ATLAS Offline Software
Loading...
Searching...
No Matches
LArEM_region.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LAREM_REGION_H
6#define LAREM_REGION_H
7
8
9#include <vector>
10
11 enum { NOT_VALID_REGION = 63 };
12
18
20{
21public:
22
24
25 LArEM_region(unsigned int& minHash, short int& nbEtaBins, short int& nPhi,
26 float minEta, float granulEta, float minPhi, float granulPhi, bool fullSym, bool isBarrelMiddle,
27 short int& prevEtaReg, short int& nextEtaReg,
28 std::vector<short int>& prevSampReg, std::vector<short int>& nextSampReg,
29 std::vector<short int>& prevSubdetReg, std::vector<short int>& nextSubdetReg);
30
32
34 short int numberOfEta() const { return m_nbEtaBins ; }
35
37 short int phiN() const { return m_nPhi ; }
38
40 float etaGranularity() const { return m_granulEta ; }
41
43 float phiGranularity() const { return m_granulPhi ; }
44
46 bool fullTwoPi() const { return m_fullSym ; }
47
50
52 float etaMin() const { return m_minEta ; }
53
55 float etaMax() const { return (m_minEta + m_nbEtaBins*m_granulEta) ; }
56
58 float phiMin() const { return m_minPhi ; }
59
61 float phiMax() const { return (m_minPhi + m_nPhi*m_granulPhi) ; }
62
64 unsigned int hashMin() const { return m_hashMin ; }
65
67 unsigned int hashMax() const { return (m_hashMin + m_nbEtaBins * m_nPhi) ; }
68
70 short int prevEtaRegion() const { return m_prevEtaReg; }
71
73 short int nextEtaRegion() const { return m_nextEtaReg; }
74
76 bool isEtaMin(unsigned int index) const {
77 return ((m_hashMin<=index) && (index<(m_hashMin+m_nPhi)));
78 }
79
81 bool isEtaMax(unsigned int index) const {
82 return ((hashMax()-m_nPhi)<=index) && (index<hashMax());
83 }
84
86 bool isPhiMin(unsigned int index) const {
87 return !m_fullSym && (index-m_hashMin)%m_nPhi == 0;
88 }
89
91 bool isPhiMax(unsigned int index) const {
92 return !m_fullSym && (index-m_hashMin+1)%m_nPhi == 0;
93 }
94
96 const std::vector<short int>& prevSamplingRegion() const { return m_prevSampReg; }
97
99 const std::vector<short int>& nextSamplingRegion() const { return m_nextSampReg; }
100
102 const std::vector<short int>& prevSubdetRegion() const { return m_prevSubdetReg; }
103
105 const std::vector<short int>& nextSubdetRegion() const { return m_nextSubdetReg; }
106
107private:
108
109 unsigned int m_hashMin;
110 short int m_nbEtaBins;
111 short int m_nPhi;
112 float m_minEta;
114 float m_minPhi;
118
119 short int m_prevEtaReg;
120 short int m_nextEtaReg;
121 std::vector<short int> m_prevSampReg;
122 std::vector<short int> m_nextSampReg;
123 std::vector<short int> m_prevSubdetReg;
124 std::vector<short int> m_nextSubdetReg;
125
126};
127
128#endif // LAREM_REGION_H
@ NOT_VALID_REGION
float phiGranularity() const
phi granularity
std::vector< short int > m_prevSubdetReg
short int m_nextEtaReg
const std::vector< short int > & prevSamplingRegion() const
region number of the prev region in sampling
short int m_nPhi
const std::vector< short int > & nextSubdetRegion() const
region number of the next region in subdet
short int nextEtaRegion() const
region number of the next region in eta
bool isEtaMax(unsigned int index) const
is the considered cell in the last eta bin 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
float etaGranularity() const
eta granularity
float etaMax() const
end eta
bool m_isFirstBarrelRegion
std::vector< short int > m_nextSampReg
const std::vector< short int > & nextSamplingRegion() const
region number of the next region in sampling
unsigned int m_hashMin
unsigned int hashMin() const
hash Id of the first cell of the region
std::vector< short int > m_nextSubdetReg
short int numberOfEta() const
number of eta bins in the whole region
bool fullTwoPi() const
true if detector covers full 2pi (== wraparound option in dictionary)
const std::vector< short int > & prevSubdetRegion() const
region number of the prev region in subdet
std::vector< short int > m_prevSampReg
bool isFirstBarrelRegion() const
true if region close to barrel middle
float phiMax() const
end phi
short int m_prevEtaReg
float etaMin() const
starting eta
short int m_nbEtaBins
float phiMin() const
starting phi
bool isPhiMin(unsigned int index) const
is the considered cell in the first phi bin of the region ?
short int phiN() const
number of phi bins
bool isEtaMin(unsigned int index) const
is the considered cell in the first eta bin of the region ?
bool isPhiMax(unsigned int index) const
is the considered cell in the last phi bin of the region ?
Definition index.py:1