ATLAS Offline Software
Loading...
Searching...
No Matches
ShowerDepthUtil.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 EGAMMAUTILS_SHOWERDEPTHTOOL_H
6#define EGAMMAUTILS_SHOWERDEPTHTOOL_H
7
8// System include(s).
9#include <memory>
10#include <optional>
11#include <utility>
12
13#include <TH1.h>
14
15namespace CP {
16
18 public:
20
22 float getCorrectedShowerDepthEM1(float etas1, float phi,
23 bool isData = true) const;
24
26 float getCorrectedShowerDepthEM2(float etas2, float phi,
27 bool isData = true) const;
28
30 std::pair<float, float> getCorrectedRZ(float eta, float phi,
31 bool isData = true,
32 int sampling = 1) const;
33
35 float getRZCorrection(float eta, float phi, bool isData = true) const;
36
38 float getCorrectedEtaDirection(float zvertex, float eta, float phi,
39 bool isData = true, int sampling = 1) const;
40
42 std::optional<float> getCaloPointingEta(float etas1, float etas2, float phi,
43 bool isData = true) const;
44
46 static float getShowerDepthEM1(float etas1);
47
49 static float getShowerDepthEM2(float etas2);
50
52 static std::pair<float, float> getRZ(float eta, int sampling);
53
54 static float getEtaDirection(float zvertex, float R, float z);
55
56 private:
58 static std::unique_ptr<TH1> getHistoFromFile(const char* fileName,
59 const char* histoName);
60
61 std::unique_ptr<TH1> m_hData;
62 std::unique_ptr<TH1> m_hMC;
63};
64
65} // namespace CP
66
67#endif // ELECTRONISOLATIONSELECTION_SHOWERDEPTHTOOL_H
Scalar eta() const
pseudorapidity method
#define z
float getCorrectedShowerDepthEM1(float etas1, float phi, bool isData=true) const
Shower depth (in mm) on EM1 vs.
std::unique_ptr< TH1 > m_hMC
std::unique_ptr< TH1 > m_hData
std::optional< float > getCaloPointingEta(float etas1, float etas2, float phi, bool isData=true) const
Eta direction from samplings 1 and 2 (pointing)
static float getShowerDepthEM2(float etas2)
Shower depth (in mm) vs.
static std::unique_ptr< TH1 > getHistoFromFile(const char *fileName, const char *histoName)
Return TH1* from file given fileName, histoName.
std::pair< float, float > getCorrectedRZ(float eta, float phi, bool isData=true, int sampling=1) const
Return the shower depth in R,Z considering misalignments.
float getCorrectedShowerDepthEM2(float etas2, float phi, bool isData=true) const
Shower depth (in mm) on EM2 vs.
static float getShowerDepthEM1(float etas1)
Shower depth (in mm) vs.
float getRZCorrection(float eta, float phi, bool isData=true) const
Return the calorimeter displacement in R(Z) for barrel (endcap)
static float getEtaDirection(float zvertex, float R, float z)
float getCorrectedEtaDirection(float zvertex, float eta, float phi, bool isData=true, int sampling=1) const
Eta direction from zvertex to the shower in the given sampling.
static std::pair< float, float > getRZ(float eta, int sampling)
Shower depth in R,Z for the given sampling.
Select isolated Photons, Electrons and Muons.