SND@LHC Software
Loading...
Searching...
No Matches
g4Ex.MyTrackingAction Class Reference
Inheritance diagram for g4Ex.MyTrackingAction:
Collaboration diagram for g4Ex.MyTrackingAction:

Public Member Functions

 PostUserTrackingAction (self, atrack)
 
 PreUserTrackingAction (self, atrack)
 
 myPrintout (self, atrack)
 

Detailed Description

Definition at line 175 of file g4Ex.py.

Member Function Documentation

◆ myPrintout()

g4Ex.MyTrackingAction.myPrintout (   self,
  atrack 
)

Definition at line 189 of file g4Ex.py.

189 def myPrintout(self, atrack):
190 part = atrack.GetDynamicParticle()
191 pid = part.GetPDGcode()
192 print('TA',pid,atrack.GetTotalEnergy()/GeV,ecut*GeV)
193
194# ------------------------------------------------------------------

◆ PostUserTrackingAction()

g4Ex.MyTrackingAction.PostUserTrackingAction (   self,
  atrack 
)

Definition at line 176 of file g4Ex.py.

176 def PostUserTrackingAction(self,atrack):
177 pass

◆ PreUserTrackingAction()

g4Ex.MyTrackingAction.PreUserTrackingAction (   self,
  atrack 
)

Definition at line 178 of file g4Ex.py.

178 def PreUserTrackingAction(self,atrack):
179 # self.myPrintout(atrack)
180 if atrack.GetTotalEnergy()/GeV < ecut :
181 G4TrackingManager().SetStoreTrajectory(False)
182 atrack.SetTrackStatus(atrack.GetTrackStatus().fStopAndKill)
183 part = atrack.GetDynamicParticle()
184 pid = part.GetPDGcode()
185 if pid in notWanted:
186 G4TrackingManager().SetStoreTrajectory(False)
187 atrack.SetTrackStatus(atrack.GetTrackStatus().fStopAndKill)
188

The documentation for this class was generated from the following file: