ATLAS Offline Software
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 
8 using 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 }
71 
72 
Trig::TrigEgammaEmulationChain::emulate
asg::AcceptData emulate(const Trig::TrigData &input) const override
Definition: TrigEgammaEmulationChain.cxx:38
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
asg
Definition: DataHandleTestTool.h:28
Trig::TrigEgammaEmulationChain::TrigEgammaEmulationChain
TrigEgammaEmulationChain(const std::string &myname)
Definition: TrigEgammaEmulationChain.cxx:14
Trig::TrigEgammaEmulationChain::m_accept
asg::AcceptInfo m_accept
Accept.
Definition: TrigEgammaEmulationChain.h:50
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Trig::TrigEgammaEmulationChain::m_steps
ToolHandleArray< Trig::ITrigEgammaEmulationBaseHypoTool > m_steps
Definition: TrigEgammaEmulationChain.h:41
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trig::TrigEgammaEmulationChain::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: TrigEgammaEmulationChain.cxx:20
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:134
asg::AcceptData::getCutResult
bool getCutResult(const std::string &cutName) const
Get the result of a cut, based on the cut name (safer)
Definition: AcceptData.h:98
Trig::TrigData
Definition: TrigEgammaEmulationToolMT.h:40
LArCellBinning.step
step
Definition: LArCellBinning.py:158
TrigEgammaEmulationChain.h
Trig::TrigEgammaEmulationChain::m_l1Seed
ToolHandle< Trig::ITrigEgammaEmulationBaseHypoTool > m_l1Seed
Definition: TrigEgammaEmulationChain.h:43
Trig::TrigEgammaEmulationChain::m_chain
Gaudi::Property< std::string > m_chain
Definition: TrigEgammaEmulationChain.h:45
asg::AcceptData
Definition: AcceptData.h:30
asg::AcceptInfo::addCut
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.
Definition: AcceptInfo.h:53