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

Go to the source code of this file.

Namespaces

namespace  make_nTuple_Tr

Functions

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

Variables

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