G4QCHIPSWorld Class Reference

#include <G4QCHIPSWorld.hh>


Public Member Functions

 ~G4QCHIPSWorld ()
G4QParticleVectorGetParticles (G4int nOfParts=0)
G4QParticleGetQParticle (G4int PDG) const
G4QParticleGetQParticle (G4QPDGCode QPDG) const
G4QParticleGetQParticle (G4QPDGCode *pQP) const
G4int GetQPEntries () const

Static Public Member Functions

static G4QCHIPSWorldGet ()

Protected Member Functions

 G4QCHIPSWorld ()


Detailed Description

Definition at line 54 of file G4QCHIPSWorld.hh.


Constructor & Destructor Documentation

G4QCHIPSWorld::G4QCHIPSWorld (  )  [protected]

Definition at line 57 of file G4QCHIPSWorld.cc.

00058 {
00059 }

G4QCHIPSWorld::~G4QCHIPSWorld (  ) 

Definition at line 61 of file G4QCHIPSWorld.cc.

00062 {
00063   //G4int nP=GetQWorld().size();
00064   //G4cout<<"G4QCHIPSWorld::Destructor: Before nP="<<nP<<","<<GetQWorld()[0]<<G4endl; //TMP
00065   //if(nP) std::for_each(GetQWorld().begin(),GetQWorld().end(),DeleteQParticle());
00066   //G4cout<<"G4QCHIPSWorld::Destructor: After"<<G4endl; // TMP
00067   //GetQWorld().clear();
00068 }


Member Function Documentation

G4QCHIPSWorld * G4QCHIPSWorld::Get (  )  [static]

Definition at line 79 of file G4QCHIPSWorld.cc.

Referenced by G4ChiralInvariantPhaseSpace::ApplyYourself(), G4QCaptureAtRest::AtRestDoIt(), G4QAtomicElectronScattering::G4QAtomicElectronScattering(), G4QDiffraction::G4QDiffraction(), G4QEnvironment::G4QEnvironment(), G4QFragmentation::G4QFragmentation(), G4QIonIonCollision::G4QIonIonCollision(), G4QLowEnergy::G4QLowEnergy(), G4QLowEnergy::PostStepDoIt(), G4QIonIonElastic::PostStepDoIt(), G4QInelastic::PostStepDoIt(), G4QElastic::PostStepDoIt(), G4QDiffraction::PostStepDoIt(), G4QCoherentChargeExchange::PostStepDoIt(), G4StringChipsParticleLevelInterface::Propagate(), G4StringChipsInterface::Propagate(), G4QStringChipsParticleLevelInterface::Propagate(), G4QInelastic::SetParameters(), G4QCaptureAtRest::SetParameters(), and G4QAtomicElectronScattering::SetParameters().

00080 {
00081   static G4QCHIPSWorld theWorld;                // *** Static body of the CHIPS World *** 
00082 // Returns Pointer to the CHIPS World
00083 //  if(!aWorld) aWorld=&theWorld;                 // Init the static pointer to CHIPS World
00084 //  return aWorld;
00085   return &theWorld;
00086 }

G4QParticleVector * G4QCHIPSWorld::GetParticles ( G4int  nOfParts = 0  ) 

Definition at line 95 of file G4QCHIPSWorld.cc.

References G4cerr, G4cout, and G4endl.

Referenced by G4ChiralInvariantPhaseSpace::ApplyYourself(), G4QCaptureAtRest::AtRestDoIt(), G4QAtomicElectronScattering::G4QAtomicElectronScattering(), G4QDiffraction::G4QDiffraction(), G4QLowEnergy::G4QLowEnergy(), G4QLowEnergy::PostStepDoIt(), G4QIonIonElastic::PostStepDoIt(), G4QInelastic::PostStepDoIt(), G4QElastic::PostStepDoIt(), G4QDiffraction::PostStepDoIt(), G4QCoherentChargeExchange::PostStepDoIt(), G4StringChipsParticleLevelInterface::Propagate(), G4StringChipsInterface::Propagate(), G4QStringChipsParticleLevelInterface::Propagate(), G4QInelastic::SetParameters(), G4QCaptureAtRest::SetParameters(), and G4QAtomicElectronScattering::SetParameters().

00096 {
00097   //static const G4int mnofParts = 486;           // max number of particles (up to A=80)
00098   //static const G4int mnofParts = 494;           // max number of particles (up to A=80)
00099   static const G4int mnofParts = 512; // max#of particles,A<57,G4QParticle::InitDecayVector
00100   static const G4bool cf = true;                // verbose=true G4QPDG construction flag
00101 #ifdef debug
00102   G4cout<<"G4QCHIPSWorld::GetParticles: n="<<nOfParts<<" particles"<<G4endl;
00103 #endif
00104   //if(GetQWorld().size())G4cout<<"G4QCHIPSWorld::GetPts:***Pt#0="<<GetQWorld()[0]<<G4endl;
00105   if(nOfParts>0)
00106   {
00107 #ifdef debug
00108     G4cout<<"G4QCHIPSWorld::GetParticles: Creating CHIPS World of nP="<<nOfParts<<G4endl;
00109 #endif
00110     G4int curNP=GetQWorld().size();
00111     //G4cout<<"G4QCHIPSWorld::GetParticles: Creating CHIPS World of curNP="<<curNP<<G4endl;
00112     if(nOfParts>curNP)                         // Initialization for increasing CHIPS World
00113     {
00114       if (nOfParts>mnofParts)
00115       {
00116         G4cerr<<"***G4QCHIPSWorld::GetPartics:nOfParts="<<nOfParts<<">"<<mnofParts<<G4endl;
00117         nOfParts=mnofParts;
00118       }
00119       if (nOfParts<10) nOfParts=10;            // Minimal number of particles for Vacuum(?)
00120 #ifdef debug
00121       G4cout<<"G4QCHIPSWorld::GetParticles: n="<<nOfParts<<",c="<<curNP<<G4endl;
00122 #endif
00123       for (G4int i=curNP; i<nOfParts; i++) 
00124       {
00125 #ifdef debug
00126         G4cout<<"G4QCHIPSWorld::GetParticles: Create particle QCode="<<i<<G4endl;
00127 #endif
00128         G4QParticle* curPart = new G4QParticle(cf,i); // Created with QCode=i
00129 #ifdef debug
00130         G4cout<<"G4QCHIPSWorld::GetParticles: Particle QCode="<<i<<" is created."<<G4endl;
00131 #endif
00132         //curPart->InitQParticle(i);             //
00133         //if(!i) G4cout<<"G4QCHIPSWorld::GetParticles:Pt#0="<<curPart<<G4endl;
00134         GetQWorld().push_back(curPart);           // Filled (forever but only once)
00135 #ifdef debug
00136         G4cout<<"G4QCHIPSWorld::GetParticles: Pt#"<<i<<"("<<nOfParts<<") is done"<<G4endl;
00137 #endif
00138       }
00139     }
00140     //else init--;//Recover theReInitializationCounter, if nothingWasAdded to theCHIPSWorld
00141   }
00142 #ifdef debug
00143   G4cout<<"G4QCHIPSWorld::GetParticles: TotalPt#"<<GetQWorld().size()<<G4endl;
00144 #endif
00145   return &GetQWorld();
00146 }

G4QParticle * G4QCHIPSWorld::GetQParticle ( G4QPDGCode pQP  )  const [inline]

Definition at line 99 of file G4QCHIPSWorld.hh.

References G4QPDGCode::GetQCode().

00100 {
00101   return GetQWorld()[pQP->GetQCode()];
00102 }

G4QParticle * G4QCHIPSWorld::GetQParticle ( G4QPDGCode  QPDG  )  const [inline]

Definition at line 94 of file G4QCHIPSWorld.hh.

References G4QPDGCode::GetQCode().

00095 {
00096   return GetQWorld()[QPDG.GetQCode()];
00097 }

G4QParticle * G4QCHIPSWorld::GetQParticle ( G4int  PDG  )  const [inline]

Definition at line 87 of file G4QCHIPSWorld.hh.

Referenced by G4Quasmon::DecayQHadron(), G4QIonIonCollision::Fragment(), and G4QFragmentation::Fragment().

00088 {
00089   G4int qCode=G4QPDGCode(PDG).GetQCode();
00090   //G4cout<<"G4QCHIPSWorld::GetQPart:Q="<<qCode<<",Max="<<qWorld.size()<<G4endl;
00091   return GetQWorld()[qCode];
00092 }

G4int G4QCHIPSWorld::GetQPEntries (  )  const [inline]

Definition at line 104 of file G4QCHIPSWorld.hh.

Referenced by G4QEnvironment::G4QEnvironment(), and operator<<().

00104 {return GetQWorld().size();}


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