ATLAS Offline Software
ClassifyAndCalculateHFAugmentation.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 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"
39 #include "xAODJet/JetContainer.h"
40 
43 
46 
47 namespace 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  class JetMatchingTool;
55  class HadronOriginClassifier;
56  class ClassifyAndCalculateHFTool;
57 
58  // Declare the class that adds the HF classifier in the output derivation file.
59 
61 
62  /*
63  -------------------------------------------------------------------------------------------------------------------------------------
64  --------------------------------------------------- Public Variables and Functions --------------------------------------------------
65  -------------------------------------------------------------------------------------------------------------------------------------
66  */
67 
68  public:
69 
70  // Declare the constructor and destructor functions.
71 
72  ClassifyAndCalculateHFAugmentation(const std::string& t, const std::string& n, const IInterface* p);
74 
75  // Declare the functions initialize and finalize which are called before and after processing an event respectively.
76 
77  virtual StatusCode initialize() override;
78  virtual StatusCode finalize() override;
79 
80  // Declare the function addBranches that adds the HF classifier in the output derivation file.
81 
82  virtual StatusCode addBranches() const override;
83 
84  /*
85  -------------------------------------------------------------------------------------------------------------------------------------
86  -------------------------------------------------- Private Variables and Functions --------------------------------------------------
87  -------------------------------------------------------------------------------------------------------------------------------------
88  */
89 
90  private:
91 
92  SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthParticlesKey {this, "TruthParticleContainerName", "TruthParticles", "Name of the truth particles collection that is used to compute the HF Classification"};
93  SG::ReadHandleKey<xAOD::JetContainer> m_jetCollectionKey {this, "jetCollectionName", "AntiKt4TruthWZJets", "Name of the jet collection that is used to compute the HF Classification"};
94  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey {this, "EventInfo", "EventInfo", ""};
95 
96  SG::WriteDecorHandleKey<xAOD::EventInfo> m_hfDecorKey {this, "EventInfoHFDecorName", "", "Name that is used to store the HF Classification."};
97  SG::WriteDecorHandleKey<xAOD::EventInfo> m_SimplehfDecorKey {this, "EventInfoSimpleHFDecorName", "", "Name that is used to store the simple HF Classification."};
98 
99  // Declare a set of strings variables:
100  // -m_hfDecorationName: It contains the name used to save the HF classifier.
101  // -m_SimplehfDecorationName: It contains the name used to save the simple HF classifier.
102 
103  Gaudi::Property<std::string> m_hfDecorationName{this, "hfDecorationName", "HF_Classification", "Name that is used to store the HF Classification."};
104  Gaudi::Property<std::string> m_SimplehfDecorationName{this, "SimplehfDecorationName", "SimpleHFClassification", "Name that is used to store the simple HF Classification."};
105 
106  // Add the necessary tools:
107  // -m_JetMatchingTool_Tool: It matches the hadrons to jets.
108  // -m_HFClassification_tool: It computes the HF classifier.
109  // -m_HadronOriginClassifier_Tool: It determines the origin of the HF hadrons.
110 
111  ToolHandle<DerivationFramework::JetMatchingTool> m_JetMatchingTool_Tool;
112  ToolHandle<DerivationFramework::ClassifyAndCalculateHFTool> m_HFClassification_tool;
113  ToolHandle<DerivationFramework::HadronOriginClassifier> m_HadronOriginClassifier_Tool;
114 
115  };
116 }
117 
118 #endif // DERIVATIONFRAMEWORK_ClassifyAndCalculateHFAugmentation_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
DerivationFramework::ClassifyAndCalculateHFAugmentation::m_SimplehfDecorKey
SG::WriteDecorHandleKey< xAOD::EventInfo > m_SimplehfDecorKey
Definition: ClassifyAndCalculateHFAugmentation.h:97
SG::WriteDecorHandleKey< xAOD::EventInfo >
DerivationFramework::ClassifyAndCalculateHFAugmentation::addBranches
virtual StatusCode addBranches() const override
Pass the thinning service
Definition: ClassifyAndCalculateHFAugmentation.cxx:99
DerivationFramework::ClassifyAndCalculateHFAugmentation::~ClassifyAndCalculateHFAugmentation
~ClassifyAndCalculateHFAugmentation()
Definition: ClassifyAndCalculateHFAugmentation.cxx:45
Jet.h
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
AuxStoreAccessorMacros.h
DerivationFramework::ClassifyAndCalculateHFAugmentation::m_JetMatchingTool_Tool
ToolHandle< DerivationFramework::JetMatchingTool > m_JetMatchingTool_Tool
Definition: ClassifyAndCalculateHFAugmentation.h:111
DerivationFramework::ClassifyAndCalculateHFAugmentation::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: ClassifyAndCalculateHFAugmentation.h:94
IAugmentationTool.h
TruthParticleContainer.h
HadronOriginClassifier.h
AuxContainerBase.h
DerivationFramework::ClassifyAndCalculateHFAugmentation::ClassifyAndCalculateHFAugmentation
ClassifyAndCalculateHFAugmentation(const std::string &t, const std::string &n, const IInterface *p)
Definition: ClassifyAndCalculateHFAugmentation.cxx:27
DerivationFramework::ClassifyAndCalculateHFAugmentation
Definition: ClassifyAndCalculateHFAugmentation.h:60
DerivationFramework::ClassifyAndCalculateHFAugmentation::m_HFClassification_tool
ToolHandle< DerivationFramework::ClassifyAndCalculateHFTool > m_HFClassification_tool
Definition: ClassifyAndCalculateHFAugmentation.h:112
DerivationFramework::ClassifyAndCalculateHFAugmentation::m_HadronOriginClassifier_Tool
ToolHandle< DerivationFramework::HadronOriginClassifier > m_HadronOriginClassifier_Tool
Definition: ClassifyAndCalculateHFAugmentation.h:113
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey< xAOD::TruthParticleContainer >
DerivationFramework::IAugmentationTool
Definition: IAugmentationTool.h:24
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DerivationFramework::ClassifyAndCalculateHFAugmentation::m_jetCollectionKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetCollectionKey
Definition: ClassifyAndCalculateHFAugmentation.h:93
DerivationFramework::ClassifyAndCalculateHFAugmentation::m_hfDecorationName
Gaudi::Property< std::string > m_hfDecorationName
Definition: ClassifyAndCalculateHFAugmentation.h:103
AthAlgTool.h
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::ClassifyAndCalculateHFAugmentation::finalize
virtual StatusCode finalize() override
Definition: ClassifyAndCalculateHFAugmentation.cxx:89
EventInfo.h
JetContainer.h
DerivationFramework::ClassifyAndCalculateHFAugmentation::m_SimplehfDecorationName
Gaudi::Property< std::string > m_SimplehfDecorationName
Definition: ClassifyAndCalculateHFAugmentation.h:104
JetMatchingTool.h
ClassifyAndCalculateHFTool.h
AthAlgTool
Definition: AthAlgTool.h:26
TruthParticle.h
DerivationFramework::ClassifyAndCalculateHFAugmentation::m_truthParticlesKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticlesKey
Definition: ClassifyAndCalculateHFAugmentation.h:92
DerivationFramework::ClassifyAndCalculateHFAugmentation::m_hfDecorKey
SG::WriteDecorHandleKey< xAOD::EventInfo > m_hfDecorKey
Definition: ClassifyAndCalculateHFAugmentation.h:96
DerivationFramework::ClassifyAndCalculateHFAugmentation::initialize
virtual StatusCode initialize() override
Definition: ClassifyAndCalculateHFAugmentation.cxx:53