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

Helper to calculate hash offsets in each COOL channel. More...

#include <CaloNoiseHashRanges.h>

Collaboration diagram for CaloNoiseHashRanges:

Public Types

enum  SYSTEM {
  EMECZNEG = 0 , EMBZNEG = 1 , EMBZPOS = 2 , EMECZPOS = 3 ,
  HEC =16 , FCAL =32 , TILE =48
}

Public Member Functions

 CaloNoiseHashRanges ()=delete
 CaloNoiseHashRanges (const CaloCell_ID *cellId)
 Constructor.
 ~CaloNoiseHashRanges ()=default
const std::map< SYSTEM, IdentifierHash > & hashOffsets () const
 Return a map of cool-channel and hash-offset.
std::size_t maxLArCells () const
 Return the number of LAr cells.
std::size_t maxTileCells () const
 Return the number of Tile cells.

Private Attributes

std::map< SYSTEM, IdentifierHashm_hashOffsets
std::size_t m_maxLArCells
std::size_t m_maxTileCells

Detailed Description

Helper to calculate hash offsets in each COOL channel.

Definition at line 18 of file CaloNoiseHashRanges.h.

Member Enumeration Documentation

◆ SYSTEM

Enumerator
EMECZNEG 
EMBZNEG 
EMBZPOS 
EMECZPOS 
HEC 
FCAL 
TILE 

Definition at line 36 of file CaloNoiseHashRanges.h.

Constructor & Destructor Documentation

◆ CaloNoiseHashRanges() [1/2]

CaloNoiseHashRanges::CaloNoiseHashRanges ( )
delete

◆ CaloNoiseHashRanges() [2/2]

CaloNoiseHashRanges::CaloNoiseHashRanges ( const CaloCell_ID * cellId)

Constructor.

Parameters
cellIdCaloCell_ID pointer to a CaloCell_ID object

Initializes the hash ranges

Definition at line 9 of file CaloNoiseHashRanges.cxx.

9 {
10
11 std::array<IdentifierHash,4> emHashRanges {IdentifierHash(),IdentifierHash(),IdentifierHash(),IdentifierHash()};
12 IdentifierHash emHashBegin, emHashEnd;
13 caloCellID->calo_cell_hash_range(CaloCell_ID::LAREM, emHashBegin, emHashEnd);
14 for (IdentifierHash cellHash=emHashBegin;cellHash != emHashEnd; cellHash+=1) {
15 const Identifier id = caloCellID->cell_id(cellHash);
16 int sys = 0;
17 if ( caloCellID->is_em_barrel(id)) {
18 sys = ( caloCellID->pos_neg(id) > 0) ? EMBZPOS : EMBZNEG;
19 } else if ( caloCellID->is_em_endcap(id)) {
20 sys = ( caloCellID->pos_neg(id) > 0) ? EMECZPOS : EMECZNEG;
21 }
22 if (!emHashRanges[sys].is_valid())
23 emHashRanges[sys]=cellHash;
24 }
25
26 m_hashOffsets[EMECZNEG]=emHashRanges[EMECZNEG];
27 m_hashOffsets[EMBZNEG]=emHashRanges[EMBZNEG];
28 m_hashOffsets[EMBZPOS]=emHashRanges[EMBZPOS];
29 m_hashOffsets[EMECZPOS]=emHashRanges[EMECZPOS];
30
31 IdentifierHash from, to;
32 caloCellID->calo_cell_hash_range(CaloCell_ID::LARHEC,from,to);
33 m_hashOffsets[HEC]=from;
34
35 caloCellID->calo_cell_hash_range(CaloCell_ID::LARFCAL,from,to);
36 m_hashOffsets[FCAL]=from;
38
39 caloCellID->calo_cell_hash_range(CaloCell_ID::TILE,from,to);
40 m_hashOffsets[TILE]=from;
41 m_maxTileCells=to-from;
42}
std::map< SYSTEM, IdentifierHash > m_hashOffsets
CONT to(RANGE &&r)
Definition ranges.h:39

◆ ~CaloNoiseHashRanges()

CaloNoiseHashRanges::~CaloNoiseHashRanges ( )
default

Member Function Documentation

◆ hashOffsets()

const std::map< SYSTEM, IdentifierHash > & CaloNoiseHashRanges::hashOffsets ( ) const
inline

Return a map of cool-channel and hash-offset.

Definition at line 48 of file CaloNoiseHashRanges.h.

48{return m_hashOffsets;}

◆ maxLArCells()

std::size_t CaloNoiseHashRanges::maxLArCells ( ) const
inline

Return the number of LAr cells.

Definition at line 50 of file CaloNoiseHashRanges.h.

50{return m_maxLArCells;}

◆ maxTileCells()

std::size_t CaloNoiseHashRanges::maxTileCells ( ) const
inline

Return the number of Tile cells.

Definition at line 52 of file CaloNoiseHashRanges.h.

52{return m_maxTileCells;}

Member Data Documentation

◆ m_hashOffsets

std::map<SYSTEM,IdentifierHash> CaloNoiseHashRanges::m_hashOffsets
private

Definition at line 56 of file CaloNoiseHashRanges.h.

◆ m_maxLArCells

std::size_t CaloNoiseHashRanges::m_maxLArCells
private

Definition at line 57 of file CaloNoiseHashRanges.h.

◆ m_maxTileCells

std::size_t CaloNoiseHashRanges::m_maxTileCells
private

Definition at line 58 of file CaloNoiseHashRanges.h.


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