ATLAS Offline Software
Loading...
Searching...
No Matches
CalibrationNtupleMakerTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_CALIBRATIONNTUPLEMAKERTOOL_H
5#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_CALIBRATIONNTUPLEMAKERTOOL_H
6
8
12
13#include <vector>
14
15class TTree;
16class TH1;
17
19
20public:
21
23 CalibrationNtupleMakerTool(const std::string& name, ISvcLocator* pSvcLocator);
24
27
29 StatusCode initialize();
30
32 StatusCode execute();
33
35 StatusCode finalize();
36
37 /* book the TTree branches */
38 virtual StatusCode bookTree();
39
40private:
41
42 // Get a data container; implementation at end of this header file
43 template<class T> const T* getContainer( const std::string & containerName);
44
45 int Matched(const xAOD::Jet* truth, const xAOD::JetContainer* jets, std::vector<const xAOD::Jet*>& matched, int& index) const;
46
47 static double DRmin(const xAOD::Jet* myjet, const xAOD::JetContainer* jets, double PtMin);
48
49 float DetectorEta(const xAOD::Jet* jet);
50
51
52 std::vector < std::string > m_collectionNames;
53 std::map < std::string, TTree* > m_trees;
54 std::string m_treeFolder;
55 std::string m_treeDescription;
56
59
64
66
68
69 float m_eventWeight = 0.0F;
70 float m_mu = 0.0F;
71 float m_npv = 0.0F;
72
73 std::vector < int >* m_index;
74
75 std::vector < double >* m_etaCalo;
76 std::vector < double >* m_etaDetCalo;
77 std::vector < double >* m_phiCalo;
78 std::vector < double >* m_eCalo;
79 std::vector < double >* m_mCalo;
80
81 std::vector < double >* m_etaCorr;
82 std::vector < double >* m_etaDetCorr;
83 std::vector < double >* m_phiCorr;
84 std::vector < double >* m_eCorr;
85 std::vector < double >* m_mCorr;
86
87 std::vector < double >* m_etaTrue;
88 std::vector < double >* m_phiTrue;
89 std::vector < double >* m_eTrue;
90 std::vector < double >* m_mTrue;
91
92 // EventInfo
93 SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"};
94
95};
96
97template<class T>
98inline const T* CalibrationNtupleMakerTool::getContainer(const std::string & containerName){
99 const T * ptr = evtStore()->retrieve< const T >( containerName );
100 if (!ptr) {
101 ATH_MSG_WARNING("Container '"<<containerName<<"' could not be retrieved");
102 }
103 return ptr;
104}
105
106
107#endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_CALIBRATIONNTUPLEMAKERTOOL_H
#define ATH_MSG_WARNING(x)
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
const T * getContainer(const std::string &containerName)
static double DRmin(const xAOD::Jet *myjet, const xAOD::JetContainer *jets, double PtMin)
CalibrationNtupleMakerTool(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
std::vector< std::string > m_collectionNames
virtual ~CalibrationNtupleMakerTool()
Default Destructor.
float DetectorEta(const xAOD::Jet *jet)
int Matched(const xAOD::Jet *truth, const xAOD::JetContainer *jets, std::vector< const xAOD::Jet * > &matched, int &index) const
StatusCode finalize()
standard Athena-Algorithm method
StatusCode execute()
standard Athena-Algorithm method
StatusCode initialize()
standard Athena-Algorithm method
SG::ReadHandleKey< xAOD::EventInfo > m_evt
std::map< std::string, TTree * > m_trees
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition index.py:1
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".