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 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
29 ma.fillParticleList(
'gamma:physDQM',
'E > 0.15', loadPhotonBeamBackgroundMVA=
False, path=path)
30 ma.fillParticleList(
'pi+:physDQM',
'pt>0.2 and abs(d0) < 2 and abs(z0) < 4', path=path)
31 ma.fillParticleList(
'mu+:physDQM',
'pt>2. and abs(d0) < 2 and abs(z0) < 4', path=path)
32 ma.reconstructDecay(
'pi0:physDQM -> gamma:physDQM gamma:physDQM',
'0.10 < M < 0.15', 1,
True, path)
33 ma.reconstructDecay(
'K_S0:physDQM -> pi-:physDQM pi+:physDQM',
'0.48 < M < 0.52', 1,
True, path)
34 ma.reconstructDecay(
'Upsilon:physDQM -> mu-:physDQM mu+:physDQM',
'9 < M < 12', 1,
True, path)
38 ma.fillParticleList(
'pi+:evtshape',
'', path=path)
39 ma.fillParticleList(
'gamma:evtshape',
'', loadPhotonBeamBackgroundMVA=
False, path=path)
42 inputListNames=[
'pi+:evtshape',
'gamma:evtshape'],
43 default_cleanup=
False,
47 harmonicMoments=
False,
52 dqm = b2.register_module(
'PhysicsObjectsDQM')
53 dqm.param(
'PI0PListName',
'pi0:physDQM')
54 dqm.param(
'KS0PListName',
'K_S0:physDQM')
55 dqm.param(
'UpsPListName',
'Upsilon:physDQM')
59 def add_mirabelle_dqm(path):
60 """Add the mirabelle DQM modules to the ``path``.
61 Runs on conditional paths depending on the software trigger results.
62 Building D*'s or dimuons on the conditional paths.
65 path (basf2.Path): modules are loaded onto this path
68 MiraBelleMumu_path = b2.create_path()
69 MiraBelleDst1_path = b2.create_path()
70 MiraBelleNotDst1_path = b2.create_path()
71 MiraBelleDst2_path = b2.create_path()
73 trigger_skim_mumutight = path.add_module(
75 triggerLines=[
"software_trigger_cut&skim&accept_mumutight"],
78 trigger_skim_mumutight.if_value(
"==1", MiraBelleMumu_path, b2.AfterConditionPath.CONTINUE)
80 trigger_skim_dstar_1 = path.add_module(
82 triggerLines=[
"software_trigger_cut&skim&accept_dstar_1"],
85 trigger_skim_dstar_1.if_value(
"==1", MiraBelleDst1_path, b2.AfterConditionPath.CONTINUE)
87 trigger_skim_not_dstar_1 = path.add_module(
89 triggerLines=[
"software_trigger_cut&skim&accept_dstar_1"],
93 trigger_skim_not_dstar_1.if_value(
"==1", MiraBelleNotDst1_path, b2.AfterConditionPath.CONTINUE)
94 trigger_skim_dstar_2 = MiraBelleNotDst1_path.add_module(
96 triggerLines=[
"software_trigger_cut&skim&accept_dstar_2"],
99 trigger_skim_dstar_2.if_value(
"==1", MiraBelleDst2_path, b2.AfterConditionPath.CONTINUE)
102 ma.fillParticleList(
'mu+:physMiraBelle',
'', path=MiraBelleMumu_path)
103 ma.reconstructDecay(
'Upsilon:physMiraBelle -> mu+:physMiraBelle mu-:physMiraBelle',
'9 < M < 12', path=MiraBelleMumu_path)
104 MiraBelleMumu = b2.register_module(
'PhysicsObjectsMiraBelle')
105 MiraBelleMumu.param(
'MuPListName',
'mu+:physMiraBelle')
106 MiraBelleMumu.param(
'MuMuPListName',
'Upsilon:physMiraBelle')
107 MiraBelleMumu_path.add_module(MiraBelleMumu)
110 ma.fillParticleList(
'pi+:MiraBelleDst1',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst1_path)
111 ma.fillParticleList(
'K+:MiraBelleDst1',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst1_path)
112 ma.reconstructDecay(
'D0:MiraBelleDst1_kpi -> K-:MiraBelleDst1 pi+:MiraBelleDst1',
'1.7 < M < 2.1', path=MiraBelleDst1_path)
113 ma.reconstructDecay(
'D*+:MiraBelleDst1_kpi -> D0:MiraBelleDst1_kpi pi+:MiraBelleDst1',
114 'useCMSFrame(p) > 2.5 and massDifference(0) < 0.16', path=MiraBelleDst1_path)
115 MiraBelleDst1 = b2.register_module(
'PhysicsObjectsMiraBelleDst')
116 MiraBelleDst1.param(
'DstListName',
'D*+:MiraBelleDst1_kpi')
117 MiraBelleDst1_path.add_module(MiraBelleDst1)
120 ma.fillParticleList(
'pi+:MiraBelleDst2',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst2_path)
121 ma.fillParticleList(
'K+:MiraBelleDst2',
'abs(d0)<0.5 and abs(z0)<3', path=MiraBelleDst2_path)
122 stdPi0s(listtype=
'eff60_May2020', path=MiraBelleDst2_path, loadPhotonBeamBackgroundMVA=
False)
124 'D0:MiraBelleDst2_kpipi0 -> K-:MiraBelleDst2 pi+:MiraBelleDst2 pi0:eff60_May2020',
126 path=MiraBelleDst2_path)
127 ma.reconstructDecay(
'D*+:MiraBelleDst2_kpipi0 -> D0:MiraBelleDst2_kpipi0 pi+:MiraBelleDst2',
128 'useCMSFrame(p) > 2.5 and massDifference(0) < 0.16', path=MiraBelleDst2_path)
129 MiraBelleDst2 = b2.register_module(
'PhysicsObjectsMiraBelleDst2')
130 MiraBelleDst2.param(
'DstListName',
'D*+:MiraBelleDst2_kpipi0')
131 MiraBelleDst2_path.add_module(MiraBelleDst2)