ATLAS Offline Software
JetTruthNtupleTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // JetTruthNtupleTool.h
7 // Header file for JetTruthNtupleTool
9 // (c) ATLAS Detector software
11 // Wolfgang.Liebig@cern.ch
13 
14 #ifndef TRK_JETTRUTHNTUPLETOOL_H
15 #define TRK_JETTRUTHNTUPLETOOL_H
16 
18 #include "GaudiKernel/ToolHandle.h"
21 
23 #include <vector>
24 
25 class TTree;
26 
27 namespace Trk {
28 
29 
37 class JetTruthNtupleTool : virtual public Trk::IJetTruthNtupleTool, public AthAlgTool {
38 public:
39 
40  // standard AlgToolmethods
41  JetTruthNtupleTool(const std::string&,const std::string&,const IInterface*);
43 
44  // standard Athena methods
47 
49  virtual StatusCode writeJetTruthData (const std::vector< Trk::GenParticleJet >&,
50  const int& );
51 
52  virtual unsigned int getNumberOfTreeRecords() const;
53 
54 private:
55 
56  // jobOptions
57  std::string m_ntupleTreeName;
58  std::string m_ntupleFileName;
59  std::vector<double> m_etaBins;
60 
61  TTree* m_nt;
62 
63  unsigned int m_numberOfTreeEntries;
64 
65  // ntuple variables
68 
69  // truth jet information
70  std::vector<unsigned int>* m_genParticleLinkIndex;
71  std::vector<float>* m_mc_trackToJetAngle;
77 
78  SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"};
79 };
80 
81 
82 } // end of namespace
83 
84 #endif // TRK_TRUTHNTUPLETOOL_H
85 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
IJetTruthNtupleTool.h
Trk::JetTruthNtupleTool::m_nt
TTree * m_nt
Pointer to the NTuple tree.
Definition: JetTruthNtupleTool.h:61
Trk::JetTruthNtupleTool::m_mc_jetMultiplicity
float m_mc_jetMultiplicity
Definition: JetTruthNtupleTool.h:72
Trk::JetTruthNtupleTool::m_ntupleFileName
std::string m_ntupleFileName
jobOption: Ntuple file and dir name
Definition: JetTruthNtupleTool.h:58
Trk::JetTruthNtupleTool::m_mc_jetSphericity
float m_mc_jetSphericity
Definition: JetTruthNtupleTool.h:73
Trk::JetTruthNtupleTool::m_mc_jetThrust
float m_mc_jetThrust
Definition: JetTruthNtupleTool.h:74
Trk::JetTruthNtupleTool
Tool to fill basic information about truth jets, establishing track-to-jet association indices with t...
Definition: JetTruthNtupleTool.h:37
Trk::JetTruthNtupleTool::m_genParticleLinkIndex
std::vector< unsigned int > * m_genParticleLinkIndex
Definition: JetTruthNtupleTool.h:70
SG::ReadHandleKey< xAOD::EventInfo >
Trk::JetTruthNtupleTool::writeJetTruthData
virtual StatusCode writeJetTruthData(const std::vector< Trk::GenParticleJet > &, const int &)
fill ntuple data for a given vector of truth jets
Definition: JetTruthNtupleTool.cxx:112
Trk::JetTruthNtupleTool::m_mc_jetMomentum
float m_mc_jetMomentum
Definition: JetTruthNtupleTool.h:76
Trk::JetTruthNtupleTool::initialize
StatusCode initialize()
Definition: JetTruthNtupleTool.cxx:57
Trk::IJetTruthNtupleTool
Definition: IJetTruthNtupleTool.h:35
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::JetTruthNtupleTool::JetTruthNtupleTool
JetTruthNtupleTool(const std::string &, const std::string &, const IInterface *)
Definition: JetTruthNtupleTool.cxx:28
Trk::JetTruthNtupleTool::m_numberOfTreeEntries
unsigned int m_numberOfTreeEntries
Definition: JetTruthNtupleTool.h:63
AthAlgTool.h
Trk::JetTruthNtupleTool::~JetTruthNtupleTool
~JetTruthNtupleTool()
Trk::JetTruthNtupleTool::m_eventNumber
int m_eventNumber
Definition: JetTruthNtupleTool.h:67
Trk::JetTruthNtupleTool::m_evt
SG::ReadHandleKey< xAOD::EventInfo > m_evt
Definition: JetTruthNtupleTool.h:78
Trk::JetTruthNtupleTool::finalize
StatusCode finalize()
finalize
Definition: JetTruthNtupleTool.cxx:100
Trk::JetTruthNtupleTool::m_mc_jetEnergy
float m_mc_jetEnergy
Definition: JetTruthNtupleTool.h:75
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
EventInfo.h
Trk::JetTruthNtupleTool::m_runNumber
int m_runNumber
Definition: JetTruthNtupleTool.h:66
Trk::JetTruthNtupleTool::m_ntupleTreeName
std::string m_ntupleTreeName
jobOption: Ntuple tree name
Definition: JetTruthNtupleTool.h:57
AthAlgTool
Definition: AthAlgTool.h:26
Trk::JetTruthNtupleTool::m_mc_trackToJetAngle
std::vector< float > * m_mc_trackToJetAngle
Definition: JetTruthNtupleTool.h:71
Trk::JetTruthNtupleTool::getNumberOfTreeRecords
virtual unsigned int getNumberOfTreeRecords() const
Definition: JetTruthNtupleTool.cxx:162
Trk::JetTruthNtupleTool::m_etaBins
std::vector< double > m_etaBins
Definition: JetTruthNtupleTool.h:59