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

Functions

 getMasssq (pid)

Variables

int nJob = 1
int nMult = 1000
str muonIn = "/media/Data/HNL/muVetoDIS/muDISVetoCounter.root"
 PDG = ROOT.TDatabasePDG.Instance()
dict masssq = {}
 fout = ROOT.TFile("muonEm_" + str(nJob) + ".root", "recreate")
 dTree = ROOT.TTree("pythia8-Geant4", "muons for EM studies")
 iMuon = ROOT.TClonesArray("TVectorD")
 iMuonBranch = dTree.Branch("InMuon", iMuon, 32000, -1)
 dPart = ROOT.TClonesArray("TVectorD")
 dPartBranch = dTree.Branch("Particles", dPart, 32000, -1)
 fin = ROOT.TFile(muonIn)
 sTree = fin.muons
 rc = sTree.GetEvent(k)
 px
 py
 pz
 x
 y
 z
 pid
 w
 p = ROOT.TMath.Sqrt(px * px + py * py + pz * pz)
 E = ROOT.TMath.Sqrt(getMasssq(pid) + p * p)
 mu = array("d", [pid, px, py, pz, E, x, y, z, w])
 muPart = ROOT.TVectorD(9, mu)
 m = array("d", [pid, px, py, pz, E])
 part = ROOT.TVectorD(5, m)

Function Documentation

◆ getMasssq()

makeMuonEM.getMasssq ( pid)

Definition at line 19 of file makeMuonEM.py.

19def getMasssq(pid):
20 apid = abs(int(pid))
21 if apid not in masssq:
22 _p = ut.get_particle(apid)
23 masssq[apid] = _p.Mass() ** 2
24 return masssq[apid]
25
26
27# prepare muon input for FairShip/Geant4 processing
28# incoming muon, id:px:py:pz:x:y:z:ox:oy:oz:pythiaid:parentid:ecut:w
29
30# just duplicate muon n times, rather stupid job
31

Variable Documentation

◆ dPart

makeMuonEM.dPart = ROOT.TClonesArray("TVectorD")

Definition at line 36 of file makeMuonEM.py.

◆ dPartBranch

makeMuonEM.dPartBranch = dTree.Branch("Particles", dPart, 32000, -1)

Definition at line 37 of file makeMuonEM.py.

◆ dTree

makeMuonEM.dTree = ROOT.TTree("pythia8-Geant4", "muons for EM studies")

Definition at line 33 of file makeMuonEM.py.

◆ E

makeMuonEM.E = ROOT.TMath.Sqrt(getMasssq(pid) + p * p)

Definition at line 50 of file makeMuonEM.py.

◆ fin

makeMuonEM.fin = ROOT.TFile(muonIn)

Definition at line 40 of file makeMuonEM.py.

◆ fout

makeMuonEM.fout = ROOT.TFile("muonEm_" + str(nJob) + ".root", "recreate")

Definition at line 32 of file makeMuonEM.py.

◆ iMuon

makeMuonEM.iMuon = ROOT.TClonesArray("TVectorD")

Definition at line 34 of file makeMuonEM.py.

◆ iMuonBranch

makeMuonEM.iMuonBranch = dTree.Branch("InMuon", iMuon, 32000, -1)

Definition at line 35 of file makeMuonEM.py.

◆ m

makeMuonEM.m = array("d", [pid, px, py, pz, E])

Definition at line 58 of file makeMuonEM.py.

◆ masssq

dict makeMuonEM.masssq = {}

Definition at line 16 of file makeMuonEM.py.

◆ mu

makeMuonEM.mu = array("d", [pid, px, py, pz, E, x, y, z, w])

Definition at line 51 of file makeMuonEM.py.

◆ muonIn

str makeMuonEM.muonIn = "/media/Data/HNL/muVetoDIS/muDISVetoCounter.root"

Definition at line 10 of file makeMuonEM.py.

◆ muPart

makeMuonEM.muPart = ROOT.TVectorD(9, mu)

Definition at line 52 of file makeMuonEM.py.

◆ nJob

int makeMuonEM.nJob = 1

Definition at line 8 of file makeMuonEM.py.

◆ nMult

int makeMuonEM.nMult = 1000

Definition at line 9 of file makeMuonEM.py.

◆ p

makeMuonEM.p = ROOT.TMath.Sqrt(px * px + py * py + pz * pz)

Definition at line 49 of file makeMuonEM.py.

◆ part

makeMuonEM.part = ROOT.TVectorD(5, m)

Definition at line 59 of file makeMuonEM.py.

◆ PDG

makeMuonEM.PDG = ROOT.TDatabasePDG.Instance()

Definition at line 15 of file makeMuonEM.py.

◆ pid

makeMuonEM.pid

Definition at line 48 of file makeMuonEM.py.

◆ px

makeMuonEM.px

Definition at line 46 of file makeMuonEM.py.

◆ py

makeMuonEM.py

Definition at line 46 of file makeMuonEM.py.

◆ pz

makeMuonEM.pz

Definition at line 46 of file makeMuonEM.py.

◆ rc

makeMuonEM.rc = sTree.GetEvent(k)

Definition at line 44 of file makeMuonEM.py.

◆ sTree

makeMuonEM.sTree = fin.muons

Definition at line 41 of file makeMuonEM.py.

◆ w

makeMuonEM.w

Definition at line 48 of file makeMuonEM.py.

◆ x

makeMuonEM.x

Definition at line 47 of file makeMuonEM.py.

◆ y

makeMuonEM.y

Definition at line 47 of file makeMuonEM.py.

◆ z

makeMuonEM.z

Definition at line 47 of file makeMuonEM.py.