ATLAS Offline Software
Loading...
Searching...
No Matches
CaloBCIDAverage Class Reference

#include <CaloBCIDAverage.h>

Collaboration diagram for CaloBCIDAverage:

Public Member Functions

 CaloBCIDAverage ()=delete
 CaloBCIDAverage (const LArMCSym *mcSym, CxxUtils::vec_aligned_vector< float > &&data)
float averageOflHash (const IdentifierHash h) const
float average (const Identifier &id) const
float average (const HWIdentifier &id) const
float average (size_t idx) const

Private Attributes

const LArMCSymm_mcSym
const size_t m_oflHashMax
CxxUtils::vec_aligned_vector< float > m_avg

Detailed Description

Definition at line 16 of file CaloBCIDAverage.h.

Constructor & Destructor Documentation

◆ CaloBCIDAverage() [1/2]

CaloBCIDAverage::CaloBCIDAverage ( )
delete

◆ CaloBCIDAverage() [2/2]

CaloBCIDAverage::CaloBCIDAverage ( const LArMCSym * mcSym,
CxxUtils::vec_aligned_vector< float > && data )

Definition at line 8 of file CaloBCIDAverage.cxx.

9 :
10 m_mcSym(mcSym),
11 m_oflHashMax(mcSym ? mcSym->hashMax().second : 0),
12 m_avg(std::move(data))
13{
14}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
const LArMCSym * m_mcSym
CxxUtils::vec_aligned_vector< float > m_avg
const size_t m_oflHashMax
std::pair< size_t, size_t > hashMax() const
Return the hash-max as pair<onlHashMax,oflHashMax>
Definition LArMCSym.h:139

Member Function Documentation

◆ average() [1/3]

float CaloBCIDAverage::average ( const HWIdentifier & id) const
inline

Definition at line 35 of file CaloBCIDAverage.h.

35 {
36 if (!id.is_valid()) return 0;
37 const size_t idx = m_mcSym->ZPhiSymOnlIndex(id);
38 if (idx == LArMCSym::NO_INDEX) return 0; //Catches the tile-case
39 return m_avg[idx];
40 }
static constexpr size_t NO_INDEX
Return for an index if there's no valid symmetric identifier.
Definition LArMCSym.h:41

◆ average() [2/3]

float CaloBCIDAverage::average ( const Identifier & id) const
inline

Definition at line 27 of file CaloBCIDAverage.h.

27 {
28 if (!id.is_valid()) return 0;
29 const size_t idx = m_mcSym->ZPhiSymOflIndex(id);
30 if (idx == LArMCSym::NO_INDEX) return 0; //Catches the tile-case
31 return m_avg[idx];
32 }

◆ average() [3/3]

float CaloBCIDAverage::average ( size_t idx) const
inline

Definition at line 43 of file CaloBCIDAverage.h.

43 {
44 return m_avg.at(idx);
45 }

◆ averageOflHash()

float CaloBCIDAverage::averageOflHash ( const IdentifierHash h) const
inline

Definition at line 21 of file CaloBCIDAverage.h.

21 {
22 if (h>=m_oflHashMax) return 0.0; //Catches the tile-case
23 const size_t idx = m_mcSym->ZPhiSymOflIndex(h);
24 return m_avg[idx];
25 }

Member Data Documentation

◆ m_avg

CxxUtils::vec_aligned_vector<float> CaloBCIDAverage::m_avg
private

Definition at line 51 of file CaloBCIDAverage.h.

◆ m_mcSym

const LArMCSym* CaloBCIDAverage::m_mcSym
private

Definition at line 49 of file CaloBCIDAverage.h.

◆ m_oflHashMax

const size_t CaloBCIDAverage::m_oflHashMax
private

Definition at line 50 of file CaloBCIDAverage.h.


The documentation for this class was generated from the following files: