ATLAS Offline Software
Loading...
Searching...
No Matches
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
21
22#include "xAODJet/Jet.h"
23#include "xAODBase/IParticle.h"
25
26namespace DerivationFramework{
27
28 // Declare the class that matches hadrons with jets.
29
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
static Double_t a
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
virtual StatusCode initialize() override
virtual StatusCode finalize() override
JetMatchingTool(const std::string &t, const std::string &n, const IInterface *p)
Gaudi::Property< float > m_jetEtaCut
std::map< const xAOD::Jet *, std::vector< xAOD::TruthParticleContainer::const_iterator > > matchHadronsToJets(const xAOD::TruthParticleContainer *hadrons, const xAOD::JetContainer *jets) const
Gaudi::Property< float > m_jetPtCut
THE reconstruction tool.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.