ATLAS Offline Software
Loading...
Searching...
No Matches
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)
 ~electronPearShapeAlignmentCorrection ()=default
double getDeltaEtaDistortion (const float eta, const float phi) const
 get the correction to deltaEta
double getDeltaEtaCorrection (const float eta, const float phi) const

Private Attributes

std::unique_ptr< TH2 > m_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}
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
path
python interpreter configuration --------------------------------------—
Definition athena.py:128
str infile
Definition run.py:13
TFile * file

◆ ~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}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
double getDeltaEtaDistortion(const float eta, const float phi) const
get the correction to deltaEta

◆ 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}
@ binEta
Definition BinningType.h:54
@ binPhi
Definition BinningType.h:51

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: