ATLAS Offline Software
TrackCaloClusterRecValidationTool.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_TRACKCALOCLUSTERRECVALIDATIONTOOL_H
5 #define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TRACKCALOCLUSTERRECVALIDATIONTOOL_H
6 
14 
15 //#gaudi includes
16 #include "GaudiKernel/ToolHandle.h"
17 //EDM includes
19 //Athena
20 
21 //STL includes
22 #include <string>
23 #include <vector>
24 
25 #include "xAODJet/JetContainer.h"
29 
30 class TCCPlots;
32 
37 public:
39  TrackCaloClusterRecValidationTool(const std::string & type, const std::string & name, const IInterface* parent);
45  virtual StatusCode initialize();
46  virtual StatusCode bookHistograms();
47  virtual StatusCode fillHistograms();
48  virtual StatusCode procHistograms();
50 private:
53 
55  ToolHandleArray<IJetCalibrationTool> m_jetCalibrationTools;
56  std::vector< std::string > m_jetCalibrationCollections;
58 
60  const xAOD::JetContainer* calibrateAndRecordShallowCopyJetCollection(const xAOD::JetContainer * jetContainer, const std::string& name);
61 
64  const xAOD::Jet* ClusterMatched(const xAOD::Jet* jet, const std::vector<const xAOD::Jet*>& jets) const;
65 
66  // Get a data container; implementation at end of this header file
67  template<class T> const T* getContainer( const std::string & containerName);
68 
73 
74  std::vector<std::string> m_jetContainerNames;
75 
76  std::string m_vertexContainerName;
77 
80 
82  std::string m_dirName;
83  float m_maxJetDR;
84  float m_maxEta;
85  float m_minPt;
86  float m_minMass;
87  float m_maxMass;
88 
89  std::string m_folder;
90 
92 
95  float m_trackPtMin;
96 
97  std::vector<float> m_jetPtBins ;
98  std::vector<float> m_jetMassOverPtBins ;
99  std::vector<float> m_trackPtBins ;
100  std::vector<float> m_trackProdRadiusBins ;
101 
105 
107  std::vector<std::string> m_TCCCombinedCollectionNames;
108  float m_tccPtMin;
109  float m_tccEtaMax;
110 
111  //histograms
112  std::map<std::string, TCCPlots*> m_tccPlots;
113 
114  // EventInfo
115  SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"};
116 };
117 
118 template<class T>
119 inline const T* TrackCaloClusterRecValidationTool::getContainer(const std::string & containerName){
120  const T * ptr = evtStore()->retrieve< const T >( containerName );
121  if (!ptr) {
122  ATH_MSG_WARNING("Container '"<<containerName<<"' could not be retrieved");
123  }
124  return ptr;
125 }
126 
127 #endif //TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TRACKCALOCLUSTERRECVALIDATIONTOOL_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TrackCaloClusterRecValidationTool::m_jetMassOverPtBins
std::vector< float > m_jetMassOverPtBins
Definition: TrackCaloClusterRecValidationTool.h:98
TrackCaloClusterRecValidationTool::m_jetCalibrationCollections
std::vector< std::string > m_jetCalibrationCollections
Definition: TrackCaloClusterRecValidationTool.h:56
TrackCaloClusterRecValidationTool::procHistograms
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
Definition: TrackCaloClusterRecValidationTool.cxx:445
TrackCaloClusterRecValidationTool::m_minPt
float m_minPt
Definition: TrackCaloClusterRecValidationTool.h:85
TrackCaloClusterRecValidationTool::m_truthTrimmedJetContainerName
std::string m_truthTrimmedJetContainerName
Definition: TrackCaloClusterRecValidationTool.h:72
TrackCaloClusterRecValidationTool::m_trackProdRadiusBins
std::vector< float > m_trackProdRadiusBins
Definition: TrackCaloClusterRecValidationTool.h:100
TrackCaloClusterRecValidationTool::~TrackCaloClusterRecValidationTool
virtual ~TrackCaloClusterRecValidationTool()
Destructor.
TrackCaloClusterRecValidationTool::m_minMass
float m_minMass
Definition: TrackCaloClusterRecValidationTool.h:86
TrackCaloClusterRecValidationTool::m_saveMatchingInfo
bool m_saveMatchingInfo
Definition: TrackCaloClusterRecValidationTool.h:94
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:73
TrackCaloClusterRecValidationTool::calibrateAndRecordShallowCopyJetCollection
const xAOD::JetContainer * calibrateAndRecordShallowCopyJetCollection(const xAOD::JetContainer *jetContainer, const std::string &name)
Calibrate and record a shallow copy of a given jet container.
Definition: TrackCaloClusterRecValidationTool.cxx:460
TrackCaloClusterRecValidationTool::m_topoJetReferenceName
std::string m_topoJetReferenceName
Definition: TrackCaloClusterRecValidationTool.h:78
TrackCaloClusterRecValidationTool::m_trackPtMin
float m_trackPtMin
Definition: TrackCaloClusterRecValidationTool.h:95
TruthParticleContainer.h
TrackCaloClusterRecValidationTool::m_tccEtaMax
float m_tccEtaMax
Definition: TrackCaloClusterRecValidationTool.h:109
TrackCaloClusterRecValidationTool::m_jetContainerNames
std::vector< std::string > m_jetContainerNames
Definition: TrackCaloClusterRecValidationTool.h:74
TrackCaloClusterRecValidationTool::ClusterMatched
const xAOD::Jet * ClusterMatched(const xAOD::Jet *jet, const xAOD::JetContainer *jets)
Get the matched jet.
Definition: TrackCaloClusterRecValidationTool.cxx:406
TCCPlots
Definition: TCCPlots.h:21
TrackCaloClusterRecValidationTool::m_saveClusterInfo
bool m_saveClusterInfo
Definition: TrackCaloClusterRecValidationTool.h:102
TrackCaloClusterRecValidationTool::m_tccPtMin
float m_tccPtMin
Definition: TrackCaloClusterRecValidationTool.h:108
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
SG::ReadHandleKey< xAOD::EventInfo >
TrackCaloClusterRecValidationTool::TrackCaloClusterRecValidationTool
TrackCaloClusterRecValidationTool()
prevent default construction
TrackCaloClusterRecValidationTool::m_dirName
std::string m_dirName
Directory name.
Definition: TrackCaloClusterRecValidationTool.h:82
TrackCaloClusterRecValidationTool::m_saveTCCInfo
bool m_saveTCCInfo
Definition: TrackCaloClusterRecValidationTool.h:106
TrackCaloClusterRecValidationTool::m_tccPlots
std::map< std::string, TCCPlots * > m_tccPlots
Definition: TrackCaloClusterRecValidationTool.h:112
IJetCalibrationTool.h
TrackCaloClusterRecValidationTool::m_jetCalibrationTools
ToolHandleArray< IJetCalibrationTool > m_jetCalibrationTools
calibration tool
Definition: TrackCaloClusterRecValidationTool.h:55
TrackCaloClusterRecValidationTool::m_trackPtBins
std::vector< float > m_trackPtBins
Definition: TrackCaloClusterRecValidationTool.h:99
TrackCaloClusterRecValidationTool::initialize
virtual StatusCode initialize()
Definition: TrackCaloClusterRecValidationTool.cxx:70
ManagedMonitorToolBase.h
IJetCalibrationTool
class IJetCalibrationTool
Definition: IJetCalibrationTool.h:26
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
TrackCaloClusterRecValidationTool::m_truthJetContainerName
std::string m_truthJetContainerName
Truth jet container's name.
Definition: TrackCaloClusterRecValidationTool.h:71
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
TrackCaloClusterRecValidationTool::m_saveTrackInfo
bool m_saveTrackInfo
Definition: TrackCaloClusterRecValidationTool.h:93
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrackCaloClusterRecValidationTool::m_caloClusterEtaMax
float m_caloClusterEtaMax
Definition: TrackCaloClusterRecValidationTool.h:104
TrackCaloClusterRecValidationTool::m_maxEta
float m_maxEta
Definition: TrackCaloClusterRecValidationTool.h:84
TrackCaloClusterRecValidationTool::m_trackParticleCollectionName
std::string m_trackParticleCollectionName
Definition: TrackCaloClusterRecValidationTool.h:91
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrackCaloClusterRecValidationTool::m_vertexContainerName
std::string m_vertexContainerName
Definition: TrackCaloClusterRecValidationTool.h:76
TrackCaloClusterRecValidationTool::m_jetPtBins
std::vector< float > m_jetPtBins
Definition: TrackCaloClusterRecValidationTool.h:97
TrackCaloClusterRecValidationTool::m_maxMass
float m_maxMass
Definition: TrackCaloClusterRecValidationTool.h:87
TrackCaloClusterRecValidationTool::getContainer
const T * getContainer(const std::string &containerName)
Definition: TrackCaloClusterRecValidationTool.h:119
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrackCaloClusterRecValidationTool::m_evt
SG::ReadHandleKey< xAOD::EventInfo > m_evt
Definition: TrackCaloClusterRecValidationTool.h:115
TrackCaloClusterRecValidationTool::m_applyCalibration
bool m_applyCalibration
Definition: TrackCaloClusterRecValidationTool.h:57
TrackCaloClusterRecValidationTool::m_folder
std::string m_folder
Definition: TrackCaloClusterRecValidationTool.h:89
EventInfo.h
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
TrackCaloClusterRecValidationTool::bookHistograms
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
Definition: TrackCaloClusterRecValidationTool.cxx:429
JetContainer.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrackCaloClusterRecValidationTool::m_caloClusterCollectionName
std::string m_caloClusterCollectionName
Definition: TrackCaloClusterRecValidationTool.h:103
TrackCaloClusterRecValidationTool::m_TCCCombinedCollectionNames
std::vector< std::string > m_TCCCombinedCollectionNames
Definition: TrackCaloClusterRecValidationTool.h:107
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
TrackCaloClusterRecValidationTool::m_topoTrimmedJetReferenceName
std::string m_topoTrimmedJetReferenceName
Definition: TrackCaloClusterRecValidationTool.h:79
TrackCaloClusterRecValidationTool::m_saveJetInfo
bool m_saveJetInfo
Definition: TrackCaloClusterRecValidationTool.h:69
TrackCaloClusterRecValidationTool
Tool to book and fill inner detector histograms for physics validation.
Definition: TrackCaloClusterRecValidationTool.h:36
TrackCaloClusterRecValidationTool::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: TrackCaloClusterRecValidationTool.cxx:131
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
TrackCaloClusterRecValidationTool::m_maxJetDR
float m_maxJetDR
Definition: TrackCaloClusterRecValidationTool.h:83