13 This module defines functions to add analysis DQM modules.
17 from stdPi0s
import stdPi0s
18 import modularAnalysis
as ma
21 def 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.
24 Also M(mumu) for nominal beam energy monitoring.
27 path (basf2.Path): modules are loaded onto this path
31 ma.fillParticleList(
'mu+:KLMDQM',
'p>0.2 and abs(d0) < 2 and abs(z0) < 4', path=path)
32 ma.fillParticleList(
'gamma:physDQM',
'E > 0.15', loadPhotonBeamBackgroundMVA=
False, path=path)
33 ma.fillParticleList(
'pi+:physDQM',
'pt>0.2 and abs(d0) < 2 and abs(z0) < 4', path=path)
34 ma.fillParticleList(
'mu+:physDQM',
'pt>2. and abs(d0) < 2 and abs(z0) < 4', path=path)
35 ma.reconstructDecay(
'pi0:physDQM -> gamma:physDQM gamma:physDQM',
'0.10 < M < 0.15', 1,
True, path)
36 ma.reconstructDecay(
'K_S0:physDQM -> pi-:physDQM pi+:physDQM',
'0.48 < M < 0.52', 1,
True, path)
37 ma.reconstructDecay(
'Upsilon:physDQM -> mu-:physDQM mu+:physDQM',
'9 < M < 12', 1,
True, path)
41 ma.fillParticleList(
'pi+:evtshape',
'', path=path)
42 ma.fillParticleList(
'gamma:evtshape',
'', loadPhotonBeamBackgroundMVA=
False, path=path)
45 inputListNames=[
'pi+:evtshape',
'gamma:evtshape'],
46 default_cleanup=
False,
50 harmonicMoments=
False,
55 dqm = b2.register_module(
'PhysicsObjectsDQM')
56 dqm.param(
'PI0PListName',
'pi0:physDQM')
57 dqm.param(
'KS0PListName',
'K_S0:physDQM')
58 dqm.param(
'UpsPListName',
'Upsilon:physDQM')
62 def add_mirabelle_dqm(path):
63 """Add the mirabelle DQM modules to the ``path``.
64 Runs on conditional paths depending on the software trigger results.
65 Building D*'s or dimuons on the conditional paths.
68 path (basf2.Path): modules are loaded onto this path
71 MiraBelleMumu_path = b2.create_path()
72 MiraBelleDst1_path = b2.create_path()
73 MiraBelleNotDst1_path = b2.create_path()
74 MiraBelleDst2_path = b2.create_path()
76 trigger_skim_mumutight = path.add_module(
78 triggerLines=[
"software_trigger_cut&skim&accept_mumutight"],
81 trigger_skim_mumutight.if_value(
"==1", MiraBelleMumu_path, b2.AfterConditionPath.CONTINUE)
83 trigger_skim_dstar_1 = path.add_module(
85 triggerLines=[
"software_trigger_cut&skim&accept_dstar_1"],
88 trigger_skim_dstar_1.if_value(
"==1", MiraBelleDst1_path, b2.AfterConditionPath.CONTINUE)
90 trigger_skim_not_dstar_1 = path.add_module(
92 triggerLines=[
"software_trigger_cut&skim&accept_dstar_1"],
96 trigger_skim_not_dstar_1.if_value(
"==1", MiraBelleNotDst1_path, b2.AfterConditionPath.CONTINUE)
97 trigger_skim_dstar_2 = MiraBelleNotDst1_path.add_module(
99 triggerLines=[
"software_trigger_cut&skim&accept_dstar_2"],
102 trigger_skim_dstar_2.if_value(
"==1", MiraBelleDst2_path, b2.AfterConditionPath.CONTINUE)
105 ma.fillParticleList(
'mu+:physMiraBelle',
'', path=MiraBelleMumu_path)
106 ma.reconstructDecay(
'Upsilon:physMiraBelle -> mu+:physMiraBelle mu-:physMiraBelle',
'9 < M < 12', path=MiraBelleMumu_path)
107 MiraBelleMumu = b2.register_module(
'PhysicsObjectsMiraBelle')
108 MiraBelleMumu.param(
'MuPListName',
'mu+:physMiraBelle')
109 MiraBelleMumu.param(
'MuMuPListName',
'Upsilon:physMiraBelle')
110 MiraBelleMumu_path.add_module(MiraBelleMumu)
113 ma.fillParticleList(
'pi+:MiraBelleDst1',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst1_path)
114 ma.fillParticleList(
'K+:MiraBelleDst1',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst1_path)
115 ma.reconstructDecay(
'D0:MiraBelleDst1_kpi -> K-:MiraBelleDst1 pi+:MiraBelleDst1',
'1.7 < M < 2.1', path=MiraBelleDst1_path)
116 ma.reconstructDecay(
'D*+:MiraBelleDst1_kpi -> D0:MiraBelleDst1_kpi pi+:MiraBelleDst1',
117 'useCMSFrame(p) > 2.5 and massDifference(0) < 0.16', path=MiraBelleDst1_path)
118 MiraBelleDst1 = b2.register_module(
'PhysicsObjectsMiraBelleDst')
119 MiraBelleDst1.param(
'DstListName',
'D*+:MiraBelleDst1_kpi')
120 MiraBelleDst1_path.add_module(MiraBelleDst1)
123 ma.fillParticleList(
'pi+:MiraBelleDst2',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst2_path)
124 ma.fillParticleList(
'K+:MiraBelleDst2',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst2_path)
125 stdPi0s(listtype=
'eff60_May2020', path=MiraBelleDst2_path, loadPhotonBeamBackgroundMVA=
False)
127 'D0:MiraBelleDst2_kpipi0 -> K-:MiraBelleDst2 pi+:MiraBelleDst2 pi0:eff60_May2020',
129 path=MiraBelleDst2_path)
130 ma.reconstructDecay(
'D*+:MiraBelleDst2_kpipi0 -> D0:MiraBelleDst2_kpipi0 pi+:MiraBelleDst2',
131 'useCMSFrame(p) > 2.5 and massDifference(0) < 0.16', path=MiraBelleDst2_path)
132 MiraBelleDst2 = b2.register_module(
'PhysicsObjectsMiraBelleDst2')
133 MiraBelleDst2.param(
'DstListName',
'D*+:MiraBelleDst2_kpipi0')
134 MiraBelleDst2_path.add_module(MiraBelleDst2)