ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHIHypo
src
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
5
#include "
TrigHIFwdGapHypoTool.h
"
6
7
#include "GaudiKernel/SystemOfUnits.h"
8
using
Gaudi::Units::GeV;
9
10
TrigHIFwdGapHypoTool::TrigHIFwdGapHypoTool
(
const
std::string&
type
,
11
const
std::string& name,
12
const
IInterface* parent):
13
base_class(
type
, name, parent),
14
m_decisionId
(
HLT
::
Identifier
::fromToolName(name)) {}
15
16
17
StatusCode
TrigHIFwdGapHypoTool::initialize
() {
18
ATH_MSG_DEBUG
(
"Initializing TrigHIFwdGapHypoTool for "
<< name());
19
return
StatusCode::SUCCESS;
20
}
21
22
StatusCode
TrigHIFwdGapHypoTool::finalize
() {
23
return
StatusCode::SUCCESS;
24
}
25
26
27
StatusCode
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"
);
53
if
(
m_useDoubleSidedGap
) {
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
72
const
HLT::Identifier
&
TrigHIFwdGapHypoTool::getId
()
const
{
73
return
m_decisionId
;
74
}
75
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
GeV
#define GeV
Definition
PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
TrigHIFwdGapHypoTool.h
HLT::Identifier
Definition
TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:19
TrigHIFwdGapHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition
TrigHIFwdGapHypoTool.h:33
TrigHIFwdGapHypoTool::m_useDoubleSidedGap
Gaudi::Property< bool > m_useDoubleSidedGap
Definition
TrigHIFwdGapHypoTool.h:36
TrigHIFwdGapHypoTool::m_useSideA
Gaudi::Property< bool > m_useSideA
Definition
TrigHIFwdGapHypoTool.h:37
TrigHIFwdGapHypoTool::m_maxFCalEt
Gaudi::Property< float > m_maxFCalEt
Definition
TrigHIFwdGapHypoTool.h:35
TrigHIFwdGapHypoTool::decide
virtual StatusCode decide(const xAOD::HIEventShapeContainer *eventShapeContainer, bool &pass) const override
Definition
TrigHIFwdGapHypoTool.cxx:27
TrigHIFwdGapHypoTool::finalize
virtual StatusCode finalize() override
Definition
TrigHIFwdGapHypoTool.cxx:22
TrigHIFwdGapHypoTool::TrigHIFwdGapHypoTool
TrigHIFwdGapHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TrigHIFwdGapHypoTool.cxx:10
TrigHIFwdGapHypoTool::getId
virtual const HLT::Identifier & getId() const override
Definition
TrigHIFwdGapHypoTool.cxx:72
TrigHIFwdGapHypoTool::initialize
virtual StatusCode initialize() override
Definition
TrigHIFwdGapHypoTool.cxx:17
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition
HLTResultReader.h:26
Identifier
Definition
IdentifierFieldParser.cxx:14
xAOD::HIEventShapeContainer
HIEventShapeContainer_v2 HIEventShapeContainer
Define the latest version of the container.
Definition
HIEventShapeContainer.h:17
xAOD::HIEventShape
HIEventShape_v2 HIEventShape
Definition of the latest event info version.
Definition
HIEventShape.h:16
type
et
Extra patterns decribing particle interation process.
Generated on
for ATLAS Offline Software by
1.17.0