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

Public Member Functions

 EndOfEventAction (self, event)
 
 myPrintout (self, event)
 

Detailed Description

Definition at line 210 of file g4Ex_args.py.

Member Function Documentation

◆ EndOfEventAction()

g4Ex_args.MyEventAction.EndOfEventAction (   self,
  event 
)

Definition at line 212 of file g4Ex_args.py.

212 def EndOfEventAction(self, event):
213 global myEventnr
214 myEventnr += 1
215 # self.myPrintout(event)

◆ myPrintout()

g4Ex_args.MyEventAction.myPrintout (   self,
  event 
)

Definition at line 216 of file g4Ex_args.py.

216 def myPrintout(self, event):
217 prim = event.GetPrimaryVertex()
218 print('vertex ',prim.GetX0()/m,prim.GetY0()/m,prim.GetZ0()/m)
219 for k in range( prim.GetNumberOfParticle() ):
220 p = prim.GetPrimary(k)
221 print('event',p.GetPDGcode(),p.GetPx()/GeV,p.GetPy()/GeV,p.GetPz()/GeV)
222# ------------------------------------------------------------------

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