ATLAS Offline Software
Loading...
Searching...
No Matches
TrigHIFwdGapHypoTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include "GaudiKernel/SystemOfUnits.h"
8using Gaudi::Units::GeV;
9
11 const std::string& name,
12 const IInterface* parent):
13 base_class(type, name, parent),
14 m_decisionId(HLT::Identifier::fromToolName(name)) {}
15
16
18 ATH_MSG_DEBUG("Initializing TrigHIFwdGapHypoTool for " << name());
19 return StatusCode::SUCCESS;
20}
21
23 return StatusCode::SUCCESS;
24}
25
26
27StatusCode TrigHIFwdGapHypoTool::decide(const xAOD::HIEventShapeContainer* eventShapeContainer, bool& pass) const {
28 ATH_MSG_DEBUG("Executing decide() of " << name());
29
30 float totalFCalEtSideA = 0.;
31 float totalFCalEtSideC = 0.;
32 for (const xAOD::HIEventShape* es: *eventShapeContainer) {
33 const int layer = es->layer();
34 if (layer < 21 or layer > 23) { //only use FCal information (calo samplings 21: FCAL0, 22: FCAL1, 23: FCAL2)
35 continue;
36 }
37
38 const float et = es->et();
39 if (std::abs(et) < 0.1) { //don't add negligible energy deposits (< 0.1 MeV)
40 continue;
41 }
42
43 const float eta = 0.5 * (es->etaMin() + es->etaMax());
44 if (eta > 0.) {
45 totalFCalEtSideA += et;
46 }
47 else {
48 totalFCalEtSideC += et;
49 }
50 }
51
52 ATH_MSG_DEBUG("Total FCal ET: side A = " << totalFCalEtSideA << " MeV, side C = " << totalFCalEtSideC << " MeV");
54 pass = (totalFCalEtSideA < m_maxFCalEt * GeV and totalFCalEtSideC < m_maxFCalEt * GeV);
55 if (pass) ATH_MSG_DEBUG("Passed max FCal ET cut of " << m_maxFCalEt * GeV << " MeV\n");
56 }
57 else {
58 if (m_useSideA) {
59 pass = (totalFCalEtSideA < m_maxFCalEt * GeV);
60 if (pass) ATH_MSG_DEBUG("Passed max FCal ET cut of " << m_maxFCalEt * GeV << " MeV on side A\n");
61 }
62 else {
63 pass = (totalFCalEtSideC < m_maxFCalEt * GeV);
64 if (pass) ATH_MSG_DEBUG("Passed max FCal ET cut of " << m_maxFCalEt * GeV << " MeV on side C\n");
65 }
66 }
67
68 return StatusCode::SUCCESS;
69}
70
71
75
Scalar eta() const
pseudorapidity method
#define ATH_MSG_DEBUG(x)
Gaudi::Property< bool > m_useDoubleSidedGap
Gaudi::Property< bool > m_useSideA
Gaudi::Property< float > m_maxFCalEt
virtual StatusCode decide(const xAOD::HIEventShapeContainer *eventShapeContainer, bool &pass) const override
virtual StatusCode finalize() override
TrigHIFwdGapHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual const HLT::Identifier & getId() const override
virtual StatusCode initialize() override
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
HIEventShapeContainer_v2 HIEventShapeContainer
Define the latest version of the container.
HIEventShape_v2 HIEventShape
Definition of the latest event info version.
Extra patterns decribing particle interation process.