30from modularAnalysis
import inputMdst
31from modularAnalysis
import fillParticleList
32from modularAnalysis
import reconstructDecay
33from modularAnalysis
import matchMCTruth
34from vertex
import raveFit
35from kinfit
import fitKinematic4C
36from modularAnalysis
import variablesToNtuple
42my_path = b2.create_path()
45inputMdst(filename=b2.find_file(
'darkphotonmumu_mdst.root',
'examples',
False),
49fillParticleList(
"gamma:sel",
'E > 0.1 and abs(formula(clusterTiming/clusterErrorTiming)) < 1.0', path=my_path)
50fillParticleList(
"mu-:sel",
'electronID < 0.01 and chiProb > 0.001 and abs(dz) < 3 and dr < 0.1', path=my_path)
52reconstructDecay(
"A:sel -> mu-:sel mu+:sel",
"", path=my_path)
53reconstructDecay(
"A:selvertex -> mu-:sel mu+:sel",
"", path=my_path)
56raveFit(
"A:selvertex", -1.0, constraint=
"iptube", daughtersUpdate=
True, path=my_path)
59reconstructDecay(
"beam:sel -> A:sel gamma:sel",
"", path=my_path)
60reconstructDecay(
"beam:selv -> A:selvertex gamma:sel",
"", path=my_path)
61reconstructDecay(
"beam:selv4c -> A:selvertex gamma:sel",
"", path=my_path)
64matchMCTruth(
'beam:sel', path=my_path)
65matchMCTruth(
'beam:selv', path=my_path)
66matchMCTruth(
'beam:selv4c', path=my_path)
69fitKinematic4C(
"beam:selv4c", path=my_path)
72muvars = vc.kinematics + vc.mc_truth + vc.mc_kinematics + vc.pid + vc.momentum_uncertainty
73gammavars = vc.inv_mass + vc.kinematics + vc.mc_kinematics + vc.mc_truth + vc.momentum_uncertainty
74avars = vc.inv_mass + vc.kinematics + vc.mc_kinematics + vc.mc_truth + vc.momentum_uncertainty
75uvars = vc.inv_mass + vc.kinematics + vc.mc_kinematics + vc.mc_truth + \
76 vu.create_aliases_for_selected(muvars,
'beam -> [A -> ^mu+ ^mu-] gamma') + \
77 vu.create_aliases_for_selected(gammavars,
'beam -> A ^gamma') + \
78 vu.create_aliases_for_selected(avars,
'beam -> ^A gamma')
80uvarsv = uvars + [
'chiProb']
82uvars4c = uvars + [
'OrcaKinFitProb',
'OrcaKinFitProb',
'OrcaKinFitChi2',
'OrcaKinFitErrorCode'] + \
83 vu.create_aliases([
'VertexFitChi2',
84 'VertexFitProb'],
'daughter(1, extraInfo({variable}))',
"A")
87output_file =
'B2A424-OrcaKinFit_vertexfit_4Cfit.root'
89 filename=output_file, treename=
'beamselv4c', path=my_path)
91 filename=output_file, treename=
'beamselv', path=my_path)
93 filename=output_file, treename=
'beamsel', path=my_path)
def add_particle(name, pdgCode, mass, width, charge, spin, max_width=None, lifetime=0, pythiaID=0, define_anti_particle=False)