Changeset 921 for trunk/source/particles/management/include
- Timestamp:
- Feb 16, 2009, 10:14:30 AM (16 years ago)
- Location:
- trunk/source/particles/management/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/particles/management/include/G4ParticleDefinition.hh
r890 r921 25 25 // 26 26 // 27 // $Id: G4ParticleDefinition.hh,v 1.3 3 2008/11/14 16:26:30 kurasige Exp $28 // GEANT4 tag $Name: $27 // $Id: G4ParticleDefinition.hh,v 1.32 2008/03/22 06:03:40 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 129 129 130 130 G4double GetPDGMagneticMoment() const { return thePDGMagneticMoment; } 131 void SetPDGMagneticMoment(G4double mageticMoment); 132 G4double CalculateAnomaly() const; 133 // gives the anomaly of magnetic moment for spin 1/2 particles 131 void SetPDGMagneticMoment(G4double mageticMoment); 134 132 135 133 const G4String& GetParticleType() const { return theParticleType; } -
trunk/source/particles/management/include/G4ParticleDefinition.icc
r890 r921 25 25 // 26 26 // 27 // $Id: G4ParticleDefinition.icc,v 1.1 3 2008/11/14 16:26:30kurasige Exp $28 // GEANT4 tag $Name: $27 // $Id: G4ParticleDefinition.icc,v 1.12 2007/03/11 07:17:35 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 … … 155 155 } 156 156 157 inline 158 G4double G4ParticleDefinition::CalculateAnomaly() const 159 { 160 // gives the anomaly of magnetic moment for spin 1/2 particles 161 if (thePDGiSpin==1) { 162 G4double muB = 0.5*eplus*hbar_Planck/(thePDGMass/c_squared); 163 return 0.5*fabs(thePDGMagneticMoment/muB - 2.*thePDGCharge/eplus); 164 } else { 165 return 0.0; 166 } 167 } 157
Note: See TracChangeset
for help on using the changeset viewer.