ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TriggerCommon
TriggerMenuMT
python
HLT
CalibCosmicMon
CosmicChainConfiguration.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaCommon.Logging
import
logging
4
logging.getLogger().info(
"Importing %s"
,__name__)
5
log = logging.getLogger(__name__)
6
7
from
AthenaConfiguration.ComponentFactory
import
CompFactory
8
from
TriggerMenuMT.HLT.Config.MenuComponents
import
MenuSequence, SelectionCA, InViewRecoCA, createEmptyMenuSequenceCfg
9
from
TrigEDMConfig.TriggerEDM
import
recordable
10
import
AthenaCommon.SystemOfUnits
as
Units
11
12
from
TriggerMenuMT.HLT.Config.ChainConfigurationBase
import
ChainConfigurationBase
13
14
def
TrackCountHypoToolGen
(flags, chainDict):
15
hypo = CompFactory.TrackCountHypoTool(chainDict[
"chainName"
])
16
hypo.minNtrks = 1
17
return
hypo
18
19
def
CosmicsTrkSequenceGenCfg
(flags):
20
21
trkRecoSeq = InViewRecoCA(
"CosmicTrkRecoSeq"
, InViewRoIs =
"CosmicRoIs"
)
22
23
from
TrigInDetConfig.utils
import
getFlagsForActiveConfig
24
flagsWithTrk = getFlagsForActiveConfig(flags,
"cosmics"
, log)
25
26
from
TrigInDetConfig.InnerTrackingTrigSequence
import
InnerTrackingTrigSequence
27
seq = InnerTrackingTrigSequence.create(flagsWithTrk,
28
flagsWithTrk.Tracking.ActiveConfig.input_name,
29
rois =
"CosmicRoIs"
,
30
inView =
"VDVCosmicsIDTracking"
)
31
idTrackingAlgs = seq.sequence(
"Offline"
)
32
trkRecoSeq.mergeReco(idTrackingAlgs)
33
34
trackCountHypo = CompFactory.TrackCountHypoAlg(
"CosmicsTrackCountHypoAlg"
,
35
minPt = [100*Units.MeV],
36
maxZ0 = [401*Units.mm],
37
vertexZ = [803*Units.mm])
38
trackCountHypo.tracksKey = recordable(
"HLT_IDTrack_Cosmic_IDTrig"
)
39
trackCountHypo.trackCountKey =
"HLT_CosmicsTrackCount"
# irrelevant, not recorded
40
41
#TODO move a complete configuration of the algs to TrigMinBias package
42
from
TrigMinBias.TrigMinBiasMonitoring
import
TrackCountMonitoring
43
trackCountHypo.MonTool = TrackCountMonitoring(flags, trackCountHypo)
# monitoring tool configures itself using config of the hypo alg
44
45
46
trkSequence = SelectionCA(
"CosmicTrkSequence"
)
47
trkSequence.mergeReco(trkRecoSeq)
48
trkSequence.addHypoAlgo(trackCountHypo)
49
log.debug(
"Prepared ID tracking sequence"
)
50
log.debug(trkSequence)
51
return
MenuSequence(flags,
52
trkSequence,
53
HypoToolGen = TrackCountHypoToolGen)
54
55
56
#----------------------------------------------------------------
57
class
CosmicChainConfiguration
(ChainConfigurationBase):
58
59
def
__init__
(self, chainDict):
60
ChainConfigurationBase.__init__(self,chainDict)
61
62
# ----------------------
63
# Assemble the chain depending on information from chainName
64
# ----------------------
65
def
assembleChainImpl
(self, flags):
66
67
steps = []
68
log.debug(
"Assembling chain for %s"
, self.
chainName
)
69
# --------------------
70
# define here the names of the steps and obtain the chainStep configuration
71
# --------------------
72
if
'cosmic_id'
in
self.
chainName
:
73
seqName=
"EmptyBeforeCosmicID"
74
emptySeqGen = createEmptyMenuSequenceCfg(flags, name=seqName)
75
steps += [ self.getStep(flags,
'Empty'
, [emptySeqGen], name=seqName),
76
self.getStep(flags,
'CosmicTracking'
, [CosmicsTrkSequenceGenCfg]) ]
77
78
return
self.buildChain(steps)
79
80
python.HLT.CalibCosmicMon.CosmicChainConfiguration.CosmicChainConfiguration
Definition
CosmicChainConfiguration.py:57
python.HLT.CalibCosmicMon.CosmicChainConfiguration.CosmicChainConfiguration.assembleChainImpl
assembleChainImpl(self, flags)
Definition
CosmicChainConfiguration.py:65
python.HLT.CalibCosmicMon.CosmicChainConfiguration.CosmicChainConfiguration.chainName
chainName
Definition
CosmicChainConfiguration.py:68
python.HLT.CalibCosmicMon.CosmicChainConfiguration.CosmicChainConfiguration.__init__
__init__(self, chainDict)
Definition
CosmicChainConfiguration.py:59
python.HLT.CalibCosmicMon.CosmicChainConfiguration.TrackCountHypoToolGen
TrackCountHypoToolGen(flags, chainDict)
Definition
CosmicChainConfiguration.py:14
python.HLT.CalibCosmicMon.CosmicChainConfiguration.CosmicsTrkSequenceGenCfg
CosmicsTrkSequenceGenCfg(flags)
Definition
CosmicChainConfiguration.py:19
Generated on
for ATLAS Offline Software by
1.17.0