30 from modularAnalysis
import inputMdst
31 from modularAnalysis
import fillParticleList
32 from modularAnalysis
import reconstructDecay
33 from modularAnalysis
import matchMCTruth
34 from vertex
import raveFit
35 from kinfit
import fitKinematic4C
36 from modularAnalysis
import variablesToNtuple
42 my_path = b2.create_path()
45 inputMdst(filename=b2.find_file(
'darkphotonmumu_mdst.root',
'examples',
False),
49 fillParticleList(
"gamma:sel",
'E > 0.1 and abs(formula(clusterTiming/clusterErrorTiming)) < 1.0', path=my_path)
50 fillParticleList(
"mu-:sel",
'electronID < 0.01 and chiProb > 0.001 and abs(dz) < 3 and dr < 0.1', path=my_path)
52 reconstructDecay(
"A:sel -> mu-:sel mu+:sel",
"", path=my_path)
53 reconstructDecay(
"A:selvertex -> mu-:sel mu+:sel",
"", path=my_path)
56 raveFit(
"A:selvertex", -1.0, constraint=
"iptube", daughtersUpdate=
True, path=my_path)
59 reconstructDecay(
"beam:sel -> A:sel gamma:sel",
"", path=my_path)
60 reconstructDecay(
"beam:selv -> A:selvertex gamma:sel",
"", path=my_path)
61 reconstructDecay(
"beam:selv4c -> A:selvertex gamma:sel",
"", path=my_path)
64 matchMCTruth(
'beam:sel', path=my_path)
65 matchMCTruth(
'beam:selv', path=my_path)
66 matchMCTruth(
'beam:selv4c', path=my_path)
69 fitKinematic4C(
"beam:selv4c", path=my_path)
72 muvars = vc.kinematics + vc.mc_truth + vc.mc_kinematics + vc.pid + vc.momentum_uncertainty
73 gammavars = vc.inv_mass + vc.kinematics + vc.mc_kinematics + vc.mc_truth + vc.momentum_uncertainty
74 avars = vc.inv_mass + vc.kinematics + vc.mc_kinematics + vc.mc_truth + vc.momentum_uncertainty
75 uvars = 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')
80 uvarsv = uvars + [
'chiProb']
82 uvars4c = uvars + [
'OrcaKinFitProb',
'OrcaKinFitProb',
'OrcaKinFitChi2',
'OrcaKinFitErrorCode'] + \
83 vu.create_aliases([
'VertexFitChi2',
84 'VertexFitProb'],
'daughter(1, extraInfo({variable}))',
"A")
87 output_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)