24from modularAnalysis
import inputMdst
25from modularAnalysis
import fillParticleList
26from modularAnalysis
import reconstructDecay
27from modularAnalysis
import matchMCTruth
28from kinfit
import fitKinematic3C
29from modularAnalysis
import variablesToNtuple
32from stdPhotons
import stdPhotons
36mypath = b2.create_path()
38b2.set_log_level(b2.LogLevel.WARNING)
41inputMdst(filename=b2.find_file(
'darkphotonmumu_mdst.root',
'examples',
False),
48fillParticleList(
'mu-:z0',
'chiProb > 0.001 and p > 1.0', path=mypath)
51reconstructDecay(
'Z0:mm -> mu+:z0 mu-:z0',
'', path=mypath)
55reconstructDecay(
"beam:rec -> gamma:loose Z0:mm",
"", path=mypath)
56reconstructDecay(
"beam:kinfit -> gamma:loose Z0:mm",
"", path=mypath)
60matchMCTruth(
'beam:rec', path=mypath)
61matchMCTruth(
'beam:kinfit', path=mypath)
64fitKinematic3C(
'beam:kinfit', path=mypath)
68mugvars = vc.inv_mass + vc.kinematics + vc.mc_truth + vc.mc_kinematics + vc.momentum_uncertainty
69z0vars = vc.inv_mass + vc.kinematics + vc.mc_kinematics + vc.mc_truth + \
70 vu.create_aliases_for_selected(mugvars,
'beam -> ^gamma [^Z0 -> ^mu+ ^mu-]')
72z0uvars = z0vars + [
'OrcaKinFitProb',
'OrcaKinFitChi2',
'OrcaKinFitErrorCode']
75output_file =
'B2A422-Orcakinfit_3CFit.root'
77 filename=output_file, treename=
'Z0_mm_rec', path=mypath)
79 filename=output_file, treename=
'Z0_mm_kinfit', path=mypath)
def add_particle(name, pdgCode, mass, width, charge, spin, max_width=None, lifetime=0, pythiaID=0, define_anti_particle=False)