ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkMCTruth
DerivationFrameworkMCTruth
JetMatchingTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// //
7
// JetMatchingTool.h //
8
// Header file for class JetMatchingTool //
9
// Author: Adrian Berrocal Guardia <adrian.berrocal.guardia@cern.ch> //
10
// //
11
// Algorithm to match each truth particle to the closest jet //
12
// //
14
15
#ifndef JetMatchingTool_HH
16
#define JetMatchingTool_HH
17
18
// Athena tools headers.
19
20
#include "
AthenaBaseComps/AthAlgTool.h
"
21
22
#include "
xAODJet/Jet.h
"
23
#include "
xAODBase/IParticle.h
"
24
#include "
xAODTruth/TruthParticle.h
"
25
26
namespace
DerivationFramework
{
27
28
// Declare the class that matches hadrons with jets.
29
30
class
JetMatchingTool
:
public
AthAlgTool
{
31
32
/*
33
-------------------------------------------------------------------------------------------------------------------------------------
34
--------------------------------------------------- Public Variables and Functions --------------------------------------------------
35
-------------------------------------------------------------------------------------------------------------------------------------
36
*/
37
38
public
:
39
40
// Declare the constructor and the destructor functions.
41
42
JetMatchingTool
(
const
std::string& t,
const
std::string& n,
const
IInterface* p);
43
virtual
~JetMatchingTool
();
44
45
// Declare the initialize and finalize function for the class which are called before and after the loop over events respectively.
46
47
virtual
StatusCode
initialize
()
override
;
48
virtual
StatusCode
finalize
()
override
;
49
50
// Declare a set of functions to change cuts on the particles:
51
// -jetPtCut: Save a given float value as a cut on the pt of the jets.
52
// -jetEtaCut: Save a given float value as a cut on the eta of the jets.
53
// -drCut: Save a given float value as a cut on the dr between the hadron and the jet to match them.
54
55
inline
void
jetPtCut
(
float
a
){
m_jetPtCut
=
a
;}
56
inline
void
jetEtaCut
(
float
a
){
m_jetEtaCut
=
a
;}
57
inline
void
drCut
(
float
a
){
m_drCut
=
a
;}
58
59
// Declare the function that matches the hadrons with the jets.
60
61
std::map<const xAOD::Jet*, std::vector<xAOD::TruthParticleContainer::const_iterator>>
matchHadronsToJets
(
const
xAOD::TruthParticleContainer
* hadrons,
const
xAOD::JetContainer
* jets)
const
;
62
63
/*
64
-------------------------------------------------------------------------------------------------------------------------------------
65
-------------------------------------------------- Private Variables and Functions --------------------------------------------------
66
-------------------------------------------------------------------------------------------------------------------------------------
67
*/
68
69
// Declare the private variables and functions which the user cannot change outside the class.
70
71
private
:
72
73
// Declare a set of float variables to save the cuts on the particles:
74
// -m_jetPtCut: Cut on the pt of the jets.
75
// -m_jetEtaCut: Cut on the eta of the jets.
76
// -m_drCut: Cut on the deltaR to match the a jet with an hadron.
77
78
Gaudi::Property<float>
m_jetPtCut
{
this
,
"jetPtCut"
, 15000.,
"Cut on the jets pt that are considered for the hadron-jet matching."
};
79
Gaudi::Property<float>
m_jetEtaCut
{
this
,
"jetEtaCut"
, 2.5,
"Cut on the jets eta that are considered for the hadron-jet matching."
};
80
Gaudi::Property<float>
m_drCut
{
this
,
"drCut"
, 0.4,
"Cut on the delta R between an hadron and the closest jet to consider them matched."
};
81
82
};
83
}
84
85
#endif
// JetMatchingTool_HH
AthAlgTool.h
IParticle.h
Jet.h
TruthParticle.h
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
DerivationFramework::JetMatchingTool::~JetMatchingTool
virtual ~JetMatchingTool()
Definition
JetMatchingTool.cxx:26
DerivationFramework::JetMatchingTool::initialize
virtual StatusCode initialize() override
Definition
JetMatchingTool.cxx:35
DerivationFramework::JetMatchingTool::drCut
void drCut(float a)
Definition
JetMatchingTool.h:57
DerivationFramework::JetMatchingTool::m_drCut
Gaudi::Property< float > m_drCut
Definition
JetMatchingTool.h:80
DerivationFramework::JetMatchingTool::jetEtaCut
void jetEtaCut(float a)
Definition
JetMatchingTool.h:56
DerivationFramework::JetMatchingTool::finalize
virtual StatusCode finalize() override
Definition
JetMatchingTool.cxx:48
DerivationFramework::JetMatchingTool::JetMatchingTool
JetMatchingTool(const std::string &t, const std::string &n, const IInterface *p)
Definition
JetMatchingTool.cxx:23
DerivationFramework::JetMatchingTool::jetPtCut
void jetPtCut(float a)
Definition
JetMatchingTool.h:55
DerivationFramework::JetMatchingTool::m_jetEtaCut
Gaudi::Property< float > m_jetEtaCut
Definition
JetMatchingTool.h:79
DerivationFramework::JetMatchingTool::matchHadronsToJets
std::map< const xAOD::Jet *, std::vector< xAOD::TruthParticleContainer::const_iterator > > matchHadronsToJets(const xAOD::TruthParticleContainer *hadrons, const xAOD::JetContainer *jets) const
Definition
JetMatchingTool.cxx:58
DerivationFramework::JetMatchingTool::m_jetPtCut
Gaudi::Property< float > m_jetPtCut
Definition
JetMatchingTool.h:78
DerivationFramework
THE reconstruction tool.
Definition
CascadeTools.h:16
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition
JetContainer.h:17
xAOD::TruthParticleContainer
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.
Definition
Event/xAOD/xAODTruth/xAODTruth/TruthParticleContainer.h:17
Generated on
for ATLAS Offline Software by
1.17.0