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

This class provides an interface to deal with regions in the neighbours finding. More...

#include <LArHEC_region.h>

Collaboration diagram for LArHEC_region:

Public Member Functions

 LArHEC_region (void)
 LArHEC_region (unsigned int &minHash, short int &nbEtaBins, short int &nPhi, float minEta, float granulEta, float minPhi, float granulPhi, bool fullSym, short int &prevEtaReg, short int &nextEtaReg, std::vector< short int > &prevEtaSamp, std::vector< short int > &nextEtaSamp)
 ~LArHEC_region (void)
short int numberOfEta () const
 number of eta bins in the whole region
short int phiN () const
 number of phi bins
float etaGranularity () const
 eta granularity
float phiGranularity () const
 phi granularity
bool fullTwoPi () const
 true if detector covers full 2pi (== wraparound option in dictionary)
float etaMin () const
 starting eta
float etaMax () const
 end eta
float phiMin () const
 starting phi
float phiMax () const
 end phi
unsigned int hashMin () const
 hash Id of the first cell of the region
unsigned int hashMax () const
 hash Id of the last cell of the region +1
short int prevEtaRegion () const
 region number of the previous region in eta
short int nextEtaRegion () const
 region number of the next region in eta
bool isEtaMin (const unsigned int &index) const
 is the considered cell in the first eta bin of the region ?
bool isEtaMax (const unsigned int &index) const
 is the considered cell in the last eta bin of the region ?
bool isPhiMin (const unsigned int &index) const
 is the considered cell in the first phi bin of the region ?
bool isPhiMax (const unsigned int &index) const
 is the considered cell in the last phi bin of the region ?
const std::vector< short int > & prevSamplingRegion () const
 region number of the prev region in sampling
const std::vector< short int > & nextSamplingRegion () const
 region number of the next region in sampling

Private Attributes

unsigned int m_hashMin
short int m_nbEtaBins
short int m_nPhi
float m_minEta
float m_granulEta
float m_minPhi
float m_granulPhi
bool m_fullSym
short int m_prevEtaReg
short int m_nextEtaReg
std::vector< short int > m_prevSampReg
std::vector< short int > m_nextSampReg

Detailed Description

This class provides an interface to deal with regions in the neighbours finding.

Definition at line 20 of file LArHEC_region.h.

Constructor & Destructor Documentation

◆ LArHEC_region() [1/2]

LArHEC_region::LArHEC_region ( void )

Definition at line 11 of file LArHEC_region.cxx.

11 :
12 m_hashMin(0)
13 ,m_nbEtaBins(0)
14 ,m_nPhi(0)
15 ,m_minEta(99)
16 ,m_granulEta(0)
17 ,m_minPhi(99)
18 ,m_granulPhi(0)
19 ,m_fullSym(true)
20 ,m_prevEtaReg(63)
21 ,m_nextEtaReg(63)
22{
23}
short int m_nbEtaBins
short int m_prevEtaReg
short int m_nextEtaReg
unsigned int m_hashMin
short int m_nPhi

◆ LArHEC_region() [2/2]

LArHEC_region::LArHEC_region ( unsigned int & minHash,
short int & nbEtaBins,
short int & nPhi,
float minEta,
float granulEta,
float minPhi,
float granulPhi,
bool fullSym,
short int & prevEtaReg,
short int & nextEtaReg,
std::vector< short int > & prevEtaSamp,
std::vector< short int > & nextEtaSamp )

Definition at line 25 of file LArHEC_region.cxx.

29 : m_hashMin (minHash),
30 m_nbEtaBins (nbEtaBins),
31 m_nPhi (nPhi),
32 m_minEta (minEta),
33 m_granulEta (granulEta),
34 m_minPhi (minPhi),
35 m_granulPhi (granulPhi),
36 m_fullSym (fullSym),
37 m_prevEtaReg (prevEtaReg),
38 m_nextEtaReg (nextEtaReg),
39 m_prevSampReg(prevSampReg),
40 m_nextSampReg(nextSampReg)
41{
42
43
44}
std::vector< short int > m_prevSampReg
std::vector< short int > m_nextSampReg

◆ ~LArHEC_region()

LArHEC_region::~LArHEC_region ( void )
default

Member Function Documentation

◆ etaGranularity()

float LArHEC_region::etaGranularity ( ) const

eta granularity

Definition at line 59 of file LArHEC_region.cxx.

60{
61 return m_granulEta ;
62}

◆ etaMax()

float LArHEC_region::etaMax ( ) const

end eta

Definition at line 79 of file LArHEC_region.cxx.

80{
82}

◆ etaMin()

float LArHEC_region::etaMin ( ) const

starting eta

Definition at line 74 of file LArHEC_region.cxx.

75{
76 return m_minEta ;
77}

◆ fullTwoPi()

bool LArHEC_region::fullTwoPi ( ) const

true if detector covers full 2pi (== wraparound option in dictionary)

Definition at line 69 of file LArHEC_region.cxx.

70{
71 return m_fullSym ;
72}

◆ hashMax()

unsigned int LArHEC_region::hashMax ( ) const

hash Id of the last cell of the region +1

Definition at line 99 of file LArHEC_region.cxx.

100{
101 return (m_hashMin + m_nbEtaBins * m_nPhi) ;
102}

◆ hashMin()

unsigned int LArHEC_region::hashMin ( ) const

hash Id of the first cell of the region

Definition at line 94 of file LArHEC_region.cxx.

95{
96 return m_hashMin ;
97}

◆ isEtaMax()

bool LArHEC_region::isEtaMax ( const unsigned int & index) const

is the considered cell in the last eta bin of the region ?

Definition at line 121 of file LArHEC_region.cxx.

122{
123 bool result=false;
124 if( ((hashMax()-m_nPhi)<=index) && (index<hashMax()))result=true;
125 return result;
126}
unsigned int hashMax() const
hash Id of the last cell of the region +1

◆ isEtaMin()

bool LArHEC_region::isEtaMin ( const unsigned int & index) const

is the considered cell in the first eta bin of the region ?

Definition at line 114 of file LArHEC_region.cxx.

115{
116 bool result=false;
117 if( ((m_hashMin<=index) && (index<(m_hashMin+m_nPhi))))result=true;
118 return result;
119}

◆ isPhiMax()

bool LArHEC_region::isPhiMax ( const unsigned int & index) const

is the considered cell in the last phi bin of the region ?

Definition at line 135 of file LArHEC_region.cxx.

136{
137 bool result=false;
138 if( !m_fullSym && (index-m_hashMin+1)%m_nPhi == 0 )result=true;
139 return result;
140}

◆ isPhiMin()

bool LArHEC_region::isPhiMin ( const unsigned int & index) const

is the considered cell in the first phi bin of the region ?

Definition at line 128 of file LArHEC_region.cxx.

129{
130 bool result=false;
131 if( !m_fullSym && (index-m_hashMin)%m_nPhi == 0 )result=true;
132 return result;
133}

◆ nextEtaRegion()

short int LArHEC_region::nextEtaRegion ( ) const

region number of the next region in eta

Definition at line 109 of file LArHEC_region.cxx.

110{
111 return m_nextEtaReg;
112}

◆ nextSamplingRegion()

const std::vector< short int > & LArHEC_region::nextSamplingRegion ( ) const

region number of the next region in sampling

Definition at line 142 of file LArHEC_region.cxx.

143{
144 return m_nextSampReg;
145}

◆ numberOfEta()

short int LArHEC_region::numberOfEta ( ) const

number of eta bins in the whole region

Definition at line 49 of file LArHEC_region.cxx.

50{
51 return m_nbEtaBins ;
52}

◆ phiGranularity()

float LArHEC_region::phiGranularity ( ) const

phi granularity

Definition at line 64 of file LArHEC_region.cxx.

65{
66 return m_granulPhi ;
67}

◆ phiMax()

float LArHEC_region::phiMax ( ) const

end phi

Definition at line 89 of file LArHEC_region.cxx.

90{
91 return (m_minPhi + m_nPhi*m_granulPhi) ;
92}

◆ phiMin()

float LArHEC_region::phiMin ( ) const

starting phi

Definition at line 84 of file LArHEC_region.cxx.

85{
86 return m_minPhi ;
87}

◆ phiN()

short int LArHEC_region::phiN ( ) const

number of phi bins

Definition at line 54 of file LArHEC_region.cxx.

55{
56 return m_nPhi ;
57}

◆ prevEtaRegion()

short int LArHEC_region::prevEtaRegion ( ) const

region number of the previous region in eta

Definition at line 104 of file LArHEC_region.cxx.

105{
106 return m_prevEtaReg;
107}

◆ prevSamplingRegion()

const std::vector< short int > & LArHEC_region::prevSamplingRegion ( ) const

region number of the prev region in sampling

Definition at line 147 of file LArHEC_region.cxx.

148{
149 return m_prevSampReg;
150}

Member Data Documentation

◆ m_fullSym

bool LArHEC_region::m_fullSym
private

Definition at line 100 of file LArHEC_region.h.

◆ m_granulEta

float LArHEC_region::m_granulEta
private

Definition at line 97 of file LArHEC_region.h.

◆ m_granulPhi

float LArHEC_region::m_granulPhi
private

Definition at line 99 of file LArHEC_region.h.

◆ m_hashMin

unsigned int LArHEC_region::m_hashMin
private

Definition at line 93 of file LArHEC_region.h.

◆ m_minEta

float LArHEC_region::m_minEta
private

Definition at line 96 of file LArHEC_region.h.

◆ m_minPhi

float LArHEC_region::m_minPhi
private

Definition at line 98 of file LArHEC_region.h.

◆ m_nbEtaBins

short int LArHEC_region::m_nbEtaBins
private

Definition at line 94 of file LArHEC_region.h.

◆ m_nextEtaReg

short int LArHEC_region::m_nextEtaReg
private

Definition at line 103 of file LArHEC_region.h.

◆ m_nextSampReg

std::vector<short int> LArHEC_region::m_nextSampReg
private

Definition at line 105 of file LArHEC_region.h.

◆ m_nPhi

short int LArHEC_region::m_nPhi
private

Definition at line 95 of file LArHEC_region.h.

◆ m_prevEtaReg

short int LArHEC_region::m_prevEtaReg
private

Definition at line 102 of file LArHEC_region.h.

◆ m_prevSampReg

std::vector<short int> LArHEC_region::m_prevSampReg
private

Definition at line 104 of file LArHEC_region.h.


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