[904] | 1 | <!-- ******************************************************** --> |
---|
| 2 | <!-- Docbook Version: For Toolkit Developers Guide --> |
---|
| 3 | <!-- ******************************************************** --> |
---|
| 4 | |
---|
| 5 | <!-- ******************* Section (Level#1) ****************** --> |
---|
| 6 | <sect1 id="sect.ExtdFuncParticles"> |
---|
| 7 | <title> |
---|
| 8 | Particles |
---|
| 9 | </title> |
---|
| 10 | |
---|
| 11 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 12 | <sect2 id="sect.ExtdFuncParticles.Properties"> |
---|
| 13 | <title> |
---|
| 14 | Properties of particles |
---|
| 15 | </title> |
---|
| 16 | |
---|
| 17 | <para> |
---|
| 18 | The <emphasis>G4ParticleDefinition</emphasis> class has |
---|
| 19 | properties to characterize individual particles, |
---|
| 20 | such as name, mass, charge, spin, and so on. |
---|
| 21 | Properties of particles are set during initialization of each particle. |
---|
| 22 | Default values of particle properties are described in each particles class. |
---|
| 23 | In addition, properties of heavy nuclei can be given by external files. |
---|
| 24 | Basicaly, these properties can not be changed after initialization phase except for |
---|
| 25 | ones related its decay; life time, branching ratio of each decay mode and |
---|
| 26 | the ``stable'' flag. However, Geant4 proivides a method to override these properties |
---|
| 27 | by using external files. |
---|
| 28 | </para> |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | <!-- ******* Bridgehead ******* --> |
---|
| 32 | <bridgehead renderas='sect4'> |
---|
| 33 | Properties of nuclei |
---|
| 34 | </bridgehead> |
---|
| 35 | |
---|
| 36 | <para> |
---|
| 37 | Individual classes are provided for light nuclei (i.e. deuteron, triton, He3, and He4) |
---|
| 38 | with default values of their properties. |
---|
| 39 | Other nuclei are dynamically created by requests from processes (and users). |
---|
| 40 | <emphasis>G4IonTable</emphasis> class handles creation of such ions. |
---|
| 41 | Default properties of nuclei are determined with help of <emphasis>G4NuclearProperties</emphasis>. |
---|
| 42 | </para> |
---|
| 43 | <para> |
---|
| 44 | Users can register a <emphasis>G4IsotopeTable</emphasis> to the |
---|
| 45 | <emphasis>G4IonTable</emphasis>. <emphasis>G4IsotopeTable</emphasis> |
---|
| 46 | describes properties of ions which are used to create ions. |
---|
| 47 | You can get exited energy, decay modes, and life time for relatively long life nuclei |
---|
| 48 | by using <emphasis>G4RIsotopeTable</emphasis> and data files |
---|
| 49 | (G4RADIOACTIVEDATA should be set to the directory where data files exist). |
---|
| 50 | <emphasis>G4IsotopeMagneticMomentTable</emphasis> provides a table of |
---|
| 51 | magnetic moment of nuclei with the data file of |
---|
| 52 | <emphasis>G4IsotopeMagneticMoment.table</emphasis> (The file name should be set to G4IONMAGNETICMOMENT ) |
---|
| 53 | </para> |
---|
| 54 | |
---|
| 55 | <!-- ******* Bridgehead ******* --> |
---|
| 56 | <bridgehead renderas='sect4'> |
---|
| 57 | Changing particle properties |
---|
| 58 | </bridgehead> |
---|
| 59 | |
---|
| 60 | <para> |
---|
| 61 | Only in ``PreInit'' phase, properties can be modified with help of |
---|
| 62 | <emphasis> G4ParticlePropertyTable</emphasis> class. |
---|
| 63 | Particle properties can be overridden with the method |
---|
| 64 | <informalexample><programlisting> |
---|
[921] | 65 | G4bool SetParticleProperty(const G4ParticlePropertyData& newProperty) |
---|
[904] | 66 | </programlisting></informalexample> |
---|
| 67 | by setting new values in <emphasis> G4ParticlePropertyData </emphasis>. |
---|
| 68 | In addition, the current values of particles properties can be extracted |
---|
| 69 | into text files by using <emphasis> G4TextPPReporter </emphasis>. |
---|
| 70 | On the other hand, <emphasis> G4TextPPRetriever </emphasis> can change particle |
---|
| 71 | properties according to text files. |
---|
| 72 | </para> |
---|
| 73 | |
---|
| 74 | </sect2> |
---|
| 75 | |
---|
| 76 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 77 | <sect2 id="sect.ExtdFuncParticles.AddNewPar"> |
---|
| 78 | <title> |
---|
| 79 | Adding New Particles |
---|
| 80 | </title> |
---|
| 81 | |
---|
| 82 | <para> |
---|
| 83 | You can add a new particle by creating a new class for it. |
---|
| 84 | The new class should be derived from <emphasis>G4ParticleDefinition</emphasis>. |
---|
| 85 | You can find an example under examples/extended/exoticphysics/monopole. |
---|
| 86 | A new class for the monople is defined as follows; |
---|
| 87 | <informalexample><programlisting> |
---|
| 88 | class G4Monopole : public G4ParticleDefinition |
---|
| 89 | { |
---|
| 90 | private: |
---|
| 91 | static G4Monopole* theMonopole; |
---|
| 92 | |
---|
| 93 | G4Monopole( |
---|
[921] | 94 | const G4String& aName, G4double mass, |
---|
[904] | 95 | G4double width, G4double charge, |
---|
| 96 | G4int iSpin, G4int iParity, |
---|
| 97 | G4int iConjugation, G4int iIsospin, |
---|
| 98 | G4int iIsospin3, G4int gParity, |
---|
[921] | 99 | const G4String& pType, G4int lepton, |
---|
[904] | 100 | G4int baryon, G4int encoding, |
---|
| 101 | G4bool stable, G4double lifetime, |
---|
| 102 | G4DecayTable *decaytable ); |
---|
| 103 | |
---|
| 104 | public: |
---|
| 105 | virtual ~G4Monopole(); |
---|
| 106 | static G4Monopole* MonopoleDefinition(); |
---|
| 107 | static G4Monopole* Monopole(); |
---|
| 108 | } |
---|
| 109 | </programlisting></informalexample> |
---|
| 110 | Static methods above need to be defined and implemented so that |
---|
| 111 | this new particle instance will be created |
---|
| 112 | in ConstructParticls method of your physics list. |
---|
| 113 | You can add new properties if necessary (G4Monopole has a property for magnetic charge) |
---|
| 114 | Values of properties need to be given in the static method as other particle classes. |
---|
| 115 | <informalexample><programlisting> |
---|
| 116 | G4Monopole* G4Monopole::MonopoleDefinition(G4double mass, G4int mCharge, G4int eCharge) |
---|
| 117 | { |
---|
| 118 | if(!theMonopole) { |
---|
| 119 | theMonopole = new G4Monopole( |
---|
| 120 | "monopole", mass, 0.0*MeV, 0, |
---|
| 121 | 0, 0, 0, |
---|
| 122 | 0, 0, 0, |
---|
| 123 | "boson", 0, 0, 0, |
---|
| 124 | true, -1.0, 0); |
---|
| 125 | } |
---|
| 126 | return theMonopole; |
---|
| 127 | } |
---|
| 128 | </programlisting></informalexample> |
---|
| 129 | </para> |
---|
| 130 | |
---|
| 131 | <!-- ******* Bridgehead ******* --> |
---|
| 132 | <bridgehead role="revisionHistory" renderas="sect4"> |
---|
| 133 | [Status of this chapter] |
---|
| 134 | </bridgehead> |
---|
| 135 | <para> |
---|
| 136 | <simplelist type="var"> |
---|
| 137 | <member> |
---|
| 138 | Nov. 2008 cretad by H. Kurashige |
---|
| 139 | </member> |
---|
| 140 | </simplelist> |
---|
| 141 | </para> |
---|
| 142 | |
---|
| 143 | </sect2> |
---|
| 144 | </sect1> |
---|
| 145 | |
---|