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