28 #undef _ISFTRAJECTORY_DEBUG_ 
   32   , m_truthRecordSvcQuick(nullptr)
 
   38   : G4Trajectory(aTrack)
 
   39   , m_truthRecordSvcQuick(truthSvc)
 
   52   const int numSecondaries = aStep->GetSecondaryInCurrentStep()->size();
 
   57     G4Track* 
track=aStep->GetTrack();
 
   58 #ifdef _ISFTRAJECTORY_DEBUG_ 
   59     std::cout << 
"A new track " 
   60               << 
" (trackID " << 
track->GetTrackID()
 
   61               << 
"), track pos: "<<
track->GetPosition()
 
   62               << 
", mom: "<<
track->GetMomentum()
 
   63               << 
", parentID " << 
track->GetParentID()
 
   64               << 
", numSec="<<numSecondaries<<
" is in AppendStep." << std::endl;
 
   71 #ifdef _ISFTRAJECTORY_DEBUG_ 
   72       std::cout<<
"is secondary, returning"<<std::endl;
 
   81       description << G4String(
"AppendStep: ") + 
"No VTrackInformation associated with G4Track (trackID: " 
   82                   << 
track->GetTrackID() << 
", track pos: "<<
track->GetPosition() << 
", mom: "<<
track->GetMomentum()
 
   83                   << 
", parentID " << 
track->GetParentID() << 
")";
 
   84       G4Exception(
"iGeant4::ISFTrajectory", 
"NoVTrackInformation", FatalException, 
description);
 
   91       description << G4String(
"AppendStep: ") + 
"NULL ISFParticle pointer for current G4Step (trackID " 
   92                   << 
track->GetTrackID() << 
", track pos: "<<
track->GetPosition() << 
", mom: "<<
track->GetMomentum()
 
   93                   << 
", parentID " << 
track->GetParentID() << 
", numSec="<<numSecondaries << 
")";
 
   94       G4Exception(
"iGeant4::ISFTrajectory", 
"NoISFParticle", FatalException, 
description);
 
  101     if (atlasG4EvtUserInfo->GetCurrentGenParticle() &&
 
  102         atlasG4EvtUserInfo->GetCurrentGenParticle()->end_vertex()) {
 
  105       description << G4String(
"AppendStep: ") + 
"Currently Traced Particle has an end vertex!\n";
 
  106       description <<  
"G4Track Properties: trackID = " << 
track->GetTrackID()<< 
", Step Number = "<<
track->GetCurrentStepNumber() << 
", parentID = " << 
track->GetParentID() << 
", TrackStatus = " <<  
track->GetTrackStatus() << 
"\n";
 
  107       description << 
"G4Step Properties: number of secondaries in the current step: " << aStep->GetSecondaryInCurrentStep()->size() << 
"\n";
 
  108       description << 
"currentGenParticle : " << currentGenParticle << 
", barcode: " << 
HepMC::barcode(currentGenParticle) << 
"\n";
 
  109       description << 
"currentGenParticle->end_vertex(): " << currentGenParticle->end_vertex() << 
", barcode: " << 
HepMC::barcode(currentGenParticle->end_vertex()) << 
"\n";
 
  110       description << 
"ISFParticle (from TrackInformation): " << *baseIsp;
 
  112       if (currentTrackInfoGenParticle) {
 
  113         description << 
"currentTrackInfoGenParticle : " << currentTrackInfoGenParticle << 
", barcode: " << 
HepMC::barcode(currentTrackInfoGenParticle) << 
"\n";
 
  114         if (currentTrackInfoGenParticle->end_vertex()) {
 
  115           description << 
"currentTrackInfoGenParticle->end_vertex(): " << currentTrackInfoGenParticle->end_vertex() << 
", barcode: " << 
HepMC::barcode(currentTrackInfoGenParticle->end_vertex()) << 
"\n";
 
  118           description << 
"currentTrackInfoGenParticle has no end_vertex!\n";
 
  122         description << 
" trackInfo->GetHepMCParticle() == nullptr \n";
 
  124       G4Exception(
"iGeant4::ISFTrajectory", 
"EndVertexExists", FatalException, 
description);
 
  128     if (m_truthRecordSvcQuick) {
 
  129       m_truthRecordSvcQuick->registerTruthIncident(truth);
 
  133       if ( 
trackInfo->GetReturnedToISF()==
true ) {
 
  137         auto currentGenPart = atlasG4EvtUserInfo->GetCurrentGenParticle();
 
  141         baseIsp->
setStatus( currentGenPart->status() );
 
  143         baseIsp->
setId( 
id );
 
  148       description << G4String(
"AppendStep: ") + 
"m_truthRecordSvcQuick is NULL!";
 
  149       G4Exception(
"iGeant4::ISFTrajectory", 
"NoTruthRecordSvc", FatalException, 
description);
 
  153   G4Trajectory::AppendStep(aStep);