61 G4Track* track = step->GetTrack();
62 int trackID = track->GetTrackID();
63 G4VPhysicalVolume* pv = track->GetVolume();
64 G4LogicalVolume* lv = pv->GetLogicalVolume();
65 G4ThreeVector pos = track->GetPosition();
66 G4ThreeVector mom = track->GetMomentum() / CLHEP::GeV;
67 G4String materialName = track->GetMaterial()->GetName();
69 int G4precision = G4cout.precision();
71 G4cout <<
"pv: " << pv->GetName() <<
" lv: " << lv->GetName() << G4endl;
72 G4cout <<
"trackID: " << trackID
73 <<
" pdgID: " << track->GetDefinition()->GetParticleName()
74 <<
" Energy: " << track->GetTotalEnergy()/CLHEP::GeV
75 <<
" position: " << pos <<
"mm "
76 <<
" momentum: " << mom
77 <<
" material: " << materialName
80 auto preProcess = step->GetPreStepPoint()->GetProcessDefinedStep();
81 auto postProcess = step->GetPostStepPoint()->GetProcessDefinedStep();
84 {G4cout <<
"Pre-step process: " << preProcess->GetProcessName() << G4endl;}
86 {G4cout <<
"Post-step process: " << postProcess->GetProcessName() << G4endl;}
89 G4cout.precision(G4precision);
G4bool VerboseThisEvent(G4int eventIndex, G4int eventStart, G4int eventStop)
Logic of whether this event should be verbose or not. Code here so it's not duplicated.