26import modularAnalysis
as ma
30from variables
import variables
34my_path = b2.create_path()
37fname =
"/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"
39ma.inputMdst(environmentType=
'default',
56ma.fillParticleList(
'pi+:loose',
'thetaInCDCAcceptance and nCDCHits>20',
True, path=my_path)
61variables.addAlias(
'pi0_cosTheta',
'daughter(0, cosTheta)')
62variables.addAlias(
'pi1_cosTheta',
'daughter(1, cosTheta)')
64variables.addAlias(
'pi0_p',
'daughter(0, p)')
65variables.addAlias(
'pi1_p',
'daughter(1, p)')
70ma.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]]',
76vx.kFit(list_name=
'K_S0',
82ma.cutAndCopyLists(
"K_S0:good",
"K_S0",
"cosAngleBetweenMomentumAndVertexVector > 0.9", path=my_path)
87variables.addAlias(
'dll_arich',
'pidDeltaLogLikelihoodValueExpert(211,321,ARICH)')
88variables.addAlias(
'R_Kpi_arich',
'pidPairProbabilityExpert(321, 211, ARICH)')
89variables.addAlias(
'kaonID_arich',
'pidProbabilityExpert(321, ARICH)')
90variables.addAlias(
'pionID_arich',
'pidProbabilityExpert(211, ARICH)')
91variables.addAlias(
'R_Kpi_all',
'pidPairProbabilityExpert(321, 211, ARICH,TOP,CDC)')
92variables.addAlias(
'R_Kpi_top',
'pidPairProbabilityExpert(321, 211, TOP)')
93variables.addAlias(
'R_Kpi_cdc',
'pidPairProbabilityExpert(321,211,CDC)')
94variables.addAlias(
'R_ppi_woarich',
'pidPairProbabilityExpert(2212, 211,TOP,CDC,ECL)')
97pi_vars = vc.pid + vc.track + [
'nCDCHits',
100 'nMatchedKLMClusters',
113ks_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-')
125rootOutputFile =
'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)