ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCellPedShift.cxx
Go to the documentation of this file.
2
3
5
6 IdentifierHash tileMinHash, tileMaxHash;
7 cellid->calo_cell_hash_range (CaloCell_ID::TILE,tileMinHash,tileMaxHash);
8
9 for (auto& vec : m_larValues) {
10 vec.resize(tileMinHash,0.0);
11 }
12
13 for (auto& vec : m_tileValues) {
14 vec.resize(tileMaxHash-tileMinHash,0.0);
15 }
16
17 m_tileMinHash=tileMinHash;
18}
19
20//Setter
21void CaloCellPedShift::setPedShift(const IdentifierHash hash, const int gain, const float value) {
22 if (hash<m_tileMinHash) {
23 m_larValues[gain][hash]=value;
24 }
25 else {
26 m_tileValues[gain][hash-m_tileMinHash]=value;
27 }
28}
std::vector< size_t > vec
std::array< std::vector< float >, 3 > m_larValues
CaloCellPedShift(const CaloCell_ID *cellid)
std::array< std::vector< float >, 4 > m_tileValues
void setPedShift(const IdentifierHash hash, const int gain, const float value)
void calo_cell_hash_range(const Identifier id, IdentifierHash &caloCellMin, IdentifierHash &caloCellMax) const
to loop on 'global' cell hashes of one sub-calorimeter alone
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
This is a "hash" representation of an Identifier.