ATLAS Offline Software
Loading...
Searching...
No Matches
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
28public:
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
36private:
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
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
HIClusterGeo_HistoFiller(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::HIEventShapeContainer > m_hiEventShapeKey
TH1 * regAndGetTHF(const std::string &histName, const std::string &histTitle, int numBinsX, double xMin, double xMax, int numBinsY, double yMin, double yMax)
ServiceHandle< ITHistSvc > m_thistSvc
Gaudi::Property< std::string > m_histStream
virtual ~HIClusterGeo_HistoFiller()=default
Gaudi::Property< float > m_minFCalET
virtual StatusCode execute() override
virtual StatusCode finalize() override
Gaudi::Property< float > m_maxFCalET
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusterContainerKey
std::unordered_map< int, TH2F * > m_histTileWeights
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Property holding a SG store/key/clid from which a ReadHandle is made.