26 import modularAnalysis
as ma
30 from variables
import variables
34 my_path = b2.create_path()
37 fname =
"/group/belle2/dataprod/Data/release-03-02-02/DB00000654/proc9/e0008/4S/GoodRuns/r00827/"\
38 "skim/hlt_hadron/cdst/sub00/cdst.physics.0008.00827.HLT1.hlt_hadron.f00000.root"
39 ma.inputMdst(environmentType=
'default',
56 ma.fillParticleList(
'pi+:loose',
'thetaInCDCAcceptance and nCDCHits>20',
True, path=my_path)
61 variables.addAlias(
'pi0_cosTheta',
'daughter(0, cosTheta)')
62 variables.addAlias(
'pi1_cosTheta',
'daughter(1, cosTheta)')
64 variables.addAlias(
'pi0_p',
'daughter(0, p)')
65 variables.addAlias(
'pi1_p',
'daughter(1, p)')
70 ma.reconstructDecay(decayString=
'K_S0 -> pi+:loose pi-:loose',
71 cut=
'0.45 < M < 0.55 and [[pi0_cosTheta > 0.82 and pi0_p > 0.5] or [pi1_cosTheta > 0.82 and pi1_p>0.5]]',
76 vx.kFit(list_name=
'K_S0',
82 ma.cutAndCopyLists(
"K_S0:good",
"K_S0",
"cosAngleBetweenMomentumAndVertexVector > 0.9", path=my_path)
87 variables.addAlias(
'dll_arich',
'pidDeltaLogLikelihoodValueExpert(211,321,ARICH)')
88 variables.addAlias(
'R_Kpi_arich',
'pidPairProbabilityExpert(321, 211, ARICH)')
89 variables.addAlias(
'kaonID_arich',
'pidProbabilityExpert(321, ARICH)')
90 variables.addAlias(
'pionID_arich',
'pidProbabilityExpert(211, ARICH)')
91 variables.addAlias(
'R_Kpi_all',
'pidPairProbabilityExpert(321, 211, ARICH,TOP,CDC)')
92 variables.addAlias(
'R_Kpi_top',
'pidPairProbabilityExpert(321, 211, TOP)')
93 variables.addAlias(
'R_Kpi_cdc',
'pidPairProbabilityExpert(321,211,CDC)')
94 variables.addAlias(
'R_ppi_woarich',
'pidPairProbabilityExpert(2212, 211,TOP,CDC,ECL)')
97 pi_vars = vc.pid + vc.track + [
'nCDCHits',
100 'nMatchedKLMClusters',
113 ks_vars = vc.mc_truth + vc.kinematics + vc.vertex + vc.inv_mass + [
'cosAngleBetweenMomentumAndVertexVector'] + \
114 vu.create_aliases_for_selected(list_of_variables=pi_vars,
115 decay_string=
'K_S0 -> ^pi+ ^pi-')
125 rootOutputFile =
'arich_ks_reco.root'
129 arichSelector=
'K_S0 -> ^pi+ ^pi-',
130 filename=rootOutputFile,
def arichVariablesToNtuple(decayString, variables, arichSelector, treename='variables', filename='ntuple.root', path=None)