ATLAS Offline Software
Loading...
Searching...
No Matches
CaloSwEtamod_g3.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5/********************************************************************
6
7NAME: CaloSwEtamod_g3.cxx
8PACKAGE: offline/Calorimeter/CaloClusterCorrection
9
10AUTHORS: H. Ma, S. Rajagopalan
11CREATED: Dec. 15, 1999
12
13PURPOSE: correction for the modulations with the position in eta
14 (Tuned using 50 GeV Et photons)
15 base class: CaloClusterCorrection
16 Correction tuned on G3 samples.
17
18Atrecon Orig: emreco/qetamod.F
19
20Updated: May 10, 2000 (SR, HM)
21 Migrated to Athena Framework from PASO
22
23Updated: Jan 5, 2001 (HM)
24 QA.
25
26Updated: May 5, 2004 (Sven Menke)
27 base class changed from algo to tool
28
29Updated: June, 2004 (sss)
30 Use ToolWithConstants to get correction constants.
31
32********************************************************************/
33// include header files
34#include "CaloSwEtamod_g3.h"
35
36
38
39
40// make correction to one cluster
42 CaloCluster* cluster) const
43{
44 float aeta = fabs (cluster->etaBE(2));
45 if (aeta > 2.5) return;
46
47 int ieta = m_neta(myctx)/2;
48 if (ieta > 3) return; // something went wrong
49
50 CaloRec::Array<1> coef = m_correction(myctx)[aeta < 1.5 ? 0 : 1][ieta-1];
51
52 float u = fmod (aeta, 0.025);
53 float qetamod = coef[0] + coef[1]*u + coef[2]*u*u;
54
55 setenergy (cluster, qetamod * cluster->e());
56}
57
virtual void setenergy(xAOD::CaloCluster *cluster, float energy) const
Principal data class for CaloCell clusters.
virtual double e() const
Retrieve energy independent of signal state.
double etaBE(int sampling) const
EMB/EMEC combined barycenter .
Constant< int > m_neta
Constant< CxxUtils::Array< 3 > > m_correction
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *cluster) const override
Read-only multidimensional array.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.