|
ATLAS Offline Software
|
Go to the documentation of this file.
24 #include "CLHEP/Units/SystemOfUnits.h"
25 #include <CLHEP/Random/Randomize.h>
29 using CLHEP::RandGauss;
37 const std::string&
type,
38 const std::string&
name,
43 m_sigmaPerRegion(0.005),
44 m_sigmaPerCell(0.007),
48 declareInterface<CaloCellCorrection>(
this);
66 return StatusCode::SUCCESS;
78 CLHEP::HepRandomEngine* engine = wrapper->
getEngine (ctx);
102 << iregion <<
" " <<
m_spread1[iregion]);
125 for (
int i=0;
i<544;
i++) {
130 for (
int i=0;
i<544;
i++) {
132 int ieta,iphi,barrelec,ii;
137 else if (iregion<256) {
141 else if (iregion<(256+112)) {
145 else if (iregion<(256+224)) {
147 ii=iregion-(256+112);
149 else if (iregion<(256+224+32)) {
151 ii=iregion-(256+224);
155 ii=iregion-(256+224+32);
159 ATH_MSG_DEBUG(
"iregion,barrelec,ieta,iphi,spread " << iregion <<
" "
160 << barrelec <<
" " << ieta <<
" " << iphi <<
" " <<
m_spread1[
i] );
173 if (iphi>15) iphi=15;
174 if (abs(barrelec)==1) {
175 int ieta=(
int)(
eta*(1./0.2));
177 iregion=16*ieta+iphi;
178 if (barrelec==1) iregion=iregion+128;
180 if (abs(barrelec)==2) {
183 else if(
eta<1.6) ieta=1;
184 else if(
eta<1.8) ieta=2;
185 else if(
eta<2.0) ieta=3;
186 else if(
eta<2.1) ieta=4;
187 else if(
eta<2.3) ieta=5;
189 iregion=16*ieta+iphi;
190 if (barrelec==-2) iregion=iregion+256;
191 if (barrelec==2) iregion=iregion+256+112;
193 if (abs(barrelec)==3) {
197 if (barrelec==-3) iregion=iregion+256+224;
198 if (barrelec==3) iregion=iregion+256+224+32;
211 const EventContext& ctx)
const
const CaloDetDescrManager * m_calodetdescrmgr
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Scalar phi() const
phi method
LArCellEmMiscalib(const std::string &type, const std::string &name, const IInterface *parent)
size_type channel_hash_max() const
One more than the largest channel (cell) hash code.
virtual StatusCode initialize() override
Constructor.
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ServiceHandle< IAthRNGSvc > m_rngSvc
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const LArEM_ID * getEM_ID(void) const
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
bool msgLvl(const MSG::Level lvl) const
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
#define ATH_MSG_VERBOSE(x)
Identifier channel_id(const ExpandedIdentifier &exp_id) const
Build a cell identifier from an expanded identifier.
void initOnce(const EventContext &ctx)
const LArEM_ID * m_larem_id
Definition of CaloDetDescrManager.
float eta_raw() const
cell eta_raw
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
double energy() const
get energy (data member)
CaloCell_ID::SUBCALO getSubCalo() const
cell subcalo
IdentifierHash calo_hash() const
cell calo hash
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< float > m_calib
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
const CaloIdManager * m_caloIdMgr
void smearingPerRegion(CLHEP::HepRandomEngine *engine)
static int region(int barrelec, double eta, double phi)
A wrapper class for event-slot-local random engines.
int barrel_ec(const Identifier id) const
return barrel_ec according to :
std::vector< float > m_spread1
StatusCode initialize(bool used=true)
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
std::once_flag m_initOnce
Data object for each calorimeter readout cell.
static void setenergy(CaloCell *lar_cell, float energy)
#define ATH_MSG_WARNING(x)
#define ATLAS_THREAD_SAFE
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Apply miscalibration in EM calorimeter at cell level.
virtual void MakeCorrection(CaloCell *theCell, const EventContext &ctx) const override
float phi_raw() const
cell phi_raw