ATLAS Offline Software
HIClusterGeo_HistoFiller.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef HICLUSTERGEOWEIGHTS_HICLUSTERGEO_HISTOFILLER_H
6 #define HICLUSTERGEOWEIGHTS_HICLUSTERGEO_HISTOFILLER_H
7 
8 // Framework includes
10 #include "GaudiKernel/ServiceHandle.h"
11 #include "GaudiKernel/ITHistSvc.h"
17 
18 // STL includes
19 #include <memory> // for unique_ptr
20 #include <unordered_map>
21 
22 //ROOT includes
23 #include "TH2F.h"
24 #include "TMath.h"
25 
26 
28 public:
29  HIClusterGeo_HistoFiller(const std::string& name, ISvcLocator* pSvcLocator);
30  virtual ~HIClusterGeo_HistoFiller() = default;
31 
32  virtual StatusCode initialize() override;
33  virtual StatusCode execute() override;
34  virtual StatusCode finalize() override;
35 
36 private:
37  ServiceHandle<ITHistSvc> m_thistSvc{this, "THistSvc", "THistSvc"};
38  Gaudi::Property<std::string> m_histStream{this, "HistStream", "CLUSTERGEOFILLERSTREAM"};
39  Gaudi::Property<float> m_minFCalET{this, "minFCalET", 0.0, "minimum allowed FCal ET in TeV"};
40  Gaudi::Property<float> m_maxFCalET{this, "maxFCalET", 5.4, "maximum allowed FCal ET in TeV"};
41 
42  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfo", "name of EventInfo container"};
43  SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainerKey{this, "VertexContainerKey", "PrimaryVertices", "name of VertexContainer"};
44  SG::ReadHandleKey<xAOD::CaloClusterContainer> m_caloClusterContainerKey{this, "CaloClusterContainerKey", "HIClusters", "name of CaloClusterContainer"};
45  SG::ReadHandleKey<xAOD::HIEventShapeContainer> m_hiEventShapeKey{this, "HIEventShapeKey", "CaloSums", "name of HIEventShapeContainer"};
46 
47  std::unordered_map<int, TH2F*> m_histTileWeights;
48  const int m_etaBins=100, m_phiBins=64;
49  const int m_totalBins = (m_etaBins+2)*(m_phiBins+2);
51 
52  TH1 * regAndGetTHF(const std::string& histName, const std::string& histTitle, int numBinsX, double xMin, double xMax, int numBinsY, double yMin, double yMax);
53 };
54 
55 
56 // generate with `clid -m "HIClusterGeo_HistoFiller" `
57 #ifndef __CINT__
58  CLASS_DEF( HIClusterGeo_HistoFiller , 60054236 , 1 )
59 #endif
60 
61 #endif // HICLUSTERGEOWEIGHTS_HICLUSTERGEO_HISTOFILLER_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
HIClusterGeo_HistoFiller::m_caloClusterContainerKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusterContainerKey
Definition: HIClusterGeo_HistoFiller.h:44
AddEmptyComponent.histName
string histName
Definition: AddEmptyComponent.py:64
HIClusterGeo_HistoFiller::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
Definition: HIClusterGeo_HistoFiller.h:37
HIClusterGeo_HistoFiller::m_hiEventShapeKey
SG::ReadHandleKey< xAOD::HIEventShapeContainer > m_hiEventShapeKey
Definition: HIClusterGeo_HistoFiller.h:45
HIClusterGeo_HistoFiller::m_histStream
Gaudi::Property< std::string > m_histStream
Definition: HIClusterGeo_HistoFiller.h:38
HIClusterGeo_HistoFiller::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: HIClusterGeo_HistoFiller.h:42
SG::ReadHandleKey< xAOD::EventInfo >
HIClusterGeo_HistoFiller::~HIClusterGeo_HistoFiller
virtual ~HIClusterGeo_HistoFiller()=default
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
HIClusterGeo_HistoFiller::m_vertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
Definition: HIClusterGeo_HistoFiller.h:43
HIClusterGeo_HistoFiller::m_minFCalET
Gaudi::Property< float > m_minFCalET
Definition: HIClusterGeo_HistoFiller.h:39
AthAlgorithm.h
HIClusterGeo_HistoFiller::m_totalBins
const int m_totalBins
Definition: HIClusterGeo_HistoFiller.h:49
HIClusterGeo_HistoFiller::m_etaPhiMapping
TH2F * m_etaPhiMapping
Definition: HIClusterGeo_HistoFiller.h:50
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HIEventShapeContainer.h
AthAlgorithm
Definition: AthAlgorithm.h:47
HIClusterGeo_HistoFiller::regAndGetTHF
TH1 * regAndGetTHF(const std::string &histName, const std::string &histTitle, int numBinsX, double xMin, double xMax, int numBinsY, double yMin, double yMax)
Definition: HIClusterGeo_HistoFiller.cxx:12
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
HIClusterGeo_HistoFiller::finalize
virtual StatusCode finalize() override
Definition: HIClusterGeo_HistoFiller.cxx:142
HIClusterGeo_HistoFiller::HIClusterGeo_HistoFiller
HIClusterGeo_HistoFiller(const std::string &name, ISvcLocator *pSvcLocator)
Definition: HIClusterGeo_HistoFiller.cxx:7
HIClusterGeo_HistoFiller::execute
virtual StatusCode execute() override
Definition: HIClusterGeo_HistoFiller.cxx:49
EventInfo.h
HIClusterGeo_HistoFiller::initialize
virtual StatusCode initialize() override
Definition: HIClusterGeo_HistoFiller.cxx:29
VertexContainer.h
HIClusterGeo_HistoFiller
Definition: HIClusterGeo_HistoFiller.h:27
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
CaloClusterContainer.h
HIClusterGeo_HistoFiller::m_histTileWeights
std::unordered_map< int, TH2F * > m_histTileWeights
Definition: HIClusterGeo_HistoFiller.h:47
HIClusterGeo_HistoFiller::m_maxFCalET
Gaudi::Property< float > m_maxFCalET
Definition: HIClusterGeo_HistoFiller.h:40
HIClusterGeo_HistoFiller::m_etaBins
const int m_etaBins
Definition: HIClusterGeo_HistoFiller.h:48
ServiceHandle< ITHistSvc >
HIClusterGeo_HistoFiller::m_phiBins
const int m_phiBins
Definition: HIClusterGeo_HistoFiller.h:48