Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // G4ParticleDefinition << 27 // 26 // 28 // Class description: << 27 // $Id: G4ParticleDefinition.hh 79342 2014-02-24 11:42:42Z gcosmo $ 29 // 28 // 30 // This class contains all the static data of << 29 // 31 // It uses the process manager in order to col << 30 // ------------------------------------------------------------ 32 // this kind of particle can undertake. << 31 // GEANT 4 class header file 33 << 32 // 34 // Authors: G.Cosmo, 2 December 1995 - Design, << 33 // History: first implementation, based on object model of 35 // M.Asai, 29 January 1996 - First im << 34 // 2nd December 1995, G.Cosmo 36 // History: << 35 // ---------------- G4ParticleDefinition ---------------- 37 // - 1996-2003, H.Kurashige - Revisions << 36 // first implementation by Makoto Asai - 29 January 1996 38 // - 11.03.2003, H.Kurashige - Restructuring f << 37 // revised - G.Cosmo - 29 February 1996 39 // - 25.01.2013, G.Cosmo, A.Dotti - Introduced << 38 // revised - H.Kurashige - 19 April 1996 40 // - 15.06.2017, K.L.Genser - Added support fo << 39 // revised - H.Kurashige - 4 July 1996 41 // ------------------------------------------- << 40 // added GetEnergyCuts() and GetLengthCuts() - G.Cosmo - 11 July 1996 42 #ifndef G4ParticleDefinition_hh << 41 // added Set/GetVerboseLevel() - H.Kurashige - 11 November 1997 43 #define G4ParticleDefinition_hh 1 << 42 // added SetCuts() and ResetCuts - H.Kurashige - 15 November 1996 >> 43 // change SetProcessManager as public - H.Kurashige - 06 June 1998 >> 44 // added GetEnergyThreshold - H.Kurashige - 08 June 1998 >> 45 // added ShortLived flag and ApplyCuts flag - H.Kurashige - 27 June 1998 >> 46 // fixed some improper codings - H.Kurashige - 08 April 1999 >> 47 // added sub-type - H.Kurashige - 15 February 2000 >> 48 // added RestoreCuts - H.Kurashige - 09 March 2001 >> 49 // restructuring for Cuts per Region - H.Kurashige - 11 March 2003 >> 50 // added MagneticMoment - H.Kurashige - March 2007 >> 51 // modified for thread-safety for MT - G.Cosmo, A.Dotti - January 2013 >> 52 // ------------------------------------------------------------ 44 53 45 #include "G4PDefManager.hh" << 54 #ifndef G4ParticleDefinition_h 46 #include "G4ios.hh" << 55 #define G4ParticleDefinition_h 1 47 #include "globals.hh" << 48 56 >> 57 #include <vector> 49 #include <CLHEP/Units/PhysicalConstants.h> 58 #include <CLHEP/Units/PhysicalConstants.h> 50 59 51 #include <vector> << 60 #include "globals.hh" >> 61 #include "G4ios.hh" >> 62 #include "G4PDefSplitter.hh" 52 63 53 class G4ProcessManager; 64 class G4ProcessManager; 54 class G4DecayTable; 65 class G4DecayTable; 55 class G4ParticleTable; 66 class G4ParticleTable; 56 class G4ParticlePropertyTable; 67 class G4ParticlePropertyTable; 57 class G4VTrackingManager; << 58 << 59 using G4ParticleDefinitionSubInstanceManager = << 60 68 61 class G4ParticleDefinition << 69 class G4PDefData 62 { 70 { 63 friend class G4ParticlePropertyTable; << 71 // Encapsulates the fields of the class G4ParticleDefinition >> 72 // that may not be read-only. 64 73 65 public: 74 public: 66 // Only one type of constructor can be use << 67 // If you want to create new particle, you << 68 // at construction. Most of members seen a << 69 // (except last 3 arguments concerning wit << 70 // and can not be changed later. (No "SET" << 71 // Each type of particle must be construct << 72 // of special class derived from G4Particl << 73 // See G4ParticleTypes for detail << 74 // clang-format off << 75 G4ParticleDefinition(const G4String& aName << 76 G4int iSpin, G4int iP << 77 G4int iIsospinZ, G4in << 78 G4int baryon, G4int e << 79 G4DecayTable* decayta << 80 const G4String& subTy << 81 G4double magneticMome << 82 // clang-format on << 83 << 84 virtual ~G4ParticleDefinition(); << 85 << 86 // Can not use "copy constructor", equalit << 87 G4ParticleDefinition(const G4ParticleDefin << 88 G4ParticleDefinition& operator=(const G4Pa << 89 << 90 G4bool operator==(const G4ParticleDefiniti << 91 G4bool operator!=(const G4ParticleDefiniti << 92 << 93 // With the following Getxxxx methods, one << 94 // for members which can not be changed << 95 << 96 const G4String& GetParticleName() const { << 97 << 98 G4double GetPDGMass() const { return thePD << 99 G4double GetPDGWidth() const { return theP << 100 G4double GetPDGCharge() const { return the << 101 << 102 G4double GetPDGSpin() const { return thePD << 103 G4int GetPDGiSpin() const { return thePDGi << 104 G4int GetPDGiParity() const { return thePD << 105 G4int GetPDGiConjugation() const { return << 106 G4double GetPDGIsospin() const { return th << 107 G4double GetPDGIsospin3() const { return t << 108 G4int GetPDGiIsospin() const { return theP << 109 G4int GetPDGiIsospin3() const { return the << 110 G4int GetPDGiGParity() const { return theP << 111 << 112 G4double GetPDGMagneticMoment() const { re << 113 inline void SetPDGMagneticMoment(G4double << 114 << 115 // Gives the anomaly of magnetic moment fo << 116 G4double CalculateAnomaly() const; << 117 << 118 const G4String& GetParticleType() const { << 119 const G4String& GetParticleSubType() const << 120 G4int GetLeptonNumber() const { return the << 121 G4int GetBaryonNumber() const { return the << 122 << 123 G4int GetPDGEncoding() const { return theP << 124 G4int GetAntiPDGEncoding() const { return << 125 inline void SetAntiPDGEncoding(G4int aEnco << 126 << 127 // Returns the number of quark with flavor << 128 // The value of flavor is assigned as foll << 129 // 1:d, 2:u, 3:s, 4:c, 5:b, 6:t << 130 inline G4int GetQuarkContent(G4int flavor) << 131 inline G4int GetAntiQuarkContent(G4int fla << 132 << 133 G4bool IsShortLived() const { return fShor << 134 << 135 inline G4bool GetPDGStable() const; << 136 void SetPDGStable(const G4bool aFlag) { th << 137 << 138 inline G4double GetPDGLifeTime() const; << 139 void SetPDGLifeTime(G4double aLifeTime) { << 140 << 141 // Get life time of a generic ion through << 142 inline G4double GetIonLifeTime() const; << 143 << 144 // Set/Get Decay Table << 145 // !! Decay Table can be modified !! << 146 inline G4DecayTable* GetDecayTable() const << 147 inline void SetDecayTable(G4DecayTable* aD << 148 << 149 // Set/Get Process Manager << 150 // !! Process Manager can be modified !! << 151 G4ProcessManager* GetProcessManager() cons << 152 void SetProcessManager(G4ProcessManager* a << 153 << 154 // Set/Get Tracking Manager; nullptr means << 155 // !! Tracking Manager can be modified ! << 156 G4VTrackingManager* GetTrackingManager() c << 157 void SetTrackingManager(G4VTrackingManager << 158 << 159 // Get pointer to the particle table << 160 inline G4ParticleTable* GetParticleTable() << 161 << 162 // Get AtomicNumber and AtomicMass << 163 // These properties are defined for nucleu << 164 inline G4int GetAtomicNumber() const; << 165 inline G4int GetAtomicMass() const; << 166 << 167 // Prints information of data members. << 168 void DumpTable() const; << 169 << 170 // Control flag for output message << 171 // 0: Silent << 172 // 1: Warning message << 173 // 2: More << 174 inline void SetVerboseLevel(G4int value); << 175 inline G4int GetVerboseLevel() const; << 176 << 177 void SetApplyCutsFlag(G4bool); << 178 inline G4bool GetApplyCutsFlag() const; << 179 << 180 // True only if the particle is G4Ions << 181 // (it means that theProcessManager is sam << 182 inline G4bool IsGeneralIon() const; << 183 << 184 // True only if the particle is a G4Muonic << 185 // (it means that theProcessManager is sam << 186 inline G4bool IsMuonicAtom() const; << 187 << 188 // Returns the process manager master poin << 189 inline G4ProcessManager* GetMasterProcessM << 190 << 191 // Sets the shadow master pointer (not to << 192 inline void SetMasterProcessManager(G4Proc << 193 << 194 // Returns the instance ID << 195 inline G4int GetInstanceID() const; << 196 << 197 // Returns the private data instance manag << 198 static const G4PDefManager& GetSubInstance << 199 << 200 // Clear memory allocated by sub-instance << 201 static void Clean(); << 202 << 203 void SetParticleDefinitionID(G4int id = -1 << 204 inline G4int GetParticleDefinitionID() con << 205 << 206 // The first two methods return "false" an << 207 // if the particle is not an hypernucleus; << 208 // "true" and the number of Lambdas bound << 209 // Similarly, the last two methods return << 210 // respectively, if the particle is not an << 211 // else, they return "true" and the number << 212 // bound in the anti-nucleus. << 213 // Notice that, for the time being, we are << 214 // (anti-)Lambda is the only type of (anti << 215 // in all (anti-)hypernuclei. << 216 inline G4bool IsHypernucleus() const; << 217 inline G4int GetNumberOfLambdasInHypernucl << 218 inline G4bool IsAntiHypernucleus() const; << 219 inline G4int GetNumberOfAntiLambdasInAntiH << 220 75 221 protected: << 76 void initialize() 222 // Cannot be used << 77 { 223 G4ParticleDefinition(); << 78 theProcessManager = 0; >> 79 } 224 80 225 // Calculates quark and anti-quark content << 81 G4ProcessManager *theProcessManager; 226 // return value is the PDG encoding for th << 82 }; 227 // It means error if the return value is d << 228 // this->thePDGEncoding. << 229 G4int FillQuarkContents(); << 230 83 231 inline void SetParticleSubType(const G4Str << 84 // The type G4PDefManager is introduced to encapsulate the methods used by >> 85 // both the master thread and worker threads to allocate memory space for >> 86 // the fields encapsulated by the class G4PDefData. When each thread >> 87 // changes the value for these fields, it refers to them using a macro >> 88 // definition defined below. For every G4ParticleDefinition instance, >> 89 // there is a corresponding G4PDefData instance. All G4PDefData instances >> 90 // are organized by the class G4PDefManager as an array. >> 91 // The field "int g4particleDefinitionInstanceID" is added to the class G4ParticleDefinition. >> 92 // The value of this field in each G4ParticleDefinition instance is the >> 93 // subscript of the corresponding G4PDefData instance. >> 94 // In order to use the class G4PDefManager, we add a static member in the class >> 95 // G4ParticleDefinition as follows: "static G4PDefManager subInstanceManager". >> 96 // Both the master thread and worker threads change the length of the array >> 97 // for G4PDefData instances mutually along with G4ParticleDefinition >> 98 // instances are created. For each worker thread, it dynamically creates ions. >> 99 // Consider any thread A, if there is any other thread which creates an ion. >> 100 // This ion is shared by the thread A. So the thread A leaves an empty space >> 101 // in the array of G4PDefData instances for the ion. >> 102 // >> 103 typedef G4PDefSplitter<G4PDefData> G4PDefManager; >> 104 typedef G4PDefManager G4ParticleDefinitionSubInstanceManager; 232 105 233 inline void SetAtomicNumber(G4int); << 106 // This macro changes the references to fields that are now encapsulated 234 inline void SetAtomicMass(G4int); << 107 // in the class G4PDefData. >> 108 // >> 109 #define G4MT_pmanager ((subInstanceManager.offset[g4particleDefinitionInstanceID]).theProcessManager) 235 110 236 enum << 111 class G4ParticleDefinition 237 { << 112 { 238 NumberOfQuarkFlavor = 6 << 113 // Class Description: 239 }; << 114 // >> 115 // This class containes all the static data of a particle. >> 116 // It also has uses a process manager in order to collect >> 117 // all the processes this kind of particle can undertake. >> 118 >> 119 friend class G4ParticlePropertyTable; >> 120 >> 121 public: // With Description >> 122 >> 123 // Only one type of constructor can be used for G4ParticleDefinition. >> 124 // If you want to create new particle, you must set name of the particle >> 125 // at construction. Most of members seen as arguments of the constructor >> 126 // (except last 3 arguments concerning with decay ) are "constant" >> 127 // and can not be changed later. (No "SET" methods are available) >> 128 // Each type of particle must be constructed as a unique object >> 129 // of special class derived from G4ParticleDefinition. >> 130 // see G4ParticleTypes for detail >> 131 >> 132 G4ParticleDefinition(const G4String& aName, >> 133 G4double mass, >> 134 G4double width, >> 135 G4double charge, >> 136 G4int iSpin, >> 137 G4int iParity, >> 138 G4int iConjugation, >> 139 G4int iIsospin, >> 140 G4int iIsospinZ, >> 141 G4int gParity, >> 142 const G4String& pType, >> 143 G4int lepton, >> 144 G4int baryon, >> 145 G4int encoding, >> 146 G4bool stable, >> 147 G4double lifetime, >> 148 G4DecayTable *decaytable, >> 149 G4bool shortlived = false, >> 150 const G4String& subType ="", >> 151 G4int anti_encoding =0, >> 152 G4double magneticMoment = 0.0); >> 153 >> 154 virtual ~G4ParticleDefinition(); >> 155 >> 156 // With the following Getxxxx methods, one can get values >> 157 // for members which can not be changed >> 158 >> 159 const G4String& GetParticleName() const { return theParticleName; } >> 160 >> 161 G4double GetPDGMass() const { return thePDGMass; } >> 162 G4double GetPDGWidth() const { return thePDGWidth; } >> 163 G4double GetPDGCharge() const { return thePDGCharge; } >> 164 >> 165 G4double GetPDGSpin() const { return thePDGSpin; } >> 166 G4int GetPDGiSpin() const { return thePDGiSpin; } >> 167 G4int GetPDGiParity() const { return thePDGiParity; } >> 168 G4int GetPDGiConjugation() const { return thePDGiConjugation; } >> 169 G4double GetPDGIsospin() const { return thePDGIsospin; } >> 170 G4double GetPDGIsospin3() const { return thePDGIsospin3; } >> 171 G4int GetPDGiIsospin() const { return thePDGiIsospin; } >> 172 G4int GetPDGiIsospin3() const { return thePDGiIsospin3; } >> 173 G4int GetPDGiGParity() const { return thePDGiGParity; } >> 174 >> 175 G4double GetPDGMagneticMoment() const { return thePDGMagneticMoment; } >> 176 void SetPDGMagneticMoment(G4double mageticMoment); >> 177 G4double CalculateAnomaly() const; >> 178 // Gives the anomaly of magnetic moment for spin 1/2 particles >> 179 >> 180 const G4String& GetParticleType() const { return theParticleType; } >> 181 const G4String& GetParticleSubType() const { return theParticleSubType; } >> 182 G4int GetLeptonNumber() const { return theLeptonNumber; } >> 183 G4int GetBaryonNumber() const { return theBaryonNumber; } >> 184 >> 185 G4int GetPDGEncoding() const { return thePDGEncoding; } >> 186 G4int GetAntiPDGEncoding() const { return theAntiPDGEncoding; } >> 187 void SetAntiPDGEncoding(G4int aEncoding); >> 188 >> 189 >> 190 G4int GetQuarkContent(G4int flavor) const; >> 191 G4int GetAntiQuarkContent(G4int flavor) const; >> 192 // Returns the number of quark with flavor contained in this particle. >> 193 // The value of flavor is assigned as follows >> 194 // 1:d, 2:u, 3:s, 4:c, 5:b, 6:t >> 195 >> 196 G4bool IsShortLived() const { return fShortLivedFlag; } >> 197 >> 198 G4bool GetPDGStable() const; >> 199 void SetPDGStable(const G4bool aFlag) { thePDGStable=aFlag; } >> 200 >> 201 G4double GetPDGLifeTime() const; >> 202 void SetPDGLifeTime(G4double aLifeTime) { thePDGLifeTime=aLifeTime; } >> 203 >> 204 G4double GetIonLifeTime() const; >> 205 // Get life time of a generic ion through G4NuclideTable. >> 206 >> 207 G4DecayTable* GetDecayTable() const; >> 208 void SetDecayTable(G4DecayTable* aDecayTable); >> 209 // Set/Get Decay Table >> 210 // !! Decay Table can be modified !! >> 211 >> 212 G4ProcessManager* GetProcessManager() const; >> 213 void SetProcessManager(G4ProcessManager* aProcessManager); >> 214 // Set/Get Process Manager >> 215 // !! Process Manager can be modified !! >> 216 >> 217 G4ParticleTable* GetParticleTable() const; >> 218 // Get pointer to the particle table >> 219 >> 220 G4int GetAtomicNumber() const; >> 221 G4int GetAtomicMass() const; >> 222 // Get AtomicNumber and AtomicMass >> 223 // These properties are defined for nucleus >> 224 >> 225 void DumpTable() const; >> 226 // Prints information of data members. >> 227 >> 228 void SetVerboseLevel(G4int value); >> 229 G4int GetVerboseLevel() const; >> 230 // controle flag for output message >> 231 // 0: Silent >> 232 // 1: Warning message >> 233 // 2: More >> 234 >> 235 void SetApplyCutsFlag(G4bool); >> 236 G4bool GetApplyCutsFlag() const; >> 237 >> 238 G4bool IsGeneralIon() const; >> 239 // true only if the particle is G4Ions >> 240 // (it means that theProcessManager is same as one for G4GenricIon) >> 241 >> 242 G4int operator==(const G4ParticleDefinition &right) const; >> 243 G4int operator!=(const G4ParticleDefinition &right) const; >> 244 >> 245 public : // without description >> 246 >> 247 inline G4ProcessManager* GetMasterProcessManager() const; >> 248 // Returns the process manager master pointer. >> 249 inline void SetMasterProcessManager(G4ProcessManager* aNewPM); >> 250 //Sets the shadow master pointer (not to be used by user) >> 251 >> 252 inline G4int GetInstanceID() const; >> 253 // Returns the instance ID. >> 254 >> 255 static const G4PDefManager& GetSubInstanceManager(); >> 256 // Returns the private data instance manager. >> 257 private: >> 258 // --- Shadow of master pointers. >> 259 >> 260 G4ProcessManager *theProcessManagerShadow; >> 261 // Each worker thread can access this field from the master thread >> 262 // through this pointer. 240 263 241 // the number of quark (minus Sign means << 264 G4int g4particleDefinitionInstanceID; 242 // The value of flavor is assigned as fol << 265 // This field is used as instance ID. 243 // 0:d, 1:u, 2:s, 3:c, 4:b, 5:t << 244 G4int theQuarkContent[NumberOfQuarkFlavor] << 245 G4int theAntiQuarkContent[NumberOfQuarkFla << 246 266 247 G4bool isGeneralIon = false; << 267 G4PART_DLL static G4PDefManager subInstanceManager; 248 G4bool isMuonicAtom = false; << 268 // This field helps to use the class G4PDefManager introduced above. 249 269 250 private: << 270 protected: 251 // --- Shadow of master pointers << 252 271 253 // Each worker thread can access this fiel << 272 G4int FillQuarkContents(); 254 // through this pointer. << 273 // Calculates quark and anti-quark contents 255 G4ProcessManager* theProcessManagerShadow << 274 // return value is PDG encoding for this particle. >> 275 // It means error if the return value is deffernt from >> 276 // this->thePDGEncoding. >> 277 >> 278 void SetParticleSubType(const G4String& subtype); >> 279 >> 280 void SetAtomicNumber(G4int ); >> 281 void SetAtomicMass(G4int ); >> 282 >> 283 // !!! can not use "copy constructor" nor "default constructor" !!!! >> 284 // >> 285 G4ParticleDefinition(const G4ParticleDefinition &right); >> 286 G4ParticleDefinition(); 256 287 257 // This field is used as instance ID. << 288 private: 258 G4int g4particleDefinitionInstanceID = 0; << 259 289 260 // This field helps to use the class G4PDe << 290 // !!! Assignment operation is forbidden !!! 261 G4PART_DLL static G4PDefManager subInstanc << 291 // >> 292 const G4ParticleDefinition & operator=(const G4ParticleDefinition &r); 262 293 263 // --- Following values can not be change << 294 protected: 264 // --- i.e. No Setxxxx Methods for them << 265 295 266 // The name of the particle. << 296 enum {NumberOfQuarkFlavor = 6}; 267 // Each object must have its specific name << 297 G4int theQuarkContent[NumberOfQuarkFlavor]; 268 G4String theParticleName = ""; << 298 G4int theAntiQuarkContent[NumberOfQuarkFlavor]; >> 299 // the number of quark (minus Sign means anti-quark) contents >> 300 // The value of flavor is assigned as follows >> 301 // 0:d, 1:u, 2:s, 3:c, 4:b, 5:t >> 302 >> 303 private: 269 304 270 // --- Following member values must be de << 305 // --- Following values can not be changed >> 306 // --- i.e. No Setxxxx Methods for them 271 307 272 // The mass of the particle, in units of e << 308 G4String theParticleName; 273 G4double thePDGMass = 0.0; << 309 // The name of the particle. >> 310 // Each object must have its specific name!! 274 311 275 // The decay width of the particle, usuall << 312 // --- Following member values must be defined with Units 276 // Breit-Wigner function, assuming that yo << 277 // mass center anyway. (in units of equiva << 278 G4double thePDGWidth = 0.0; << 279 313 280 // The charge of the particle.(in units of << 314 G4double thePDGMass; 281 G4double thePDGCharge = 0.0; << 315 // The mass of the particle, in units of equivalent energy. 282 316 283 // --- Following members are quantum num << 317 G4double thePDGWidth; 284 // i.e. discrete numbers can be allo << 318 // The decay width of the particle, usually the width of a 285 // So, you can define them only by u << 319 // Breit-Wigner function, assuming that you are near the >> 320 // mass center anyway. (in units of equivalent energy) 286 321 287 // The total spin of the particle, also of << 322 G4double thePDGCharge; 288 // capital J, in units of 1/2. << 323 // The charge of the particle.(in units of Coulomb) 289 G4int thePDGiSpin = 0; << 290 324 291 // The total spin of the particle, in unit << 325 // --- Following members are quantum number 292 G4double thePDGSpin = 0.0; << 326 // i.e. discrete numbers can be allowded >> 327 // So, you can defined only by using integer in constructor 293 328 294 // The parity quantum number, in units of << 329 G4int thePDGiSpin; 295 // is not defined for this particle, we wi << 330 // The total spin of the particle, also often denoted as 296 G4int thePDGiParity = 0; << 331 // capital J, in units of 1/2. >> 332 G4double thePDGSpin; >> 333 // The total spin of the particle, in units of 1. 297 334 298 // This charge conjugation quantum number << 335 G4int thePDGiParity; 299 G4int thePDGiConjugation = 0; << 336 // The parity quantum number, in units of 1. If the parity >> 337 // is not defined for this particle, we will set this to 0. 300 338 301 // The value of the G-parity quantum numbe << 339 G4int thePDGiConjugation; 302 G4int thePDGiGParity = 0; << 340 // This charge conjugation quantum number in units of 1. 303 341 304 // The isospin and its 3rd-component in un << 342 G4int thePDGiGParity; 305 G4int thePDGiIsospin = 0; << 343 // The value of the G-parity quantum number. 306 G4int thePDGiIsospin3 = 0; << 307 344 308 // The isospin quantum number in units of << 345 G4int thePDGiIsospin; 309 G4double thePDGIsospin = 0.0; << 346 G4int thePDGiIsospin3; 310 G4double thePDGIsospin3 = 0.0; << 347 // The isospin and its 3rd-component in units of 1/2. >> 348 G4double thePDGIsospin; >> 349 G4double thePDGIsospin3; >> 350 // The isospin quantum number in units of 1. >> 351 >> 352 G4double thePDGMagneticMoment; >> 353 // The magnetic moment. 311 354 312 // The magnetic moment. << 355 G4int theLeptonNumber; 313 G4double thePDGMagneticMoment = 0.0; << 356 // The lepton quantum number. 314 357 315 // The lepton quantum number. << 358 G4int theBaryonNumber; 316 G4int theLeptonNumber = 0; << 359 // The baryon quantum number. 317 360 318 // The baryon quantum number. << 361 G4String theParticleType; 319 G4int theBaryonNumber = 0; << 362 // More general textual type description of the particle. 320 363 321 // More general textual type description o << 364 G4String theParticleSubType; 322 G4String theParticleType = ""; << 365 // Textual type description of the particle >> 366 // eg. pion, lamda etc. 323 367 324 // Textual type description of the particl << 368 G4int thePDGEncoding; 325 // eg. pion, lamda etc. << 369 // The Particle Data Group integer identifier of this particle 326 G4String theParticleSubType = ""; << 370 >> 371 G4int theAntiPDGEncoding; >> 372 // The Particle Data Group integer identifier of the anti-particle 327 373 328 // The Particle Data Group integer identif << 374 // --- Following members can be changed after construction 329 G4int thePDGEncoding = 0; << 330 375 331 // The Particle Data Group integer identif << 376 G4bool fShortLivedFlag; 332 G4int theAntiPDGEncoding = 0; << 377 // Particles which have true value of this flag >> 378 // will not be tracked by TrackingManager 333 379 334 // --- Following members can be changed af << 380 G4bool thePDGStable; >> 381 // Is an indicator that this particle is stable. It must >> 382 // not decay. If the user tries to assign a kind of decay >> 383 // object to it, it will refuse to take it. 335 384 336 // Particles which have true value of this << 385 G4double thePDGLifeTime; 337 // will not be tracked by TrackingManager << 386 // Is related to the decay width of the particle. The mean 338 G4bool fShortLivedFlag = false; << 387 // life time is given in seconds. 339 388 340 // Is an indicator that this particle is s << 389 G4DecayTable *theDecayTable; 341 // not decay. If the user tries to assign << 390 // Points DecayTable 342 // object to it, it will refuse to take it << 343 G4bool thePDGStable = false; << 344 391 345 // Is related to the decay width of the pa << 392 private: 346 // life time is given in seconds. << 347 G4double thePDGLifeTime = 0.0; << 348 393 349 // Points DecayTable << 394 G4ParticleTable* theParticleTable; 350 G4DecayTable* theDecayTable = nullptr; << 351 395 352 G4ParticleTable* theParticleTable = nullpt << 396 G4int theAtomicNumber; >> 397 G4int theAtomicMass; >> 398 >> 399 G4int verboseLevel; >> 400 G4bool fApplyCutsFlag; 353 401 354 G4int theAtomicNumber = 0; << 402 protected: 355 G4int theAtomicMass = 0; << 403 G4bool isGeneralIon; 356 404 357 G4int verboseLevel = 1; << 405 public: 358 G4bool fApplyCutsFlag = false; << 406 void SetParticleDefinitionID(G4int id=-1); >> 407 G4int GetParticleDefinitionID() const; 359 }; 408 }; 360 409 361 #include "G4ParticleDefinition.icc" 410 #include "G4ParticleDefinition.icc" 362 411 363 #endif 412 #endif 364 413