ATLAS Offline Software
CaloCellPedShift.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CALOCONDITIONS_CALOCELLPEDSHIFT
6 #define CALOCONDITIONS_CALOCELLPEDSHIFT
7 
10 
11 #include <array>
12 #include <vector>
13 
14 class CaloCell_ID;
15 
17 
18  public:
19  CaloCellPedShift(const CaloCell_ID* cellid);
20 
21  //Getter:
22  float pedShift(const IdentifierHash hash, const int gain) const;
23 
24  //Setter:
25  void setPedShift(const IdentifierHash hash, const int gain, const float value);
26 
27 
28  private:
29  //Underlying data structure:
30  //LAr has 3 gains:
31  std::array<std::vector<float>,3> m_larValues;
32  //Tile has 4 gains:
33  std::array<std::vector<float>,4> m_tileValues;
34 
35  size_t m_tileMinHash;
36 
37 };
38 
39 
40 inline
41 float CaloCellPedShift::pedShift(const IdentifierHash hash, const int gain) const {
42  if (hash<m_tileMinHash) {
43  return m_larValues[gain][hash];
44  }
45  else {
47  }
48 }
49 
50 #include "AthenaKernel/CLASS_DEF.h"
51 CLASS_DEF( CaloCellPedShift, 196920958, 1 )
52 #include "AthenaKernel/CondCont.h"
54 #endif
55 
CaloCellPedShift::setPedShift
void setPedShift(const IdentifierHash hash, const int gain, const float value)
Definition: CaloCellPedShift.cxx:21
CaloCellPedShift::m_larValues
std::array< std::vector< float >, 3 > m_larValues
Definition: CaloCellPedShift.h:31
CaloCellPedShift
Definition: CaloCellPedShift.h:16
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
athena.value
value
Definition: athena.py:122
CaloCellPedShift::m_tileMinHash
size_t m_tileMinHash
Definition: CaloCellPedShift.h:35
CaloCell_ID.h
CaloCellPedShift::m_tileValues
std::array< std::vector< float >, 4 > m_tileValues
Definition: CaloCellPedShift.h:33
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
IdentifierHash.h
CaloCellPedShift::CaloCellPedShift
CaloCellPedShift(const CaloCell_ID *cellid)
Definition: CaloCellPedShift.cxx:4
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
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
IdentifierHash
Definition: IdentifierHash.h:38
CaloCellPedShift::pedShift
float pedShift(const IdentifierHash hash, const int gain) const
Definition: CaloCellPedShift.h:41
CLASS_DEF.h
macros to associate a CLID to a type
CONDCONT_DEF
CONDCONT_DEF(CaloCellPedShift, 56606546)