35 import modularAnalysis
as ma
38 from stdCharged
import stdK, stdPi
41 my_path = b2.create_path()
44 b2.conditions.prepend_globaltag(ma.getAnalysisGlobaltag())
47 ma.inputMdst(environmentType=
'default',
48 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',
87 ma.writePi0EtaVeto(particleList=
'B0',
88 decayString=
'B0 -> rho0 ^gamma',
101 stdK(
'loose', path=my_path)
102 stdPi(
'loose', path=my_path)
103 ma.reconstructDecay(
"D0:Kpi -> K-:loose pi+:loose",
"", path=my_path)
104 ma.reconstructDecay(
"B+:Dpi -> anti-D0:Kpi pi+:loose",
"useCMSFrame(daughter(1,E))>1.4", path=my_path)
105 ma.matchMCTruth(
"B+:Dpi", path=my_path)
106 ma.buildRestOfEvent(
"B+:Dpi", path=my_path)
110 ma.writePi0EtaVeto(particleList=
'B+:Dpi',
111 decayString=
'B+ -> [anti-D0 -> K+ pi-] ^pi+',
133 roe_path = b2.create_path()
141 deadEndPath = b2.create_path()
146 ma.signalSideParticleFilter(particleList=
'B0',
149 deadEndPath=deadEndPath)
155 ma.fillParticleList(decayString=
'gamma:roe',
156 cut=
'isInRestOfEvent == 1 and E > 0.050',
163 ma.fillSignalSideParticleList(outputListName=
'gamma:sig',
164 decayString=
'B0 -> rho0 ^gamma',
169 ma.reconstructDecay(decayString=
'pi0:veto -> gamma:sig gamma:roe',
170 cut=
'0.080 < M < 0.200',
182 ma.rankByLowest(particleList=
'pi0:veto',
189 ma.variableToSignalSideExtraInfo(particleList=
'pi0:veto', varToExtraInfo={
'M':
'pi0veto'}, path=roe_path)
192 my_path.for_each(
'RestOfEvent',
'RestOfEvents', roe_path)
206 gamma_vars = vc.cluster + \
210 rho_vars = vc.cluster + \
217 b_vars = vc.kinematics + \
220 vu.create_aliases_for_selected(list_of_variables=gamma_vars,
221 decay_string=
'B0 -> rho0 ^gamma') + \
222 vu.create_aliases_for_selected(list_of_variables=rho_vars,
223 decay_string=
'B0 -> ^rho0 gamma') + \
224 vu.create_aliases_for_selected(list_of_variables=pi_vars,
225 decay_string=
'B0 -> [rho0 -> ^pi+ ^pi-] gamma') + \
226 [
'pi0Prob(standard)',
'etaProb(standard)',
'extraInfo(pi0veto)']
230 rootOutputFile =
"B2A306-B02RhoGamma-withPi0EtaVeto.root"
231 ma.variablesToNtuple(decayString=
'B0',
233 filename=rootOutputFile,