ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
electronPearShapeAlignmentCorrection Class Reference

return a correction for deltaEta1 to account for the pear shape distortion of the calorimeter More...

#include <electronPearShapeAlignmentCorrection.h>

Collaboration diagram for electronPearShapeAlignmentCorrection:

Public Member Functions

 electronPearShapeAlignmentCorrection (const std::string &infile="rel22_210510/pearshapedistortion.root")
 constructor (initialization reading a root file) More...
 
 ~electronPearShapeAlignmentCorrection ()=default
 
double getDeltaEtaDistortion (const float eta, const float phi) const
 get the correction to deltaEta More...
 
double getDeltaEtaCorrection (const float eta, const float phi) const
 

Private Attributes

std::unique_ptr< TH2m_sdeta
 

Detailed Description

return a correction for deltaEta1 to account for the pear shape distortion of the calorimeter

Author
Philip Sommer
Jean-Baptiste De Vivie De Regie

Definition at line 17 of file electronPearShapeAlignmentCorrection.h.

Constructor & Destructor Documentation

◆ electronPearShapeAlignmentCorrection()

electronPearShapeAlignmentCorrection::electronPearShapeAlignmentCorrection ( const std::string &  infile = "rel22_210510/pearshapedistortion.root")

constructor (initialization reading a root file)

Definition at line 13 of file electronPearShapeAlignmentCorrection.cxx.

15 {
16  const std::string path = "EGammaVariableCorrection/" + infile;
17  std::unique_ptr<TFile> file =
18  std::make_unique<TFile>(PathResolverFindCalibFile(path).c_str());
19  if (!file) {
20  throw std::runtime_error(
21  "cannot find input file for pear shape correction");
22  }
23 
24  m_sdeta = std::unique_ptr<TH2>(dynamic_cast<TH2*>(file->Get(s_histoName)));
25  if (!m_sdeta) {
26  throw std::runtime_error("cannot find histogram for pear shape correction");
27  }
28  m_sdeta->SetDirectory(nullptr);
29 }

◆ ~electronPearShapeAlignmentCorrection()

electronPearShapeAlignmentCorrection::~electronPearShapeAlignmentCorrection ( )
default

Member Function Documentation

◆ getDeltaEtaCorrection()

double electronPearShapeAlignmentCorrection::getDeltaEtaCorrection ( const float  eta,
const float  phi 
) const

Definition at line 43 of file electronPearShapeAlignmentCorrection.cxx.

46 {
47  return (-1. * getDeltaEtaDistortion(eta, phi));
48 }

◆ getDeltaEtaDistortion()

double electronPearShapeAlignmentCorrection::getDeltaEtaDistortion ( const float  eta,
const float  phi 
) const

get the correction to deltaEta

Definition at line 32 of file electronPearShapeAlignmentCorrection.cxx.

35 {
36  const int binEta = m_sdeta->GetXaxis()->FindBin(eta);
37  const int binPhi = m_sdeta->GetYaxis()->FindBin(phi);
38  const double dEtaDistortion = m_sdeta->GetBinContent(binEta, binPhi);
39  return dEtaDistortion;
40 }

Member Data Documentation

◆ m_sdeta

std::unique_ptr<TH2> electronPearShapeAlignmentCorrection::m_sdeta
private

Definition at line 34 of file electronPearShapeAlignmentCorrection.h.


The documentation for this class was generated from the following files:
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:126
run.infile
string infile
Definition: run.py:13
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
electronPearShapeAlignmentCorrection::getDeltaEtaDistortion
double getDeltaEtaDistortion(const float eta, const float phi) const
get the correction to deltaEta
Definition: electronPearShapeAlignmentCorrection.cxx:32
Trk::binEta
@ binEta
Definition: BinningType.h:54
file
TFile * file
Definition: tile_monitor.h:29
TH2
Definition: rootspy.cxx:373
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
electronPearShapeAlignmentCorrection::m_sdeta
std::unique_ptr< TH2 > m_sdeta
Definition: electronPearShapeAlignmentCorrection.h:34
Trk::binPhi
@ binPhi
Definition: BinningType.h:51