SND@LHC Software
Loading...
Searching...
No Matches
dumpEvent Namespace Reference

Functions

 printMCTrack (n, MCTrack)
 
 dump (i, pcut)
 
 dumpStraw (i)
 

Variables

 ship_geo = ShipGeoConfig.Config().loadpy("$FAIRSHIP/geometry/geometry_config.py")
 
 PDG = ROOT.TDatabasePDG.Instance()
 

Function Documentation

◆ dump()

dumpEvent.dump (   i,
  pcut 
)

Definition at line 16 of file dumpEvent.py.

16def dump(i,pcut):
17 tree = ROOT.gROOT.FindObjectAny('cbmsim')
18 tree.GetEntry(i)
19 print(' # pid px py pz vx vy vz mid')
20 n=-1
21 for mcp in tree.MCTrack:
22 n+=1
23 if mcp.GetP()/u.GeV < pcut : continue
24 printMCTrack(n,tree.MCTrack)

◆ dumpStraw()

dumpEvent.dumpStraw (   i)

Definition at line 25 of file dumpEvent.py.

25def dumpStraw(i):
26 tree = ROOT.gROOT.FindObjectAny('cbmsim')
27 tree.GetEntry(i)
28 for aStraw in tree.strawtubesPoint:
29 trID = astraw.GetTrackID()
30 if not trID < 0:
31 printMCTrack(trID,tree.MCTrack)

◆ printMCTrack()

dumpEvent.printMCTrack (   n,
  MCTrack 
)

Definition at line 11 of file dumpEvent.py.

11def printMCTrack(n,MCTrack):
12 mcp = MCTrack[n]
13 print(' %6i %7i %6.3F %6.3F %7.3F %7.3F %7.3F %7.3F %6i '%(n,mcp.GetPdgCode(),mcp.GetPx()/u.GeV,mcp.GetPy()/u.GeV,mcp.GetPz()/u.GeV, \
14 mcp.GetStartX()/u.m,mcp.GetStartY()/u.m,mcp.GetStartZ()/u.m,mcp.GetMotherId() ))
15

Variable Documentation

◆ PDG

dumpEvent.PDG = ROOT.TDatabasePDG.Instance()

Definition at line 9 of file dumpEvent.py.

◆ ship_geo

dumpEvent.ship_geo = ShipGeoConfig.Config().loadpy("$FAIRSHIP/geometry/geometry_config.py")

Definition at line 8 of file dumpEvent.py.