Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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::G4QCHIPSWorld ( )
protected

Definition at line 57 of file G4QCHIPSWorld.cc.

58{
59}

◆ ~G4QCHIPSWorld()

G4QCHIPSWorld::~G4QCHIPSWorld ( )

Definition at line 61 of file G4QCHIPSWorld.cc.

62{
63 //G4int nP=GetQWorld().size();
64 //G4cout<<"G4QCHIPSWorld::Destructor: Before nP="<<nP<<","<<GetQWorld()[0]<<G4endl; //TMP
65 //if(nP) std::for_each(GetQWorld().begin(),GetQWorld().end(),DeleteQParticle());
66 //G4cout<<"G4QCHIPSWorld::Destructor: After"<<G4endl; // TMP
67 //GetQWorld().clear();
68}

Member Function Documentation

◆ Get()

◆ GetParticles()

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

Definition at line 95 of file G4QCHIPSWorld.cc.

96{
97 //static const G4int mnofParts = 486; // max number of particles (up to A=80)
98 //static const G4int mnofParts = 494; // max number of particles (up to A=80)
99 static const G4int mnofParts = 512; // max#of particles,A<57,G4QParticle::InitDecayVector
100 static const G4bool cf = true; // verbose=true G4QPDG construction flag
101#ifdef debug
102 G4cout<<"G4QCHIPSWorld::GetParticles: n="<<nOfParts<<" particles"<<G4endl;
103#endif
104 //if(GetQWorld().size())G4cout<<"G4QCHIPSWorld::GetPts:***Pt#0="<<GetQWorld()[0]<<G4endl;
105 if(nOfParts>0)
106 {
107#ifdef debug
108 G4cout<<"G4QCHIPSWorld::GetParticles: Creating CHIPS World of nP="<<nOfParts<<G4endl;
109#endif
110 G4int curNP=GetQWorld().size();
111 //G4cout<<"G4QCHIPSWorld::GetParticles: Creating CHIPS World of curNP="<<curNP<<G4endl;
112 if(nOfParts>curNP) // Initialization for increasing CHIPS World
113 {
114 if (nOfParts>mnofParts)
115 {
116 G4cerr<<"***G4QCHIPSWorld::GetPartics:nOfParts="<<nOfParts<<">"<<mnofParts<<G4endl;
117 nOfParts=mnofParts;
118 }
119 if (nOfParts<10) nOfParts=10; // Minimal number of particles for Vacuum(?)
120#ifdef debug
121 G4cout<<"G4QCHIPSWorld::GetParticles: n="<<nOfParts<<",c="<<curNP<<G4endl;
122#endif
123 for (G4int i=curNP; i<nOfParts; i++)
124 {
125#ifdef debug
126 G4cout<<"G4QCHIPSWorld::GetParticles: Create particle QCode="<<i<<G4endl;
127#endif
128 G4QParticle* curPart = new G4QParticle(cf,i); // Created with QCode=i
129#ifdef debug
130 G4cout<<"G4QCHIPSWorld::GetParticles: Particle QCode="<<i<<" is created."<<G4endl;
131#endif
132 //curPart->InitQParticle(i); //
133 //if(!i) G4cout<<"G4QCHIPSWorld::GetParticles:Pt#0="<<curPart<<G4endl;
134 GetQWorld().push_back(curPart); // Filled (forever but only once)
135#ifdef debug
136 G4cout<<"G4QCHIPSWorld::GetParticles: Pt#"<<i<<"("<<nOfParts<<") is done"<<G4endl;
137#endif
138 }
139 }
140 //else init--;//Recover theReInitializationCounter, if nothingWasAdded to theCHIPSWorld
141 }
142#ifdef debug
143 G4cout<<"G4QCHIPSWorld::GetParticles: TotalPt#"<<GetQWorld().size()<<G4endl;
144#endif
145 return &GetQWorld();
146}
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout

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

◆ GetQParticle() [1/3]

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

Definition at line 87 of file G4QCHIPSWorld.hh.

88{
89 G4int qCode=G4QPDGCode(PDG).GetQCode();
90 //G4cout<<"G4QCHIPSWorld::GetQPart:Q="<<qCode<<",Max="<<qWorld.size()<<G4endl;
91 return GetQWorld()[qCode];
92}
G4int GetQCode() const
Definition: G4QPDGCode.hh:327

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

◆ GetQParticle() [2/3]

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

Definition at line 99 of file G4QCHIPSWorld.hh.

100{
101 return GetQWorld()[pQP->GetQCode()];
102}

◆ GetQParticle() [3/3]

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

Definition at line 94 of file G4QCHIPSWorld.hh.

95{
96 return GetQWorld()[QPDG.GetQCode()];
97}

◆ GetQPEntries()

G4int G4QCHIPSWorld::GetQPEntries ( ) const
inline

Definition at line 104 of file G4QCHIPSWorld.hh.

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

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


The documentation for this class was generated from the following files: