00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #include "G4ios.hh"
00037 #include "globals.hh"
00038 #include "G4PhysicalConstants.hh"
00039 #include "G4SystemOfUnits.hh"
00040 #include "G4ParticlePropertyData.hh"
00041
00042
00044 G4ParticlePropertyData::~G4ParticlePropertyData()
00045 {
00046 }
00047
00049 G4ParticlePropertyData::G4ParticlePropertyData(const G4String& particleName):
00050 theParticleName(particleName),
00051 thePDGMass(0.0),
00052 thePDGWidth(0.0),
00053 thePDGCharge(0.0),
00054 thePDGiSpin(0),
00055 thePDGiParity(0),
00056 thePDGiConjugation(0),
00057 thePDGiGParity(0),
00058 thePDGiIsospin(0),
00059 thePDGiIsospin3(0),
00060 thePDGMagneticMoment(0.0),
00061 theLeptonNumber(0),
00062 theBaryonNumber(0),
00063 thePDGEncoding(0),
00064 theAntiPDGEncoding(0),
00065 thePDGLifeTime(-1.0),
00066 fPDGMassModified(false),
00067 fPDGWidthModified(false),
00068 fPDGChargeModified(false),
00069 fPDGiSpinModified(false),
00070 fPDGiParityModified(false),
00071 fPDGiConjugationModified(false),
00072 fPDGiGParityModified(false),
00073 fPDGiIsospinModified(false),
00074 fPDGiIsospin3Modified(false),
00075 fPDGIsospinModified(false),
00076 fPDGIsospin3Modified(false),
00077 fPDGMagneticMomentModified(false),
00078 fLeptonNumberModified(false),
00079 fBaryonNumberModified(false),
00080 fPDGEncodingModified(false),
00081 fAntiPDGEncodingModified(false),
00082 fQuarkContentModified(false),
00083 fAntiQuarkContentModified(false),
00084 fPDGLifeTimeModified(false),
00085 verboseLevel(1)
00086 {
00087 for (size_t flv=0; flv<NumberOfQuarkFlavor; ++flv) {
00088 theQuarkContent[flv] =0;
00089 theAntiQuarkContent[flv]=0;
00090 }
00091 }
00092
00093
00095 G4ParticlePropertyData::G4ParticlePropertyData(const G4ParticlePropertyData &right):
00096 fPDGMassModified(false),
00097 fPDGWidthModified(false),
00098 fPDGChargeModified(false),
00099 fPDGiSpinModified(false),
00100 fPDGiParityModified(false),
00101 fPDGiConjugationModified(false),
00102 fPDGiGParityModified(false),
00103 fPDGiIsospinModified(false),
00104 fPDGiIsospin3Modified(false),
00105 fPDGIsospinModified(false),
00106 fPDGIsospin3Modified(false),
00107 fPDGMagneticMomentModified(false),
00108 fLeptonNumberModified(false),
00109 fBaryonNumberModified(false),
00110 fPDGEncodingModified(false),
00111 fAntiPDGEncodingModified(false),
00112 fQuarkContentModified(false),
00113 fAntiQuarkContentModified(false),
00114 fPDGLifeTimeModified(false)
00115 {
00116 verboseLevel = right.verboseLevel;
00117 theParticleName = right.theParticleName;
00118 thePDGMass = right.thePDGMass;
00119 thePDGWidth = right. thePDGWidth;
00120 thePDGCharge = right.thePDGCharge;
00121 thePDGiSpin = right.thePDGiSpin;
00122 thePDGiParity = right.thePDGiParity;
00123 thePDGiConjugation = right.thePDGiConjugation;
00124 thePDGiGParity = right.thePDGiGParity;
00125 thePDGiIsospin = right.thePDGiIsospin;
00126 thePDGiIsospin3 = right.thePDGiIsospin3;
00127 thePDGMagneticMoment = right.thePDGMagneticMoment;
00128 theLeptonNumber = right.theLeptonNumber;
00129 theBaryonNumber = right.theBaryonNumber;
00130 thePDGEncoding = right.thePDGEncoding;
00131 theAntiPDGEncoding = right.theAntiPDGEncoding;
00132 for (size_t flv=0; flv<NumberOfQuarkFlavor; ++flv) {
00133 theQuarkContent[flv] = right.theQuarkContent[flv];
00134 theAntiQuarkContent[flv]= right.theAntiQuarkContent[flv];
00135 }
00136 thePDGLifeTime = right.thePDGLifeTime;
00137 }
00138
00140 G4ParticlePropertyData & G4ParticlePropertyData::operator=(const G4ParticlePropertyData &right)
00141 {
00142 if (this != &right) {
00143 verboseLevel = right.verboseLevel;
00144 theParticleName = right.theParticleName;
00145 thePDGMass = right.thePDGMass;
00146 thePDGWidth = right. thePDGWidth;
00147 thePDGCharge = right.thePDGCharge;
00148 thePDGiSpin = right.thePDGiSpin;
00149 thePDGiParity = right.thePDGiParity;
00150 thePDGiConjugation = right.thePDGiConjugation;
00151 thePDGiGParity = right.thePDGiGParity;
00152 thePDGiIsospin = right.thePDGiIsospin;
00153 thePDGiIsospin3 = right.thePDGiIsospin3;
00154 thePDGMagneticMoment = right.thePDGMagneticMoment;
00155 theLeptonNumber = right.theLeptonNumber;
00156 theBaryonNumber = right.theBaryonNumber;
00157 thePDGEncoding = right.thePDGEncoding;
00158 theAntiPDGEncoding = right.theAntiPDGEncoding;
00159 for (size_t flv=0; flv<NumberOfQuarkFlavor; ++flv) {
00160 theQuarkContent[flv] = right.theQuarkContent[flv];
00161 theAntiQuarkContent[flv]= right.theAntiQuarkContent[flv];
00162 }
00163 thePDGLifeTime = right.thePDGLifeTime;
00164 fPDGMassModified = true;
00165 fPDGWidthModified = true;
00166 fPDGChargeModified = true;
00167 fPDGiSpinModified = true;
00168 fPDGiParityModified = true;
00169 fPDGiConjugationModified = true;
00170 fPDGiGParityModified = true;
00171 fPDGiIsospinModified = true;
00172 fPDGiIsospin3Modified = true;
00173 fPDGIsospinModified = true;
00174 fPDGIsospin3Modified = true;
00175 fPDGMagneticMomentModified = true;
00176 fLeptonNumberModified = true;
00177 fBaryonNumberModified = true;
00178 fPDGEncodingModified = true;
00179 fAntiPDGEncodingModified = true;
00180 fQuarkContentModified = true;
00181 fAntiQuarkContentModified = true;
00182 fPDGLifeTimeModified = true;
00183 }
00184 return *this;
00185 }
00186
00188 G4int G4ParticlePropertyData::operator==(const G4ParticlePropertyData &right) const
00189 {
00190 return (this == &right);
00191 }
00192
00194 G4int G4ParticlePropertyData::operator!=(const G4ParticlePropertyData &right) const
00195 {
00196 return (this != &right);
00197 }
00198
00200 void G4ParticlePropertyData::Print() const
00201 {
00202 #ifdef G4VERBOSE
00203 G4cout << " Particle Name : " << theParticleName << G4endl;
00204 G4cout << " PDG particle code : " << thePDGEncoding;
00205 G4cout << " [PDG anti-particle code: " << this->GetAntiPDGEncoding() << "]"<< G4endl;
00206 G4cout << " Mass [GeV/c2] : " << thePDGMass/GeV ;
00207 G4cout << " Width : " << thePDGWidth/GeV << G4endl;
00208 G4cout << " Lifetime [nsec] : " << thePDGLifeTime/ns << G4endl;
00209 G4cout << " Charge [e]: " << thePDGCharge/eplus << G4endl;
00210 G4cout << " Spin : " << thePDGiSpin << "/2" << G4endl;
00211 G4cout << " Parity : " << thePDGiParity << G4endl;
00212 G4cout << " Charge conjugation : " << thePDGiConjugation << G4endl;
00213 G4cout << " Isospin : (I,Iz): (" << thePDGiIsospin <<"/2";
00214 G4cout << " , " << thePDGiIsospin3 << "/2 ) " << G4endl;
00215 G4cout << " GParity : " << thePDGiGParity << G4endl;
00216 G4cout << " MagneticMoment [MeV/T]: ";
00217 if (thePDGMagneticMoment != 0.0) {
00218 G4cout << thePDGMagneticMoment/MeV*tesla << G4endl;
00219 }else {
00220 G4cout << "not defined " << G4endl;
00221 }
00222 G4cout << " Lepton number : " << theLeptonNumber;
00223 G4cout << " Baryon number : " << theBaryonNumber << G4endl;
00224 G4cout << " Quark contents (d,u,s,c,b,t) : " << theQuarkContent[0];
00225 G4cout << ", " << theQuarkContent[1];
00226 G4cout << ", " << theQuarkContent[2];
00227 G4cout << ", " << theQuarkContent[3];
00228 G4cout << ", " << theQuarkContent[4];
00229 G4cout << ", " << theQuarkContent[5] << G4endl;
00230 G4cout << " AntiQuark contents : " << theAntiQuarkContent[0];
00231 G4cout << ", " << theAntiQuarkContent[1];
00232 G4cout << ", " << theAntiQuarkContent[2];
00233 G4cout << ", " << theAntiQuarkContent[3];
00234 G4cout << ", " << theAntiQuarkContent[4];
00235 G4cout << ", " << theAntiQuarkContent[5] << G4endl;
00236 #endif
00237 }
00238
00239
00240
00241
00242
00243
00244
00245
00246