|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "CaloDetDescr/CaloDetDescrElement.h"
20 return StatusCode::SUCCESS;
27 return StatusCode::SUCCESS;
34 const void *
arg)
const{
68 ATH_MSG_DEBUG(
"[GOOD]: seedCell location and selected eta range agree" );
71 ATH_MSG_DEBUG(
"[BAD]: seedCell location and selected eta range disagree !!" );
80 double elt_eta = caloDDE->
eta();
81 double elt_deta = caloDDE->
deta();
85 double u = 2*(
eta-elt_eta)/elt_deta;
88 double elt_eta_raw = clus->
rawEta();
90 if(elt_eta_raw<0.)
u=-
u;
99 double aeta = fabs(
eta - elt_eta + elt_eta_raw);
113 unsigned int nreg = regions.
size();
116 for (
unsigned int i=0;
i<nreg;
i++) {
130 if(std::abs(regions[region_ndx][
REG_CELLSIZE]-elt_deta) > 1
e-3) {
132 u = fmod(aeta,cellsize)/cellsize*2 - 1;
141 unsigned int n_energies = energies.
size();
142 unsigned int shape[] = {n_energies, 2};
148 unsigned int beg = 0;
149 unsigned int end = n_energies;
152 else if(
energy >= energies[n_energies-1])
162 while (n_good==0 &&
beg>0) {
166 while (n_good == 0 &&
end<n_energies) {
183 else if(
energy<=corrtab[0][0]){
186 else if(
energy>=corrtab[n_good-1][0]) {
187 offs=corrtab[n_good-1][1];
221 corrtab[n_good][0] = energies[
i];
241 m_region_ndx(region_ndx),
242 m_form (m_corr.m_regions()[region_ndx][REG_FORM])
263 if (forms.
size(0) != 0 && forms.
size(1) != 0)
264 form = forms[m_region_ndx][energy_ndx];
274 ret = calc0 (m_aeta, m_u,
coef);
277 ret = calc3 (m_aeta, m_u,
coef);
280 ret = calc4 (m_aeta, m_u,
coef);
283 ret = calc5 (m_aeta, m_u,
coef);
286 ret = calc10 (m_aeta, m_u,
coef);
289 ret = calc11 (m_aeta, m_u,
coef);
305 const unsigned int NPAR = 5;
309 for (
unsigned int i=0;
i < NPAR;
i++) {
311 double out = xcoef[0];
312 for (
unsigned int j=1; j<
degree; j++)
313 out =
out * aeta + xcoef[j];
328 const unsigned int NPAR = 4;
332 for (
unsigned int i=0;
i < NPAR;
i++) {
334 double out = xcoef[0];
335 for (
unsigned int j=1; j<
degree; j++)
336 out =
out * aeta + xcoef[j];
353 const unsigned int NPAR = 3;
357 for (
unsigned int i=0;
i < NPAR;
i++) {
359 double out = xcoef[0];
360 for (
unsigned int j=1; j<
degree; j++)
361 out =
out * aeta + xcoef[j];
367 double sq = std::sqrt (
b/atanb - 1);
370 pars[2]*(1-std::abs(
u)));
380 const unsigned int NPAR = 1;
385 for (
unsigned int i=0;
i < NPAR;
i++) {
387 double out = xcoef[0];
388 for (
unsigned int j=1; j<
degree; j++)
389 out =
out * aeta + xcoef[j];
403 const unsigned int NPAR = 7;
407 for (
unsigned int i=0;
i < NPAR;
i++) {
409 double out = xcoef[0];
410 for (
unsigned int j=1; j<
degree; j++)
411 out =
out * aeta + xcoef[j];
421 if (
u > 0.9 ||
u < -0.9) {
425 offs -= (
u-0.9)/0.1 * xdiff/2;
427 offs += (-0.9-
u)/0.1 * xdiff/2;
439 const unsigned int NPAR = 8;
443 for (
unsigned int i=0;
i < NPAR;
i++) {
445 double out = xcoef[0];
446 for (
unsigned int j=1; j<
degree; j++)
447 out =
out * aeta + xcoef[j];
float deta() const
cell deta
float calc0(float, float, const CaloRec::Array< 2 > &) const
Builder(const EgammaSshapeCalibration &, double, double, int)
Constructor.
float calc11(float, float, const CaloRec::Array< 2 > &) const
void setEta(float)
set Eta (calibrated)
float eta() const
get Eta (calibrated)
Read-write multidimensional array.
virtual StatusCode finalize() override
Finalization of the tool.
Scalar eta() const
pseudorapidity method
virtual float calculate(int energy_ndx, bool &good) const
Calculate the correction for tabulated energy ENERGY_NDX.
unsigned int size(unsigned int dim=0) const
Return the size of the array along one dimension.
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
float calc3(float, float, const CaloRec::Array< 2 > &) const
float calc5(float, float, const CaloRec::Array< 2 > &) const
void docalc(int, const CaloClusterCorrectionCommon::TableBuilder &, const CxxUtils::Array< 1 > &, CxxUtils::WritableArray< 2 > &, int &) const
@ u
Enums for curvilinear frames.
Helper, used to calculate the values of the energy interpolation table.
Definition of CaloDetDescriptor.
float calc10(float, float, const CaloRec::Array< 2 > &) const
virtual StatusCode initialize() override
Initialization of the tool.
Constant< int > m_energy_degree
Degree of the polynomial interpolation in energy.
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
bool is_lar_em_barrel() const
descriptor belongs to EM barrel
Constant< CxxUtils::Array< 2 > > m_regions
Calibration constant: table of regions.
Constant< bool > m_isRange_barrel
bool is_lar_em_endcap() const
descriptor belongs to EM end cap
float interpolate(const CaloRec::Array< 2 > &a, float x, unsigned int degree, unsigned int ycol=1, const CaloRec::Array< 1 > ®ions=CaloRec::Array< 1 >(), int n_points=-1, bool fixZero=false)
Polynomial interpolation in a table.
virtual void makeCorrection(xAOD::TrigEMCluster *, const void *) const override
Virtual function from IEgammaCalibration.
Constant< CxxUtils::Array< 1 > > m_energies
Table of energies at which the correction was tabulated.
const CaloDetDescriptor * descriptor() const
cell descriptor
float eta() const
cell eta
Polynomial interpolation in a table.
Description of a trigger EM cluster.
float rawEta() const
get Raw Eta (no calibration)
float energy() const
get Energy (calibrated)
float calc4(float, float, const CaloRec::Array< 2 > &) const