12This module defines functions to add analysis DQM modules.
16from stdPi0s
import stdPi0s
17import modularAnalysis
as ma
20def add_analysis_dqm(path):
21 """Add the analysis DQM modules to the ``path``.
22 Builds a list of muons, pi0's, Kshorts and the Fox Wolfram event shape variables. Also M(mumu) for nominal beam energy monitoring.
25 path (basf2.Path): modules are loaded onto this path
29 ma.fillParticleList(
'mu+:KLMDQM',
'p>1.5', path=path)
30 ma.fillParticleList(
'gamma:physDQM',
'E > 0.15', path=path)
31 ma.fillParticleList(
'pi+:physDQM',
'pt>0.2 and abs(d0) < 2 and abs(z0) < 4', 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)
34 ma.reconstructDecay(
'K_S0:physDQM -> pi-:physDQM pi+:physDQM',
'0.48 < M < 0.52', 1,
True, path)
35 ma.reconstructDecay(
'Upsilon:physDQM -> mu-:physDQM mu+:physDQM',
'9 < M < 12', 1,
True, path)
37 ma.fillParticleList(
'e+:physDQM',
'pt>0.2 and abs(d0) < 2 and abs(z0) < 4 and thetaInCDCAcceptance', path=path)
38 ma.reconstructDecay(
'Upsilon:ephysDQM -> e-:physDQM e+:physDQM',
'4 < M < 12', 1,
True, path)
39 ma.fillParticleList(
'pi+:hadbphysDQM',
'p>0.1 and abs(d0) < 2 and abs(z0) < 4 and thetaInCDCAcceptance', path=path)
43 ma.fillParticleList(
'pi+:evtshape',
'', path=path)
44 ma.fillParticleList(
'gamma:evtshape',
'', path=path)
47 inputListNames=[
'pi+:evtshape',
'gamma:evtshape'],
48 default_cleanup=
False,
52 harmonicMoments=
False,
57 dqm = b2.register_module(
'PhysicsObjectsDQM')
58 dqm.param(
'PI0PListName',
'pi0:physDQM')
59 dqm.param(
'KS0PListName',
'K_S0:physDQM')
60 dqm.param(
'UpsPListName',
'Upsilon:physDQM')
62 dqm.param(
'UpsBhabhaPListName',
'Upsilon:ephysDQM')
63 dqm.param(
'UpsHadPListName',
'pi+:hadbphysDQM')
68def add_mirabelle_dqm(path):
69 """Add the mirabelle DQM modules to the ``path``.
70 Runs on conditional paths depending on the software trigger results.
71 Building D*'s or dimuons on the conditional paths.
74 path (basf2.Path): modules are loaded onto this path
77 MiraBelleMumu_path = b2.create_path()
78 MiraBelleDst1_path = b2.create_path()
79 MiraBelleNotDst1_path = b2.create_path()
80 MiraBelleDst2_path = b2.create_path()
82 MiraBelleBhabha_path = b2.create_path()
83 MiraBellehadronb2_path = b2.create_path()
85 trigger_skim_mumutight = path.add_module(
87 triggerLines=[
"software_trigger_cut&skim&accept_mumutight"],
90 trigger_skim_mumutight.if_value(
"==1", MiraBelleMumu_path, b2.AfterConditionPath.CONTINUE)
92 trigger_skim_dstar_1 = path.add_module(
94 triggerLines=[
"software_trigger_cut&skim&accept_dstar_1"],
97 trigger_skim_dstar_1.if_value(
"==1", MiraBelleDst1_path, b2.AfterConditionPath.CONTINUE)
99 trigger_skim_not_dstar_1 = path.add_module(
101 triggerLines=[
"software_trigger_cut&skim&accept_dstar_1"],
105 trigger_skim_not_dstar_1.if_value(
"==1", MiraBelleNotDst1_path, b2.AfterConditionPath.CONTINUE)
106 trigger_skim_dstar_2 = MiraBelleNotDst1_path.add_module(
108 triggerLines=[
"software_trigger_cut&skim&accept_dstar_2"],
111 trigger_skim_dstar_2.if_value(
"==1", MiraBelleDst2_path, b2.AfterConditionPath.CONTINUE)
113 trigger_skim_bhabhaall = path.add_module(
115 triggerLines=[
"software_trigger_cut&skim&accept_bhabha_all"],
118 trigger_skim_bhabhaall.if_value(
"==1", MiraBelleBhabha_path, b2.AfterConditionPath.CONTINUE)
119 trigger_skim_hadronb2 = path.add_module(
121 triggerLines=[
"software_trigger_cut&skim&accept_hadronb2"],
124 trigger_skim_hadronb2.if_value(
"==1", MiraBellehadronb2_path, b2.AfterConditionPath.CONTINUE)
127 ma.fillParticleList(
'mu+:physMiraBelle',
'', path=MiraBelleMumu_path)
128 ma.reconstructDecay(
'Upsilon:physMiraBelle -> mu+:physMiraBelle mu-:physMiraBelle',
'9 < M < 12', path=MiraBelleMumu_path)
129 MiraBelleMumu = b2.register_module(
'PhysicsObjectsMiraBelle')
130 MiraBelleMumu.param(
'MuPListName',
'mu+:physMiraBelle')
131 MiraBelleMumu.param(
'MuMuPListName',
'Upsilon:physMiraBelle')
132 MiraBelleMumu_path.add_module(MiraBelleMumu)
135 ma.fillParticleList(
'pi+:MiraBelleDst1',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst1_path)
136 ma.fillParticleList(
'K+:MiraBelleDst1',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst1_path)
137 ma.reconstructDecay(
'D0:MiraBelleDst1_kpi -> K-:MiraBelleDst1 pi+:MiraBelleDst1',
'1.7 < M < 2.1', path=MiraBelleDst1_path)
138 ma.reconstructDecay(
'D*+:MiraBelleDst1_kpi -> D0:MiraBelleDst1_kpi pi+:MiraBelleDst1',
139 'useCMSFrame(p) > 2.5 and massDifference(0) < 0.16', path=MiraBelleDst1_path)
140 MiraBelleDst1 = b2.register_module(
'PhysicsObjectsMiraBelleDst')
141 MiraBelleDst1.param(
'DstListName',
'D*+:MiraBelleDst1_kpi')
142 MiraBelleDst1_path.add_module(MiraBelleDst1)
145 ma.fillParticleList(
'pi+:MiraBelleDst2',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst2_path)
146 ma.fillParticleList(
'K+:MiraBelleDst2',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst2_path)
147 stdPi0s(listtype=
'eff60_May2020', path=MiraBelleDst2_path)
149 'D0:MiraBelleDst2_kpipi0 -> K-:MiraBelleDst2 pi+:MiraBelleDst2 pi0:eff60_May2020',
151 path=MiraBelleDst2_path)
152 ma.reconstructDecay(
'D*+:MiraBelleDst2_kpipi0 -> D0:MiraBelleDst2_kpipi0 pi+:MiraBelleDst2',
153 'useCMSFrame(p) > 2.5 and massDifference(0) < 0.16', path=MiraBelleDst2_path)
154 MiraBelleDst2 = b2.register_module(
'PhysicsObjectsMiraBelleDst2')
155 MiraBelleDst2.param(
'DstListName',
'D*+:MiraBelleDst2_kpipi0')
156 MiraBelleDst2_path.add_module(MiraBelleDst2)
160 'pt>0.2 and abs(d0) < 2 and abs(z0) < 4 and thetaInCDCAcceptance',
161 path=MiraBelleBhabha_path)
162 ma.reconstructDecay(
'Upsilon:ephysMiraBelle -> e+:physMiraBelle e-:physMiraBelle',
'4 < M < 12', path=MiraBelleBhabha_path)
163 MiraBelleBhabha = b2.register_module(
'PhysicsObjectsMiraBelleBhabha')
164 MiraBelleBhabha.param(
'ePListName',
'e+:physMiraBelle')
165 MiraBelleBhabha.param(
'bhabhaPListName',
'Upsilon:ephysMiraBelle')
166 MiraBelleBhabha_path.add_module(MiraBelleBhabha)
168 'pi+:hadb2physMiraBelle',
169 'p>0.1 and abs(d0) < 2 and abs(z0) < 4 and thetaInCDCAcceptance',
170 path=MiraBellehadronb2_path)
171 MiraBellehadronb = b2.register_module(
'PhysicsObjectsMiraBelleHadron')
172 MiraBellehadronb.param(
'hadronb2piPListName',
'pi+:hadb2physMiraBelle')
173 MiraBellehadronb2_path.add_module(MiraBellehadronb)