35 import modularAnalysis
as ma
38 from stdCharged
import stdK
41 my_path = b2.create_path()
44 b2.conditions.prepend_globaltag(ma.getAnalysisGlobaltag())
47 ma.inputMdst(filename=b2.find_file(
'B2rhogamma_rho2pipi.root',
'examples',
False),
50 ma.fillParticleList(decayString=
'gamma:highE',
53 ma.fillParticleList(decayString=
'pi+:loose',
54 cut=
'abs(d0) < 0.5 and abs(z0) < 0.5 and pionID > 0.002',
59 ma.reconstructDecay(decayString=
'rho0 -> pi+:loose pi-:loose',
66 ma.reconstructDecay(decayString=
'B0 -> rho0 gamma:highE',
67 cut=
'5.2 < Mbc and abs(deltaE) < 2.0',
71 ma.matchMCTruth(list_name=
'B0',
76 ma.buildRestOfEvent(target_list_name=
'B0',
89 ma.writePi0EtaVeto(particleList=
'B0',
90 decayString=
'B0 -> rho0 ^gamma',
96 tableName =
'Pi0VetoEfficiencySystematics_Mar2022'
97 ma.addPi0VetoEfficiencySystematics(particleList=
'B0',
98 decayString=
'B0 -> rho0 ^gamma',
114 stdK(
'loose', path=my_path)
115 ma.reconstructDecay(
"D0:Kpi -> K-:loose pi+:loose",
"", path=my_path)
116 ma.reconstructDecay(
"B+:Dpi -> anti-D0:Kpi pi+:loose",
"useCMSFrame(daughter(1,E))>1.4", path=my_path)
117 ma.matchMCTruth(
"B+:Dpi", path=my_path)
118 ma.buildRestOfEvent(
"B+:Dpi", path=my_path)
122 ma.writePi0EtaVeto(particleList=
'B+:Dpi',
123 decayString=
'B+ -> [anti-D0 -> K+ pi-] ^pi+',
145 roe_path = b2.create_path()
153 deadEndPath = b2.create_path()
158 ma.signalSideParticleFilter(particleList=
'B0',
161 deadEndPath=deadEndPath)
167 ma.fillParticleList(decayString=
'gamma:roe',
168 cut=
'isInRestOfEvent == 1 and E > 0.050',
175 ma.fillSignalSideParticleList(outputListName=
'gamma:sig',
176 decayString=
'B0 -> rho0 ^gamma',
181 ma.reconstructDecay(decayString=
'pi0:veto -> gamma:sig gamma:roe',
182 cut=
'0.080 < M < 0.200',
194 ma.rankByLowest(particleList=
'pi0:veto',
201 ma.variableToSignalSideExtraInfo(particleList=
'pi0:veto', varToExtraInfo={
'M':
'pi0veto'}, path=roe_path)
204 my_path.for_each(
'RestOfEvent',
'RestOfEvents', roe_path)
218 gamma_vars = vc.cluster + \
222 rho_vars = vc.cluster + \
229 b_vars = vc.kinematics + \
232 vu.create_aliases_for_selected(list_of_variables=gamma_vars,
233 decay_string=
'B0 -> rho0 ^gamma') + \
234 vu.create_aliases_for_selected(list_of_variables=rho_vars,
235 decay_string=
'B0 -> ^rho0 gamma') + \
236 vu.create_aliases_for_selected(list_of_variables=pi_vars,
237 decay_string=
'B0 -> [rho0 -> ^pi+ ^pi-] gamma') + \
238 [
'pi0Prob(standard)',
'etaProb(standard)',
'extraInfo(pi0veto)'] + \
239 [f
'extraInfo(Pi0VetoEfficiencySystematics_{mode}{suffix}_data_MC_ratio)',
240 f
'extraInfo(Pi0VetoEfficiencySystematics_{mode}{suffix}_data_MC_uncertainty_stat)',
241 f
'extraInfo(Pi0VetoEfficiencySystematics_{mode}{suffix}_data_MC_uncertainty_sys)',
242 f
'extraInfo(Pi0VetoEfficiencySystematics_{mode}{suffix}_data_MC_uncertainty_total)',
243 f
'extraInfo(Pi0VetoEfficiencySystematics_{mode}{suffix}_threshold)']
247 rootOutputFile =
"B2A306-B02RhoGamma-withPi0EtaVeto.root"
248 ma.variablesToNtuple(decayString=
'B0',
250 filename=rootOutputFile,