ATLAS Offline Software
LArHVCorr.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #ifndef LARHVCORR_H
7 #define LARHVCORR_H
8 
13 
14 #include <vector>
15 
16 class LArHVCorr : public ILArHVScaleCorr {
17 
18  public:
19 
20  LArHVCorr()=delete;
21 
22  LArHVCorr(std::vector<float>&& vVec, const LArOnOffIdMapping* cabling, const CaloCell_Base_ID* caloidhelper);
23  ~LArHVCorr () {};
24 
25 
26  // retrieving HVScaleCorr using online ID
27  virtual const float& HVScaleCorr(const HWIdentifier& chid) const override final;
28 
29  // retrieving HVScaleCorr using offline ID
30  virtual const float& HVScaleCorr(const Identifier& chid) const;
31 
32  const float& HVScaleCorr_oflHash(const IdentifierHash& h) const {
33  if (h<m_hvCorr.size()) //Catches also Tile Ids
34  return m_hvCorr[h];
35  else
36  return m_noCorr;
37  }
38 
39  const std::vector<float>& HVCorrVec() const {return m_hvCorr;}
40 
41 
42  private:
45 
46  std::vector<float> m_hvCorr;
47  const float m_noCorr;
48 };
49 
50 #include "AthenaKernel/CondCont.h"
51 CLASS_DEF( LArHVCorr, 52206080, 1)
53 
54 #endif
LArHVCorr::LArHVCorr
LArHVCorr()=delete
ILArHVScaleCorr
Definition: ILArHVScaleCorr.h:13
CondCont.h
Hold mappings of ranges to condition objects.
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
CONDCONT_MIXED_DEF
CONDCONT_MIXED_DEF(LArHVCorr, 24667986, ILArHVScaleCorr)
LArHVCorr::HVCorrVec
const std::vector< float > & HVCorrVec() const
Definition: LArHVCorr.h:39
HWIdentifier
Definition: HWIdentifier.h:13
LArHVCorr::m_noCorr
const float m_noCorr
Definition: LArHVCorr.h:47
LArHVCorr::HVScaleCorr_oflHash
const float & HVScaleCorr_oflHash(const IdentifierHash &h) const
Definition: LArHVCorr.h:32
LArOnOffIdMapping.h
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
ILArHVScaleCorr.h
extractSporadic.h
list h
Definition: extractSporadic.py:97
LArHVCorr
Definition: LArHVCorr.h:16
LArHVCorr::m_larCablingSvc
const LArOnOffIdMapping * m_larCablingSvc
Definition: LArHVCorr.h:43
CaloCell_Base_ID.h
Helper base class for offline cell identifiers.
LArHVCorr::m_calo_id
const CaloCell_Base_ID * m_calo_id
Definition: LArHVCorr.h:44
LArHVCorr::~LArHVCorr
~LArHVCorr()
Definition: LArHVCorr.h:23
IdentifierHash.h
h
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
LArHVCorr::m_hvCorr
std::vector< float > m_hvCorr
Definition: LArHVCorr.h:46
IdentifierHash
Definition: IdentifierHash.h:38
CaloCell_Base_ID
Helper base class for offline cell identifiers.
Definition: CaloCell_Base_ID.h:41
LArHVCorr::HVScaleCorr
virtual const float & HVScaleCorr(const HWIdentifier &chid) const override final
Definition: LArHVCorr.cxx:19
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20