FairShip
Loading...
Searching...
No Matches
make_nTuple_SBT.py File Reference

Go to the source code of this file.

Namespaces

namespace  make_nTuple_SBT
 

Functions

None make_nTuple_SBT.printMCTrack (int n, MCTrack)
 
None make_nTuple_SBT.dump (event, float pcut=0, bool print_whole_event=True)
 

Variables

make_nTuple_SBT.pdg = r.TDatabasePDG.Instance()
 
 make_nTuple_SBT.level
 
argparse make_nTuple_SBT.parser = argparse.ArgumentParser(description=__doc__)
 
 make_nTuple_SBT.dest
 
 make_nTuple_SBT.help
 
 make_nTuple_SBT.action
 
 make_nTuple_SBT.default
 
argparse make_nTuple_SBT.args = parser.parse_args()
 
 make_nTuple_SBT.outputfile
 
str make_nTuple_SBT.selectedmuons = "SelectedMuonsSBT_test.txt"
 
 make_nTuple_SBT.else :
 
argparse make_nTuple_SBT.path = args.path
 
open make_nTuple_SBT.fsel = open(selectedmuons, "w")
 
csv make_nTuple_SBT.csvwriter = csv.writer(fsel)
 
make_nTuple_SBT.output_file = r.TFile.Open(args.outputfile, "recreate")
 
make_nTuple_SBT.output_tree = r.TTree("MuonAndSoftInteractions", "Muon information and soft interaction tracks")
 
make_nTuple_SBT.imuondata = r.TVectorD(10)
 
make_nTuple_SBT.track_array = r.TObjArray()
 
make_nTuple_SBT.muon_vetoPoints = r.TClonesArray("vetoPoint")
 
make_nTuple_SBT.muon_UpstreamTaggerPoints = r.TClonesArray("UpstreamTaggerPoint")
 
dict make_nTuple_SBT.h = {}
 
int make_nTuple_SBT.global_event_nr = 0
 
dict make_nTuple_SBT.processed_events = {}
 
int make_nTuple_SBT.P_threshold = 3
 
list make_nTuple_SBT.headers
 
None make_nTuple_SBT.f = None
 
 make_nTuple_SBT.try :
 
None make_nTuple_SBT.tree = f.cbmsim
 
list make_nTuple_SBT.muon_table = []
 
dict make_nTuple_SBT.nmu = {"mu+": 0, "mu-": 0}
 
list make_nTuple_SBT.muon_ids = []
 
dict make_nTuple_SBT.muon_hits = {}
 
hit make_nTuple_SBT.detID = hit.GetDetectorID()
 
hit make_nTuple_SBT.pid = hit.PdgCode()
 
hit make_nTuple_SBT.track_id = hit.GetTrackID()
 
make_nTuple_SBT.P = r.TMath.Sqrt(hit.GetPx() ** 2 + hit.GetPy() ** 2 + hit.GetPz() ** 2)
 
make_nTuple_SBT.particle_name = pdg.GetParticle(hit.PdgCode()).GetName()
 
int make_nTuple_SBT.ubt_index = 0
 
int make_nTuple_SBT.index = 0
 
make_nTuple_SBT.Pt = r.TMath.Sqrt(hit.GetPx() ** 2 + hit.GetPy() ** 2)
 
event make_nTuple_SBT.weight = event.MCTrack[track_id].GetWeight()
 
sum make_nTuple_SBT.total_muons = sum(len(values) for values in processed_events.values())
 
list make_nTuple_SBT.event_data = []
 
make_nTuple_SBT.px = imuondata[1]
 
make_nTuple_SBT.py = imuondata[2]
 
make_nTuple_SBT.pz = imuondata[3]
 
make_nTuple_SBT.x = imuondata[4]
 
make_nTuple_SBT.y = imuondata[5]
 
make_nTuple_SBT.z = imuondata[6]
 
make_nTuple_SBT.time_hit = imuondata[8]
 
make_nTuple_SBT.nmuons = imuondata[9]
 
len make_nTuple_SBT.num_tracks = len(event.tracks)
 
len make_nTuple_SBT.num_muonhits = len(event.muon_vetoPoints)
 
len make_nTuple_SBT.num_ubthits = len(event.muon_UpstreamTaggerPoints)