16#include "CLHEP/Units/SystemOfUnits.h"
23using CLHEP::millimeter;
28 return StatusCode::SUCCESS;
35 double etcell = weight * thisCell->
et() *
wtCell(thisCell);
43 Context myctx = context (Gaudi::Hive::currentContext());
45 const double mm3 = millimeter*millimeter*millimeter;
46 const double log2 = 0.69314718056;
47 const double inv_log2 = 1. / log2;
53 double ecell = thisCell->
e();
54 double etaa = fabs( thisCell->
eta() );
59 if( fabs(ecell) > 0 && vol > 0 ) {
60 iET=
static_cast<int>(log(fabs(ecell)/fabs(vol)*(mm3/
GeV))*inv_log2+26);
62 if(iET >= dim) iET = dim-1;
72 case CaloSampling::PreSamplerB:
76 case CaloSampling::PreSamplerE:
82 case CaloSampling::EMB1:
86 case CaloSampling::EME1:
92 case CaloSampling::EMB2:
93 case CaloSampling::EMB3:
94 if(iET >= 0 && etaa < 0.8) wt =
m_wtEMB1(myctx)[iET];
95 if(iET >= 0 && etaa >= 0.8) wt =
m_wtEMB2(myctx)[iET];
99 case CaloSampling::EME2:
100 case CaloSampling::EME3:
101 if(iET >= 0 && etaa < 2.5) wt =
m_wtEME1(myctx)[iET];
102 if(iET >= 0 && etaa >= 2.5) wt =
m_wtEME2(myctx)[iET];
106 case CaloSampling::TileBar0:
107 case CaloSampling::TileBar1:
108 case CaloSampling::TileBar2:
112 case CaloSampling::TileExt0:
113 case CaloSampling::TileExt1:
114 case CaloSampling::TileExt2:
119 case CaloSampling::HEC0:
120 case CaloSampling::HEC1:
121 case CaloSampling::HEC2:
122 case CaloSampling::HEC3:
123 if(iET>=0 && etaa<2.5) wt =
m_wtHec1(myctx)[iET];
124 if(iET>=0 && etaa>=2.5) wt =
m_wtHec2(myctx)[iET];
128 case CaloSampling::FCAL0:
132 case CaloSampling::FCAL1:
133 case CaloSampling::FCAL2:
138 case CaloSampling::TileGap3:
143 case CaloSampling::TileGap1:
144 case CaloSampling::TileGap2:
148 case CaloSampling::MINIFCAL0:
149 case CaloSampling::MINIFCAL1:
150 case CaloSampling::MINIFCAL2:
151 case CaloSampling::MINIFCAL3:
152 case CaloSampling::Unknown:
165 if( etAccb3*etTile1 > 0 ) {
166 return wtCryo() * sqrt( etAccb3*etTile1 );
175 Context myctx = context (Gaudi::Hive::currentContext());
183 Context myctx = context (Gaudi::Hive::currentContext());
186 int nEtaBins=etaFit.
size();
190 int ieta =
static_cast<int>(fabs(
eta)*(1./0.10));
191 if (ieta>=nEtaBins) ieta=nEtaBins-1;
193 double ptlog = log(fabs(e)/(cosh(
eta)*
GeV));
194 if(ptlog < 2.3) ptlog = 2.3;
195 if(ptlog > etaFit[ieta][4]) ptlog = etaFit[ieta][4];
196 double func = etaFit[ieta][0] + etaFit[ieta][1]/ptlog
197 + etaFit[ieta][2]/(ptlog*ptlog)
198 + etaFit[ieta][3]/(ptlog*ptlog*ptlog);
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
Data object for each calorimeter readout cell.
virtual double e() const override final
get energy (data member) (synonym to method energy()
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
virtual double eta() const override final
get eta (through CaloDetDescrElement)
virtual double et() const override final
get et
CaloCell_ID::CaloSample getSampling() const
cell sampling
float volume() const
cell volume
Read-only multidimensional array.
unsigned int size(unsigned int dim=0) const
Return the size of the array along one dimension.