2 // ********************************************************************
 
    3 // * License and Disclaimer                                           *
 
    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.                             *
 
   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.         *
 
   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 // ********************************************************************
 
   27 // $Id: G4ParticleDefinition.icc 79333 2014-02-24 10:36:17Z gcosmo $
 
   31  G4int G4ParticleDefinition::GetInstanceID() const
 
   33   return g4particleDefinitionInstanceID; 
 
   37  G4bool G4ParticleDefinition::GetPDGStable() const
 
   40   { return (GetIonLifeTime()<0.); }
 
   42   { return thePDGStable; }
 
   46  G4double G4ParticleDefinition::GetPDGLifeTime() const
 
   49   { return GetIonLifeTime(); }
 
   51   { return thePDGLifeTime; }
 
   55  G4ParticleTable* G4ParticleDefinition::GetParticleTable() const
 
   57   return theParticleTable; 
 
   61  G4DecayTable* G4ParticleDefinition::GetDecayTable() const
 
   67  void G4ParticleDefinition::SetDecayTable(G4DecayTable* aDecayTable) 
 
   69   theDecayTable = aDecayTable; 
 
   73  void G4ParticleDefinition::SetVerboseLevel(G4int value)
 
   79  G4int G4ParticleDefinition::GetVerboseLevel() const
 
   85  G4ProcessManager* G4ParticleDefinition::GetProcessManager() const
 
   87     if(g4particleDefinitionInstanceID<0) return 0;
 
   92  G4ProcessManager* G4ParticleDefinition::GetMasterProcessManager() const
 
   94     return theProcessManagerShadow;
 
   98   void G4ParticleDefinition::SetMasterProcessManager( G4ProcessManager* aNewPM )
 
  100    theProcessManagerShadow = aNewPM;
 
  104  G4int G4ParticleDefinition::GetQuarkContent(G4int flavor) const 
 
  107   if ((flavor>0) && (flavor<=NumberOfQuarkFlavor))
 
  109     content = theQuarkContent[flavor-1];
 
  116       std::ostringstream message;
 
  117       message << "Invalid Quark Flavor: " << flavor;
 
  118       G4Exception("G4ParticleDefinition::GetQuarkContent()",
 
  119                   "InvalidFlavor", JustWarning, message);
 
  127  G4int G4ParticleDefinition::GetAntiQuarkContent(G4int flavor) const 
 
  130   if ((flavor>0) && (flavor<=NumberOfQuarkFlavor))
 
  132     content = theAntiQuarkContent[flavor-1];
 
  139       std::ostringstream message;
 
  140       message << "Invalid Quark Flavor: " << flavor;
 
  141       G4Exception("G4ParticleDefinition::GetAntiQuarkContent()",
 
  142                   "InvalidFlavor", JustWarning, message);
 
  150  void G4ParticleDefinition::SetParticleSubType(const G4String& subtype)
 
  152   theParticleSubType = subtype;
 
  156  void             G4ParticleDefinition::SetAntiPDGEncoding(G4int aEncoding)
 
  158   theAntiPDGEncoding = aEncoding; 
 
  162 G4bool G4ParticleDefinition::GetApplyCutsFlag() const
 
  164   return fApplyCutsFlag;
 
  168  void G4ParticleDefinition::SetAtomicNumber(G4int i)
 
  174  G4int G4ParticleDefinition::GetAtomicNumber() const
 
  176   return theAtomicNumber;
 
  180  void G4ParticleDefinition::SetAtomicMass(G4int i)
 
  186  G4int G4ParticleDefinition::GetAtomicMass() const
 
  188   return theAtomicMass;
 
  192   void  G4ParticleDefinition::SetPDGMagneticMoment(G4double magneticMoment)
 
  194    thePDGMagneticMoment = magneticMoment;
 
  198   G4bool G4ParticleDefinition::IsGeneralIon() const
 
  204   G4int G4ParticleDefinition::GetParticleDefinitionID() const
 
  206   return g4particleDefinitionInstanceID;