SND@LHC Software
Loading...
Searching...
No Matches
makeDecay.py File Reference

Go to the source code of this file.

Namespaces

namespace  makeDecay
 

Variables

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