ATLAS Offline Software
Loading...
Searching...
No Matches
BphysicsChainConfiguration.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3
8from AthenaCommon.Logging import logging
9logging.getLogger().info("Importing %s",__name__)
10log = logging.getLogger(__name__)
11from ..Config.ChainConfigurationBase import ChainConfigurationBase
12from ..Muon.MuonChainConfiguration import MuonChainConfiguration
13
14from ..Muon.MuonMenuSequences import mul2IOOvlpRmSequenceGenCfg, mul2mtCBOvlpRmSequenceGenCfg, muEFCBSequenceGenCfg
15
16from .BphysicsMenuSequences import dimuL2SequenceGenCfg, dimuEFSequenceGenCfg, bmumuxSequenceGenCfg, bhhSequenceGenCfg
17from TrigBphysHypo.TrigMultiTrkComboHypoConfig import StreamerDimuL2ComboHypoCfg, StreamerDimuL2IOComboHypoCfg, StreamerDimuL2MTComboHypoCfg, DimuEFComboHypoCfg, BmutrkComboHypoCfg, StreamerDimuEFComboHypoCfg, TrigMultiTrkComboHypoToolFromDict
18from TrigBphysHypo.TrigBmumuxComboHypoConfig import BmumuxComboHypoCfg, TrigBmumuxComboHypoToolFromDict
19from TrigBphysHypo.TrigBmuxComboHypoConfig import BmuxComboHypoCfg
20from TrigBphysHypo.TrigBhhComboHypoConfig import BhhComboHypoCfg
21
22
23
26
28
29 def __init__(self, chainDict):
30 ChainConfigurationBase.__init__(self,chainDict)
31
32 # ----------------------
33 # Assemble the chain depending on information from chainName
34 # ----------------------
35 def assembleBphysChain(self, flags):
36
37 log.debug("Assembling chain for %s", self.chainName)
38
39 stepDictionary = self.getBphysStepDictionary()
40 key = self.getBphysKey()
41 steps=stepDictionary[key]
42
43 chainSteps = []
44 for step_level in steps:
45 for step in step_level:
46 chainStep = getattr(self, step)(flags)
47 chainSteps+=[chainStep]
48
49 chain = self.buildChain(chainSteps)
50 return chain
51
53
54 stepDictionary = {
55 'dimu' : [['getmuFast', 'getDimuL2'], ['getmuEFSA', 'getmuEFCB', 'getDimuEF']],
56 'bmumux' : [['getmuFast', 'getDimuL2'], ['getmuEFSA', 'getDimuEFCB', 'getBmumux']],
57 'bmutrk' : [['getmuFast', 'getmuCombIO'], ['getmuEFSA', 'getmuEFCB', 'getBmutrk']],
58 'bmux' : [['getmuFast', 'getmuCombIO'], ['getmuEFSA', 'getmuEFCB', 'getBmux']],
59 'bhh' : [['getmuFast', 'getmuCombIO'], ['getmuEFSA', 'getmuEFCB', 'getBhh']],
60 }
61 return stepDictionary
62
63 def getBphysKey(self):
64
65 the_topo = self.dict['topo'][0]
66
67 topo_dict = {
68 'bJpsimumu' : 'dimu',
69 'bJpsi' : 'dimu',
70 'bJpsimutrk' : 'bmutrk',
71 'bUpsimumu' : 'dimu',
72 'bUpsi' : 'dimu',
73 'bBmumu' : 'dimu',
74 'bDimu' : 'dimu',
75 'bDimu2700' : 'dimu',
76 'bDimu6000' : 'dimu',
77 'bPhi' : 'dimu',
78 'bTau' : 'dimu',
79 'b3mu' : 'dimu',
80 'bBmux' : 'bmux',
81 'bBmumux' : 'bmumux',
82 'bBhh' : 'bhh',
83 'b0dRAB12vtx20' : 'dimu',
84 'b0dRAB207invmAB22vtx20' : 'dimu',
85 'b0dRAB127invmAB22vtx20' : 'dimu',
86 'b7invmAB22vtx20' : 'dimu',
87 }
88
89 return topo_dict[the_topo]
90
91 def getDimuL2(self, flags):
92 if 'noL2Comb' in self.chainPart['extra']:
93 return self.getStep(flags, 'dimuL2', [dimuL2SequenceGenCfg], comboHypoCfg=StreamerDimuL2ComboHypoCfg)
94 elif 'l2mt' in self.chainPart['l2AlgInfo']:
95 return self.getStep(flags, 'dimuL2MT', [mul2mtCBOvlpRmSequenceGenCfg], comboHypoCfg=StreamerDimuL2MTComboHypoCfg)
96 else:
97 return self.getStep(flags, 'dimuL2IO', [mul2IOOvlpRmSequenceGenCfg], comboHypoCfg=StreamerDimuL2IOComboHypoCfg)
98
99 def getDimuEF(self, flags):
100 return self.getStep(flags, 'dimuEF', [dimuEFSequenceGenCfg], comboHypoCfg=DimuEFComboHypoCfg, comboTools=[TrigMultiTrkComboHypoToolFromDict])
101
102 def getDimuEFCB(self, flags):
103 return self.getStep(flags, 'dimuEFCB', [muEFCBSequenceGenCfg], comboHypoCfg=StreamerDimuEFComboHypoCfg)
104
105 def getBmux(self, flags):
106 return self.getStep(flags, 'bmux', [bmumuxSequenceGenCfg], comboHypoCfg=BmuxComboHypoCfg, comboTools=[TrigBmumuxComboHypoToolFromDict])
107
108 def getBmumux(self, flags):
109 return self.getStep(flags, 'bmumux', [bmumuxSequenceGenCfg], comboHypoCfg=BmumuxComboHypoCfg, comboTools=[TrigBmumuxComboHypoToolFromDict])
110
111 def getBmutrk(self, flags):
112 return self.getStep(flags, 'bmutrk', [bmumuxSequenceGenCfg], comboHypoCfg=BmutrkComboHypoCfg, comboTools=[TrigMultiTrkComboHypoToolFromDict])
113
114 def getBhh(self, flags):
115 return self.getStep(flags, 'bhh', [bhhSequenceGenCfg], comboHypoCfg=BhhComboHypoCfg, comboTools=[TrigBmumuxComboHypoToolFromDict])