35 import modularAnalysis
as ma
38 from stdCharged
import stdK, stdPi
41 my_path = b2.create_path()
44 b2.conditions.prepend_globaltag(ma.getAnalysisGlobaltag())
45 b2.conditions.prepend_globaltag(
"pi0veto_systematics_preliminary")
48 ma.inputMdst(filename=b2.find_file(
'B2rhogamma_rho2pipi.root',
'examples',
False),
51 ma.fillParticleList(decayString=
'gamma:highE',
54 ma.fillParticleList(decayString=
'pi+:loose',
55 cut=
'abs(d0) < 0.5 and abs(z0) < 0.5 and pionID > 0.002',
60 ma.reconstructDecay(decayString=
'rho0 -> pi+:loose pi-:loose',
67 ma.reconstructDecay(decayString=
'B0 -> rho0 gamma:highE',
68 cut=
'5.2 < Mbc and abs(deltaE) < 2.0',
72 ma.matchMCTruth(list_name=
'B0',
77 ma.buildRestOfEvent(target_list_name=
'B0',
90 ma.writePi0EtaVeto(particleList=
'B0',
91 decayString=
'B0 -> rho0 ^gamma',
97 tableName =
'Pi0VetoEfficiencySystematics_Mar2022'
98 ma.addPi0VetoEfficiencySystematics(particleList=
'B0',
99 decayString=
'B0 -> rho0 ^gamma',
115 stdK(
'loose', path=my_path)
116 stdPi(
'loose', path=my_path)
117 ma.reconstructDecay(
"D0:Kpi -> K-:loose pi+:loose",
"", path=my_path)
118 ma.reconstructDecay(
"B+:Dpi -> anti-D0:Kpi pi+:loose",
"useCMSFrame(daughter(1,E))>1.4", path=my_path)
119 ma.matchMCTruth(
"B+:Dpi", path=my_path)
120 ma.buildRestOfEvent(
"B+:Dpi", path=my_path)
124 ma.writePi0EtaVeto(particleList=
'B+:Dpi',
125 decayString=
'B+ -> [anti-D0 -> K+ pi-] ^pi+',
147 roe_path = b2.create_path()
155 deadEndPath = b2.create_path()
160 ma.signalSideParticleFilter(particleList=
'B0',
163 deadEndPath=deadEndPath)
169 ma.fillParticleList(decayString=
'gamma:roe',
170 cut=
'isInRestOfEvent == 1 and E > 0.050',
177 ma.fillSignalSideParticleList(outputListName=
'gamma:sig',
178 decayString=
'B0 -> rho0 ^gamma',
183 ma.reconstructDecay(decayString=
'pi0:veto -> gamma:sig gamma:roe',
184 cut=
'0.080 < M < 0.200',
196 ma.rankByLowest(particleList=
'pi0:veto',
203 ma.variableToSignalSideExtraInfo(particleList=
'pi0:veto', varToExtraInfo={
'M':
'pi0veto'}, path=roe_path)
206 my_path.for_each(
'RestOfEvent',
'RestOfEvents', roe_path)
220 gamma_vars = vc.cluster + \
224 rho_vars = vc.cluster + \
231 b_vars = vc.kinematics + \
234 vu.create_aliases_for_selected(list_of_variables=gamma_vars,
235 decay_string=
'B0 -> rho0 ^gamma') + \
236 vu.create_aliases_for_selected(list_of_variables=rho_vars,
237 decay_string=
'B0 -> ^rho0 gamma') + \
238 vu.create_aliases_for_selected(list_of_variables=pi_vars,
239 decay_string=
'B0 -> [rho0 -> ^pi+ ^pi-] gamma') + \
240 [
'pi0Prob(standard)',
'etaProb(standard)',
'extraInfo(pi0veto)'] + \
241 [f
'extraInfo(Pi0VetoEfficiencySystematics_{mode}{suffix}_data_MC_ratio)',
242 f
'extraInfo(Pi0VetoEfficiencySystematics_{mode}{suffix}_data_MC_uncertainty_stat)',
243 f
'extraInfo(Pi0VetoEfficiencySystematics_{mode}{suffix}_data_MC_uncertainty_sys)',
244 f
'extraInfo(Pi0VetoEfficiencySystematics_{mode}{suffix}_data_MC_uncertainty_total)',
245 f
'extraInfo(Pi0VetoEfficiencySystematics_{mode}{suffix}_threshold)']
249 rootOutputFile =
"B2A306-B02RhoGamma-withPi0EtaVeto.root"
250 ma.variablesToNtuple(decayString=
'B0',
252 filename=rootOutputFile,