ATLAS Offline Software
GetLCWeights.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CALOLOCALHADCALIB_GETLCWEIGHTS_H
6 #define CALOLOCALHADCALIB_GETLCWEIGHTS_H
7 
20 #include "GaudiKernel/HistoDef.h"
26 #include <vector>
27 #include <string>
28 
29 class TProfile2D;
30 class TFile;
31 class CaloCell_ID;
32 
33 class ClusWeight {
34  public:
35  unsigned int iClus;
36  double weight;
37  double eCalibTot;
39 };
40 
41 class GetLCWeights : public AthAlgorithm
42 {
43 
44  public:
45 
46  GetLCWeights(const std::string& name, ISvcLocator* pSvcLocator);
47  virtual ~GetLCWeights();
48  virtual StatusCode initialize();
49  virtual StatusCode execute();
50  virtual StatusCode finalize();
51 
52  private:
53 
54  void mapinsert(const std::vector<Gaudi::Histo1DDef> & dims);
55 
56  void mapparse();
57 
92  std::vector<std::vector<Gaudi::Histo1DDef> > m_dimensions;
93 
100  std::map<std::string,Gaudi::Histo1DDef> m_dimensionsmap;
101 
106  std::vector<std::vector<int> > m_isampmap;
107 
113  std::vector<std::vector<TProfile2D *> > m_weight;
114 
120  std::string m_outputFileName;
121 
126  std::unique_ptr<TFile> m_outputFile;
127 
132 
139 
151 
162  std::string m_NormalizationType;
163 
165 
175  std::string m_ClassificationType;
177 
178 };
179 
180 #endif // CALOLOCALHADCALIB_GETLCWEIGHTS_H
ReadHandleKeyArray.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
GetLCWeights::m_dimensions
std::vector< std::vector< Gaudi::Histo1DDef > > m_dimensions
definition of all dimensions used for each sampling
Definition: GetLCWeights.h:92
GetLCWeights::execute
virtual StatusCode execute()
Definition: GetLCWeights.cxx:355
ClusWeight::weight
double weight
Definition: GetLCWeights.h:36
GetLCWeights::m_useInversionMethod
bool m_useInversionMethod
flag to switch on/off the use of the inversion method
Definition: GetLCWeights.h:150
ClusWeight::eCalibTot
double eCalibTot
Definition: GetLCWeights.h:37
GetLCWeights::mapinsert
void mapinsert(const std::vector< Gaudi::Histo1DDef > &dims)
Definition: GetLCWeights.cxx:615
GetLCWeights::GetLCWeights
GetLCWeights(const std::string &name, ISvcLocator *pSvcLocator)
Definition: GetLCWeights.cxx:45
GetLCWeights::m_outputFileName
std::string m_outputFileName
Name of the output file to save histograms in.
Definition: GetLCWeights.h:120
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
SG::ReadHandleKey< xAOD::CaloClusterContainer >
ClusWeight::iClus
unsigned int iClus
Definition: GetLCWeights.h:35
GetLCWeights::m_NormalizationType
std::string m_NormalizationType
string to choose different normalization types
Definition: GetLCWeights.h:162
CaloCalibrationHitContainer.h
AthAlgorithm.h
GetLCWeights::finalize
virtual StatusCode finalize()
Definition: GetLCWeights.cxx:338
GetLCWeights::m_NormalizationTypeNumber
int m_NormalizationTypeNumber
Definition: GetLCWeights.h:164
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
GetLCWeights::m_outputFile
std::unique_ptr< TFile > m_outputFile
Output file to save histograms in.
Definition: GetLCWeights.h:126
GetLCWeights::m_CalibrationHitContainerNames
SG::ReadHandleKeyArray< CaloCalibrationHitContainer > m_CalibrationHitContainerNames
vector of calibration hit container names to use.
Definition: GetLCWeights.h:138
AthAlgorithm
Definition: AthAlgorithm.h:47
GetLCWeights::m_ClassificationTypeNumber
int m_ClassificationTypeNumber
Definition: GetLCWeights.h:176
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
GetLCWeights::mapparse
void mapparse()
Definition: GetLCWeights.cxx:621
GetLCWeights::~GetLCWeights
virtual ~GetLCWeights()
Definition: GetLCWeights.cxx:156
GetLCWeights::initialize
virtual StatusCode initialize()
Definition: GetLCWeights.cxx:161
GetLCWeights::m_weight
std::vector< std::vector< TProfile2D * > > m_weight
Vector of vector of actual histograms.
Definition: GetLCWeights.h:113
ClusWeight
Definition: GetLCWeights.h:33
CaloClusterContainer.h
GetLCWeights
Top algorithm to generate Weight histograms for Local Hadron Calibration.
Definition: GetLCWeights.h:42
ClusWeight::next
ClusWeight * next
Definition: GetLCWeights.h:38
GetLCWeights::m_dimensionsmap
std::map< std::string, Gaudi::Histo1DDef > m_dimensionsmap
property to set all dimensions introduced above
Definition: GetLCWeights.h:100
GetLCWeights::m_ClassificationType
std::string m_ClassificationType
string to choose different classification types
Definition: GetLCWeights.h:175
GetLCWeights::m_isampmap
std::vector< std::vector< int > > m_isampmap
Vector of indices in m_dimensions for each sampling.
Definition: GetLCWeights.h:106
GetLCWeights::m_clusterCollName
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterCollName
Name of the CaloClusterContainer to use.
Definition: GetLCWeights.h:131