5 import modularAnalysis
as ma
11 filenumber = sys.argv[1]
18 filelist=[b2.find_file(f
"starterkit/2021/1111540100_eph3_BGx0_{filenumber}.root",
"examples")],
25 "electronID > 0.1 and dr < 0.5 and abs(dz) < 2 and thetaInCDCAcceptance",
32 "J/psi:ee -> e+:uncorrected e-:uncorrected", cut=
"dM < 0.11", path=main
37 "B0 -> J/psi:ee K_S0:merged",
38 cut=
"Mbc > 5.2 and abs(deltaE) < 0.15",
43 ma.matchMCTruth(
"B0", path=main)
46 ma.buildRestOfEvent(
"B0", fillWithMostLikely=
True, path=main)
47 track_based_cuts =
"thetaInCDCAcceptance and pt > 0.075 and dr < 5 and abs(dz) < 10"
48 ecl_based_cuts =
"thetaInCDCAcceptance and E > 0.05"
49 roe_mask = (
"my_mask", track_based_cuts, ecl_based_cuts)
50 ma.appendROEMasks(
"B0", [roe_mask], path=main)
55 standard_vars = vc.kinematics + vc.mc_kinematics + vc.mc_truth
56 b_vars += vc.deltae_mbc
57 b_vars += standard_vars
60 roe_kinematics = [
"roeE()",
"roeM()",
"roeP()",
"roeMbc()",
"roeDeltae()"]
61 roe_multiplicities = [
64 "nROE_NeutralHadrons()",
66 b_vars += roe_kinematics + roe_multiplicities
68 for roe_variable
in roe_kinematics + roe_multiplicities:
70 roe_variable_with_mask = roe_variable.replace(
"()",
"(my_mask)")
71 b_vars.append(roe_variable_with_mask)
74 fs_vars = vc.pid + vc.track + vc.track_hits + standard_vars
75 b_vars += vu.create_aliases_for_selected(
77 "B0 -> [J/psi -> ^e+ ^e-] [K_S0 -> ^pi+ ^pi-]",
78 prefix=[
"ep",
"em",
"pip",
"pim"],
81 jpsi_ks_vars = vc.inv_mass + standard_vars
82 b_vars += vu.create_aliases_for_selected(jpsi_ks_vars,
"B0 -> ^J/psi ^K_S0")
85 cmskinematics = vu.create_aliases(
86 vc.kinematics,
"useCMSFrame({variable})",
"CMS"
88 b_vars += vu.create_aliases_for_selected(
89 cmskinematics,
"^B0 -> [^J/psi -> ^e+ ^e-] [^K_S0 -> ^pi+ ^pi-]"
96 filename=
"Bd2JpsiKS.root",
def stdKshorts(prioritiseV0=True, fitter='TreeFit', path=None, updateAllDaughters=False, writeOut=False)