G4ParticleDefinition.icc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 
00030 inline 
00031  G4ParticleTable* G4ParticleDefinition::GetParticleTable() const
00032 { 
00033   return theParticleTable; 
00034 }
00035 
00036 inline
00037  G4DecayTable* G4ParticleDefinition::GetDecayTable() const
00038 { 
00039   return theDecayTable; 
00040 }
00041 
00042 inline
00043  void          G4ParticleDefinition::SetDecayTable(G4DecayTable* aDecayTable) 
00044 { 
00045   theDecayTable = aDecayTable; 
00046 }
00047 
00048 
00049 inline 
00050  void G4ParticleDefinition::SetVerboseLevel(G4int value)
00051 {
00052    verboseLevel = value;
00053 }
00054 
00055 inline 
00056  G4int G4ParticleDefinition::GetVerboseLevel() const
00057 {
00058    return verboseLevel;
00059 }
00060 
00061 inline
00062  G4ProcessManager* G4ParticleDefinition::GetProcessManager() const
00063 {
00064     return theProcessManager;
00065 }
00066 
00067 inline
00068  void G4ParticleDefinition::SetProcessManager(G4ProcessManager *aProcessManager)
00069 {
00070       theProcessManager = aProcessManager;
00071 }
00072 
00073 inline
00074  G4int G4ParticleDefinition::GetQuarkContent(G4int flavor) const 
00075 {
00076   G4int content = 0; 
00077   if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
00078     content = theQuarkContent[flavor-1];
00079   }else {
00080 #ifdef G4VERBOSE
00081     if (verboseLevel >0) {
00082       G4cout << "Invalid Quark Flavor for G4ParticleDefinition::GetQuarkContent";
00083       G4cout << ": flavor=" << flavor <<G4endl;
00084     }   
00085 #endif  
00086   }
00087   return content;  
00088 }
00089 
00090 inline
00091  G4int G4ParticleDefinition::GetAntiQuarkContent(G4int flavor) const 
00092 {
00093   G4int content = 0;
00094   if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
00095     content = theAntiQuarkContent[flavor-1];
00096   }else {
00097 #ifdef G4VERBOSE
00098     if (verboseLevel >0) {
00099       G4cout <<"Invalid Quark Flavor for G4ParticleDefinition::GetAntiQuarkContent";
00100       G4cout << ": flavor=" << flavor <<G4endl;
00101     }
00102 #endif
00103   }  
00104   return content;
00105 }
00106 
00107 
00108 inline 
00109  void G4ParticleDefinition::SetParticleSubType(const G4String& subtype)
00110 {
00111   theParticleSubType = subtype;
00112 }
00113  
00114 inline 
00115  void             G4ParticleDefinition::SetAntiPDGEncoding(G4int aEncoding)
00116 { 
00117   theAntiPDGEncoding = aEncoding; 
00118 }
00119 
00120 inline 
00121 G4bool G4ParticleDefinition::GetApplyCutsFlag() const
00122 {
00123   return fApplyCutsFlag;
00124 }
00125 
00126 inline
00127  void G4ParticleDefinition::SetAtomicNumber(G4int i)
00128 {
00129   theAtomicNumber = i;
00130 }
00131 
00132 inline
00133  G4int G4ParticleDefinition::GetAtomicNumber() const
00134 {
00135   return theAtomicNumber;
00136 }
00137 
00138 inline
00139  void G4ParticleDefinition::SetAtomicMass(G4int i)
00140 {
00141   theAtomicMass = i;
00142 }
00143 
00144 inline
00145  G4int G4ParticleDefinition::GetAtomicMass() const
00146 {
00147   return theAtomicMass;
00148 }
00149 
00150 inline 
00151   void  G4ParticleDefinition::SetPDGMagneticMoment(G4double magneticMoment)
00152 {
00153    thePDGMagneticMoment = magneticMoment;
00154 }
00155 
00156 inline
00157   G4double G4ParticleDefinition::CalculateAnomaly()  const
00158 {
00159    // gives the anomaly of magnetic moment for spin 1/2 particles 
00160    if (thePDGiSpin==1) {
00161      G4double muB = 0.5*CLHEP::eplus*CLHEP::hbar_Planck/(thePDGMass/CLHEP::c_squared);
00162      return 0.5*std::fabs(thePDGMagneticMoment/muB - 2.*thePDGCharge/CLHEP::eplus);   
00163    } else {     
00164      return 0.0;
00165    }
00166 }

Generated on Mon May 27 17:49:16 2013 for Geant4 by  doxygen 1.4.7