65 G4Track* theTrack = theStep->GetTrack();
67 G4int pdg = part->GetPDGEncoding();
69 if(theTrack->GetCurrentStepNumber() == 1)
72 auto trackInformation =
75 G4StepPoint* thePrePoint = theStep->GetPreStepPoint();
78 G4StepPoint* thePostPoint = theStep->GetPostStepPoint();
81 G4OpBoundaryProcessStatus boundaryStatus = Undefined;
87 G4int nprocesses = pm->GetProcessListLength();
89 for(G4int i = 0; i < nprocesses; ++i)
91 if(
nullptr != (*pv)[i] && (*pv)[i]->GetProcessName() ==
"OpBoundary")
99 if(theTrack->GetParentID() == 0)
102 auto secondaries = theStep->GetSecondaryInCurrentStep();
109 if(!secondaries->empty())
111 for(
auto & tr : *secondaries)
113 const G4VProcess* creator = tr->GetCreatorProcess();
114 if(
nullptr != creator)
116 G4int type = creator->GetProcessSubType();
120 if(type >= 12 && type <= 14)
129 theTrack->SetTrackStatus(fStopAndKill);
132 if(
nullptr == thePostPV)
141 if(thePrePV->GetName() ==
"Slab")
143 trackInformation->SetForceDrawTrajectory(
true);
144 else if(thePostPV->GetName() ==
"expHall")
146 theTrack->SetTrackStatus(fStopAndKill);
149 auto proc = thePostPoint->GetProcessDefinedStep();
150 if(
nullptr != proc && proc->GetProcessName() ==
"OpAbsorption")
153 trackInformation->AddTrackStatusFlag(
absorbed);
158 if(thePostPoint->GetStepStatus() == fGeomBoundary)
164 if(boundaryStatus != StepTooSmall)
166 G4cout <<
"LXeSteppingAction::UserSteppingAction(): "
167 <<
"trackID=" << theTrack->GetTrackID()
168 <<
" parentID=" << theTrack->GetParentID()
169 <<
" " << part->GetParticleName()
170 <<
" E(MeV)=" << theTrack->GetKineticEnergy()
171 <<
"n/ at " << theTrack->GetPosition()
172 <<
" prePV: " << thePrePV->GetName()
173 <<
" postPV: " << thePostPV->GetName()
175 G4ExceptionDescription ed;
176 ed <<
"LXeSteppingAction: "
177 <<
"No reallocation step after reflection!"
178 <<
"Something is wrong with the surface normal or geometry";
179 G4Exception(
"LXeSteppingAction:",
"LXeExpl01", JustWarning, ed,
"");
184 switch(boundaryStatus)
201 trackInformation->AddTrackStatusFlag(
hitPMT);
204 case FresnelReflection:
205 case TotalInternalReflection:
206 case LambertianReflection:
208 case SpikeReflection:
210 trackInformation->IncReflections();
216 if(thePostPV->GetName() ==
"sphere")
217 trackInformation->AddTrackStatusFlag(
hitSphere);