56 std::vector<math::XYZTLorentzVector> secondaries;
59 if (aStep !=
nullptr) {
60 const G4TrackVector *tkV = aStep->GetSecondary();
61 G4Track *thTk = aStep->GetTrack();
62 const G4StepPoint *preStepPoint = aStep->GetPreStepPoint();
63 const G4StepPoint *postStepPoint = aStep->GetPostStepPoint();
64 double eTrackNew = thTk->GetKineticEnergy() / MeV;
67 if (tkV !=
nullptr && postStepPoint !=
nullptr) {
68 int nsc = (*tkV).size();
69 const G4VProcess *
proc = postStepPoint->GetProcessDefinedStep();
70 if (
proc !=
nullptr) {
71 G4ProcessType
type =
proc->GetProcessType();
75 LogDebug(
"CheckSecondary") <<
sec <<
" secondaries in step " << thTk->GetCurrentStepNumber() <<
" of track " 76 << thTk->GetTrackID() <<
" from " <<
name <<
" of type " <<
type <<
" ID " << procid
80 if (procid >= 121 && procid <= 151) {
81 LogDebug(
"CheckSecondary") <<
"Hadronic Interaction " <<
nHad <<
" of Type " << procid <<
" with " <<
sec 82 <<
" secondaries from process " <<
proc->GetProcessName() <<
" Delta E " <<
deltaE 83 <<
" Flag " << hadrInt;
86 G4Track *tk = (*tkV)[
i];
87 G4ThreeVector
pp = tk->GetMomentum();
88 double ee = tk->GetTotalEnergy();
90 secondaries.push_back(secondary);
91 int charge = (
int)(tk->GetDefinition()->GetPDGCharge());
96 G4Track *tk = (*tkV)[
i];
97 LogDebug(
"CheckSecondary") <<
"Secondary: " <<
sec <<
" ID " << tk->GetTrackID() <<
" Status " 98 << tk->GetTrackStatus() <<
" Particle " 99 << tk->GetDefinition()->GetParticleName() <<
" Position " << tk->GetPosition()
100 <<
" KE " << tk->GetKineticEnergy() <<
" Time " << tk->GetGlobalTime();
108 LogDebug(
"CheckSecondary") <<
"Track: " << thTk->GetTrackID() <<
" Status " << thTk->GetTrackStatus()
109 <<
" Particle " << thTk->GetDefinition()->GetParticleName() <<
" at " 110 << preStepPoint->GetPosition() <<
" Step: " <<
step <<
" KE " 111 << thTk->GetKineticEnergy() / GeV <<
" GeV; p " << thTk->GetMomentum().mag() / GeV
112 <<
" GeV/c; Step Length " << aStep->GetStepLength() <<
" Energy Deposit " 113 << aStep->GetTotalEnergyDeposit() / MeV <<
" MeV; Interaction " << hadrInt;
G4ProcessTypeEnumerator * typeEnumerator
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
int processIdLong(const G4VProcess *p) const
std::string processG4Name(int) const
charges
only generated particles of these IDs are considered