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

Functions

None mem_monitor ()
 

Variables

bool withHists = True
 
bool pidProton = False
 
ArgumentParser parser = ArgumentParser()
 
 dest
 
 help
 
 required
 
 False
 
 default
 
 type
 
 action
 
 choices
 
 None
 
ArgumentParser options = parser.parse_args()
 
not vertexing = not options.noVertexing
 
ArgumentParser tmp = options.inputFile.split(".")
 
 try :
 
float dy = float(tmp[1] + "." + tmp[2])
 
ArgumentParser outFile = options.inputFile
 
 inputFile
 
 else :
 
 geoFile
 
ROOT fgeo = ROOT.TFile.Open(options.geoFile)
 
ROOT geoMat = ROOT.genfit.TGeoMaterialInterface()
 
load_from_root_file ShipGeo = load_from_root_file(fgeo, "ShipGeo")
 
dict h = {}
 
ROOT run = ROOT.FairRunSim()
 
ROOT rtdb = run.GetRuntimeDb()
 
shipDet_conf modules = shipDet_conf.configure(run, ShipGeo)
 
geomGeant4 fieldMaker = geomGeant4.addVMCFields(ShipGeo, "", True, withVirtualMC=False)
 
 debug
 
 withT0
 
 realPR
 
 withNoStrawSmearing
 
 iEvent
 
shipDigiReco SHiP = shipDigiReco.ShipDigiReco(options.inputFile, outFile, fgeo)
 
 nEvents
 
shipDigiReco rc = SHiP.sTree.GetEvent(global_variables.iEvent)
 

Function Documentation

◆ mem_monitor()

None ShipReco.mem_monitor ( )

Definition at line 13 of file ShipReco.py.

13def mem_monitor() -> None:
14 # Getting virtual memory size
15 pid = os.getpid()
16 with open(os.path.join("/proc", str(pid), "status")) as f:
17 lines = f.readlines()
18 _vmsize = [line for line in lines if line.startswith("VmSize")][0]
19 vmsize = int(_vmsize.split()[1])
20 # Getting physical memory size
21 pmsize = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
22 print(f"memory: virtual = {vmsize / 1.0e3:5.2F} MB physical = {pmsize / 1.0e3:5.2F} MB")
23
24
int open(const char *, int)
Opens a file descriptor.

Variable Documentation

◆ action

ShipReco.action

Definition at line 42 of file ShipReco.py.

◆ choices

ShipReco.choices

Definition at line 71 of file ShipReco.py.

◆ debug

ShipReco.debug

Definition at line 151 of file ShipReco.py.

◆ default

ShipReco.default

Definition at line 38 of file ShipReco.py.

◆ dest

ShipReco.dest

Definition at line 36 of file ShipReco.py.

◆ dy

None ShipReco.dy = float(tmp[1] + "." + tmp[2])

Definition at line 86 of file ShipReco.py.

◆ else

ShipReco.else :

Definition at line 108 of file ShipReco.py.

◆ False

ShipReco.False

Definition at line 38 of file ShipReco.py.

◆ fgeo

ROOT ShipReco.fgeo = ROOT.TFile.Open(options.geoFile)

Definition at line 118 of file ShipReco.py.

◆ fieldMaker

ShipReco.fieldMaker = geomGeant4.addVMCFields(ShipGeo, "", True, withVirtualMC=False)

Definition at line 148 of file ShipReco.py.

◆ geoFile

ShipReco.geoFile

Definition at line 116 of file ShipReco.py.

◆ geoMat

ROOT ShipReco.geoMat = ROOT.genfit.TGeoMaterialInterface()

Definition at line 119 of file ShipReco.py.

◆ h

ShipReco.h = {}

Definition at line 126 of file ShipReco.py.

◆ help

ShipReco.help

Definition at line 36 of file ShipReco.py.

◆ iEvent

ShipReco.iEvent

Definition at line 161 of file ShipReco.py.

◆ inputFile

ShipReco.inputFile

Definition at line 107 of file ShipReco.py.

◆ modules

ShipReco.modules = shipDet_conf.configure(run, ShipGeo)

Definition at line 142 of file ShipReco.py.

◆ nEvents

ShipReco.nEvents

Definition at line 167 of file ShipReco.py.

◆ None

ShipReco.None

Definition at line 74 of file ShipReco.py.

◆ options

ArgumentParser ShipReco.options = parser.parse_args()

Definition at line 77 of file ShipReco.py.

◆ outFile

ArgumentParser ShipReco.outFile = options.inputFile

Definition at line 106 of file ShipReco.py.

◆ parser

ArgumentParser ShipReco.parser = ArgumentParser()

Definition at line 34 of file ShipReco.py.

◆ pidProton

ShipReco.pidProton = False

Definition at line 8 of file ShipReco.py.

◆ rc

shipDigiReco ShipReco.rc = SHiP.sTree.GetEvent(global_variables.iEvent)

Definition at line 172 of file ShipReco.py.

◆ realPR

ShipReco.realPR

Definition at line 155 of file ShipReco.py.

◆ required

ShipReco.required

Definition at line 36 of file ShipReco.py.

◆ rtdb

ROOT ShipReco.rtdb = run.GetRuntimeDb()

Definition at line 140 of file ShipReco.py.

◆ run

ROOT ShipReco.run = ROOT.FairRunSim()

Definition at line 136 of file ShipReco.py.

◆ SHiP

shipDigiReco ShipReco.SHiP = shipDigiReco.ShipDigiReco(options.inputFile, outFile, fgeo)

Definition at line 166 of file ShipReco.py.

◆ ShipGeo

ShipReco.ShipGeo = load_from_root_file(fgeo, "ShipGeo")

Definition at line 124 of file ShipReco.py.

◆ tmp

ArgumentParser ShipReco.tmp = options.inputFile.split(".")

Definition at line 84 of file ShipReco.py.

◆ try

ShipReco.try :

Definition at line 85 of file ShipReco.py.

◆ type

ShipReco.type

Definition at line 38 of file ShipReco.py.

◆ vertexing

ShipReco.vertexing = not options.noVertexing

Definition at line 78 of file ShipReco.py.

◆ withHists

bool ShipReco.withHists = True

Definition at line 7 of file ShipReco.py.

◆ withNoStrawSmearing

ShipReco.withNoStrawSmearing

Definition at line 159 of file ShipReco.py.

◆ withT0

ShipReco.withT0

Definition at line 154 of file ShipReco.py.