ATLAS Offline Software
Loading...
Searching...
No Matches
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
7
8using namespace Trig;
9
10
11
12//**********************************************************************
13
15 : asg::AsgTool( myname )
16{}
17
18
19//**********************************************************************
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
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
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
bool passed(DecisionID id, const DecisionIDContainer &)
checks if required decision ID is in the set of IDs in the container
TrigEgammaEmulationChain(const std::string &myname)
ToolHandle< Trig::ITrigEgammaEmulationBaseHypoTool > m_l1Seed
ToolHandleArray< Trig::ITrigEgammaEmulationBaseHypoTool > m_steps
asg::AcceptData emulate(const Trig::TrigData &input) const override
Gaudi::Property< std::string > m_chain
StatusCode initialize() override
Dummy implementation of the initialisation function.
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
Definition AcceptData.h:134
bool getCutResult(const std::string &cutName) const
Get the result of a cut, based on the cut name (safer)
Definition AcceptData.h:98
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
The common trigger namespace for trigger analysis tools.