ATLAS Offline Software
Loading...
Searching...
No Matches
JetHistoPtTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9
10JetHistoPtTool::JetHistoPtTool( const std::string& type, const std::string & name ,const IInterface* parent):
11 AthAlgTool( type, name, parent )
12
13{
14 declareInterface<IJetHistoFiller>(this);
15
16
17}
18
19StatusCode JetHistoPtTool::processJetContainer(const JetMonitoringAlg& parentAlg, const xAOD::JetContainer & jets, const EventContext& ) const {
20
21 std::vector<float> jetPt_v;
22 for (const auto *const jetItr : jets) {
23 jetPt_v.push_back(jetItr->pt()/1000.);
24 }
25 auto jetPt = Monitored::Collection("jetPt", jetPt_v);
26 parentAlg.fill(m_group, jetPt);
27
28 return StatusCode::SUCCESS;
29}
Header file to be included by clients of the Monitored infrastructure.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Property< std::string > m_group
JetHistoPtTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode processJetContainer(const JetMonitoringAlg &parentAlg, const xAOD::JetContainer &jets, const EventContext &) const
A monitoring algorithm in charge of filling histogram for a JetContainer.
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.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
JetContainer_v1 JetContainer
Definition of the current "jet container version".