24 from modularAnalysis
import inputMdst
25 from modularAnalysis
import fillParticleList
26 from modularAnalysis
import reconstructDecay
27 from modularAnalysis
import matchMCTruth
28 from kinfit
import fitKinematic3C
29 from modularAnalysis
import variablesToNtuple
32 from stdPhotons
import stdPhotons
36 mypath = b2.create_path()
38 b2.set_log_level(b2.LogLevel.WARNING)
41 inputMdst(filename=b2.find_file(
'darkphotonmumu_mdst.root',
'examples',
False),
48 fillParticleList(
'mu-:z0',
'chiProb > 0.001 and p > 1.0', path=mypath)
51 reconstructDecay(
'Z0:mm -> mu+:z0 mu-:z0',
'', path=mypath)
55 reconstructDecay(
"beam:rec -> gamma:loose Z0:mm",
"", path=mypath)
56 reconstructDecay(
"beam:kinfit -> gamma:loose Z0:mm",
"", path=mypath)
60 matchMCTruth(
'beam:rec', path=mypath)
61 matchMCTruth(
'beam:kinfit', path=mypath)
64 fitKinematic3C(
'beam:kinfit', path=mypath)
68 mugvars = vc.inv_mass + vc.kinematics + vc.mc_truth + vc.mc_kinematics + vc.momentum_uncertainty
69 z0vars = vc.inv_mass + vc.kinematics + vc.mc_kinematics + vc.mc_truth + \
70 vu.create_aliases_for_selected(mugvars,
'beam -> ^gamma [^Z0 -> ^mu+ ^mu-]')
72 z0uvars = z0vars + [
'OrcaKinFitProb',
'OrcaKinFitChi2',
'OrcaKinFitErrorCode']
75 output_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)