ATLAS Offline Software
Loading...
Searching...
No Matches
ClassifyAndCalculateHFAugmentation.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// //
7// ClassifyAndCalculateHFAugmentation.h //
8// Header file for class ClassifyAndCalculateHFAugmentation //
9// Author: Adrian Berrocal Guardia <adrian.berrocal.guardia@cern.ch> //
10// //
11// Algorithm to add a variable called HFClassification which classifies //
12// ttbar+jets events according to the number of additional HF jets. //
13// //
15
16#ifndef DERIVATIONFRAMEWORK_ClassifyAndCalculateHFAugmentation_H
17#define DERIVATIONFRAMEWORK_ClassifyAndCalculateHFAugmentation_H
18
19// Basic C++ headers.
20
21#include <string>
22#include <vector>
23
24// Athena tools headers.
25
26#include "GaudiKernel/ToolHandle.h"
31
35
37
38#include "xAODJet/Jet.h"
40
43
46
47namespace DerivationFramework {
48
49 // Declare a set of classes:
50 // -JetMatchingTool: It matches the hadrons with the jets.
51 // -HadronOriginClassifier: It determines the origin of the HF hadrons.
52 // -ClassifyAndCalculateHFTool: It computes the the HF classifiers.
53
54 // Declare the class that adds the HF classifier in the output derivation file.
55
56 class ClassifyAndCalculateHFAugmentation : public extends<AthAlgTool, IAugmentationTool> {
57
58 /*
59 -------------------------------------------------------------------------------------------------------------------------------------
60 --------------------------------------------------- Public Variables and Functions --------------------------------------------------
61 -------------------------------------------------------------------------------------------------------------------------------------
62 */
63
64 public:
65
66 using base_class::base_class;
67
68 // Declare the functions initialize and finalize which are called before and after processing an event respectively.
69
70 virtual StatusCode initialize() override final;
71
72 // Declare the function addBranches that adds the HF classifier in the output derivation file.
73
74 virtual StatusCode addBranches(const EventContext& ctx) const override final;
75
76 /*
77 -------------------------------------------------------------------------------------------------------------------------------------
78 -------------------------------------------------- Private Variables and Functions --------------------------------------------------
79 -------------------------------------------------------------------------------------------------------------------------------------
80 */
81
82 private:
83
84 SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthParticlesKey {this, "TruthParticleContainerName", "TruthParticles", "Name of the truth particles collection that is used to compute the HF Classification"};
85 SG::ReadHandleKey<xAOD::JetContainer> m_jetCollectionKey {this, "jetCollectionName", "AntiKt4TruthDressedWZJets", "Name of the jet collection that is used to compute the HF Classification"};
86 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey {this, "EventInfo", "EventInfo", ""};
87
88 // Declare a set of strings variables:
89 // -m_hfDecorKey: It contains the name used to save the HF classifier.
90 // -m_SimplehfDecorKey: It contains the name used to save the simple HF classifier.
91
92 SG::WriteDecorHandleKey<xAOD::EventInfo> m_hfDecorKey {this, "hfDecorationName", m_eventInfoKey , "HF_Classification", "Name that is used to store the HF Classification."};
93 SG::WriteDecorHandleKey<xAOD::EventInfo> m_SimplehfDecorKey {this, "SimplehfDecorationName", m_eventInfoKey ,"SimpleHFClassification", "Name that is used to store the simple HF Classification."};
94 SG::WriteDecorHandleKey<xAOD::JetContainer> m_jetIDDecorationKey{this, "HadronOriginIDDecorationName", m_jetCollectionKey, "HFHadronOriginID", "jet origin ID decoration key"};
95 std::string m_hfDecorationName{""};
96 // Add the necessary tools:
97 // -m_JetMatchingTool_Tool: It matches the hadrons to jets.
98 // -m_HFClassification_tool: It computes the HF classifier.
99 // -m_HadronOriginClassifier_Tool: It determines the origin of the HF hadrons.
100
101 PublicToolHandle<DerivationFramework::JetMatchingTool> m_JetMatchingTool_Tool{this, "JetMatchingTool", ""};
102 PublicToolHandle<DerivationFramework::ClassifyAndCalculateHFTool> m_HFClassification_tool{this, "ClassifyAndComputeHFtool", ""};
103 PublicToolHandle<DerivationFramework::HadronOriginClassifier> m_HadronOriginClassifier_Tool{this, "HadronOriginClassifierTool", ""};
104
105 };
106}
107
108#endif // DERIVATIONFRAMEWORK_ClassifyAndCalculateHFAugmentation_H
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
PublicToolHandle< DerivationFramework::ClassifyAndCalculateHFTool > m_HFClassification_tool
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticlesKey
PublicToolHandle< DerivationFramework::HadronOriginClassifier > m_HadronOriginClassifier_Tool
PublicToolHandle< DerivationFramework::JetMatchingTool > m_JetMatchingTool_Tool
virtual StatusCode addBranches(const EventContext &ctx) const override final
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
THE reconstruction tool.