ATLAS Offline Software
Loading...
Searching...
No Matches
ClassifyAndCalculateHFTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6// //
7// ClassifyAndCalculateHFAugmentation.h //
8// Header file for class ClassifyAndCalculateHFTool //
9// Author: Adrian Berrocal Guardia <adrian.berrocal.guardia@cern.ch> //
10// //
11// Algorithm to calculate a variable called HFClassification which //
12// classifies ttbar+jets events according to the number of additional //
13// HF jets. //
14// //
16
17#ifndef DERIVATIONFRAMEWORK_CLASSIFYANDCALCULATEHFTOOL_H
18#define DERIVATIONFRAMEWORK_CLASSIFYANDCALCULATEHFTOOL_H
19
20// Basic C++ headers:
21
22#include <string>
23
24// Athena tools headers.
25
28
29#include "xAODJet/Jet.h"
31#include "xAODBase/IParticle.h"
34
35namespace DerivationFramework {
36
37 // Declare the class that computes the HF classifier.
38
40
41 /*
42 -------------------------------------------------------------------------------------------------------------------------------------
43 --------------------------------------------------- Public Variables and Functions --------------------------------------------------
44 -------------------------------------------------------------------------------------------------------------------------------------
45 */
46
47 public:
48
49 // Declare the constructor and destructor functions.
50
51 ClassifyAndCalculateHFTool(const std::string& t, const std::string& n, const IInterface* p);
53
54 // Declare the initialize and finalize function for the class which are called before and after the loop over events respectively.
55
56 virtual StatusCode initialize() override;
57 virtual StatusCode finalize() override;
58
59 // Declare a set of functions to change cuts on the particles:
60 // -jetPtCut: Save a given float value as a cut on the pt of the jets.
61 // -jetEtaCut: Save a given float value as a cut on the eta of the jets.
62 // -leadingHadronPtCut: Save a given float value as a cut on the pt of the leading hadron.
63 // -leadingHadronPtRatioCut: Save a given float value as a cut on the ratio between the pt of the leading hadron and the pt of its associated jet.
64
65 inline void jetPtCut(float a){m_jetPtCut=a;}
66 inline void jetEtaCut(float a){m_jetEtaCut=a;}
69
70 // Declare the following set of functions to compute the classifier:
71 // -flagJets: Computes the necessary variables for the classifier using information from jets and add the information in three vectors.
72 // -computeHFClassification: Compute the classifier.
73 // -getSimpleClassification: Compute a simpler classifier.
74
75 void flagJets(const xAOD::JetContainer* jets,
76 const std::map<const xAOD::Jet*, std::vector<xAOD::TruthParticleContainer::const_iterator>>& particleMatch,
77 const std::map<const xAOD::TruthParticle*, DerivationFramework::HadronOriginClassifier::HF_id>& hadronMap,
78 const std::string& hfDecorationName) const;
79 int computeHFClassification(const xAOD::JetContainer* jets, const std::string& hfDecorationName) const;
80 int getSimpleClassification(int hfclassif) const;
81
82 /*
83 -------------------------------------------------------------------------------------------------------------------------------------
84 -------------------------------------------------- Private Variables and Functions --------------------------------------------------
85 -------------------------------------------------------------------------------------------------------------------------------------
86 */
87
88 private:
89
90 // Declare a set of float variables to save the cuts on the particles:
91 // -m_jetPtCut: Cut on the pt of the jets.
92 // -m_jetEtaCut: Cut on the eta of the jets.
93 // -m_leadingHadronPtCut: Cut on the pt of the leading hadron.
94 // -m_leadingHadronPtRatioCut: Cut on the ratio between the pt of the leading hadron and the pt of its associated jet.
95
96 Gaudi::Property<float> m_jetPtCut{this, "jetPtCut", 15000., "Cut on the jets pt that are considered to compute the HF classification."};
97 Gaudi::Property<float> m_jetEtaCut{this, "jetEtaCut", 2.5, "Cut on the jets eta that are considered to compute the HF classification."};
98 Gaudi::Property<float> m_leadingHadronPtCut{this, "leadingHadronPtCut", 5000., "Cut on the hadrons that are considered to compute the HF classification."};
99 Gaudi::Property<float> m_leadingHadronPtRatioCut{this, "leadingHadronPtRatioCut", -1., "Cut on the ratio between the pt of the leading hadron matched to a jet and the jet pt."};
100
101 };
102}
103
104#endif // DERIVATIONFRAMEWORK_CLASSIFYANDCALCULATEHFTOOL_H
static Double_t a
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
void flagJets(const xAOD::JetContainer *jets, const std::map< const xAOD::Jet *, std::vector< xAOD::TruthParticleContainer::const_iterator > > &particleMatch, const std::map< const xAOD::TruthParticle *, DerivationFramework::HadronOriginClassifier::HF_id > &hadronMap, const std::string &hfDecorationName) const
int computeHFClassification(const xAOD::JetContainer *jets, const std::string &hfDecorationName) const
ClassifyAndCalculateHFTool(const std::string &t, const std::string &n, const IInterface *p)
THE reconstruction tool.
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".