Geant4 Cross Reference |
1 // 2 // ******************************************************************** 3 // * License and Disclaimer * 4 // * * 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. * 10 // * * 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitation of liability. * 17 // * * 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************************************** 25 // 26 // G4ParticlePropertyData 27 // 28 // Class description: 29 // 30 // This class contains properties of a particle which are a subset 31 // of properties in G4ParticleDefinition. 32 // This class is used only for G4ParticlePropertyTable. 33 34 // Author: H.Kurashige, 9 June 2003 35 // -------------------------------------------------------------------- 36 #ifndef G4ParticlePropertyData_hh 37 #define G4ParticlePropertyData_hh 1 38 39 #include "G4ios.hh" 40 #include "globals.hh" 41 42 class G4ParticlePropertyTable; 43 44 class G4ParticlePropertyData 45 { 46 friend class G4ParticlePropertyTable; 47 48 public: 49 // The particle name should be assigned 50 // The name cannot be changed except by assignment operator 51 G4ParticlePropertyData(const G4String& particleName = ""); 52 53 G4ParticlePropertyData(const G4ParticlePropertyData& right); 54 55 virtual ~G4ParticlePropertyData() = default; 56 57 G4ParticlePropertyData& operator=(const G4ParticlePropertyData& right); 58 59 G4bool operator==(const G4ParticlePropertyData& right) const; 60 G4bool operator!=(const G4ParticlePropertyData& right) const; 61 62 // With the following accessors, one can get values 63 // for members which cannot be changed 64 65 const G4String& GetParticleName() const { return theParticleName; } 66 67 G4double GetPDGMass() const { return thePDGMass; } 68 G4double GetPDGWidth() const { return thePDGWidth; } 69 G4double GetPDGCharge() const { return thePDGCharge; } 70 71 G4int GetPDGiSpin() const { return thePDGiSpin; } 72 G4int GetPDGiParity() const { return thePDGiParity; } 73 G4int GetPDGiConjugation() const { return thePDGiConjugation; } 74 G4int GetPDGiIsospin() const { return thePDGiIsospin; } 75 G4int GetPDGiIsospin3() const { return thePDGiIsospin3; } 76 G4int GetPDGiGParity() const { return thePDGiGParity; } 77 78 G4double GetPDGMagneticMoment() const { return thePDGMagneticMoment; } 79 80 G4int GetLeptonNumber() const { return theLeptonNumber; } 81 G4int GetBaryonNumber() const { return theBaryonNumber; } 82 83 G4int GetPDGEncoding() const { return thePDGEncoding; } 84 G4int GetAntiPDGEncoding() const { return theAntiPDGEncoding; } 85 86 // Return the number of quark with flavor contained in this particle. 87 // The value of flavor is assigned as follows: 88 // 1:d, 2:u, 3:s, 4:c, 5:b, 6:t 89 inline G4int GetQuarkContent(G4int flavor) const; 90 inline G4int GetAntiQuarkContent(G4int flavor) const; 91 92 G4double GetPDGLifeTime() const { return thePDGLifeTime; } 93 94 // Modifiers 95 96 inline void SetPDGMass(G4double newMass); 97 inline void SetPDGWidth(G4double newWidth); 98 inline void SetPDGCharge(G4double newCharge); 99 100 inline void SetPDGiSpin(G4int newSpin); 101 inline void SetPDGiParity(G4int newParity); 102 inline void SetPDGiConjugation(G4int newConjugation); 103 inline void SetPDGiIsospin(G4int newIsospin); 104 inline void SetPDGiIsospin3(G4int newIsospin3); 105 inline void SetPDGiGParity(G4int newGParity); 106 107 inline void SetPDGMagneticMoment(G4double magneticMoment); 108 109 inline void SetLeptonNumber(G4int newLeptonNumber); 110 inline void SetBaryonNumber(G4int newBaryonNumber); 111 112 inline void SetPDGEncoding(G4int newEncoding); 113 inline void SetAntiPDGEncoding(G4int newAntiEncoding); 114 115 inline void SetQuarkContent(G4int flavor, G4int newContent); 116 inline void SetAntiQuarkContent(G4int flavor, G4int newContent); 117 inline void SetPDGLifeTime(G4double newLifeTime); 118 119 // Prints information of data members 120 void Print() const; 121 122 // Control flag for output message 123 // 0: Silent 124 // 1: Warning message 125 // 2: More 126 inline void SetVerboseLevel(G4int value); 127 inline G4int GetVerboseLevel() const; 128 129 private: 130 // The name of the particle. 131 G4String theParticleName = ""; 132 133 // The mass of the particle, in units of equivalent energy. 134 G4double thePDGMass = 0.0; 135 136 // The decay width of the particle, usually the width of a 137 // Breit-Wigner function, assuming that you are near the 138 // mass center anyway (in units of equivalent energy). 139 G4double thePDGWidth = 0.0; 140 141 // The charge of the particle (in units of Coulomb). 142 G4double thePDGCharge = 0.0; 143 144 // ---- following members are quantum number 145 // i.e. discrete numbers can be allowed 146 // So, you can define only by using integer in constructor 147 148 // The total spin of the particle, also often denoted as 149 // capital J, in units of 1/2. 150 G4int thePDGiSpin = 0; 151 152 // The parity quantum number, in units of 1. If the parity 153 // is not defined for this particle, we will set this to 0. 154 G4int thePDGiParity = 0; 155 156 // This charge conjugation quantum number in units of 1. 157 G4int thePDGiConjugation = 0; 158 159 // The value of the G-parity quantum number. 160 G4int thePDGiGParity = 0; 161 162 // The isospin and its 3rd-component in units of 1/2. 163 G4int thePDGiIsospin = 0; 164 G4int thePDGiIsospin3 = 0; 165 166 // The magnetic moment. 167 G4double thePDGMagneticMoment = 0.0; 168 169 // The lepton quantum number. 170 G4int theLeptonNumber = 0; 171 172 // The baryon quantum number. 173 G4int theBaryonNumber = 0; 174 175 // The Particle Data Group integer identifier of this particle 176 G4int thePDGEncoding = 0; 177 178 // The Particle Data Group integer identifier of the anti-particle 179 G4int theAntiPDGEncoding = 0; 180 181 // The Particle Life Time 182 G4double thePDGLifeTime = -1.0; 183 184 enum 185 { 186 NumberOfQuarkFlavor = 6 187 }; 188 189 // The number of quark (minus Sign means anti-quark) contents 190 G4int theQuarkContent[NumberOfQuarkFlavor]; 191 G4int theAntiQuarkContent[NumberOfQuarkFlavor]; 192 193 private: 194 G4bool fPDGMassModified = false; 195 G4bool fPDGWidthModified = false; 196 G4bool fPDGChargeModified = false; 197 G4bool fPDGiSpinModified = false; 198 G4bool fPDGiParityModified = false; 199 G4bool fPDGiConjugationModified = false; 200 G4bool fPDGiGParityModified = false; 201 G4bool fPDGiIsospinModified = false; 202 G4bool fPDGiIsospin3Modified = false; 203 G4bool fPDGIsospinModified = false; 204 G4bool fPDGIsospin3Modified = false; 205 G4bool fPDGMagneticMomentModified = false; 206 G4bool fLeptonNumberModified = false; 207 G4bool fBaryonNumberModified = false; 208 G4bool fPDGEncodingModified = false; 209 G4bool fAntiPDGEncodingModified = false; 210 G4bool fQuarkContentModified = false; 211 G4bool fAntiQuarkContentModified = false; 212 G4bool fPDGLifeTimeModified = false; 213 214 G4int verboseLevel = 1; 215 }; 216 217 #include "G4ParticlePropertyData.icc" 218 219 #endif 220