FairShip
Loading...
Searching...
No Matches
dumpEvent Namespace Reference

Functions

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

Variables

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

Function Documentation

◆ dump()

None dumpEvent.dump (   i,
  pcut 
)

Definition at line 32 of file dumpEvent.py.

32def dump(i, pcut) -> None:
33 tree = ROOT.gROOT.FindObjectAny("cbmsim")
34 tree.GetEntry(i)
35 print(" # pid px py pz vx vy vz mid")
36 n = -1
37 for mcp in tree.MCTrack:
38 n += 1
39 if mcp.GetP() / u.GeV < pcut:
40 continue
41 printMCTrack(n, tree.MCTrack)
42
43

◆ dumpStraw()

None dumpEvent.dumpStraw (   i)

Definition at line 44 of file dumpEvent.py.

44def dumpStraw(i) -> None:
45 tree = ROOT.gROOT.FindObjectAny("cbmsim")
46 tree.GetEntry(i)
47 for aStraw in tree.strawtubesPoint:
48 trID = aStraw.GetTrackID()
49 if not trID < 0:
50 printMCTrack(trID, tree.MCTrack)

◆ printMCTrack()

None dumpEvent.printMCTrack ( int  n,
  MCTrack 
)

Definition at line 14 of file dumpEvent.py.

14def printMCTrack(n: int, MCTrack) -> None:
15 mcp = MCTrack[n]
16 print(
17 " %6i %7i %6.3F %6.3F %7.3F %7.3F %7.3F %7.3F %6i "
18 % (
19 n,
20 mcp.GetPdgCode(),
21 mcp.GetPx() / u.GeV,
22 mcp.GetPy() / u.GeV,
23 mcp.GetPz() / u.GeV,
24 mcp.GetStartX() / u.m,
25 mcp.GetStartY() / u.m,
26 mcp.GetStartZ() / u.m,
27 mcp.GetMotherId(),
28 )
29 )
30
31

Variable Documentation

◆ PDG

ROOT dumpEvent.PDG = ROOT.TDatabasePDG.Instance()

Definition at line 11 of file dumpEvent.py.

◆ ship_geo

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

Definition at line 10 of file dumpEvent.py.