13import modularAnalysis
as ma
16path = b2.create_path()
19ma.inputMdst(filename=b2.find_file(
'mdst14.root',
'validation',
False),
23b2.conditions.prepend_globaltag(ma.getAnalysisGlobaltag())
27particles = fei.get_default_channels()
30configuration = fei.config.FeiConfiguration(prefix=
'FEIv4_2021_MC14_release_05_01_12', training=
False, monitor=
False, cache=0)
33feistate = fei.get_path(particles, configuration)
36path.add_path(feistate.path)
39path.add_module(
'MCMatcherParticles', listName=
'B+:generic', looseMCMatching=
True)
40path.add_module(
'MCMatcherParticles', listName=
'B+:semileptonic', looseMCMatching=
True)
41path.add_module(
'MCMatcherParticles', listName=
'B0:generic', looseMCMatching=
True)
42path.add_module(
'MCMatcherParticles', listName=
'B0:semileptonic', looseMCMatching=
True)
45ma.variablesToNtuple(
'B+:generic',
49 'extraInfo(decayModeID)',
50 'extraInfo(uniqueSignal)',
51 'extraInfo(SignalProbability)',
53 filename=
'B_charged_hadronic.root',
55ma.variablesToNtuple(
'B+:semileptonic',
56 [
'cosThetaBetweenParticleAndNominalB',
58 'extraInfo(decayModeID)',
59 'extraInfo(uniqueSignal)',
60 'extraInfo(SignalProbability)',
61 'isSignalAcceptMissingNeutrino'],
62 filename=
'B_charged_semileptonic.root',
65ma.variablesToNtuple(
'B0:generic',
69 'extraInfo(decayModeID)',
70 'extraInfo(uniqueSignal)',
71 'extraInfo(SignalProbability)',
73 filename=
'B_mixed_hadronic.root',
75ma.variablesToNtuple(
'B0:semileptonic',
76 [
'cosThetaBetweenParticleAndNominalB',
78 'extraInfo(decayModeID)',
79 'extraInfo(uniqueSignal)',
80 'extraInfo(SignalProbability)',
81 'isSignalAcceptMissingNeutrino'],
82 filename=
'B_mixed_semileptonic.root',
86b2.process(path, max_event=100)