39 import modularAnalysis
as ma
40 from variables
import variables
as vm
52 ma.inputMdstList([b2.find_file(
'analysis/tests/mdst.root')], path=mypath)
58 ma.fillParticleList(
'pi+:all',
'', path=mypath)
59 ma.fillParticleList(
'K+:all',
'', path=mypath)
61 ma.reconstructDecay(
'D0:Example -> pi-:all pi+:all K_S0:merged',
'1.7 < M < 2.0', path=mypath)
62 ma.reconstructDecay(
'D*+:Example -> pi+:all D0:Example',
'0 < Q < 0.022 and useCMSFrame(p)>2.3', path=mypath)
65 ma.matchMCTruth(list_name=
'D*+:Example', path=mypath)
68 basic_vars = vc.inv_mass + vc.kinematics + vc.mc_truth + vc.mc_variables
71 isSignalSomething_vars = [
"isSignalAcceptWrongFSPs"]
72 isSignalSomething_vars += [
"isSignalAcceptMissingNeutrino",
"isSignalAcceptMissingMassive"]
73 isSignalSomething_vars += [
"isSignalAcceptMissingGamma",
"isSignalAcceptMissing",
"mcParticleStatus"]
79 c_MissingResonance = 2
86 c_MissMassiveParticle = 32
89 c_AddedWrongParticle = 256
93 c_AddedRecoBremsPhoton = 2048
97 vu.create_isSignal_alias(
"isSignalAcceptMissingGammaAndMissingNeutrino", [16, 8])
98 isSignalSomething_vars += [
"isSignalAcceptMissingGammaAndMissingNeutrino"]
100 vu.create_isSignal_alias(
"isSignalAcceptMissingGammaAndDecayInFlight", [c_MissGamma, c_DecayInFlight])
101 isSignalSomething_vars += [
"isSignalAcceptMissingGammaAndDecayInFlight"]
104 vm.addAlias(
"isSignalAcceptMissingNeutrinoAndWrongFSP",
"passesCut(unmask(mcErrors," +
105 "%d) == %d)" % (c_MissGamma | c_MissMassiveParticle | c_MissKlong | c_MissKlong, c_Correct))
106 isSignalSomething_vars += [
"isSignalAcceptMissingNeutrinoAndWrongFSP"]
108 basic_vars += isSignalSomething_vars
114 ma.variablesToNtuple(
'D*+:Example', basic_vars, filename=
"isSignalAcceptFlags.root",
115 treename=
'Dst', path=mypath)
def stdKshorts(prioritiseV0=True, fitter='TreeFit', path=None, updateAllDaughters=False, writeOut=False)