39import modularAnalysis
as ma
40from variables
import variables
as vm
52ma.inputMdstList([b2.find_file(
'analysis/tests/mdst.root')], path=mypath)
58ma.fillParticleList(
'pi+:all',
'', path=mypath)
59ma.fillParticleList(
'K+:all',
'', path=mypath)
61ma.reconstructDecay(
'D0:Example -> pi-:all pi+:all K_S0:merged',
'1.7 < M < 2.0', path=mypath)
62ma.reconstructDecay(
'D*+:Example -> pi+:all D0:Example',
'0 < Q < 0.022 and useCMSFrame(p)>2.3', path=mypath)
65ma.matchMCTruth(list_name=
'D*+:Example', path=mypath)
68basic_vars = vc.inv_mass + vc.kinematics + vc.mc_truth + vc.mc_variables
71isSignalSomething_vars = [
"isSignalAcceptWrongFSPs"]
72isSignalSomething_vars += [
"isSignalAcceptMissingNeutrino",
"isSignalAcceptMissingMassive"]
73isSignalSomething_vars += [
"isSignalAcceptMissingGamma",
"isSignalAcceptMissing",
"mcParticleStatus"]
86c_MissMassiveParticle = 32
89c_AddedWrongParticle = 256
93c_AddedRecoBremsPhoton = 2048
97vu.create_isSignal_alias(
"isSignalAcceptMissingGammaAndMissingNeutrino", [16, 8])
98isSignalSomething_vars += [
"isSignalAcceptMissingGammaAndMissingNeutrino"]
100vu.create_isSignal_alias(
"isSignalAcceptMissingGammaAndDecayInFlight", [c_MissGamma, c_DecayInFlight])
101isSignalSomething_vars += [
"isSignalAcceptMissingGammaAndDecayInFlight"]
104vm.addAlias(
"isSignalAcceptMissingNeutrinoAndWrongFSP",
"passesCut(unmask(mcErrors," +
105 f
"{int(c_MissGamma | c_MissMassiveParticle | c_MissKlong | c_MissKlong)}) == {int(c_Correct)})")
106isSignalSomething_vars += [
"isSignalAcceptMissingNeutrinoAndWrongFSP"]
108basic_vars += isSignalSomething_vars
114ma.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)