ATLAS Offline Software
GetLCSinglePionsPerf.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CALOLOCALHADCALIB_GETLCSINGLEPIONSPERF_H
6 #define CALOLOCALHADCALIB_GETLCSINGLEPIONSPERF_H
7 
23 #include <vector>
24 #include <string>
25 #include <set>
26 
27 
28 class AtlasDetectorID;
29 class CaloCell_ID;
30 class CaloDmDescrManager;
31 
32 class TFile;
33 class TH1F;
34 class TProfile;
35 class TProfile2D;
36 
38 {
39 
40  public:
41  GetLCSinglePionsPerf(const std::string& name, ISvcLocator* pSvcLocator);
42  virtual ~GetLCSinglePionsPerf();
43  virtual StatusCode initialize();
44  virtual StatusCode execute();
45  virtual StatusCode finalize();
46 
47  static double angle_mollier_factor(double x);
48 
49  private:
50  typedef std::pair<std::string,xAOD::CaloCluster::MomentType> moment_name_pair;
51  typedef std::vector<moment_name_pair> moment_name_vector;
52 
57 
61 
64  std::string m_outputFileName;
65  TFile * m_outputFile;
69 
71 
72  int m_netabin;
73  float m_etamin;
74  float m_etamax;
75  float m_deta;
76  int m_nphibin;
77  float m_phimin;
78  float m_phimax;
79  float m_dphi;
81  float m_logenermin;
82  float m_logenermax;
84  float m_dlogener;
85  int m_nnormtype; // pion energy, calibration level, calibration level with ideal previous step
86  int m_ncluscoll; // CaloTopoCluster, CaloWTopoCluster, CaloOOCTopoCluster, CaloCalTopoCluster
87  int m_ntagcases; // TAGGEDEM, TAGGEDHAD, TAGGEDUNKNOWN
88  int m_nmoments; // number of moments assigned to clusters we want to study
89  int m_nmomsums; // ratio of moment assigned to cls0, cls1, cls2, cls_sum, non assigned
90 // int m_nhitsums; // number of histograms for calibration hits validation
91 
94  bool m_doEngTag;
103 
104  // ereco over truth after each step of calibration
105  std::vector<std::vector<std::vector<TProfile *> > > m_engRecOverTruth_vs_eta; // [ncluscoll][nnormtype][nenerbin]
106  std::vector<std::vector<std::vector<TProfile *> > > m_engRecOverTruth_vs_ebeam; // [ncluscoll][nnormtype][netabin]
107  // classification performance
108  std::vector<std::vector<TProfile *> > m_engTag_vs_eta; // [ntagcases][nenerbin]
109  std::vector<std::vector<TProfile *> > m_engTag_vs_ebeam; // [ntagcases][netabin]
110  // reconstructed energy spectras after each step of calibration
111  std::vector<std::vector<std::vector<TH1F *> > > m_engRecSpect; // [ncluscoll][nenerbin][netabin]
112  // average incident pion energy in bins
113  std::vector<std::vector<TH1F *> > m_engPionSpect; // [nenerbin][netabin]
114  // spectra of noise clusters
115  std::vector<std::vector<TH1F *> > m_engNoiseClusSpect; // [ncluscoll][netabin]
116  std::vector<TProfile *> m_engNoiseClus_vs_eta; // [ncluscoll]
117  // cluster moments
118  std::vector<std::vector<std::vector<TProfile *> > > m_clusMoment_vs_eta; // [nmoments][nmomsums][nenerbin]
119  std::vector<std::vector<std::vector<TProfile *> > > m_clusMoment_vs_ebeam; // [nmoments][nmomsums][netabin]
120  // reconstruction efficiency
121  std::vector<TH1F *> m_RecoEfficiency_vs_eta[2]; // [nenerbin]
122  std::vector<TH1F *> m_RecoEfficiency_vs_ebeam[2]; // [netabin]
123  // calibration hits
124  std::vector<TProfile *> m_SumCalibHitOverEbeam_vs_eta; // [nenerbin]
125  //std::vector<TProfile *> m_SumCalibHitOverEbeam_vs_ebeam; // [netabin]
126  std::vector<TProfile *> m_DefaultCalculatorOverEbeam_vs_eta; // [nenerbin]
127  //std::vector<TProfile *> m_DefaultCalculatorOverEbeam_vs_ebeam; // [netabin]
128  std::vector<TProfile *> m_SumCalibHitAssignedOverEbeam_vs_eta; // [nenerbin]
129  std::vector<TProfile2D *> m_SumCalibHitAssignedOverEbeam_vs_etaphi; // [nenerbin]
130 
131  double m_mc_ener;
132  double m_mc_eta;
133  double m_mc_phi;
137 
138  int fill_reco (const xAOD::CaloClusterContainer& clusColl,
139  const EventContext& ctx);
140  int fill_moments (const xAOD::CaloClusterContainer& clusColl,
141  const EventContext& ctx);
142  int fill_calibhits (const xAOD::CaloClusterContainer& clusColl,
143  const EventContext& ctx);
144 
145 };
146 
147 #endif // LOCALHADCALIBCHECK_CHECKHITSASSIGNMENT_H
148 
ReadHandleKeyArray.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
GetLCSinglePionsPerf::m_netabin
int m_netabin
Definition: GetLCSinglePionsPerf.h:72
GetLCSinglePionsPerf::m_dphi
float m_dphi
Definition: GetLCSinglePionsPerf.h:79
GetLCSinglePionsPerf::m_ncluscoll
int m_ncluscoll
Definition: GetLCSinglePionsPerf.h:86
GetLCSinglePionsPerf::execute
virtual StatusCode execute()
Definition: GetLCSinglePionsPerf.cxx:654
GetLCSinglePionsPerf::m_engTag_vs_eta
std::vector< std::vector< TProfile * > > m_engTag_vs_eta
Definition: GetLCSinglePionsPerf.h:108
GetLCSinglePionsPerf::m_clusMoment_vs_ebeam
std::vector< std::vector< std::vector< TProfile * > > > m_clusMoment_vs_ebeam
Definition: GetLCSinglePionsPerf.h:119
GetLCSinglePionsPerf::fill_calibhits
int fill_calibhits(const xAOD::CaloClusterContainer &clusColl, const EventContext &ctx)
Definition: GetLCSinglePionsPerf.cxx:1167
GetLCSinglePionsPerf::m_outputFile
TFile * m_outputFile
Definition: GetLCSinglePionsPerf.h:65
GetLCSinglePionsPerf::m_nnormtype
int m_nnormtype
Definition: GetLCSinglePionsPerf.h:85
GetLCSinglePionsPerf::kTAG
@ kTAG
Definition: GetLCSinglePionsPerf.h:54
GetLCSinglePionsPerf::moment_name_vector
std::vector< moment_name_pair > moment_name_vector
Definition: GetLCSinglePionsPerf.h:51
GetLCSinglePionsPerf::m_mc_phi
double m_mc_phi
Definition: GetLCSinglePionsPerf.h:133
GetLCSinglePionsPerf::keys_norm_level
keys_norm_level
Definition: GetLCSinglePionsPerf.h:56
GetLCSinglePionsPerf::m_clusMoment_vs_eta
std::vector< std::vector< std::vector< TProfile * > > > m_clusMoment_vs_eta
Definition: GetLCSinglePionsPerf.h:118
GetLCSinglePionsPerf::m_mc_eta
double m_mc_eta
Definition: GetLCSinglePionsPerf.h:132
GetLCSinglePionsPerf::m_SumCalibHitOverEbeam_vs_eta
std::vector< TProfile * > m_SumCalibHitOverEbeam_vs_eta
Definition: GetLCSinglePionsPerf.h:124
GetLCSinglePionsPerf::m_logenermax
float m_logenermax
Definition: GetLCSinglePionsPerf.h:82
GetLCSinglePionsPerf::m_engNoiseClusSpect
std::vector< std::vector< TH1F * > > m_engNoiseClusSpect
Definition: GetLCSinglePionsPerf.h:115
GetLCSinglePionsPerf::m_doEngNoiseClus
bool m_doEngNoiseClus
Definition: GetLCSinglePionsPerf.h:96
GetLCSinglePionsPerf::m_truthPiEngFraction
float m_truthPiEngFraction
Definition: GetLCSinglePionsPerf.h:92
GetLCSinglePionsPerf::moment_name_pair
std::pair< std::string, xAOD::CaloCluster::MomentType > moment_name_pair
Definition: GetLCSinglePionsPerf.h:50
GetLCSinglePionsPerf::kTAGUNK
@ kTAGUNK
Definition: GetLCSinglePionsPerf.h:54
GetLCSinglePionsPerf::m_doClusMoments
bool m_doClusMoments
Definition: GetLCSinglePionsPerf.h:97
GetLCSinglePionsPerf::GetLCSinglePionsPerf
GetLCSinglePionsPerf(const std::string &name, ISvcLocator *pSvcLocator)
Definition: GetLCSinglePionsPerf.cxx:59
GetLCSinglePionsPerf::m_etamax
float m_etamax
Definition: GetLCSinglePionsPerf.h:74
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
GetLCSinglePionsPerf::m_nlogenerbin2
int m_nlogenerbin2
Definition: GetLCSinglePionsPerf.h:83
GetLCSinglePionsPerf::m_ntagcases
int m_ntagcases
Definition: GetLCSinglePionsPerf.h:87
GetLCSinglePionsPerf::m_dlogener
float m_dlogener
Definition: GetLCSinglePionsPerf.h:84
GetLCSinglePionsPerf::m_doCalibHitsValidation
bool m_doCalibHitsValidation
Definition: GetLCSinglePionsPerf.h:101
GetLCSinglePionsPerf::m_mc_etabin
int m_mc_etabin
Definition: GetLCSinglePionsPerf.h:134
GetLCSinglePionsPerf::finalize
virtual StatusCode finalize()
Definition: GetLCSinglePionsPerf.cxx:481
GetLCSinglePionsPerf::m_engPionSpect
std::vector< std::vector< TH1F * > > m_engPionSpect
Definition: GetLCSinglePionsPerf.h:113
GetLCSinglePionsPerf::kLEVEL_CALIBHIT_IDEAL
@ kLEVEL_CALIBHIT_IDEAL
Definition: GetLCSinglePionsPerf.h:56
GetLCSinglePionsPerf::~GetLCSinglePionsPerf
virtual ~GetLCSinglePionsPerf()
Definition: GetLCSinglePionsPerf.cxx:163
SG::ReadHandleKey< xAOD::CaloClusterContainer >
GetLCSinglePionsPerf::m_doEngRecOverTruth
bool m_doEngRecOverTruth
Definition: GetLCSinglePionsPerf.h:93
x
#define x
GetLCSinglePionsPerf::angle_mollier_factor
static double angle_mollier_factor(double x)
Definition: GetLCSinglePionsPerf.cxx:1288
GetLCSinglePionsPerf::m_engTag_vs_ebeam
std::vector< std::vector< TProfile * > > m_engTag_vs_ebeam
Definition: GetLCSinglePionsPerf.h:109
CaloCalibrationHitContainer.h
GetLCSinglePionsPerf::kTOPO_W
@ kTOPO_W
Definition: GetLCSinglePionsPerf.h:53
GetLCSinglePionsPerf::m_distance_cut
double m_distance_cut
Definition: GetLCSinglePionsPerf.h:70
GetLCSinglePionsPerf::keys_momsums
keys_momsums
Definition: GetLCSinglePionsPerf.h:55
GetLCSinglePionsPerf::kMOM_MISS
@ kMOM_MISS
Definition: GetLCSinglePionsPerf.h:55
AthAlgorithm.h
GetLCSinglePionsPerf::kTAGEM
@ kTAGEM
Definition: GetLCSinglePionsPerf.h:54
GetLCSinglePionsPerf::kMOM_MCENER
@ kMOM_MCENER
Definition: GetLCSinglePionsPerf.h:55
GetLCSinglePionsPerf::keys_tagged
keys_tagged
Definition: GetLCSinglePionsPerf.h:54
GetLCSinglePionsPerf::m_logenermin
float m_logenermin
Definition: GetLCSinglePionsPerf.h:81
GetLCSinglePionsPerf::m_clusterCollNames
SG::ReadHandleKeyArray< xAOD::CaloClusterContainer > m_clusterCollNames
Definition: GetLCSinglePionsPerf.h:63
GetLCSinglePionsPerf::m_phimax
float m_phimax
Definition: GetLCSinglePionsPerf.h:78
GetLCSinglePionsPerf::m_SumCalibHitAssignedOverEbeam_vs_eta
std::vector< TProfile * > m_SumCalibHitAssignedOverEbeam_vs_eta
Definition: GetLCSinglePionsPerf.h:128
GetLCSinglePionsPerf::m_id_helper
const AtlasDetectorID * m_id_helper
Definition: GetLCSinglePionsPerf.h:58
GetLCSinglePionsPerf::m_useRecoEfficiency
bool m_useRecoEfficiency
Definition: GetLCSinglePionsPerf.h:99
GetLCSinglePionsPerf::kLEVEL_PARTICLE
@ kLEVEL_PARTICLE
Definition: GetLCSinglePionsPerf.h:56
GetLCSinglePionsPerf::m_deta
float m_deta
Definition: GetLCSinglePionsPerf.h:75
GetLCSinglePionsPerf::kMOM_CLS1
@ kMOM_CLS1
Definition: GetLCSinglePionsPerf.h:55
python.TrigEgammaMonitorHelper.TProfile
def TProfile(*args, **kwargs)
Definition: TrigEgammaMonitorHelper.py:81
GetLCSinglePionsPerf::fill_moments
int fill_moments(const xAOD::CaloClusterContainer &clusColl, const EventContext &ctx)
Definition: GetLCSinglePionsPerf.cxx:944
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
GetLCSinglePionsPerf::kMOM_CLS2
@ kMOM_CLS2
Definition: GetLCSinglePionsPerf.h:55
GetLCSinglePionsPerf::m_validMoments
moment_name_vector m_validMoments
Definition: GetLCSinglePionsPerf.h:68
GetLCSinglePionsPerf::initialize
virtual StatusCode initialize()
Definition: GetLCSinglePionsPerf.cxx:173
GetLCSinglePionsPerf::m_RecoEfficiency_vs_ebeam
std::vector< TH1F * > m_RecoEfficiency_vs_ebeam[2]
Definition: GetLCSinglePionsPerf.h:122
CaloDmDescrManager
Definition: CaloDmDescrManager.h:131
GetLCSinglePionsPerf
Top algorithm to get local hadronic calibration performance plots for single pions.
Definition: GetLCSinglePionsPerf.h:38
GetLCSinglePionsPerf::m_engNoiseClus_vs_eta
std::vector< TProfile * > m_engNoiseClus_vs_eta
Definition: GetLCSinglePionsPerf.h:116
GetLCSinglePionsPerf::kMOM_CLS0
@ kMOM_CLS0
Definition: GetLCSinglePionsPerf.h:55
GetLCSinglePionsPerf::m_phimin
float m_phimin
Definition: GetLCSinglePionsPerf.h:77
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
GetLCSinglePionsPerf::m_useGoodClus
bool m_useGoodClus
Definition: GetLCSinglePionsPerf.h:100
GetLCSinglePionsPerf::m_nlogenerbin
int m_nlogenerbin
Definition: GetLCSinglePionsPerf.h:80
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
GetLCSinglePionsPerf::m_outputFileName
std::string m_outputFileName
Definition: GetLCSinglePionsPerf.h:64
GetLCSinglePionsPerf::kLEVEL_CALIBHIT
@ kLEVEL_CALIBHIT
Definition: GetLCSinglePionsPerf.h:56
GetLCSinglePionsPerf::keys_topo
keys_topo
Definition: GetLCSinglePionsPerf.h:53
AthAlgorithm
Definition: AthAlgorithm.h:47
GetLCSinglePionsPerf::m_etamin
float m_etamin
Definition: GetLCSinglePionsPerf.h:73
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
GetLCSinglePionsPerf::m_nphibin
int m_nphibin
Definition: GetLCSinglePionsPerf.h:76
GetLCSinglePionsPerf::m_mc_ener
double m_mc_ener
Definition: GetLCSinglePionsPerf.h:131
GetLCSinglePionsPerf::m_usePionClusters
bool m_usePionClusters
Definition: GetLCSinglePionsPerf.h:102
GetLCSinglePionsPerf::m_engRecSpect
std::vector< std::vector< std::vector< TH1F * > > > m_engRecSpect
Definition: GetLCSinglePionsPerf.h:111
GetLCSinglePionsPerf::m_engRecOverTruth_vs_eta
std::vector< std::vector< std::vector< TProfile * > > > m_engRecOverTruth_vs_eta
Definition: GetLCSinglePionsPerf.h:105
GetLCSinglePionsPerf::m_DMCalibrationHitContainerNames
SG::ReadHandleKeyArray< CaloCalibrationHitContainer > m_DMCalibrationHitContainerNames
Definition: GetLCSinglePionsPerf.h:67
GetLCSinglePionsPerf::m_CalibrationHitContainerNames
SG::ReadHandleKeyArray< CaloCalibrationHitContainer > m_CalibrationHitContainerNames
Definition: GetLCSinglePionsPerf.h:66
GetLCSinglePionsPerf::m_calo_id
const CaloCell_ID * m_calo_id
Definition: GetLCSinglePionsPerf.h:59
GetLCSinglePionsPerf::kMOM_SUMCLS
@ kMOM_SUMCLS
Definition: GetLCSinglePionsPerf.h:55
GetLCSinglePionsPerf::kTAGHAD
@ kTAGHAD
Definition: GetLCSinglePionsPerf.h:54
GetLCSinglePionsPerf::m_DefaultCalculatorOverEbeam_vs_eta
std::vector< TProfile * > m_DefaultCalculatorOverEbeam_vs_eta
Definition: GetLCSinglePionsPerf.h:126
GetLCSinglePionsPerf::m_SumCalibHitAssignedOverEbeam_vs_etaphi
std::vector< TProfile2D * > m_SumCalibHitAssignedOverEbeam_vs_etaphi
Definition: GetLCSinglePionsPerf.h:129
GetLCSinglePionsPerf::kTOPO
@ kTOPO
Definition: GetLCSinglePionsPerf.h:53
GetLCSinglePionsPerf::m_doEngTag
bool m_doEngTag
Definition: GetLCSinglePionsPerf.h:94
CaloClusterContainer.h
GetLCSinglePionsPerf::m_nmoments
int m_nmoments
Definition: GetLCSinglePionsPerf.h:88
GetLCSinglePionsPerf::fill_reco
int fill_reco(const xAOD::CaloClusterContainer &clusColl, const EventContext &ctx)
Definition: GetLCSinglePionsPerf.cxx:755
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
GetLCSinglePionsPerf::m_RecoEfficiency_vs_eta
std::vector< TH1F * > m_RecoEfficiency_vs_eta[2]
Definition: GetLCSinglePionsPerf.h:121
GetLCSinglePionsPerf::m_nmomsums
int m_nmomsums
Definition: GetLCSinglePionsPerf.h:89
GetLCSinglePionsPerf::m_doEngRecSpect
bool m_doEngRecSpect
Definition: GetLCSinglePionsPerf.h:95
GetLCSinglePionsPerf::kTOPO_EM
@ kTOPO_EM
Definition: GetLCSinglePionsPerf.h:53
GetLCSinglePionsPerf::m_mc_phibin
int m_mc_phibin
Definition: GetLCSinglePionsPerf.h:136
GetLCSinglePionsPerf::m_engRecOverTruth_vs_ebeam
std::vector< std::vector< std::vector< TProfile * > > > m_engRecOverTruth_vs_ebeam
Definition: GetLCSinglePionsPerf.h:106
GetLCSinglePionsPerf::m_clusterBasicCollName
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterBasicCollName
Definition: GetLCSinglePionsPerf.h:62
GetLCSinglePionsPerf::m_mc_enerbin
int m_mc_enerbin
Definition: GetLCSinglePionsPerf.h:135
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
GetLCSinglePionsPerf::m_doRecoEfficiency
bool m_doRecoEfficiency
Definition: GetLCSinglePionsPerf.h:98
GetLCSinglePionsPerf::kTOPO_OOC
@ kTOPO_OOC
Definition: GetLCSinglePionsPerf.h:53
GetLCSinglePionsPerf::m_caloDmDescrManager
const CaloDmDescrManager * m_caloDmDescrManager
Definition: GetLCSinglePionsPerf.h:60