ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TriggerCommon
TriggerMenuMT
python
CFtest
HLTSignatureConfig.py
Go to the documentation of this file.
1
2
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
4
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
5
from
TriggerMenuMT.HLT.Config.MenuComponents
import
MenuSequence, SelectionCA, InEventRecoCA
6
from
AthenaConfiguration.ComponentAccumulator
import
CompFactory
7
from
TriggerMenuMT.CFtest.HLTSignatureHypoTools
import
MuTestHypoTool, ElTestHypoTool
8
import
sys
9
10
HLTTest__TestHypoAlg=CompFactory.getComp(
"HLTTest::TestHypoAlg"
)
11
HLTTest__TestRecoAlg=CompFactory.getComp(
"HLTTest::TestRecoAlg"
)
12
HLTTest__TestInputMaker=CompFactory.getComp(
"HLTTest::TestInputMaker"
)
13
14
UseThisLinkName=
"initialRoI"
15
16
17
def
InputMakerForInitialRoIAlg
(name):
18
return
HLTTest__TestInputMaker
(name, RoIsLink=
"initialRoI"
, LinkName=
"initialRoI"
)
19
20
def
InputMakerForFeatureAlg
(name):
21
return
HLTTest__TestInputMaker
(name, RoIsLink=
"initialRoI"
, LinkName=UseThisLinkName)
22
23
24
#generalize
25
26
27
def
makeSequence
(flags, name,step, signature):
28
"""
29
generate reco sequence for emulation chains
30
"""
31
IM=
InputMakerForFeatureAlg
(
"IM"
+signature+name+
"Step"
+step)
32
IM.Output=name+signature+
"IM"
+step+
"_out"
33
if
"el"
in
signature:
34
Alg =
CaloClustering
(
"CaloClustering"
+name+
"Step"
+step, FileName=
"emclusters.dat"
)
35
elif
"mu"
in
signature:
36
Alg =
muMSRecAlg
(
"muMSRecAlg"
+name+
"Step"
+step, FileName=
"msmu.dat"
)
37
else
:
38
sys.exit(
"ERROR, in configuration of sequence "
+name+step+signature)
39
40
Alg.Output = name+signature+
"Alg"
+step+
"_out"
41
Alg.Input = IM.Output
42
43
accAlg = ComponentAccumulator()
44
accAlg.addEventAlgo(Alg)
45
InEventReco = InEventRecoCA(name+signature+
"SeqStep"
+step,inputMaker=IM)
46
InEventReco.mergeReco(accAlg)
47
48
return
(InEventReco,IM, Alg.Output)
49
50
51
52
53
# here define the sequences from the signatures
54
# signatures do this:
55
# - declare all the RecoAlg and the HypoAlg -> create the Sequence
56
# - creates the InputMaker, without the inputs
57
58
59
60
62
63
64
def
muMSRecAlg
(name, FileName="noreco.dat"):
65
return
HLTTest__TestRecoAlg
(name=name, FileName=FileName)
66
67
def
MuHypo
(name):
68
return
HLTTest__TestHypoAlg
(name=name, LinkName=UseThisLinkName)
69
70
def
makeMuSequence
(flags, name,step):
71
return
makeSequence
(flags, name,step,
"mu"
)
72
73
74
76
77
def
CaloClustering
(name, FileName="noreco.dat"):
78
return
HLTTest__TestRecoAlg
(name=name, FileName=FileName)
79
80
def
ElGamHypo
(name):
81
return
HLTTest__TestHypoAlg
(name=name, LinkName=UseThisLinkName)
82
83
def
makeElSequence
(flags, name,step):
84
return
makeSequence
(flags, name,step,
"el"
)
85
86
87
def
elMenuSequence
(flags, step, reconame, hyponame):
88
(Sequence, IM, seqOut) = makeElSequence (flags,name=reconame, step=step)
89
elHypo =
ElGamHypo
(hyponame+
"Step"
+step+
"ElHypo"
)
90
elHypo.Input = seqOut
91
92
selAcc=SelectionCA(hyponame+
"elStep"
+step)
93
selAcc.mergeReco(Sequence)
94
selAcc.addHypoAlgo(elHypo)
95
return
MenuSequence(flags, selAcc, HypoToolGen=ElTestHypoTool)
96
97
98
def
gamMenuSequence
(flags, step, reconame, hyponame):
99
(Sequence, IM, seqOut) =
makeElSequence
(flags,name=reconame, step=step)
100
elHypo =
ElGamHypo
(hyponame+
"Step"
+step+
"GamHypo"
)
101
elHypo.Input = seqOut
102
103
selAcc=SelectionCA(hyponame+
"gamStep"
+step+
"Gam"
)
104
selAcc.mergeReco(Sequence)
105
selAcc.addHypoAlgo(elHypo)
106
return
MenuSequence(flags,selAcc, HypoToolGen=ElTestHypoTool)
107
108
109
110
def
muMenuSequence
(flags, step, reconame, hyponame):
111
(Sequence, IM, seqOut) =
makeMuSequence
(flags,name=reconame, step=step)
112
muHypo =
MuHypo
(hyponame+
"Step"
+step+
"MuHypo"
)
113
muHypo.Input = seqOut
114
115
selAcc=SelectionCA(hyponame+
"muStep"
+step)
116
selAcc.mergeReco(Sequence)
117
selAcc.addHypoAlgo(muHypo)
118
return
MenuSequence(flags, selAcc, HypoToolGen=MuTestHypoTool)
119
120
121
def
genMenuSequence
(flags, step, reconame, hyponame):
122
(Sequence, IM, seqOut) = makeElSequence (flags,name=reconame, step=step)
123
elHypo =
ElGamHypo
(hyponame+
"Hypo"
)
124
elHypo.Input = seqOut
125
126
selAcc=SelectionCA(hyponame+
"elStep"
+step)
127
selAcc.mergeReco(Sequence)
128
selAcc.addHypoAlgo(elHypo)
129
return
MenuSequence(flags, selAcc, HypoToolGen=ElTestHypoTool)
130
HLTSignatureConfig.gamMenuSequence
gamMenuSequence(flags, step, reconame, hyponame)
Definition
HLTSignatureConfig.py:98
HLTSignatureConfig.makeElSequence
makeElSequence(flags, name, step)
Definition
HLTSignatureConfig.py:83
HLTSignatureConfig.makeSequence
makeSequence(flags, name, step, signature)
Definition
HLTSignatureConfig.py:27
HLTSignatureConfig.genMenuSequence
genMenuSequence(flags, step, reconame, hyponame)
Definition
HLTSignatureConfig.py:121
HLTSignatureConfig.muMenuSequence
muMenuSequence(flags, step, reconame, hyponame)
Definition
HLTSignatureConfig.py:110
HLTSignatureConfig.elMenuSequence
elMenuSequence(flags, step, reconame, hyponame)
Definition
HLTSignatureConfig.py:87
HLTSignatureConfig.CaloClustering
CaloClustering(name, FileName="noreco.dat")
Definition
HLTSignatureConfig.py:77
HLTSignatureConfig.InputMakerForInitialRoIAlg
InputMakerForInitialRoIAlg(name)
Definition
HLTSignatureConfig.py:17
HLTSignatureConfig.MuHypo
MuHypo(name)
Definition
HLTSignatureConfig.py:67
HLTSignatureConfig.ElGamHypo
ElGamHypo(name)
Definition
HLTSignatureConfig.py:80
HLTSignatureConfig.InputMakerForFeatureAlg
InputMakerForFeatureAlg(name)
Definition
HLTSignatureConfig.py:20
HLTSignatureConfig.HLTTest__TestRecoAlg
HLTTest__TestRecoAlg
Definition
HLTSignatureConfig.py:11
HLTSignatureConfig.muMSRecAlg
muMSRecAlg(name, FileName="noreco.dat")
muon signatures
Definition
HLTSignatureConfig.py:64
HLTSignatureConfig.makeMuSequence
makeMuSequence(flags, name, step)
Definition
HLTSignatureConfig.py:70
HLTSignatureConfig.HLTTest__TestInputMaker
HLTTest__TestInputMaker
Definition
HLTSignatureConfig.py:12
HLTSignatureConfig.HLTTest__TestHypoAlg
HLTTest__TestHypoAlg
Definition
HLTSignatureConfig.py:10
Generated on
for ATLAS Offline Software by
1.17.0