G4ParticlePropertyData Class Reference

#include <G4ParticlePropertyData.hh>


Public Member Functions

 G4ParticlePropertyData (const G4String &particleName="")
 G4ParticlePropertyData (const G4ParticlePropertyData &right)
virtual ~G4ParticlePropertyData ()
G4ParticlePropertyDataoperator= (const G4ParticlePropertyData &right)
G4int operator== (const G4ParticlePropertyData &right) const
G4int operator!= (const G4ParticlePropertyData &right) const
const G4StringGetParticleName () const
G4double GetPDGMass () const
G4double GetPDGWidth () const
G4double GetPDGCharge () const
G4int GetPDGiSpin () const
G4int GetPDGiParity () const
G4int GetPDGiConjugation () const
G4int GetPDGiIsospin () const
G4int GetPDGiIsospin3 () const
G4int GetPDGiGParity () const
G4double GetPDGMagneticMoment () const
G4int GetLeptonNumber () const
G4int GetBaryonNumber () const
G4int GetPDGEncoding () const
G4int GetAntiPDGEncoding () const
G4int GetQuarkContent (G4int flavor) const
G4int GetAntiQuarkContent (G4int flavor) const
G4double GetPDGLifeTime () const
void SetPDGMass (G4double newMass)
void SetPDGWidth (G4double newWidth)
void SetPDGCharge (G4double newCharge)
void SetPDGiSpin (G4int newSpin)
void SetPDGiParity (G4int newParity)
void SetPDGiConjugation (G4int newConjugation)
void SetPDGiIsospin (G4int newIsospin)
void SetPDGiIsospin3 (G4int newIsospin3)
void SetPDGiGParity (G4int newGParity)
void SetPDGMagneticMoment (G4double mageticMoment)
void SetLeptonNumber (G4int newLeptonNumber)
void SetBaryonNumber (G4int newBaryonNumber)
void SetPDGEncoding (G4int newEncoding)
void SetAntiPDGEncoding (G4int newAntiEncoding)
void SetQuarkContent (G4int flavor, G4int newContent)
void SetAntiQuarkContent (G4int flavor, G4int newContent)
void SetPDGLifeTime (G4double newLifeTime)
void Print () const
void SetVerboseLevel (G4int value)
G4int GetVerboseLevel () const

Friends

class G4ParticlePropertyTable


Detailed Description

Definition at line 46 of file G4ParticlePropertyData.hh.


Constructor & Destructor Documentation

G4ParticlePropertyData::G4ParticlePropertyData ( const G4String particleName = ""  ) 

Definition at line 49 of file G4ParticlePropertyData.cc.

00049                                                                           :
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 }

G4ParticlePropertyData::G4ParticlePropertyData ( const G4ParticlePropertyData right  ) 

Definition at line 95 of file G4ParticlePropertyData.cc.

References theAntiPDGEncoding, theAntiQuarkContent, theBaryonNumber, theLeptonNumber, theParticleName, thePDGCharge, thePDGEncoding, thePDGiConjugation, thePDGiGParity, thePDGiIsospin, thePDGiIsospin3, thePDGiParity, thePDGiSpin, thePDGLifeTime, thePDGMagneticMoment, thePDGMass, theQuarkContent, and verboseLevel.

00095                                                                                  :
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 }
      

G4ParticlePropertyData::~G4ParticlePropertyData (  )  [virtual]

Definition at line 44 of file G4ParticlePropertyData.cc.

00045 {
00046 }


Member Function Documentation

G4int G4ParticlePropertyData::GetAntiPDGEncoding (  )  const [inline]

Definition at line 93 of file G4ParticlePropertyData.hh.

Referenced by Print().

00093 { return theAntiPDGEncoding; }

G4int G4ParticlePropertyData::GetAntiQuarkContent ( G4int  flavor  )  const [inline]

Definition at line 53 of file G4ParticlePropertyData.icc.

00054 { 
00055   if ((flavor>0) && (flavor<NumberOfQuarkFlavor)){
00056     return theAntiQuarkContent[flavor-1];
00057   }else {
00058     return 0;
00059   }  
00060 }

G4int G4ParticlePropertyData::GetBaryonNumber (  )  const [inline]

Definition at line 90 of file G4ParticlePropertyData.hh.

00090 { return theBaryonNumber; }

G4int G4ParticlePropertyData::GetLeptonNumber (  )  const [inline]

Definition at line 89 of file G4ParticlePropertyData.hh.

00089 { return theLeptonNumber; }

const G4String& G4ParticlePropertyData::GetParticleName (  )  const [inline]

Definition at line 74 of file G4ParticlePropertyData.hh.

00074 { return theParticleName; }

G4double G4ParticlePropertyData::GetPDGCharge (  )  const [inline]

Definition at line 78 of file G4ParticlePropertyData.hh.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00078 { return thePDGCharge; }

G4int G4ParticlePropertyData::GetPDGEncoding (  )  const [inline]

Definition at line 92 of file G4ParticlePropertyData.hh.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00092 { return thePDGEncoding; }

G4int G4ParticlePropertyData::GetPDGiConjugation (  )  const [inline]

Definition at line 82 of file G4ParticlePropertyData.hh.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00082 { return thePDGiConjugation; }

G4int G4ParticlePropertyData::GetPDGiGParity (  )  const [inline]

Definition at line 85 of file G4ParticlePropertyData.hh.

00085 { return thePDGiGParity; }

G4int G4ParticlePropertyData::GetPDGiIsospin (  )  const [inline]

Definition at line 83 of file G4ParticlePropertyData.hh.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00083 { return thePDGiIsospin; }

G4int G4ParticlePropertyData::GetPDGiIsospin3 (  )  const [inline]

Definition at line 84 of file G4ParticlePropertyData.hh.

00084 { return thePDGiIsospin3; }

G4int G4ParticlePropertyData::GetPDGiParity (  )  const [inline]

Definition at line 81 of file G4ParticlePropertyData.hh.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00081 { return thePDGiParity; }

G4int G4ParticlePropertyData::GetPDGiSpin (  )  const [inline]

Definition at line 80 of file G4ParticlePropertyData.hh.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00080 { return thePDGiSpin; }

G4double G4ParticlePropertyData::GetPDGLifeTime (  )  const [inline]

Definition at line 101 of file G4ParticlePropertyData.hh.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00101 { return thePDGLifeTime; }

G4double G4ParticlePropertyData::GetPDGMagneticMoment (  )  const [inline]

Definition at line 87 of file G4ParticlePropertyData.hh.

00087 { return thePDGMagneticMoment; }

G4double G4ParticlePropertyData::GetPDGMass (  )  const [inline]

Definition at line 76 of file G4ParticlePropertyData.hh.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00076 { return thePDGMass; }

G4double G4ParticlePropertyData::GetPDGWidth (  )  const [inline]

Definition at line 77 of file G4ParticlePropertyData.hh.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00077 { return thePDGWidth; } 

G4int G4ParticlePropertyData::GetQuarkContent ( G4int  flavor  )  const [inline]

Definition at line 43 of file G4ParticlePropertyData.icc.

00044 { 
00045   if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
00046     return theQuarkContent[flavor-1];
00047   }else {
00048     return 0;
00049   }  
00050 }

G4int G4ParticlePropertyData::GetVerboseLevel (  )  const [inline]

Definition at line 37 of file G4ParticlePropertyData.icc.

00038 {
00039    return verboseLevel;
00040 }

G4int G4ParticlePropertyData::operator!= ( const G4ParticlePropertyData right  )  const

Definition at line 194 of file G4ParticlePropertyData.cc.

00195 {
00196   return (this != &right);
00197 }

G4ParticlePropertyData & G4ParticlePropertyData::operator= ( const G4ParticlePropertyData right  ) 

Definition at line 140 of file G4ParticlePropertyData.cc.

References theAntiPDGEncoding, theAntiQuarkContent, theBaryonNumber, theLeptonNumber, theParticleName, thePDGCharge, thePDGEncoding, thePDGiConjugation, thePDGiGParity, thePDGiIsospin, thePDGiIsospin3, thePDGiParity, thePDGiSpin, thePDGLifeTime, thePDGMagneticMoment, thePDGMass, theQuarkContent, and verboseLevel.

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 }

G4int G4ParticlePropertyData::operator== ( const G4ParticlePropertyData right  )  const

Definition at line 188 of file G4ParticlePropertyData.cc.

00189 {
00190   return (this == &right);
00191 }

void G4ParticlePropertyData::Print (  )  const

Definition at line 200 of file G4ParticlePropertyData.cc.

References G4cout, G4endl, GetAntiPDGEncoding(), and ns.

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 }

void G4ParticlePropertyData::SetAntiPDGEncoding ( G4int  newAntiEncoding  )  [inline]

Definition at line 73 of file G4ParticlePropertyData.icc.

00074 { 
00075   theAntiPDGEncoding = aEncoding; 
00076   fAntiPDGEncodingModified = true;  
00077 }

void G4ParticlePropertyData::SetAntiQuarkContent ( G4int  flavor,
G4int  newContent 
) [inline]

Definition at line 173 of file G4ParticlePropertyData.icc.

00174 {
00175   if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
00176     theAntiQuarkContent[flavor-1] = newContent;
00177     fAntiQuarkContentModified = true;
00178   }
00179 }  

void G4ParticlePropertyData::SetBaryonNumber ( G4int  newBaryonNumber  )  [inline]

Definition at line 157 of file G4ParticlePropertyData.icc.

00158 {
00159   theBaryonNumber = newBaryonNumber;
00160   fBaryonNumberModified = true;
00161 }

void G4ParticlePropertyData::SetLeptonNumber ( G4int  newLeptonNumber  )  [inline]

Definition at line 150 of file G4ParticlePropertyData.icc.

00151 {
00152   theLeptonNumber = newLeptonNumber;
00153   fLeptonNumberModified = true;
00154 }

void G4ParticlePropertyData::SetPDGCharge ( G4double  newCharge  )  [inline]

Definition at line 94 of file G4ParticlePropertyData.icc.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00095 {
00096   thePDGCharge = newCharge;
00097   fPDGChargeModified = true;            
00098 }

void G4ParticlePropertyData::SetPDGEncoding ( G4int  newEncoding  )  [inline]

Definition at line 64 of file G4ParticlePropertyData.icc.

00065 { 
00066   thePDGEncoding = aEncoding; 
00067   fPDGEncodingModified = true;  
00068   theAntiPDGEncoding = -1*aEncoding; 
00069   fAntiPDGEncodingModified = true;  
00070 }

void G4ParticlePropertyData::SetPDGiConjugation ( G4int  newConjugation  )  [inline]

Definition at line 115 of file G4ParticlePropertyData.icc.

00116 { 
00117   thePDGiConjugation = newConjugation;
00118   fPDGiConjugationModified = true;
00119 }

void G4ParticlePropertyData::SetPDGiGParity ( G4int  newGParity  )  [inline]

Definition at line 143 of file G4ParticlePropertyData.icc.

00144 {
00145  thePDGiGParity = newGParity;
00146  fPDGiGParityModified = true;
00147 }

void G4ParticlePropertyData::SetPDGiIsospin ( G4int  newIsospin  )  [inline]

Definition at line 122 of file G4ParticlePropertyData.icc.

00123 {
00124   thePDGiIsospin = newIsospin;
00125   fPDGiIsospinModified = true;
00126 }

void G4ParticlePropertyData::SetPDGiIsospin3 ( G4int  newIsospin3  )  [inline]

Definition at line 129 of file G4ParticlePropertyData.icc.

00130 {
00131   thePDGiIsospin3 = newIsospin3;
00132   fPDGiIsospin3Modified = true;
00133 }

void G4ParticlePropertyData::SetPDGiParity ( G4int  newParity  )  [inline]

Definition at line 108 of file G4ParticlePropertyData.icc.

00109 {
00110   thePDGiParity = newParity;
00111   fPDGiParityModified = true;
00112 }

void G4ParticlePropertyData::SetPDGiSpin ( G4int  newSpin  )  [inline]

Definition at line 101 of file G4ParticlePropertyData.icc.

00102 {
00103   thePDGiSpin = newSpin; 
00104   fPDGiSpinModified = true;
00105 }

void G4ParticlePropertyData::SetPDGLifeTime ( G4double  newLifeTime  )  [inline]

Definition at line 182 of file G4ParticlePropertyData.icc.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00183 {
00184   thePDGLifeTime = newLifeTime;
00185   fPDGLifeTimeModified = true;
00186 }

void G4ParticlePropertyData::SetPDGMagneticMoment ( G4double  mageticMoment  )  [inline]

Definition at line 136 of file G4ParticlePropertyData.icc.

00137 {
00138    thePDGMagneticMoment = mageticMoment;
00139    fPDGMagneticMomentModified = true;
00140 }

void G4ParticlePropertyData::SetPDGMass ( G4double  newMass  )  [inline]

Definition at line 80 of file G4ParticlePropertyData.icc.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00081 {
00082   thePDGMass = newMass;
00083   fPDGMassModified = true;
00084 }

void G4ParticlePropertyData::SetPDGWidth ( G4double  newWidth  )  [inline]

Definition at line 87 of file G4ParticlePropertyData.icc.

Referenced by G4TextPPRetriever::ModifyPropertyTable().

00088 {
00089   thePDGWidth = newWidth;
00090   fPDGWidthModified = true;
00091 }

void G4ParticlePropertyData::SetQuarkContent ( G4int  flavor,
G4int  newContent 
) [inline]

Definition at line 164 of file G4ParticlePropertyData.icc.

00165 {
00166   if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
00167     theQuarkContent[flavor-1] = newContent;
00168     fQuarkContentModified = true;
00169   }
00170 }

void G4ParticlePropertyData::SetVerboseLevel ( G4int  value  )  [inline]

Definition at line 31 of file G4ParticlePropertyData.icc.

00032 {
00033    verboseLevel = value;
00034 }


Friends And Related Function Documentation

friend class G4ParticlePropertyTable [friend]

Definition at line 54 of file G4ParticlePropertyData.hh.


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:51 2013 for Geant4 by  doxygen 1.4.7