ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigEgammaEmulationTool
Root
TrigEgammaEmulationChain.cxx
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
* */
4
5
6
#include "
TrigEgammaEmulationTool/TrigEgammaEmulationChain.h
"
7
8
using namespace
Trig
;
9
10
11
12
//**********************************************************************
13
14
TrigEgammaEmulationChain::TrigEgammaEmulationChain
(
const
std::string& myname )
15
:
asg
::
AsgTool
( myname )
16
{}
17
18
19
//**********************************************************************
20
StatusCode
TrigEgammaEmulationChain::initialize
()
21
{
22
23
ATH_CHECK
(
m_steps
.retrieve() );
24
25
//add cuts into TAccept
26
m_accept
.addCut(
"L1Calo"
,
"Trigger L1Calo step"
);
27
m_accept
.addCut(
"L2Calo"
,
"Trigger L2Calo step"
);
28
m_accept
.addCut(
"L2"
,
"Trigger L2Electron step"
);
29
m_accept
.addCut(
"EFCalo"
,
"Trigger EFCalo step"
);
30
m_accept
.addCut(
"EFTrack"
,
"Trigger EFTrack step"
);
31
m_accept
.addCut(
"HLT"
,
"Trigger HLT decision"
);
32
33
return
StatusCode::SUCCESS;
34
}
35
36
//**********************************************************************
37
38
asg::AcceptData
TrigEgammaEmulationChain::emulate
(
const
Trig::TrigData
&input)
const
39
{
40
asg::AcceptData
acceptData (&
m_accept
);
41
42
ATH_MSG_DEBUG
(
"Emulate "
<<
m_chain
);
43
44
// Emulate L1 seed
45
bool
passedL1Calo =
false
;
46
m_l1Seed
->emulate(input, passedL1Calo);
47
acceptData.
setCutResult
(
"L1Calo"
, passedL1Calo );
48
49
if
(passedL1Calo){
50
for
(
size_t
step=0; step <
m_steps
.size(); ++step)
51
{
52
bool
passed
=
false
;
53
m_steps
[step]->emulate( input,
passed
);
54
acceptData.
setCutResult
( step + 1,
passed
);
55
if
(!
passed
)
56
break
;
57
}
58
}
59
60
ATH_MSG_DEBUG
(
"Accept results:"
);
61
ATH_MSG_DEBUG
(
"L1 : "
<< acceptData.
getCutResult
(0));
// Step 0
62
ATH_MSG_DEBUG
(
"L2Calo : "
<< acceptData.
getCutResult
(1));
// Step 1
63
ATH_MSG_DEBUG
(
"L2 : "
<< acceptData.
getCutResult
(2));
// Step 2
64
ATH_MSG_DEBUG
(
"EFCalo : "
<< acceptData.
getCutResult
(3));
// Step 3
65
ATH_MSG_DEBUG
(
"EFTrack : "
<< acceptData.
getCutResult
(4));
// Step 4
66
ATH_MSG_DEBUG
(
"HLT : "
<< acceptData.
getCutResult
(5));
// Step 5
67
68
return
acceptData;
69
}
70
71
72
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
passed
bool passed(DecisionID id, const DecisionIDContainer &)
checks if required decision ID is in the set of IDs in the container
Definition
TrigCompositeUtilsRoot.cxx:118
TrigEgammaEmulationChain.h
Trig::TrigData
Definition
TrigEgammaEmulationToolMT.h:40
Trig::TrigEgammaEmulationChain::TrigEgammaEmulationChain
TrigEgammaEmulationChain(const std::string &myname)
Definition
TrigEgammaEmulationChain.cxx:14
Trig::TrigEgammaEmulationChain::m_l1Seed
ToolHandle< Trig::ITrigEgammaEmulationBaseHypoTool > m_l1Seed
Definition
TrigEgammaEmulationChain.h:43
Trig::TrigEgammaEmulationChain::m_steps
ToolHandleArray< Trig::ITrigEgammaEmulationBaseHypoTool > m_steps
Definition
TrigEgammaEmulationChain.h:41
Trig::TrigEgammaEmulationChain::emulate
asg::AcceptData emulate(const Trig::TrigData &input) const override
Definition
TrigEgammaEmulationChain.cxx:38
Trig::TrigEgammaEmulationChain::m_chain
Gaudi::Property< std::string > m_chain
Definition
TrigEgammaEmulationChain.h:45
Trig::TrigEgammaEmulationChain::m_accept
asg::AcceptInfo m_accept
Accept.
Definition
TrigEgammaEmulationChain.h:50
Trig::TrigEgammaEmulationChain::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
TrigEgammaEmulationChain.cxx:20
asg::AcceptData
Definition
AcceptData.h:31
asg::AcceptData::setCutResult
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer).
Definition
AcceptData.h:135
asg::AcceptData::getCutResult
bool getCutResult(std::string_view cutName) const
Get the result of a cut, based on the cut name (safer).
Definition
AcceptData.h:99
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
Trig
The common trigger namespace for trigger analysis tools.
Definition
LArCellMonAlg.h:33
asg
Definition
DataHandleTestTool.h:28
Generated on
for ATLAS Offline Software by
1.17.0