|
FairShip
|
Functions | |
| def | rotate (px, py, pz, theta, phi) |
| None | update_file (str filename, final_xsec) |
| None | inspect_file (str filename) |
| None | makeMuonDIS () |
| def | getMasssq (pid) |
| def | rotate (ctheta, stheta, cphi, sphi, px, py, pz) |
Variables | |
| level | |
| r | PDG = r.TDatabasePDG.Instance() |
| argparse | parser = argparse.ArgumentParser(description=__doc__) |
| help | |
| required | |
| dest | |
| default | |
| type | |
| argparse | args = parser.parse_args() |
| argparse | n_events = args.n_events |
| argparse | first_mu_event = args.first_mu_event |
| list | headers |
| dict | Fixtarget = {1: "p+", 0: "n0"} |
| int | nJob = 2 |
| int | nMult = 10 |
| str | muonIn = "$SHIPSOFT/data/muConcrete.root" |
| int | nPerJob = 20000 |
| ROOT | myPythia = ROOT.TPythia6() |
| ROOT | kc = myPythia.Pycomp(kf) |
| dict | masssq = {} |
| int | R = int(time.time() % 900000000) |
| dict | mutype = {-13: "gamma/mu+", 13: "gamma/mu-"} |
| ROOT | fout = ROOT.TFile("muonDis_" + str(nJob) + ".root", "recreate") |
| ROOT | dTree = ROOT.TTree("DIS", "muon DIS") |
| ROOT | iMuon = ROOT.TClonesArray("TVectorD") |
| ROOT | iMuonBranch = dTree.Branch("InMuon", iMuon, 32000, -1) |
| ROOT | dPart = ROOT.TClonesArray("TVectorD") |
| ROOT | dPartBranch = dTree.Branch("Particles", dPart, 32000, -1) |
| ROOT | fin = ROOT.TFile(muonIn) |
| ROOT | sTree = fin.muons |
| ROOT | nTOT = sTree.GetEntries() |
| int | nStart = nPerJob * nJob |
| min | nEnd = min(nTOT, nStart + nPerJob) |
| int | nMade = 0 |
| ROOT | rc = sTree.GetEvent(k) |
| px | |
| py | |
| pz | |
| x | |
| y | |
| z | |
| pid | |
| w | |
| ROOT | p = ROOT.TMath.Sqrt(px * px + py * py + pz * pz) |
| ROOT | E = ROOT.TMath.Sqrt(getMasssq(pid) + p * p) |
| ROOT | theta = ROOT.TMath.ACos(pz / p) |
| ROOT | phi = ROOT.TMath.ATan2(py, px) |
| ctheta | |
| stheta | |
| cphi | |
| sphi | |
| array | mu = array("d", [pid, px, py, pz, E, x, y, z, w]) |
| ROOT | tca_vec = iMuon.ConstructedAt(0) |
| ROOT | muPart = ROOT.TVectorD(9, mu) |
| ROOT | did = myPythia.GetK(itrk, 2) |
| dpx | |
| dpy | |
| dpz | |
| dpx | psq = dpx**2 + dpy**2 + dpz**2 |
| array | m = array("d", [did, dpx, dpy, dpz, E]) |
| ROOT | part = ROOT.TVectorD(5, m) |
| len | nPart = len(dPart) |
Script to generate DIS events for muons in Pythia6, and save them to a ROOT file (along with the original muon's soft interactions).
| def makeMuonDIS.getMasssq | ( | pid | ) |
Definition at line 40 of file makeMuonDIS.py.
| None makeMuonDIS.inspect_file | ( | str | filename | ) |
Inspect the contents of muonDis file.
Definition at line 106 of file makeMuonDIS.py.
| None makeMuonDIS.makeMuonDIS | ( | ) |
Generate DIS events.
Definition at line 130 of file makeMuonDIS.py.
| def makeMuonDIS.rotate | ( | ctheta, | |
| stheta, | |||
| cphi, | |||
| sphi, | |||
| px, | |||
| py, | |||
| pz | |||
| ) |
Definition at line 66 of file makeMuonDIS.py.
| def makeMuonDIS.rotate | ( | px, | |
| py, | |||
| pz, | |||
| theta, | |||
| phi | |||
| ) |
Rotate the daughter particle momentum to align with respect to the muon's momentum.
Definition at line 55 of file makeMuonDIS.py.
| None makeMuonDIS.update_file | ( | str | filename, |
| final_xsec | |||
| ) |
Update the DIS cross section of the muon to the converged value from Pythia.
Definition at line 69 of file makeMuonDIS.py.
| argparse makeMuonDIS.args = parser.parse_args() |
Definition at line 50 of file makeMuonDIS.py.
| makeMuonDIS.cphi |
Definition at line 100 of file makeMuonDIS.py.
| makeMuonDIS.ctheta |
Definition at line 99 of file makeMuonDIS.py.
| makeMuonDIS.default |
Definition at line 29 of file makeMuonDIS.py.
| makeMuonDIS.dest |
Definition at line 26 of file makeMuonDIS.py.
| ROOT makeMuonDIS.did = myPythia.GetK(itrk, 2) |
Definition at line 114 of file makeMuonDIS.py.
| ROOT makeMuonDIS.dPart = ROOT.TClonesArray("TVectorD") |
Definition at line 58 of file makeMuonDIS.py.
| ROOT makeMuonDIS.dPartBranch = dTree.Branch("Particles", dPart, 32000, -1) |
Definition at line 59 of file makeMuonDIS.py.
| makeMuonDIS.dpx |
Definition at line 115 of file makeMuonDIS.py.
| makeMuonDIS.dpy |
Definition at line 115 of file makeMuonDIS.py.
| makeMuonDIS.dpz |
Definition at line 115 of file makeMuonDIS.py.
| ROOT makeMuonDIS.dTree = ROOT.TTree("DIS", "muon DIS") |
Definition at line 55 of file makeMuonDIS.py.
Definition at line 95 of file makeMuonDIS.py.
| ROOT makeMuonDIS.fin = ROOT.TFile(muonIn) |
Definition at line 62 of file makeMuonDIS.py.
| argparse makeMuonDIS.first_mu_event = args.first_mu_event |
Definition at line 52 of file makeMuonDIS.py.
| dict makeMuonDIS.Fixtarget = {1: "p+", 0: "n0"} |
Definition at line 103 of file makeMuonDIS.py.
| ROOT makeMuonDIS.fout = ROOT.TFile("muonDis_" + str(nJob) + ".root", "recreate") |
Definition at line 54 of file makeMuonDIS.py.
| list makeMuonDIS.headers |
Definition at line 94 of file makeMuonDIS.py.
| makeMuonDIS.help |
Definition at line 22 of file makeMuonDIS.py.
| ROOT makeMuonDIS.iMuon = ROOT.TClonesArray("TVectorD") |
Definition at line 56 of file makeMuonDIS.py.
| ROOT makeMuonDIS.iMuonBranch = dTree.Branch("InMuon", iMuon, 32000, -1) |
Definition at line 57 of file makeMuonDIS.py.
| ROOT makeMuonDIS.kc = myPythia.Pycomp(kf) |
Definition at line 34 of file makeMuonDIS.py.
| makeMuonDIS.level |
Definition at line 16 of file makeMuonDIS.py.
Definition at line 120 of file makeMuonDIS.py.
| dict makeMuonDIS.masssq = {} |
Definition at line 37 of file makeMuonDIS.py.
Definition at line 101 of file makeMuonDIS.py.
| sys makeMuonDIS.muonIn = "$SHIPSOFT/data/muConcrete.root" |
Definition at line 14 of file makeMuonDIS.py.
| ROOT makeMuonDIS.muPart = ROOT.TVectorD(9, mu) |
Definition at line 107 of file makeMuonDIS.py.
Definition at line 49 of file makeMuonDIS.py.
| ROOT makeMuonDIS.myPythia = ROOT.TPythia6() |
Definition at line 30 of file makeMuonDIS.py.
| argparse makeMuonDIS.n_events = args.n_events |
Definition at line 51 of file makeMuonDIS.py.
Definition at line 79 of file makeMuonDIS.py.
| int makeMuonDIS.nJob = 2 |
Definition at line 12 of file makeMuonDIS.py.
| int makeMuonDIS.nMade = 0 |
Definition at line 87 of file makeMuonDIS.py.
| int makeMuonDIS.nMult = 10 |
Definition at line 13 of file makeMuonDIS.py.
| len makeMuonDIS.nPart = len(dPart) |
Definition at line 123 of file makeMuonDIS.py.
| int makeMuonDIS.nPerJob = 20000 |
Definition at line 15 of file makeMuonDIS.py.
Definition at line 78 of file makeMuonDIS.py.
| ROOT makeMuonDIS.nTOT = sTree.GetEntries() |
Definition at line 76 of file makeMuonDIS.py.
Definition at line 94 of file makeMuonDIS.py.
| argparse makeMuonDIS.parser = argparse.ArgumentParser(description=__doc__) |
Definition at line 21 of file makeMuonDIS.py.
| ROOT makeMuonDIS.part = ROOT.TVectorD(5, m) |
Definition at line 121 of file makeMuonDIS.py.
| ROOT makeMuonDIS.PDG = r.TDatabasePDG.Instance() |
Definition at line 17 of file makeMuonDIS.py.
Definition at line 98 of file makeMuonDIS.py.
| makeMuonDIS.pid |
Definition at line 93 of file makeMuonDIS.py.
| makeMuonDIS.px |
Definition at line 91 of file makeMuonDIS.py.
| makeMuonDIS.py |
Definition at line 91 of file makeMuonDIS.py.
| makeMuonDIS.pz |
Definition at line 91 of file makeMuonDIS.py.
| int makeMuonDIS.R = int(time.time() % 900000000) |
Definition at line 47 of file makeMuonDIS.py.
| ROOT makeMuonDIS.rc = sTree.GetEvent(k) |
Definition at line 89 of file makeMuonDIS.py.
| makeMuonDIS.required |
Definition at line 22 of file makeMuonDIS.py.
| makeMuonDIS.sphi |
Definition at line 100 of file makeMuonDIS.py.
| makeMuonDIS.stheta |
Definition at line 99 of file makeMuonDIS.py.
| ROOT makeMuonDIS.sTree = fin.muons |
Definition at line 63 of file makeMuonDIS.py.
| ROOT makeMuonDIS.tca_vec = iMuon.ConstructedAt(0) |
Definition at line 106 of file makeMuonDIS.py.
Definition at line 97 of file makeMuonDIS.py.
| makeMuonDIS.type |
Definition at line 30 of file makeMuonDIS.py.
| makeMuonDIS.w |
Definition at line 93 of file makeMuonDIS.py.
| makeMuonDIS.x |
Definition at line 92 of file makeMuonDIS.py.
| makeMuonDIS.y |
Definition at line 92 of file makeMuonDIS.py.
| makeMuonDIS.z |
Definition at line 92 of file makeMuonDIS.py.