ATLAS Offline Software
LArCellEmMiscalib.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARCELLREC_LARCELLEMMISCALIB_H
6 #define LARCELLREC_LARCELLEMMISCALIB_H
7 
17 #include <utility>
18 #include <vector>
19 
20 #include "StoreGate/StoreGateSvc.h"
22 
25 
27 
28 class LArEM_ID;
29 class CaloIdManager;
30 
31 namespace CLHEP {
32  class HepRandomEngine;
33 }
34 
36 
37 {
38 
39  public:
40 
41  LArCellEmMiscalib(const std::string& type,
42  const std::string& name,
43  const IInterface* parent) ;
44 
45  virtual ~LArCellEmMiscalib()=default;
46 
48  virtual StatusCode initialize() override;
49 
50  virtual void MakeCorrection (CaloCell* theCell,
51  const EventContext& ctx) const override;
52 
53  private:
54 
55  static int region(int barrelec, double eta, double phi);
56  void smearingPerRegion (CLHEP::HepRandomEngine* engine);
57 
59  const CaloIdManager* m_caloIdMgr = nullptr;
61 
63  { this, "RndmSvc", "AthRNGSvc", "" };
64 
65  int m_seed;
68  bool m_undo;
69 
70  unsigned int m_ncellem;
71  std::vector<float> m_spread1;
72  std::vector<float> m_calib;
73 
74  mutable std::once_flag m_initOnce;
75  void initOnce (const EventContext& ctx);
76  SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this,"CaloDetDescrManager", "CaloDetDescrManager"};
77 };
78 
79 #endif // not LARCELLREC_LARCELLEMMISCALIB_H
LArCellEmMiscalib::m_calodetdescrmgr
const CaloDetDescrManager * m_calodetdescrmgr
Definition: LArCellEmMiscalib.h:60
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
LArCellEmMiscalib::LArCellEmMiscalib
LArCellEmMiscalib(const std::string &type, const std::string &name, const IInterface *parent)
Definition: LArCellEmMiscalib.cxx:36
LArCellEmMiscalib::initialize
virtual StatusCode initialize() override
Constructor.
Definition: LArCellEmMiscalib.cxx:61
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
LArCellEmMiscalib::m_rngSvc
ServiceHandle< IAthRNGSvc > m_rngSvc
Definition: LArCellEmMiscalib.h:63
CaloCellCorrection
Definition: CaloCellCorrection.h:51
LArCellEmMiscalib::m_sigmaPerRegion
double m_sigmaPerRegion
Definition: LArCellEmMiscalib.h:66
LArCellEmMiscalib::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: LArCellEmMiscalib.h:76
LArCellEmMiscalib::initOnce
void initOnce(const EventContext &ctx)
Definition: LArCellEmMiscalib.cxx:69
LArCellEmMiscalib::m_larem_id
const LArEM_ID * m_larem_id
Definition: LArCellEmMiscalib.h:58
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
CaloCellCorrection.h
LArCellEmMiscalib::~LArCellEmMiscalib
virtual ~LArCellEmMiscalib()=default
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArCellEmMiscalib::m_calib
std::vector< float > m_calib
Definition: LArCellEmMiscalib.h:72
CLHEP
STD'S.
Definition: IAtRndmGenSvc.h:19
LArCellEmMiscalib::m_ncellem
unsigned int m_ncellem
Definition: LArCellEmMiscalib.h:70
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LArCellEmMiscalib::m_caloIdMgr
const CaloIdManager * m_caloIdMgr
Definition: LArCellEmMiscalib.h:59
LArCellEmMiscalib::smearingPerRegion
void smearingPerRegion(CLHEP::HepRandomEngine *engine)
Definition: LArCellEmMiscalib.cxx:122
LArCellEmMiscalib::region
static int region(int barrelec, double eta, double phi)
Definition: LArCellEmMiscalib.cxx:168
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LArCellEmMiscalib::m_undo
bool m_undo
Definition: LArCellEmMiscalib.h:68
LArCellEmMiscalib::m_spread1
std::vector< float > m_spread1
Definition: LArCellEmMiscalib.h:71
LArCellEmMiscalib::m_sigmaPerCell
double m_sigmaPerCell
Definition: LArCellEmMiscalib.h:67
LArCellEmMiscalib::m_initOnce
std::once_flag m_initOnce
Definition: LArCellEmMiscalib.h:74
SG::ReadCondHandleKey< CaloDetDescrManager >
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IOVSvcDefs.h
defines and typedefs for IOVSvc
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
StoreGateSvc.h
LArCellEmMiscalib
Apply miscalibration in EM calorimeter at cell level.
Definition: LArCellEmMiscalib.h:37
LArCellEmMiscalib::MakeCorrection
virtual void MakeCorrection(CaloCell *theCell, const EventContext &ctx) const override
Definition: LArCellEmMiscalib.cxx:210
LArCellEmMiscalib::m_seed
int m_seed
Definition: LArCellEmMiscalib.h:65
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >