ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigCaloHypo
src
TrigL2CaloLayersHypoTool.cxx
Go to the documentation of this file.
1
2
/*
3
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4
*/
5
6
#include "
TrigCompositeUtils/HLTIdentifier.h
"
7
#include "
TrigCompositeUtils/Combinators.h
"
8
#include "
AthenaMonitoringKernel/Monitored.h
"
9
10
#include "
TrigL2CaloLayersHypoTool.h
"
11
12
13
using namespace
TrigCompositeUtils
;
14
15
TrigL2CaloLayersHypoTool::TrigL2CaloLayersHypoTool
(
const
std::string&
type
,
16
const
std::string& name,
17
const
IInterface* parent )
18
: base_class(
type
, name, parent ),
19
m_decisionId
(
HLT
::
Identifier
::fromToolName( name ) )
20
{
21
}
22
23
StatusCode
TrigL2CaloLayersHypoTool::initialize
() {
24
25
26
ATH_MSG_INFO
(
"TrigL2CaloLayersHypoTool initialization completed successfully."
);
27
28
/*
29
if ( not m_monTool.name().empty() )
30
CHECK( m_monTool.retrieve() );
31
*/
32
33
34
return
StatusCode::SUCCESS;
35
}
36
37
38
StatusCode
TrigL2CaloLayersHypoTool::decide
( std::vector<ITrigL2CaloLayersHypoTool::CaloLayersInfo>& input )
const
{
39
40
for
(
auto
& i: input ) {
41
if
(
passed
(
m_decisionId
.
numeric
(), i.previousDecisionIDs ) ) {
42
if
(
decide
( i ) ) {
43
addDecisionID
(
m_decisionId
, i.decision );
44
}
45
}
46
}
47
return
StatusCode::SUCCESS;
48
}
49
50
bool
TrigL2CaloLayersHypoTool::decide
(
const
ITrigL2CaloLayersHypoTool::CaloLayersInfo
& input )
const
{
51
52
if
(
m_acceptAll
)
return
true
;
53
// no clusters no discussion
54
if
( !
input
.clusters )
return
false
;
55
//bool pass=false;
56
57
// get cluster
58
const
xAOD::TrigEMCluster
* pClus =
input
.clusters->front();
59
//m_preSampFrac=m_preSamp=m_monEta=m_monPhi=m_Energy=-9999.0;
60
61
if
( !pClus or (pClus->
energy
()<0.1) or (fabsf(pClus->
eta
())>2.1) ) {
62
ATH_MSG_DEBUG
(
"No EM cluster in RoI"
);
63
return
false
;
64
}
65
66
//m_monEta = pClus->eta();
67
//m_monPhi = pClus->phi();
68
69
// increment event counter
70
//m_PassedCuts++; //// the ROI at least contais the cluster
71
72
std::vector<double> fracs;
73
for
(
int
i=0;
i
<4;
i
++){
74
fracs.push_back(0);
75
fracs[
i
] = (pClus->
energy
( ((
CaloSampling::CaloSample
)i) )+pClus->
energy
( ((
CaloSampling::CaloSample
)(i+4)) ))/pClus->
energy
();
76
}
77
//m_Energy = pClus->energy();
78
79
if
( fracs[0] >
m_EnergyFracCut
[0] )
return
false
;
80
//m_PassedCuts++; ////
81
//m_preSampFrac = fracs[0];
82
83
if
( (pClus->
energy
( ((
CaloSampling::CaloSample
)0) ) + pClus->
energy
( ((
CaloSampling::CaloSample
)4) ) ) >
m_EnergyAbsCut
[0] )
return
false
;
84
//m_PassedCuts++; ////
85
//m_preSamp = (fracs[0])*pClus->energy();
86
87
ATH_MSG_DEBUG
(
"L2 Calo Layers passed"
);
88
89
return
true
;
90
}
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
Combinators.h
HLTIdentifier.h
TrigL2CaloLayersHypoTool.h
CaloSampling::CaloSample
CaloSample
Definition
Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition
TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:41
TrigL2CaloLayersHypoTool::initialize
virtual StatusCode initialize() override
Definition
TrigL2CaloLayersHypoTool.cxx:23
TrigL2CaloLayersHypoTool::m_EnergyAbsCut
Gaudi::Property< std::vector< float > > m_EnergyAbsCut
Definition
TrigL2CaloLayersHypoTool.h:35
TrigL2CaloLayersHypoTool::TrigL2CaloLayersHypoTool
TrigL2CaloLayersHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TrigL2CaloLayersHypoTool.cxx:15
TrigL2CaloLayersHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition
TrigL2CaloLayersHypoTool.h:32
TrigL2CaloLayersHypoTool::m_EnergyFracCut
Gaudi::Property< std::vector< float > > m_EnergyFracCut
Definition
TrigL2CaloLayersHypoTool.h:34
TrigL2CaloLayersHypoTool::decide
virtual StatusCode decide(std::vector< CaloLayersInfo > &input) const override
TrigL2CaloLayersHypoTool::m_acceptAll
Gaudi::Property< bool > m_acceptAll
Definition
TrigL2CaloLayersHypoTool.h:36
xAOD::TrigEMCluster_v1::eta
float eta() const
get Eta (calibrated)
xAOD::TrigEMCluster_v1::energy
float energy() const
get Energy (calibrated)
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
TrigCompositeUtils
Definition
TrigComposite.h:19
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:118
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition
TrigCompositeUtilsRoot.cxx:59
WriteLumiToCool.input
dict input
Definition
WriteLumiToCool.py:174
lumiFormat.i
int i
Definition
lumiFormat.py:85
xAOD::TrigEMCluster
TrigEMCluster_v1 TrigEMCluster
Define the latest version of the trigger EM cluster class.
Definition
Event/xAOD/xAODTrigCalo/xAODTrigCalo/TrigEMCluster.h:17
ITrigL2CaloLayersHypoTool::CaloLayersInfo
Definition
ITrigL2CaloLayersHypoTool.h:27
type
Generated on
for ATLAS Offline Software by
1.17.0