3 from AthenaCommon.Logging
import logging
4 logging.getLogger().
info(
"Importing %s",__name__)
5 log = logging.getLogger(__name__)
7 from TriggerMenuMT.HLT.Config.ChainConfigurationBase
import ChainConfigurationBase
9 from AthenaConfiguration.ComponentFactory
import CompFactory
10 from TrigStreamerHypo.TrigStreamerHypoConfig
import StreamerHypoToolGenerator
11 from TrigInDetConfig.utils
import getFlagsForActiveConfig
12 from TrigInDetConfig.TrigInDetConfig
import trigInDetFastTrackingCfg
13 from ..Config.MenuComponents
import MenuSequenceCA, SelectionCA, InEventRecoCA, InViewRecoCA
21 if(signature ==
"FS"):
22 _signature =
"beamSpotFS"
24 beamspotSequence = InViewRecoCA(
'beamspotSequence_'+signature)
28 roisKey=beamspotSequence.inputMaker().InViewRoIs,
29 signatureName=_signature))
31 from TrigT2BeamSpot.T2VertexBeamSpotConfig
import T2VertexBeamSpot_activeAllTE
33 vertexAlg.TrackCollection = flagsWithTrk.Tracking.ActiveConfig.trkTracks_FTF
36 beamspotSequence.addRecoAlgo(vertexAlg)
37 beamspotViewsSequence = SelectionCA(
'beamspotViewsSequence'+_signature)
38 beamspotViewsSequence.mergeReco(beamspotSequence)
42 beamspotHypoAlg = CompFactory.TrigStreamerHypoAlg(
"BeamspotHypoAlg_"+_signature)
43 beamspotHypoAlg.RuntimeValidation =
False
45 beamspotViewsSequence.addHypoAlgo(beamspotHypoAlg)
48 beamspotHypoToolGen = StreamerHypoToolGenerator
50 return MenuSequenceCA( flags,
51 beamspotViewsSequence,
52 HypoToolGen = beamspotHypoToolGen )
56 signature =
"BeamspotJet"
59 inputMakerAlg = CompFactory.InputMakerForRoI(
"IM_beamspotJet_"+signature)
60 inputMakerAlg.RoITool = CompFactory.ViewCreatorInitialROITool()
63 from TrigT2BeamSpot.T2VertexBeamSpotConfig
import T2VertexBeamSpot_activeAllTE
65 vertexAlg.TrackCollection = flags.Trigger.InDetTracking.fullScan.trkTracks_FTF
68 beamspotSequence = InEventRecoCA(
'beamspotJetSequence_'+signature,inputMaker=inputMakerAlg)
69 beamspotSequence.addRecoAlgo(vertexAlg)
70 beamspotViewsSequence = SelectionCA(
'beamspotJetViewsSequence'+signature)
71 beamspotViewsSequence.mergeReco(beamspotSequence)
74 beamspotHypoAlg = CompFactory.TrigStreamerHypoAlg(
"BeamspotHypoAlg_"+signature)
76 beamspotViewsSequence.addHypoAlgo(beamspotHypoAlg)
79 def getRejectingHypoTool(chainDict):
80 return CompFactory.TrigStreamerHypoTool(chainDict[
'chainName'],Pass=
False)
82 return MenuSequenceCA( flags,
83 beamspotViewsSequence,
84 HypoToolGen = getRejectingHypoTool )
93 ChainConfigurationBase.__init__(self,chainDict)
99 log.debug(
"Assembling chain for %s", self.chainName)
103 if self.chainPart[
'beamspotChain'] !=
'':
104 stepName = f
"Step4_{self.jc_name}_beamspotJet"
105 chainSteps = [self.getStep(flags, stepName, [getBeamspotVtxSequenceGenCfg])]
108 key = self.chainPart[
'addInfo'][0] +
"_" + self.chainPart[
'l2IDAlg'][0]
110 steps=stepDictionary[key]
112 chainstep = getattr(self, step)(flags)
113 chainSteps+=[chainstep]
115 myChain = self.buildChain(chainSteps)
123 "allTE_trkfast":[
'getAllTEStep'],
124 "trkFS_trkfast":[
'getTrkFSStep'],
126 return stepDictionary
132 return self.getStep(flags,
"trkFS_trkfast",[allTE_trkfastSequenceGenCfg],signature=
"FS")
138 return self.getStep(flags,
"allTE_trkfast",[allTE_trkfastSequenceGenCfg],signature=
"beamSpot")