ATLAS Offline Software
TrigHIUCCHypoTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "TrigHIUCCHypoTool.h"
6 #include <GaudiKernel/StatusCode.h>
7 
8 TrigHIUCCHypoTool::TrigHIUCCHypoTool(const std::string& type, const std::string& name, const IInterface* parent) :
9  base_class(type, name, parent),
10  m_decisionId(HLT::Identifier::fromToolName(name))
11 {
12 }
13 
15  return m_decisionId;
16 }
17 
18 StatusCode TrigHIUCCHypoTool::decide(const xAOD::HIEventShapeContainer* eventShapeContainer, bool& pass) const {
19  ATH_MSG_DEBUG("Executing decide() of " << name());
20 
21  float totalFCalEt = 0;
22  for (const xAOD::HIEventShape* es: *eventShapeContainer) {
23  const int layer = es->layer();
24  if (layer < 21 or layer > 23) { //only use FCal information (calo samplings 21: FCAL0, 22: FCAL1, 23: FCAL2)
25  continue;
26  }
27  totalFCalEt += es->et();
28  }
29  pass = totalFCalEt > m_FCalEtThreshold;
30  return StatusCode::SUCCESS;
31 }
TrigHIUCCHypoTool::TrigHIUCCHypoTool
TrigHIUCCHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigHIUCCHypoTool.cxx:8
TrigHIUCCHypoTool::decide
virtual StatusCode decide(const xAOD::HIEventShapeContainer *, bool &) const override
Definition: TrigHIUCCHypoTool.cxx:18
TrigHIUCCHypoTool::m_FCalEtThreshold
Gaudi::Property< float > m_FCalEtThreshold
Definition: TrigHIUCCHypoTool.h:35
TrigHIUCCHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigHIUCCHypoTool.h:34
xAOD::HIEventShape_v2
Interface class for the HI reconstruction EDM.
Definition: HIEventShape_v2.h:31
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
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
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TrigHIUCCHypoTool::getId
virtual const HLT::Identifier & getId() const override
Definition: TrigHIUCCHypoTool.cxx:14
TrigHIUCCHypoTool.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Identifier
Definition: IdentifierFieldParser.cxx:14