48 : parentParticle(0), pdgID(0),
51 vertex(0), storeFlag(false)
61 name(aname), pdgID(apcode),
62 trackID(atid), parentTrackID(ptid),
63 primaryFlag(false),momentumAtVertex(p),
64 vertex(0), storeFlag(false)
75 name(aname), pdgID(apcode),
76 trackID(atid), parentTrackID(ptid),
77 primaryFlag(false),momentumAtVertex(p),
110 int size= associatedParticleList.size();
111 if(i>=0 && i< size)
return associatedParticleList[i];
121 for(nlevel=1;;nlevel++) {
123 if(p==0)
return nlevel;
142 std::ostringstream os;
144 if(storeFlag) cqp=
'+';
146 std::string stid(os.str());
147 ostr << std::setw(6) << stid;
150 if(primaryFlag) ostr <<
"*";
152 ostr <<
"<" << std::setw(5) << parentTrackID;
153 ostr.setf(std::ios::fixed);
155 << std::setw(7) << std::setprecision(3) << momentumAtVertex.x()/
GeV
156 <<
"," << std::setw(7) << std::setprecision(3)
157 << momentumAtVertex.y()/
GeV
158 <<
"," << std::setw(7) << std::setprecision(3)
159 << momentumAtVertex.z()/
GeV
160 <<
"," << std::setw(7) << std::setprecision(3)
161 << momentumAtVertex.e()/
GeV <<
") @";
162 ostr <<
name <<
"(" << pdgID <<
")";
165 ostr <<
" %" << vertex-> GetCreatorProcessName() <<
G4endl;
167 std::ostringstream osv;
169 if(vertex->GetStoreFlag()) cqv=
'+';
170 osv << cqv << vertex-> GetID() <<
'\0';
171 std::string svid(osv.str());
172 ostr <<
" " << std::setw(6) << svid;
174 ostr.unsetf(std::ios::fixed);
176 ostr <<
"- X(" << std::setw(9) << std::setprecision(2)
177 << vertex-> GetPosition().x()/
mm
178 <<
"," << std::setw(9) << std::setprecision(2)
179 << vertex-> GetPosition().y()/
mm
180 <<
"," << std::setw(9) << std::setprecision(2)
181 << vertex-> GetPosition().z()/
mm
182 <<
"," << std::setw(9) << std::setprecision(2)
183 << vertex-> GetTime()/
ns <<
")";
184 ostr.unsetf(std::ios::scientific);
186 ostr <<
" @" << vertex-> GetVolumeName()
187 <<
"-" << vertex-> GetVolumeNumber();
201 SimParticleList::const_iterator itr;
202 for(itr= associatedParticleList.begin();
203 itr!= associatedParticleList.end(); ++itr) {
204 (*itr)->
Print(ostr);
207 if(parentParticle) parentParticle->
Print(ostr,
true);
std::vector< G4MCTSimParticle * > associatedParticleList
static constexpr double mm
void SetStoreFlag(G4bool q)
void PrintSingle(std::ostream &ostr=std::cout) const
const G4ThreeVector const G4double const
void Print(G4Element &ele)
int AssociateParticle(G4MCTSimParticle *p)
void Print(std::ostream &ostr=std::cout, G4bool qrevorder=false) const
G4MCTSimParticle * GetAssociatedParticle(int i) const
void SetParentParticle(const G4MCTSimParticle *p)
virtual ~G4MCTSimParticle()
void SetStoreFlagToParentTree(G4bool q=true)
G4MCTSimParticle * parentParticle
G4MCTSimParticle * GetParentParticle() const
int GetNofAssociatedParticles() const
static constexpr double GeV