ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetMonitoring
src
JetHistoLeadingJetsRelations.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
AthenaMonitoringKernel/GenericMonitoringTool.h
"
6
#include "
JetMonitoring/JetHistoLeadingJetsRelations.h
"
7
8
#include "
JetMonitoring/JetMonitoringAlg.h
"
9
10
11
JetHistoLeadingJetsRelations::JetHistoLeadingJetsRelations
(
const
std::string&
type
,
const
std::string & name ,
const
IInterface* parent):
12
AthAlgTool
(
type
, name, parent )
13
{
14
declareInterface<IJetHistoFiller>(
this
);
15
16
}
17
18
19
StatusCode
JetHistoLeadingJetsRelations::initialize
() {
20
21
return
StatusCode::SUCCESS;
22
}
23
24
StatusCode
JetHistoLeadingJetsRelations::processJetContainer
(
const
JetMonitoringAlg
& parentAlg,
const
xAOD::JetContainer
& jets,
const
EventContext& )
const
{
25
if
(jets.empty())
return
StatusCode::SUCCESS;
26
//
27
28
if
(jets.size()==1)
return
StatusCode::SUCCESS;
29
30
31
// consider the two jets with the highest pt
32
const
xAOD::Jet
* j1 = jets[0];
33
const
xAOD::Jet
* j2 = jets[1];
34
35
// define deta, dphi and dr so that they are known to be monitored
36
auto
dEta=
Monitored::Scalar<float>
(
"dEta"
,0.0);
37
// alternative way
38
//Monitored::Scalar<float>dEta("dEta")
39
auto
dPhi=
Monitored::Scalar<float>
(
"dPhi"
,0.0);
40
// alternative way
41
//Monitored::Scalar<float>dEta("dPhi")
42
auto
dR =
Monitored::Scalar<float>
(
"dR"
,0.0);
43
// Monitored::Scalar<float>dR("dR")
44
45
dEta= j1->eta() - j2->eta();
46
dPhi = fabs(j1->phi() - j2->phi() );
47
if
(dPhi > 2*3.14159) dPhi -= 2*3.14159;
48
dR = sqrt( dPhi*dPhi + dEta*dEta);
49
50
// ToolHandle<GenericMonitoringTool> grpT =
51
parentAlg.
fill
(
m_group
,dEta,dPhi,dR);
52
53
return
StatusCode::SUCCESS;
54
}
55
56
GenericMonitoringTool.h
JetHistoLeadingJetsRelations.h
JetMonitoringAlg.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
JetHistoLeadingJetsRelations::JetHistoLeadingJetsRelations
JetHistoLeadingJetsRelations(const std::string &type, const std::string &name, const IInterface *parent)
Definition
JetHistoLeadingJetsRelations.cxx:11
JetHistoLeadingJetsRelations::processJetContainer
virtual StatusCode processJetContainer(const JetMonitoringAlg &parentAlg, const xAOD::JetContainer &jets, const EventContext &ctx) const
Definition
JetHistoLeadingJetsRelations.cxx:24
JetHistoLeadingJetsRelations::m_group
Gaudi::Property< std::string > m_group
Definition
JetHistoLeadingJetsRelations.h:35
JetHistoLeadingJetsRelations::initialize
virtual StatusCode initialize()
Definition
JetHistoLeadingJetsRelations.cxx:19
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::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition
Event/xAOD/xAODJet/xAODJet/Jet.h:17
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