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

Variables

str fname = "/eos/experiment/ship/data/Charm/Cascade-parp16-MSTP82-1-MSEL4-76Mpot_1"
 
float nrpotspill = 5.0e13
 
float chicc = 1.7e-3
 
float chibb = 1.6e-7
 
bool setByHand = False
 
 try :
 
 opts
 
 args
 
str FIN = fname + ".root"
 
os tmp = os.path.abspath(FIN).split("/")
 
str FOUT = "Decay-" + tmp[len(tmp) - 1]
 
ROOT fin = ROOT.TFile(FIN)
 
 else :
 
ROOT sTree = fin.FindObjectAny("pythia6")
 
ROOT nEvents = sTree.GetEntries()
 
dict hc = {}
 
ROOT fhin = ROOT.TFile(FIN.replace("ntuple", "hists"))
 
dict nrcpot = hc["2"].GetBinContent(1) / 2.0
 
ROOT P8gen = ROOT.TPythia8()
 
ROOT P8 = P8gen.Pythia8()
 
int n = 1
 
ROOT p = P8.particleData.particleDataEntryPtr(n)
 
str command = str(n) + ":mayDecay = false"
 
ROOT ftup = ROOT.TFile.Open(FOUT, "RECREATE")
 
ROOT Ntup = ROOT.TNtuple("Decay", "pythia8 heavy flavour decays", "id:px:py:pz:E:M:weight:mid:mpx:mpy:mpz:mE:pot:ptGM:pzGM")
 
dict h = {}
 
ROOT PDG = ROOT.TDatabasePDG.Instance()
 
int idhnu = 1000 + idnu
 
idnu idw = idnu
 
ROOT name = PDG.GetParticle(idw).GetName()
 
float pot = 0.0
 
int nDsprim = 0
 
int ntotprim = 0
 
ROOT rc = sTree.GetEvent(n)
 
float wspill = nrpotspill * chicc / nrcpot
 
ROOT pt = ROOT.TMath.Sqrt(sTree.mpx**2 + sTree.mpy**2)
 
int idabs = int(abs(sTree.id))
 
ROOT par = P8.event[n]
 
ROOT ptGM = ROOT.TMath.Sqrt(sTree.mpx * sTree.mpx + sTree.mpy * sTree.mpy)
 
ROOT pt2 = par.px() ** 2 + par.py() ** 2
 
ROOT ptot = ROOT.TMath.Sqrt(pt2 + par.pz() ** 2)
 
min l10ptot = min(max(ROOT.TMath.Log10(ptot), -0.3), 1.69999)
 
min l10pt = min(max(ROOT.TMath.Log10(ROOT.TMath.Sqrt(pt2)), -2.0), 0.4999)
 
float fDsP6 = 1.0 * nDsprim / ntotprim
 
float fDs = 0.077
 

Variable Documentation

◆ args

makeDecay.args

Definition at line 27 of file makeDecay.py.

◆ chibb

float makeDecay.chibb = 1.6e-7

Definition at line 21 of file makeDecay.py.

◆ chicc

float makeDecay.chicc = 1.7e-3

Definition at line 20 of file makeDecay.py.

◆ command

str makeDecay.command = str(n) + ":mayDecay = false"

Definition at line 78 of file makeDecay.py.

◆ else

makeDecay.else :

Definition at line 48 of file makeDecay.py.

◆ fDs

float makeDecay.fDs = 0.077

Definition at line 194 of file makeDecay.py.

◆ fDsP6

float makeDecay.fDsP6 = 1.0 * nDsprim / ntotprim

Definition at line 193 of file makeDecay.py.

◆ fhin

ROOT makeDecay.fhin = ROOT.TFile(FIN.replace("ntuple", "hists"))

Definition at line 59 of file makeDecay.py.

◆ FIN

str makeDecay.FIN = fname + ".root"

Definition at line 43 of file makeDecay.py.

◆ fin

ROOT makeDecay.fin = ROOT.TFile(FIN)

Definition at line 47 of file makeDecay.py.

◆ fname

a makeDecay.fname = "/eos/experiment/ship/data/Charm/Cascade-parp16-MSTP82-1-MSEL4-76Mpot_1"

Definition at line 17 of file makeDecay.py.

◆ FOUT

str makeDecay.FOUT = "Decay-" + tmp[len(tmp) - 1]

Definition at line 45 of file makeDecay.py.

◆ ftup

ROOT makeDecay.ftup = ROOT.TFile.Open(FOUT, "RECREATE")

Definition at line 85 of file makeDecay.py.

◆ h

dict makeDecay.h = {}

Definition at line 88 of file makeDecay.py.

◆ hc

dict makeDecay.hc = {}

Definition at line 55 of file makeDecay.py.

◆ idabs

int makeDecay.idabs = int(abs(sTree.id))

Definition at line 130 of file makeDecay.py.

◆ idhnu

int makeDecay.idhnu = 1000 + idnu

Definition at line 95 of file makeDecay.py.

◆ idw

idnu makeDecay.idw = idnu

Definition at line 96 of file makeDecay.py.

◆ l10pt

min makeDecay.l10pt = min(max(ROOT.TMath.Log10(ROOT.TMath.Sqrt(pt2)), -2.0), 0.4999)

Definition at line 170 of file makeDecay.py.

◆ l10ptot

min makeDecay.l10ptot = min(max(ROOT.TMath.Log10(ptot), -0.3), 1.69999)

Definition at line 169 of file makeDecay.py.

◆ n

ROOT makeDecay.n = 1

Definition at line 73 of file makeDecay.py.

◆ name

ROOT makeDecay.name = PDG.GetParticle(idw).GetName()

Definition at line 100 of file makeDecay.py.

◆ nDsprim

int makeDecay.nDsprim = 0

Definition at line 107 of file makeDecay.py.

◆ nEvents

ROOT makeDecay.nEvents = sTree.GetEntries()

Definition at line 51 of file makeDecay.py.

◆ nrcpot

dict makeDecay.nrcpot = hc["2"].GetBinContent(1) / 2.0

Definition at line 63 of file makeDecay.py.

◆ nrpotspill

float makeDecay.nrpotspill = 5.0e13

Definition at line 19 of file makeDecay.py.

◆ ntotprim

int makeDecay.ntotprim = 0

Definition at line 108 of file makeDecay.py.

◆ Ntup

ROOT makeDecay.Ntup = ROOT.TNtuple("Decay", "pythia8 heavy flavour decays", "id:px:py:pz:E:M:weight:mid:mpx:mpy:mpz:mE:pot:ptGM:pzGM")

Definition at line 86 of file makeDecay.py.

◆ opts

makeDecay.opts

Definition at line 27 of file makeDecay.py.

◆ p

ROOT makeDecay.p = P8.particleData.particleDataEntryPtr(n)

Definition at line 76 of file makeDecay.py.

◆ P8

ROOT makeDecay.P8 = P8gen.Pythia8()

Definition at line 69 of file makeDecay.py.

◆ P8gen

ROOT makeDecay.P8gen = ROOT.TPythia8()

Definition at line 68 of file makeDecay.py.

◆ par

ROOT makeDecay.par = P8.event[n]

Definition at line 143 of file makeDecay.py.

◆ PDG

ROOT makeDecay.PDG = ROOT.TDatabasePDG.Instance()

Definition at line 91 of file makeDecay.py.

◆ pot

float makeDecay.pot = 0.0

Definition at line 105 of file makeDecay.py.

◆ pt

ROOT makeDecay.pt = ROOT.TMath.Sqrt(sTree.mpx**2 + sTree.mpy**2)

Definition at line 125 of file makeDecay.py.

◆ pt2

ROOT makeDecay.pt2 = par.px() ** 2 + par.py() ** 2

Definition at line 167 of file makeDecay.py.

◆ ptGM

ROOT makeDecay.ptGM = ROOT.TMath.Sqrt(sTree.mpx * sTree.mpx + sTree.mpy * sTree.mpy)

Definition at line 144 of file makeDecay.py.

◆ ptot

ROOT makeDecay.ptot = ROOT.TMath.Sqrt(pt2 + par.pz() ** 2)

Definition at line 168 of file makeDecay.py.

◆ rc

ROOT makeDecay.rc = sTree.GetEvent(n)

Definition at line 111 of file makeDecay.py.

◆ setByHand

bool makeDecay.setByHand = False

Definition at line 22 of file makeDecay.py.

◆ sTree

ROOT makeDecay.sTree = fin.FindObjectAny("pythia6")

Definition at line 50 of file makeDecay.py.

◆ tmp

os makeDecay.tmp = os.path.abspath(FIN).split("/")

Definition at line 44 of file makeDecay.py.

◆ try

makeDecay.try :

Definition at line 26 of file makeDecay.py.

◆ wspill

float makeDecay.wspill = nrpotspill * chicc / nrcpot

Definition at line 123 of file makeDecay.py.