13 import modularAnalysis
as ma
16 path = b2.create_path()
19 ma.inputMdst(environmentType=
'default',
20 filename=b2.find_file(
'mdst14.root',
'validation',
False),
24 b2.conditions.prepend_globaltag(ma.getAnalysisGlobaltag())
28 particles = fei.get_default_channels()
31 configuration = fei.config.FeiConfiguration(prefix=
'FEIv4_2021_MC14_release_05_01_12', training=
False, monitor=
False, cache=0)
34 feistate = fei.get_path(particles, configuration)
37 path.add_path(feistate.path)
40 path.add_module(
'MCMatcherParticles', listName=
'B+:generic', looseMCMatching=
True)
41 path.add_module(
'MCMatcherParticles', listName=
'B+:semileptonic', looseMCMatching=
True)
42 path.add_module(
'MCMatcherParticles', listName=
'B0:generic', looseMCMatching=
True)
43 path.add_module(
'MCMatcherParticles', listName=
'B0:semileptonic', looseMCMatching=
True)
46 ma.variablesToNtuple(
'B+:generic',
50 'extraInfo(decayModeID)',
51 'extraInfo(uniqueSignal)',
52 'extraInfo(SignalProbability)',
54 filename=
'B_charged_hadronic.root',
56 ma.variablesToNtuple(
'B+:semileptonic',
57 [
'cosThetaBetweenParticleAndNominalB',
59 'extraInfo(decayModeID)',
60 'extraInfo(uniqueSignal)',
61 'extraInfo(SignalProbability)',
62 'isSignalAcceptMissingNeutrino'],
63 filename=
'B_charged_semileptonic.root',
66 ma.variablesToNtuple(
'B0:generic',
70 'extraInfo(decayModeID)',
71 'extraInfo(uniqueSignal)',
72 'extraInfo(SignalProbability)',
74 filename=
'B_mixed_hadronic.root',
76 ma.variablesToNtuple(
'B0:semileptonic',
77 [
'cosThetaBetweenParticleAndNominalB',
79 'extraInfo(decayModeID)',
80 'extraInfo(uniqueSignal)',
81 'extraInfo(SignalProbability)',
82 'isSignalAcceptMissingNeutrino'],
83 filename=
'B_mixed_semileptonic.root',
87 b2.process(path, max_event=100)