7 import modularAnalysis
as ma
10 path = b2.create_path()
13 ma.inputMdst(environmentType=
'default',
14 filename=b2.find_file(
'mdst12.root',
'validation',
False),
20 b2.conditions.prepend_globaltag(ma.getAnalysisGlobaltag())
24 particles = fei.get_default_channels()
27 configuration = fei.config.FeiConfiguration(prefix=
'FEIv4_2020_MC13_release_04_01_01', training=
False, monitor=
False, cache=0)
30 feistate = fei.get_path(particles, configuration)
33 path.add_path(feistate.path)
36 path.add_module(
'MCMatcherParticles', listName=
'B+:generic', looseMCMatching=
True)
37 path.add_module(
'MCMatcherParticles', listName=
'B+:semileptonic', looseMCMatching=
True)
38 path.add_module(
'MCMatcherParticles', listName=
'B0:generic', looseMCMatching=
True)
39 path.add_module(
'MCMatcherParticles', listName=
'B0:semileptonic', looseMCMatching=
True)
42 ma.variablesToNtuple(
'B+:generic',
46 'extraInfo(decayModeID)',
47 'extraInfo(uniqueSignal)',
48 'extraInfo(SignalProbability)',
50 filename=
'B_charged_hadronic.root',
52 ma.variablesToNtuple(
'B+:semileptonic',
53 [
'cosThetaBetweenParticleAndNominalB',
55 'extraInfo(decayModeID)',
56 'extraInfo(uniqueSignal)',
57 'extraInfo(SignalProbability)',
58 'isSignalAcceptMissingNeutrino'],
59 filename=
'B_charged_semileptonic.root',
62 ma.variablesToNtuple(
'B0:generic',
66 'extraInfo(decayModeID)',
67 'extraInfo(uniqueSignal)',
68 'extraInfo(SignalProbability)',
70 filename=
'B_mixed_hadronic.root',
72 ma.variablesToNtuple(
'B0:semileptonic',
73 [
'cosThetaBetweenParticleAndNominalB',
75 'extraInfo(decayModeID)',
76 'extraInfo(uniqueSignal)',
77 'extraInfo(SignalProbability)',
78 'isSignalAcceptMissingNeutrino'],
79 filename=
'B_mixed_semileptonic.root',
83 b2.process(path, max_event=100)