12This module defines functions to add analysis DQM modules.
16from stdPi0s
import stdPi0s
17import modularAnalysis
as ma
21def add_analysis_dqm(path):
22 """Add the analysis DQM modules to the ``path``.
23 Builds a list of muons, pi0's, Kshorts and the Fox Wolfram event shape variables. Also M(mumu) for nominal beam energy monitoring.
26 path (basf2.Path): modules are loaded onto this path
30 ma.fillParticleList(
'mu+:KLMDQM',
'p>1.5', path=path)
31 ma.fillParticleList(
'gamma:physDQM',
'E > 0.15', path=path)
32 ma.fillParticleList(
'mu+:physDQM',
'pt>2. and abs(d0) < 2 and abs(z0) < 4', path=path)
33 ma.reconstructDecay(
'pi0:physDQM -> gamma:physDQM gamma:physDQM',
'0.10 < M < 0.15', 1,
True, path)
36 ma.reconstructDecay(
'Upsilon:physDQM -> mu-:physDQM mu+:physDQM',
'9 < M < 12', 1,
True, path)
38 ma.fillParticleList(
'e+:physDQM',
'pt>0.2 and abs(d0) < 2 and abs(z0) < 4 and thetaInCDCAcceptance', path=path)
39 ma.reconstructDecay(
'Upsilon:ephysDQM -> e-:physDQM e+:physDQM',
'4 < M < 12', 1,
True, path)
40 ma.fillParticleList(
'pi+:hadbphysDQM',
'p>0.1 and abs(d0) < 2 and abs(z0) < 4 and thetaInCDCAcceptance', path=path)
44 ma.fillParticleList(
'pi+:evtshape',
'', path=path)
45 ma.fillParticleList(
'gamma:evtshape',
'', path=path)
48 inputListNames=[
'pi+:evtshape',
'gamma:evtshape'],
49 default_cleanup=
False,
53 harmonicMoments=
False,
58 dqm = b2.register_module(
'PhysicsObjectsDQM')
59 dqm.param(
'PI0PListName',
'pi0:physDQM')
60 dqm.param(
'KS0PListName',
'K_S0:merged')
61 dqm.param(
'UpsPListName',
'Upsilon:physDQM')
63 dqm.param(
'UpsBhabhaPListName',
'Upsilon:ephysDQM')
64 dqm.param(
'UpsHadPListName',
'pi+:hadbphysDQM')
69def add_mirabelle_dqm(path):
70 """Add the mirabelle DQM modules to the ``path``.
71 Runs on conditional paths depending on the software trigger results.
72 Building D*'s or dimuons on the conditional paths.
75 path (basf2.Path): modules are loaded onto this path
78 MiraBelleMumu_path = b2.create_path()
79 MiraBelleDst1_path = b2.create_path()
80 MiraBelleNotDst1_path = b2.create_path()
81 MiraBelleDst2_path = b2.create_path()
83 MiraBelleBhabha_path = b2.create_path()
84 MiraBellehadronb2_path = b2.create_path()
86 trigger_skim_mumutight = path.add_module(
88 triggerLines=[
"software_trigger_cut&skim&accept_mumutight"],
91 trigger_skim_mumutight.if_value(
"==1", MiraBelleMumu_path, b2.AfterConditionPath.CONTINUE)
93 trigger_skim_dstar_1 = path.add_module(
95 triggerLines=[
"software_trigger_cut&skim&accept_dstar_1"],
98 trigger_skim_dstar_1.if_value(
"==1", MiraBelleDst1_path, b2.AfterConditionPath.CONTINUE)
100 trigger_skim_not_dstar_1 = path.add_module(
102 triggerLines=[
"software_trigger_cut&skim&accept_dstar_1"],
106 trigger_skim_not_dstar_1.if_value(
"==1", MiraBelleNotDst1_path, b2.AfterConditionPath.CONTINUE)
107 trigger_skim_dstar_2 = MiraBelleNotDst1_path.add_module(
109 triggerLines=[
"software_trigger_cut&skim&accept_dstar_2"],
112 trigger_skim_dstar_2.if_value(
"==1", MiraBelleDst2_path, b2.AfterConditionPath.CONTINUE)
114 trigger_skim_bhabhaall = path.add_module(
116 triggerLines=[
"software_trigger_cut&skim&accept_bhabha_all"],
119 trigger_skim_bhabhaall.if_value(
"==1", MiraBelleBhabha_path, b2.AfterConditionPath.CONTINUE)
120 trigger_skim_hadronb2 = path.add_module(
122 triggerLines=[
"software_trigger_cut&skim&accept_hadronb2"],
125 trigger_skim_hadronb2.if_value(
"==1", MiraBellehadronb2_path, b2.AfterConditionPath.CONTINUE)
128 ma.fillParticleList(
'mu+:physMiraBelle',
'', path=MiraBelleMumu_path)
129 ma.reconstructDecay(
'Upsilon:physMiraBelle -> mu+:physMiraBelle mu-:physMiraBelle',
'9 < M < 12', path=MiraBelleMumu_path)
130 MiraBelleMumu = b2.register_module(
'PhysicsObjectsMiraBelle')
131 MiraBelleMumu.param(
'MuPListName',
'mu+:physMiraBelle')
132 MiraBelleMumu.param(
'MuMuPListName',
'Upsilon:physMiraBelle')
133 MiraBelleMumu_path.add_module(MiraBelleMumu)
136 ma.fillParticleList(
'pi+:MiraBelleDst1',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst1_path)
137 ma.fillParticleList(
'K+:MiraBelleDst1',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst1_path)
138 ma.reconstructDecay(
'D0:MiraBelleDst1_kpi -> K-:MiraBelleDst1 pi+:MiraBelleDst1',
'1.7 < M < 2.1', path=MiraBelleDst1_path)
139 ma.reconstructDecay(
'D*+:MiraBelleDst1_kpi -> D0:MiraBelleDst1_kpi pi+:MiraBelleDst1',
140 'useCMSFrame(p) > 2.5 and massDifference(0) < 0.16', path=MiraBelleDst1_path)
141 MiraBelleDst1 = b2.register_module(
'PhysicsObjectsMiraBelleDst')
142 MiraBelleDst1.param(
'DstListName',
'D*+:MiraBelleDst1_kpi')
143 MiraBelleDst1_path.add_module(MiraBelleDst1)
146 ma.fillParticleList(
'pi+:MiraBelleDst2',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst2_path)
147 ma.fillParticleList(
'K+:MiraBelleDst2',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst2_path)
148 stdPi0s(listtype=
'eff60_May2020', path=MiraBelleDst2_path)
150 'D0:MiraBelleDst2_kpipi0 -> K-:MiraBelleDst2 pi+:MiraBelleDst2 pi0:eff60_May2020',
152 path=MiraBelleDst2_path)
153 ma.reconstructDecay(
'D*+:MiraBelleDst2_kpipi0 -> D0:MiraBelleDst2_kpipi0 pi+:MiraBelleDst2',
154 'useCMSFrame(p) > 2.5 and massDifference(0) < 0.16', path=MiraBelleDst2_path)
155 MiraBelleDst2 = b2.register_module(
'PhysicsObjectsMiraBelleDst2')
156 MiraBelleDst2.param(
'DstListName',
'D*+:MiraBelleDst2_kpipi0')
157 MiraBelleDst2_path.add_module(MiraBelleDst2)
161 'pt>0.2 and abs(d0) < 2 and abs(z0) < 4 and thetaInCDCAcceptance',
162 path=MiraBelleBhabha_path)
163 ma.reconstructDecay(
'Upsilon:ephysMiraBelle -> e+:physMiraBelle e-:physMiraBelle',
'4 < M < 12', path=MiraBelleBhabha_path)
164 MiraBelleBhabha = b2.register_module(
'PhysicsObjectsMiraBelleBhabha')
165 MiraBelleBhabha.param(
'ePListName',
'e+:physMiraBelle')
166 MiraBelleBhabha.param(
'bhabhaPListName',
'Upsilon:ephysMiraBelle')
167 MiraBelleBhabha_path.add_module(MiraBelleBhabha)
169 'pi+:hadb2physMiraBelle',
170 'p>0.1 and abs(d0) < 2 and abs(z0) < 4 and thetaInCDCAcceptance',
171 path=MiraBellehadronb2_path)
172 MiraBellehadronb = b2.register_module(
'PhysicsObjectsMiraBelleHadron')
173 MiraBellehadronb.param(
'hadronb2piPListName',
'pi+:hadb2physMiraBelle')
174 MiraBellehadronb2_path.add_module(MiraBellehadronb)
def stdKshorts(prioritiseV0=True, fitter='TreeFit', path=None, updateAllDaughters=False, writeOut=False)