51 const int numSecondaries = aStep->GetSecondaryInCurrentStep()->size();
56 G4Track* track=aStep->GetTrack();
57#ifdef _ISFTRAJECTORY_DEBUG_
58 std::cout <<
"A new track "
59 <<
" (trackID " << track->GetTrackID()
60 <<
"), track pos: "<<track->GetPosition()
61 <<
", mom: "<<track->GetMomentum()
62 <<
", parentID " << track->GetParentID()
63 <<
", numSec="<<numSecondaries<<
" is in AppendStep." << std::endl;
70#ifdef _ISFTRAJECTORY_DEBUG_
71 std::cout<<
"is secondary, returning"<<std::endl;
80 description << G4String(
"AppendStep: ") +
"No VTrackInformation associated with G4Track (trackID: "
81 << track->GetTrackID() <<
", track pos: "<<track->GetPosition() <<
", mom: "<<track->GetMomentum()
82 <<
", parentID " << track->GetParentID() <<
")";
83 G4Exception(
"iGeant4::ISFTrajectory",
"NoVTrackInformation", FatalException,
description);
90 description << G4String(
"AppendStep: ") +
"NULL ISFParticle pointer for current G4Step (trackID "
91 << track->GetTrackID() <<
", track pos: "<<track->GetPosition() <<
", mom: "<<track->GetMomentum()
92 <<
", parentID " << track->GetParentID() <<
", numSec="<<numSecondaries <<
")";
93 G4Exception(
"iGeant4::ISFTrajectory",
"NoISFParticle", FatalException,
description);
100 if (currentGenParticle && currentGenParticle->end_vertex()) {
102 description << G4String(
"AppendStep: ") +
"Currently Traced Particle has an end vertex!\n";
103 description <<
"G4Track Properties: trackID = " << track->GetTrackID()<<
", Step Number = "<<track->GetCurrentStepNumber() <<
", parentID = " << track->GetParentID() <<
", TrackStatus = " << track->GetTrackStatus() <<
"\n";
104 description <<
"G4Step Properties: number of secondaries in the current step: " << aStep->GetSecondaryInCurrentStep()->size() <<
"\n";
105 description <<
"currentGenParticle : " << currentGenParticle <<
", barcode: " <<
HepMC::barcode(currentGenParticle) <<
"\n";
106 description <<
"currentGenParticle->end_vertex(): " << currentGenParticle->end_vertex() <<
", barcode: " <<
HepMC::barcode(currentGenParticle->end_vertex()) <<
"\n";
107 description <<
"ISFParticle (from TrackInformation): " << *baseIsp;
109 if (currentTrackInfoGenParticle) {
110 description <<
"currentTrackInfoGenParticle : " << currentTrackInfoGenParticle <<
", barcode: " <<
HepMC::barcode(currentTrackInfoGenParticle) <<
"\n";
111 if (currentTrackInfoGenParticle->end_vertex()) {
112 description <<
"currentTrackInfoGenParticle->end_vertex(): " << currentTrackInfoGenParticle->end_vertex() <<
", barcode: " <<
HepMC::barcode(currentTrackInfoGenParticle->end_vertex()) <<
"\n";
115 description <<
"currentTrackInfoGenParticle has no end_vertex!\n";
119 description <<
" trackInfo->GetHepMCParticle() == nullptr \n";
121 G4Exception(
"iGeant4::ISFTrajectory",
"EndVertexExists", FatalException,
description);
130 if (
trackInfo->GetReturnedToISF()==
true ) {
134 auto currentGenPart =
trackInfo->GetCurrentGenParticle();
138 baseIsp->
setStatus( currentGenPart->status() );
140 baseIsp->
setId(
id );
145 description << G4String(
"AppendStep: ") +
"m_truthRecordSvcQuick is NULL!";
146 G4Exception(
"iGeant4::ISFTrajectory",
"NoTruthRecordSvc", FatalException,
description);
150 G4Trajectory::AppendStep(aStep);
The generic ISF particle definition,.
const TruthBinding * getTruthBinding() const
pointer to the simulation truth - optional, can be 0
AtlasDetDescr::AtlasRegion nextGeoID() const
next geoID the particle will be simulated in