ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
LArFCAL_region Class Reference

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

#include <LArFCAL_region.h>

Collaboration diagram for LArFCAL_region:

Public Member Functions

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

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_prevSampReg
 
short int m_nextSampReg
 

Detailed Description

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

Definition at line 19 of file LArFCAL_region.h.

Constructor & Destructor Documentation

◆ LArFCAL_region() [1/2]

LArFCAL_region::LArFCAL_region ( void  )

Definition at line 12 of file LArFCAL_region.cxx.

12  :
13  m_hashMin(0)
14  ,m_nbEtaBins(0)
15  ,m_nPhi(0)
16  ,m_minEta(99)
17  ,m_granulEta(0)
18  ,m_minPhi(99)
19  ,m_granulPhi(0)
20  ,m_fullSym(true)
21  ,m_prevSampReg(63)
22  ,m_nextSampReg(63)
23 {
24 }

◆ LArFCAL_region() [2/2]

LArFCAL_region::LArFCAL_region ( unsigned int &  minHash,
short int &  nbEtaBins,
short int &  nPhi,
float  minEta,
float  granulEta,
float  minPhi,
float  granulPhi,
bool  fullSym,
short int &  prevEtaSamp,
short int &  nextEtaSamp 
)

Definition at line 26 of file LArFCAL_region.cxx.

29 {
30 
31  m_hashMin = minHash;
32  m_nbEtaBins = nbEtaBins;
33  m_nPhi = nPhi;
34  m_minEta = minEta;
35  m_granulEta = granulEta;
36  m_minPhi = minPhi;
37  m_granulPhi = granulPhi;
38  m_fullSym = fullSym;
39  m_prevSampReg = prevSampReg;
40  m_nextSampReg = nextSampReg;
41 
42 }

◆ ~LArFCAL_region()

LArFCAL_region::~LArFCAL_region ( void  )
default

Member Function Documentation

◆ etaGranularity()

float LArFCAL_region::etaGranularity ( ) const

eta granularity

Definition at line 56 of file LArFCAL_region.cxx.

57 {
58  return m_granulEta ;
59 }

◆ etaMax()

float LArFCAL_region::etaMax ( ) const

end eta

Definition at line 76 of file LArFCAL_region.cxx.

77 {
78  return (m_minEta + m_nbEtaBins*m_granulEta) ;
79 }

◆ etaMin()

float LArFCAL_region::etaMin ( ) const

starting eta

Definition at line 71 of file LArFCAL_region.cxx.

72 {
73  return m_minEta ;
74 }

◆ fullTwoPi()

bool LArFCAL_region::fullTwoPi ( ) const

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

Definition at line 66 of file LArFCAL_region.cxx.

67 {
68  return m_fullSym ;
69 }

◆ hashMax()

unsigned int LArFCAL_region::hashMax ( ) const

hash Id of the last cell of the region +1

Definition at line 96 of file LArFCAL_region.cxx.

97 {
98  return (m_hashMin + m_nbEtaBins * m_nPhi) ;
99 }

◆ hashMin()

unsigned int LArFCAL_region::hashMin ( ) const

hash Id of the first cell of the region

Definition at line 91 of file LArFCAL_region.cxx.

92 {
93  return m_hashMin ;
94 }

◆ isEtaMax()

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

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

Definition at line 108 of file LArFCAL_region.cxx.

109 {
110  bool result=false;
111  if( ((hashMax()-m_nPhi)<=index) && (index<hashMax()))result=true;
112  return result;
113 }

◆ isEtaMin()

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

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

Definition at line 101 of file LArFCAL_region.cxx.

102 {
103  bool result=false;
104  if( ((m_hashMin<=index) && (index<(m_hashMin+m_nPhi))))result=true;
105  return result;
106 }

◆ isPhiMax()

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

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

Definition at line 122 of file LArFCAL_region.cxx.

123 {
124  bool result=false;
125  if( !m_fullSym && (index-m_hashMin+1)%m_nPhi == 0 )result=true;
126  return result;
127 }

◆ isPhiMin()

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

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

Definition at line 115 of file LArFCAL_region.cxx.

116 {
117  bool result=false;
118  if( !m_fullSym && (index-m_hashMin)%m_nPhi == 0 )result=true;
119  return result;
120 }

◆ nextSamplingRegion()

short int LArFCAL_region::nextSamplingRegion ( ) const

region number of the next region in sampling

Definition at line 129 of file LArFCAL_region.cxx.

130 {
131  return m_nextSampReg;
132 }

◆ numberOfEta()

short int LArFCAL_region::numberOfEta ( ) const

number of eta bins in the whole region

Definition at line 46 of file LArFCAL_region.cxx.

47 {
48  return m_nbEtaBins ;
49 }

◆ phiGranularity()

float LArFCAL_region::phiGranularity ( ) const

phi granularity

Definition at line 61 of file LArFCAL_region.cxx.

62 {
63  return m_granulPhi ;
64 }

◆ phiMax()

float LArFCAL_region::phiMax ( ) const

end phi

Definition at line 86 of file LArFCAL_region.cxx.

87 {
88  return (m_minPhi + m_nPhi*m_granulPhi) ;
89 }

◆ phiMin()

float LArFCAL_region::phiMin ( ) const

starting phi

Definition at line 81 of file LArFCAL_region.cxx.

82 {
83  return m_minPhi ;
84 }

◆ phiN()

short int LArFCAL_region::phiN ( ) const

number of phi bins

Definition at line 51 of file LArFCAL_region.cxx.

52 {
53  return m_nPhi ;
54 }

◆ prevSamplingRegion()

short int LArFCAL_region::prevSamplingRegion ( ) const

region number of the prev region in sampling

Definition at line 134 of file LArFCAL_region.cxx.

135 {
136  return m_prevSampReg;
137 }

Member Data Documentation

◆ m_fullSym

bool LArFCAL_region::m_fullSym
private

Definition at line 92 of file LArFCAL_region.h.

◆ m_granulEta

float LArFCAL_region::m_granulEta
private

Definition at line 89 of file LArFCAL_region.h.

◆ m_granulPhi

float LArFCAL_region::m_granulPhi
private

Definition at line 91 of file LArFCAL_region.h.

◆ m_hashMin

unsigned int LArFCAL_region::m_hashMin
private

Definition at line 85 of file LArFCAL_region.h.

◆ m_minEta

float LArFCAL_region::m_minEta
private

Definition at line 88 of file LArFCAL_region.h.

◆ m_minPhi

float LArFCAL_region::m_minPhi
private

Definition at line 90 of file LArFCAL_region.h.

◆ m_nbEtaBins

short int LArFCAL_region::m_nbEtaBins
private

Definition at line 86 of file LArFCAL_region.h.

◆ m_nextSampReg

short int LArFCAL_region::m_nextSampReg
private

Definition at line 95 of file LArFCAL_region.h.

◆ m_nPhi

short int LArFCAL_region::m_nPhi
private

Definition at line 87 of file LArFCAL_region.h.

◆ m_prevSampReg

short int LArFCAL_region::m_prevSampReg
private

Definition at line 94 of file LArFCAL_region.h.


The documentation for this class was generated from the following files:
LArFCAL_region::m_hashMin
unsigned int m_hashMin
Definition: LArFCAL_region.h:85
get_generator_info.result
result
Definition: get_generator_info.py:21
index
Definition: index.py:1
LArFCAL_region::m_granulEta
float m_granulEta
Definition: LArFCAL_region.h:89
TrigVSI::AlgConsts::nPhi
constexpr int nPhi
Default bin number of phi for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:27
LArFCAL_region::m_prevSampReg
short int m_prevSampReg
Definition: LArFCAL_region.h:94
LArFCAL_region::m_minPhi
float m_minPhi
Definition: LArFCAL_region.h:90
LArFCAL_region::m_fullSym
bool m_fullSym
Definition: LArFCAL_region.h:92
LArFCAL_region::m_nextSampReg
short int m_nextSampReg
Definition: LArFCAL_region.h:95
LArFCAL_region::m_minEta
float m_minEta
Definition: LArFCAL_region.h:88
LArFCAL_region::m_nPhi
short int m_nPhi
Definition: LArFCAL_region.h:87
LArFCAL_region::hashMax
unsigned int hashMax() const
hash Id of the last cell of the region +1
Definition: LArFCAL_region.cxx:96
LArFCAL_region::m_granulPhi
float m_granulPhi
Definition: LArFCAL_region.h:91
LArFCAL_region::m_nbEtaBins
short int m_nbEtaBins
Definition: LArFCAL_region.h:86