SND@LHC Software
Loading...
Searching...
No Matches
makeDecay Namespace Reference

Variables

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

Variable Documentation

◆ args

makeDecay.args

Definition at line 21 of file makeDecay.py.

◆ chibb

float makeDecay.chibb = 1.6e-7

Definition at line 15 of file makeDecay.py.

◆ chicc

float makeDecay.chicc = 1.7e-3

Definition at line 14 of file makeDecay.py.

◆ command

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

Definition at line 71 of file makeDecay.py.

◆ fDs

float makeDecay.fDs = 0.077

Definition at line 168 of file makeDecay.py.

◆ fDsP6

int makeDecay.fDsP6 = 1.*nDsprim/ntotprim

Definition at line 167 of file makeDecay.py.

◆ fhin

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

Definition at line 52 of file makeDecay.py.

◆ FIN

str makeDecay.FIN = fname+'.root'

Definition at line 38 of file makeDecay.py.

◆ fin

makeDecay.fin

Definition at line 41 of file makeDecay.py.

◆ fname

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

Definition at line 11 of file makeDecay.py.

◆ FOUT

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

Definition at line 40 of file makeDecay.py.

◆ ftup

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

Definition at line 78 of file makeDecay.py.

◆ h

dict makeDecay.h = {}

Definition at line 81 of file makeDecay.py.

◆ hc

dict makeDecay.hc = {}

Definition at line 48 of file makeDecay.py.

◆ idabs

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

Definition at line 123 of file makeDecay.py.

◆ idhnu

int makeDecay.idhnu = 1000+idnu

Definition at line 88 of file makeDecay.py.

◆ idw

makeDecay.idw = idnu

Definition at line 89 of file makeDecay.py.

◆ l10pt

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

Definition at line 145 of file makeDecay.py.

◆ l10ptot

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

Definition at line 144 of file makeDecay.py.

◆ n

makeDecay.n = 1

Definition at line 66 of file makeDecay.py.

◆ name

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

Definition at line 93 of file makeDecay.py.

◆ nDsprim

int makeDecay.nDsprim = 0

Definition at line 100 of file makeDecay.py.

◆ nEvents

makeDecay.nEvents = sTree.GetEntries()

Definition at line 44 of file makeDecay.py.

◆ nrcpot

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

Definition at line 56 of file makeDecay.py.

◆ nrpotspill

makeDecay.nrpotspill = 5.e13

Definition at line 13 of file makeDecay.py.

◆ ntotprim

int makeDecay.ntotprim = 0

Definition at line 101 of file makeDecay.py.

◆ Ntup

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 79 of file makeDecay.py.

◆ opts

makeDecay.opts

Definition at line 21 of file makeDecay.py.

◆ p

makeDecay.p = p8.particleData.particleDataEntryPtr(n)

Definition at line 69 of file makeDecay.py.

◆ P8

makeDecay.P8 = P8gen.Pythia8()

Definition at line 62 of file makeDecay.py.

◆ P8gen

makeDecay.P8gen = ROOT.TPythia8()

Definition at line 61 of file makeDecay.py.

◆ par

makeDecay.par = P8.event[n]

Definition at line 135 of file makeDecay.py.

◆ PDG

makeDecay.PDG = ROOT.TDatabasePDG.Instance()

Definition at line 84 of file makeDecay.py.

◆ pot

int makeDecay.pot = 0.

Definition at line 98 of file makeDecay.py.

◆ pt

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

Definition at line 118 of file makeDecay.py.

◆ pt2

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

Definition at line 142 of file makeDecay.py.

◆ ptGM

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

Definition at line 136 of file makeDecay.py.

◆ ptot

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

Definition at line 143 of file makeDecay.py.

◆ rc

makeDecay.rc = sTree.GetEvent(n)

Definition at line 104 of file makeDecay.py.

◆ setByHand

bool makeDecay.setByHand = False

Definition at line 16 of file makeDecay.py.

◆ sTree

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

Definition at line 43 of file makeDecay.py.

◆ tmp

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

Definition at line 39 of file makeDecay.py.

◆ wspill

int makeDecay.wspill = nrpotspill*chicc/nrcpot

Definition at line 116 of file makeDecay.py.