ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetMonitoring
src
JetHistoHTFiller.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
#include "
AthenaMonitoringKernel/GenericMonitoringTool.h
"
6
#include "
JetMonitoring/JetHistoHTFiller.h
"
7
#include "
JetMonitoring/JetMonitoringAlg.h
"
8
9
10
JetHistoHTFiller::JetHistoHTFiller
(
const
std::string&
type
,
const
std::string & name ,
const
IInterface* parent):
11
AthAlgTool
(
type
, name, parent )
12
,
m_failureOnMissingContainer
(false)
13
{
14
declareInterface<IJetHistoFiller>(
this
);
15
declareProperty
(
"FailureOnMissingContainer"
,
m_failureOnMissingContainer
);
16
17
}
18
19
20
StatusCode
JetHistoHTFiller::initialize
() {
21
ATH_MSG_DEBUG
(
" Initializing "
<< name() <<
" with "
<<
m_minPt
<<
" and "
<<
m_maxEta
);
22
return
StatusCode::SUCCESS;
23
}
24
25
StatusCode
JetHistoHTFiller::finalize
() {
26
ATH_MSG_DEBUG
(
"Finalizing "
<< name());
27
return
StatusCode::SUCCESS;
28
}
29
30
StatusCode
JetHistoHTFiller::processJetContainer
(
const
JetMonitoringAlg
& parentAlg,
const
xAOD::JetContainer
& jets,
const
EventContext& )
const
{
31
32
if
( jets.empty() ) {
33
if
(
m_failureOnMissingContainer
){
34
ATH_MSG_ERROR
(
"Input JetContainer could not be found or is empty"
);
35
return
StatusCode::FAILURE;
36
}
else
{
37
ATH_MSG_DEBUG
(
"Input JetContainer could not be found or is empty"
);
38
return
StatusCode::SUCCESS;
39
}
40
}
41
42
auto
HT =
Monitored::Scalar<float>
(
"jetHT"
, 0.0);
43
for
(
const
auto
*
const
jetItr : jets) {
44
float
pt = jetItr->pt()/1000.;
45
if
( pt >
m_minPt
) {
46
if
(fabs(jetItr->eta()) <
m_maxEta
) HT += pt;
47
}
48
else
{
break
; }
// jets ordered by pT anyway
49
}
50
51
parentAlg.
fill
(
m_group
, HT);
52
53
return
StatusCode::SUCCESS;
54
}
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
GenericMonitoringTool.h
JetHistoHTFiller.h
JetMonitoringAlg.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
JetHistoHTFiller::JetHistoHTFiller
JetHistoHTFiller(const std::string &type, const std::string &name, const IInterface *parent)
Definition
JetHistoHTFiller.cxx:10
JetHistoHTFiller::processJetContainer
virtual StatusCode processJetContainer(const JetMonitoringAlg &parentAlg, const xAOD::JetContainer &jets, const EventContext &ctx) const
Definition
JetHistoHTFiller.cxx:30
JetHistoHTFiller::finalize
virtual StatusCode finalize()
Definition
JetHistoHTFiller.cxx:25
JetHistoHTFiller::m_failureOnMissingContainer
bool m_failureOnMissingContainer
Definition
JetHistoHTFiller.h:28
JetHistoHTFiller::initialize
virtual StatusCode initialize()
Definition
JetHistoHTFiller.cxx:20
JetHistoHTFiller::m_group
Gaudi::Property< std::string > m_group
Definition
JetHistoHTFiller.h:25
JetHistoHTFiller::m_maxEta
Gaudi::Property< float > m_maxEta
Definition
JetHistoHTFiller.h:27
JetHistoHTFiller::m_minPt
Gaudi::Property< float > m_minPt
Definition
JetHistoHTFiller.h:26
JetMonitoringAlg
A monitoring algorithm in charge of filling histogram for a JetContainer.
Definition
JetMonitoringAlg.h:26
Monitored::Scalar
Declare a monitored scalar variable.
Definition
MonitoredScalar.h:34
AthMonitorAlgorithm::fill
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &&variables) const
Fills a vector of variables to a group by reference.
Definition
AthMonitorAlgorithm.cxx:99
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition
JetContainer.h:17
type
Generated on
for ATLAS Offline Software by
1.17.0