60 G4Track* track = step->GetTrack();
61 int trackID = track->GetTrackID();
62 G4VPhysicalVolume* pv = track->GetVolume();
63 G4LogicalVolume* lv = pv->GetLogicalVolume();
64 G4ThreeVector pos = track->GetPosition();
65 G4ThreeVector mom = track->GetMomentum() / CLHEP::GeV;
66 G4String materialName = track->GetMaterial()->GetName();
68 int G4precision = G4cout.precision();
70 G4cout <<
"pv: " << pv->GetName() <<
" lv: " << lv->GetName() << G4endl;
71 G4cout <<
"trackID: " << trackID
72 <<
" pdgID: " << track->GetDefinition()->GetParticleName()
73 <<
" Energy: " << track->GetTotalEnergy()/CLHEP::GeV
74 <<
" position: " << pos <<
"mm "
75 <<
" momentum: " << mom
76 <<
" material: " << materialName
79 auto preProcess = step->GetPreStepPoint()->GetProcessDefinedStep();
80 auto postProcess = step->GetPostStepPoint()->GetProcessDefinedStep();
83 {G4cout <<
"Pre-step process: " << preProcess->GetProcessName() << G4endl;}
85 {G4cout <<
"Post-step process: " << postProcess->GetProcessName() << G4endl;}
88 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.