ATLAS Offline Software
PixelChargeInterpolationParameters.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PixelOfflineCalibData.h, (c) ATLAS Detector software
8 
9 #ifndef PIXELCHARGEINTERPOLATIONPARAMETERS_H
10 #define PIXELCHARGEINTERPOLATIONPARAMETERS_H
11 
12 #include "AthenaKernel/CLASS_DEF.h"
13 #include <string>
14 #include <vector>
15 
24 namespace PixelCalib {
25 
27 
28  public:
32 
33  // get/set version number
34  int getVersion() const;
35  void setVersion(int version);
36 
37 
41  float getDeltaXbarrel(int nRows, float angle, int ilayer=0) const;
42  float getDeltaYbarrel(int nCol, float eta, int ilayer=0) const;
43  float getDeltaXIBL(int nRows, float angle) const;
44  float getDeltaYIBL(int nCol, float eta) const;
45 
46  static float getDeltaXendcap() ;
47  static float getDeltaYendcap() ;
48 
51  float getDeltaX(int iangle, int iclustersize, int ilayer) const;
52  float getDeltaY(int ieta, int iclustersize, int ilayer) const;
53  int setDeltaX(int iangle, int iclustersize, int ilayer, float value);
54  int setDeltaY(int ieta, int iclustersize, int ilayer, float value);
55 
58  float getErrDeltaX(int iangle, int iclustersize, int ilayer) const;
59  float getErrDeltaY(int ieta, int iclustersize, int ilayer) const;
60  int setErrDeltaX(int iangle, int iclustersize, int ilayer, float value);
61  int setErrDeltaY(int ieta, int iclustersize, int ilayer, float value);
62 
67  float getDeltaX(int i) const;
68  float getDeltaY(int i) const;
69  int setDeltaX(int i, float value);
70  int setDeltaY(int i, float value);
71 
76  float getErrDeltaX(int i) const;
77  float getErrDeltaY(int i) const;
78  int setErrDeltaX(int i, float value);
79  int setErrDeltaY(int i, float value);
80 
81  int getNumberOfXbins() const;
82  int getNumberOfYbins() const;
83 
84  const std::vector<float>& getEtaBins() const{return m_etabins;}
85  const std::vector<float>& getAngleBins() const{return m_phibins;}
86  const std::vector<float>& getClusterSizeXBins() const{return m_csx;}
87  const std::vector<float>& getClusterSizeYBins() const{return m_csy;}
88 
89  void setParameters(const int ncsx, const int ncsy, const int neta,
90  const int nalpha, int offset, const std::vector<float> & constants);
91 
92  void Print(const std::string& filename) const;
93  void Load(const std::string& filename);
94 
95  // IBL
96  const std::vector<float>& getIBLEtaBins() const{return m_ibletabins;}
97  const std::vector<float>& getIBLAngleBins() const{return m_iblphibins;}
98  int getIBLcsxbins() const {return m_csxbinsibl;}
99  int getIBLcsybins() const {return m_csybinsibl;}
100  int getIBLetabins() const {return m_etaibl;}
101  int getIBLphibins() const {return m_alphaibl;}
102  void setIBLcsxbins(int icsx){m_csxbinsibl = icsx;}
103  void setIBLcsybins(int icsy){m_csybinsibl = icsy;}
104  void setIBLetabins(int ieta){m_etaibl = ieta;}
105  void setIBLphibins(int ialpha){m_alphaibl = ialpha;}
106  //
107 
108  private:
109 
112  int getBarrelBinX(int iclustersize, float angle, int ilayer) const;
113  int getBarrelBinY(int iclustersize, float eta, int ilayer) const;
114 
115 
118  int getBarrelBinX(int iclustersize, int iangle, int ilayer) const;
119  int getBarrelBinY(int iclustersize, int ieta, int ilayer) const;
120 
121 
122  // Parametrization bins
124  int m_nlayerbins; // number of layers
125  std::vector<float> m_etabins;
126  std::vector<float> m_phibins;
127  std::vector<float> m_csx;
128  std::vector<float> m_csy;
129  // parametrization values
130  std::vector<float> m_deltax;
131  std::vector<float> m_deltay;
132  // error on parametrization values
133  std::vector<float> m_errdeltax;
134  std::vector<float> m_errdeltay;
135  // IBL
136  int m_csxbinsibl; // IBL csx bins
137  int m_csybinsibl; // IBL csy bins
138  int m_etaibl; // IBL eta bins
139  int m_alphaibl; // IBL phi bins
140  std::vector<float> m_ibletabins;
141  std::vector<float> m_iblphibins;
142 
143 };
144 
145 }
146 
147 #endif
PixelCalib::PixelChargeInterpolationParameters::getBarrelBinX
int getBarrelBinX(int iclustersize, float angle, int ilayer) const
Get the global bin index as a function of the value of the variables of the parametrization.
Definition: PixelChargeInterpolationParameters.cxx:306
PixelCalib::PixelChargeInterpolationParameters::m_csy
std::vector< float > m_csy
Definition: PixelChargeInterpolationParameters.h:128
PixelCalib::PixelChargeInterpolationParameters::setDeltaY
int setDeltaY(int ieta, int iclustersize, int ilayer, float value)
Definition: PixelChargeInterpolationParameters.cxx:257
PixelCalib::PixelChargeInterpolationParameters::getIBLAngleBins
const std::vector< float > & getIBLAngleBins() const
Definition: PixelChargeInterpolationParameters.h:97
PixelCalib::PixelChargeInterpolationParameters::setParameters
void setParameters(const int ncsx, const int ncsy, const int neta, const int nalpha, int offset, const std::vector< float > &constants)
Definition: PixelChargeInterpolationParameters.cxx:70
PixelCalib::PixelChargeInterpolationParameters::getIBLetabins
int getIBLetabins() const
Definition: PixelChargeInterpolationParameters.h:100
PixelCalib::PixelChargeInterpolationParameters::m_iblphibins
std::vector< float > m_iblphibins
Definition: PixelChargeInterpolationParameters.h:141
PixelCalib::PixelChargeInterpolationParameters::getDeltaY
float getDeltaY(int ieta, int iclustersize, int ilayer) const
Definition: PixelChargeInterpolationParameters.cxx:242
PixelCalib::PixelChargeInterpolationParameters::m_deltay
std::vector< float > m_deltay
Definition: PixelChargeInterpolationParameters.h:131
PixelCalib::PixelChargeInterpolationParameters::m_ibletabins
std::vector< float > m_ibletabins
Definition: PixelChargeInterpolationParameters.h:140
athena.value
value
Definition: athena.py:124
PixelCalib::PixelChargeInterpolationParameters::Load
void Load(const std::string &filename)
Definition: PixelChargeInterpolationParameters.cxx:493
PixelCalib::PixelChargeInterpolationParameters::getIBLcsxbins
int getIBLcsxbins() const
Definition: PixelChargeInterpolationParameters.h:98
PixelCalib::PixelChargeInterpolationParameters::getAngleBins
const std::vector< float > & getAngleBins() const
Definition: PixelChargeInterpolationParameters.h:85
PixelCalib::PixelChargeInterpolationParameters::~PixelChargeInterpolationParameters
~PixelChargeInterpolationParameters()=default
PixelCalib::PixelChargeInterpolationParameters::m_version
int m_version
Definition: PixelChargeInterpolationParameters.h:123
PixelCalib::PixelChargeInterpolationParameters::getDeltaX
float getDeltaX(int iangle, int iclustersize, int ilayer) const
methods to get/set the calibration data as a function of the bin index for the various variables sepa...
Definition: PixelChargeInterpolationParameters.cxx:235
PixelCalib::PixelChargeInterpolationParameters::getDeltaYendcap
static float getDeltaYendcap()
Definition: PixelChargeInterpolationParameters.cxx:302
PixelCalib::PixelChargeInterpolationParameters::m_nlayerbins
int m_nlayerbins
Definition: PixelChargeInterpolationParameters.h:124
PixelCalib::PixelChargeInterpolationParameters::getNumberOfYbins
int getNumberOfYbins() const
Definition: PixelChargeInterpolationParameters.cxx:143
PixelCalib::PixelChargeInterpolationParameters::m_etaibl
int m_etaibl
Definition: PixelChargeInterpolationParameters.h:138
PixelCalib::PixelChargeInterpolationParameters::getEtaBins
const std::vector< float > & getEtaBins() const
Definition: PixelChargeInterpolationParameters.h:84
PixelCalib::PixelChargeInterpolationParameters::getNumberOfXbins
int getNumberOfXbins() const
Definition: PixelChargeInterpolationParameters.cxx:139
PixelCalib::PixelChargeInterpolationParameters::getDeltaYIBL
float getDeltaYIBL(int nCol, float eta) const
PixelCalib::PixelChargeInterpolationParameters::getIBLphibins
int getIBLphibins() const
Definition: PixelChargeInterpolationParameters.h:101
PixelCalib::PixelChargeInterpolationParameters::setIBLcsybins
void setIBLcsybins(int icsy)
Definition: PixelChargeInterpolationParameters.h:103
lumiFormat.i
int i
Definition: lumiFormat.py:85
PixelCalib::PixelChargeInterpolationParameters::getClusterSizeYBins
const std::vector< float > & getClusterSizeYBins() const
Definition: PixelChargeInterpolationParameters.h:87
angle
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Definition: TRTDetectorFactory_Full.cxx:73
PixelCalib::PixelChargeInterpolationParameters::setIBLphibins
void setIBLphibins(int ialpha)
Definition: PixelChargeInterpolationParameters.h:105
PixelCalib::PixelChargeInterpolationParameters::PixelChargeInterpolationParameters
PixelChargeInterpolationParameters()
Definition: PixelChargeInterpolationParameters.cxx:20
PixelCalib::PixelChargeInterpolationParameters::PixelChargeInterpolationParameters
PixelChargeInterpolationParameters(const PixelChargeInterpolationParameters &)=delete
PixelCalib
Definition: PixelChargeInterpolationCalibration.h:14
PixelCalib::PixelChargeInterpolationParameters::getBarrelBinY
int getBarrelBinY(int iclustersize, float eta, int ilayer) const
Definition: PixelChargeInterpolationParameters.cxx:346
PixelCalib::PixelChargeInterpolationParameters::setVersion
void setVersion(int version)
Definition: PixelChargeInterpolationParameters.cxx:66
PixelCalib::PixelChargeInterpolationParameters::getVersion
int getVersion() const
Definition: PixelChargeInterpolationParameters.cxx:68
PixelCalib::PixelChargeInterpolationParameters::m_csybinsibl
int m_csybinsibl
Definition: PixelChargeInterpolationParameters.h:137
PixelCalib::PixelChargeInterpolationParameters::getErrDeltaY
float getErrDeltaY(int ieta, int iclustersize, int ilayer) const
Definition: PixelChargeInterpolationParameters.cxx:275
get_generator_info.version
version
Definition: get_generator_info.py:33
PixelCalib::PixelChargeInterpolationParameters::getDeltaXIBL
float getDeltaXIBL(int nRows, float angle) const
PixelCalib::PixelChargeInterpolationParameters::setIBLetabins
void setIBLetabins(int ieta)
Definition: PixelChargeInterpolationParameters.h:104
PixelCalib::PixelChargeInterpolationParameters::Print
void Print(const std::string &filename) const
Definition: PixelChargeInterpolationParameters.cxx:421
constants
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:1
PixelCalib::PixelChargeInterpolationParameters::getClusterSizeXBins
const std::vector< float > & getClusterSizeXBins() const
Definition: PixelChargeInterpolationParameters.h:86
PixelCalib::PixelChargeInterpolationParameters::setErrDeltaY
int setErrDeltaY(int ieta, int iclustersize, int ilayer, float value)
Definition: PixelChargeInterpolationParameters.cxx:290
PixelCalib::PixelChargeInterpolationParameters::m_alphaibl
int m_alphaibl
Definition: PixelChargeInterpolationParameters.h:139
PixelCalib::PixelChargeInterpolationParameters::getDeltaYbarrel
float getDeltaYbarrel(int nCol, float eta, int ilayer=0) const
Definition: PixelChargeInterpolationParameters.cxx:219
PixelCalib::PixelChargeInterpolationParameters::getDeltaXbarrel
float getDeltaXbarrel(int nRows, float angle, int ilayer=0) const
Methods to access the calibration data as a function of the cluster size, angle/pseudorapidity,...
Definition: PixelChargeInterpolationParameters.cxx:209
PixelCalib::PixelChargeInterpolationParameters::m_csx
std::vector< float > m_csx
Definition: PixelChargeInterpolationParameters.h:127
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
PixelCalib::PixelChargeInterpolationParameters::getErrDeltaX
float getErrDeltaX(int iangle, int iclustersize, int ilayer) const
methods to get/set the calibration data as a function of the bin index for the various variables sepa...
Definition: PixelChargeInterpolationParameters.cxx:268
PixelCalib::PixelChargeInterpolationParameters::setDeltaX
int setDeltaX(int iangle, int iclustersize, int ilayer, float value)
Definition: PixelChargeInterpolationParameters.cxx:249
PixelCalib::PixelChargeInterpolationParameters::m_csxbinsibl
int m_csxbinsibl
Definition: PixelChargeInterpolationParameters.h:136
PixelCalib::PixelChargeInterpolationParameters::setIBLcsxbins
void setIBLcsxbins(int icsx)
Definition: PixelChargeInterpolationParameters.h:102
PixelCalib::PixelChargeInterpolationParameters
Definition: PixelChargeInterpolationParameters.h:26
RPDUtils::nRows
unsigned constexpr int nRows
Definition: RPDUtils.h:24
PixelCalib::PixelChargeInterpolationParameters::m_etabins
std::vector< float > m_etabins
Definition: PixelChargeInterpolationParameters.h:125
PixelCalib::PixelChargeInterpolationParameters::m_phibins
std::vector< float > m_phibins
Definition: PixelChargeInterpolationParameters.h:126
PixelCalib::PixelChargeInterpolationParameters::m_deltax
std::vector< float > m_deltax
Definition: PixelChargeInterpolationParameters.h:130
PixelCalib::PixelChargeInterpolationParameters::getIBLcsybins
int getIBLcsybins() const
Definition: PixelChargeInterpolationParameters.h:99
PixelCalib::PixelChargeInterpolationParameters::m_errdeltay
std::vector< float > m_errdeltay
Definition: PixelChargeInterpolationParameters.h:134
CLASS_DEF.h
macros to associate a CLID to a type
PixelCalib::PixelChargeInterpolationParameters::getIBLEtaBins
const std::vector< float > & getIBLEtaBins() const
Definition: PixelChargeInterpolationParameters.h:96
PixelCalib::PixelChargeInterpolationParameters::getDeltaXendcap
static float getDeltaXendcap()
Definition: PixelChargeInterpolationParameters.cxx:298
PixelCalib::PixelChargeInterpolationParameters::setErrDeltaX
int setErrDeltaX(int iangle, int iclustersize, int ilayer, float value)
Definition: PixelChargeInterpolationParameters.cxx:282
PixelCalib::PixelChargeInterpolationParameters::m_errdeltax
std::vector< float > m_errdeltax
Definition: PixelChargeInterpolationParameters.h:133