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

Public Member Functions

 __init__ (self, Name)
 
 ProcessHits (self, step, rohist)
 

Detailed Description

Definition at line 250 of file g4Ex_args.py.

Constructor & Destructor Documentation

◆ __init__()

g4Ex_args.ScoreSD.__init__ (   self,
  Name 
)

Definition at line 253 of file g4Ex_args.py.

253 def __init__(self,Name):
254 G4VSensitiveDetector.__init__(self, Name)
255

Member Function Documentation

◆ ProcessHits()

g4Ex_args.ScoreSD.ProcessHits (   self,
  step,
  rohist 
)

Definition at line 256 of file g4Ex_args.py.

256 def ProcessHits(self, step, rohist):
257 preStepPoint = step.GetPreStepPoint()
258 track = step.GetTrack()
259 part = track.GetDynamicParticle()
260 pid = part.GetPDGcode()
261 if abs(pid) in leptons :
262 mom = track.GetMomentum()
263 pos = track.GetPosition()
264#
265 # primPart = part.GetPrimaryParticle()
266 w = track.GetWeight()
267 parentid = int(w)/100000-10000
268 pythiaid = int(w)%100000-10000
269 h['ntuple'].Fill(float(pid), float(mom.x/GeV),float(mom.y/GeV),float(mom.z/GeV),
270 float(pos.x/m),float(pos.y/m),float(pos.z/m),pythiaid,parentid)
271 #print 'xxx',pid, float(mom.x/GeV),float(mom.y/GeV),float(mom.z/GeV),pythiaid,parentid,float(pos.x/m),float(pos.y/m),float(pos.z/m)
272 #myPythia.EventListing()
273

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