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

Simple class to mainly store eta/phi information (indices, granularity, trigger tower coordinates) as determined by the channel mappings classes. More...

#include <L1CaloDetectorRegion.h>

Collaboration diagram for L1CaloDetectorRegion:

Public Types

enum  ObjectTypeEnum {
  PPM = 0 , CPM , JEM , EFEX ,
  JFEX , GFEX , NONE
}
enum  LayerTypeEnum {
  Electromagnetic = 0 , Hadronic , HadFcal2 , HadFcal3 ,
  Presampler , Front , Middle , Back ,
  Both , None
}

Public Member Functions

 L1CaloDetectorRegion ()
 L1CaloDetectorRegion (ObjectTypeEnum, LayerTypeEnum, bool, int, int, double, double, double, double)
 ~L1CaloDetectorRegion ()
bool operator== (const L1CaloDetectorRegion &rhs)
int getEtaIndex () const
int getPhiIndex () const
double getEtaBinWidth () const
double getPhiBinWidth () const
double getEtaCoordinate () const
double getPhiCoordinate () const
bool getValidity () const
ObjectTypeEnum getObjectType () const
LayerTypeEnum getLayer () const
double getEtaMin () const
double getEtaMax () const
double getPhiMin () const
double getPhiMax () const
std::string layerToString ()
 Method to convert the enumerated type 'layer' to string.
std::string objectTypeToString ()
 Method to convert the enumerated type 'object' to string.
CaloDivision getCaloDivision () const
 Method to return the calorimeter partition for this region.
unsigned int getEtaLetterBit () const
 Method to return the bit number of the eta "letter".
unsigned int getPhiLetterBit () const
 Method to return the bit number of the phi "letter".
bool isDisabled (unsigned int caloDivisionsDisabled, unsigned int etaLetterBitsDisabled, unsigned int phiLetterBitsDisabled) const
 Method to check this region against patterns of disabled areas: caloDisabled bit pattern of disabled divisions of the calorimeter etaDisabled bit pattern of disabled strips in eta (mainly 0.4) phiDisabled bit pattern of disabled strips in phi (0.4)
bool isCaloDisabled (unsigned int caloDivisionsDisabled) const
 Method to check this region against patterns of disabled areas: caloDisabled bit pattern of disabled divisions of the calorimeter.
bool isEtaPhiDisabled (unsigned int etaLetterBitsDisabled, unsigned int phiLetterBitsDisabled) const
 Method to check this region against patterns of disabled areas: etaDisabled bit pattern of disabled strips in eta (mainly 0.4) phiDisabled bit pattern of disabled strips in phi (0.4)
void printInfo ()
 Print the content of the L1CaloDetectorRegion object.

Private Attributes

ObjectTypeEnum m_object
LayerTypeEnum m_layer
bool m_valid
 validity of the mapped channel
int m_etaIdx
 eta index
int m_phiIdx
 phi index
double m_etaBinWidth
 eta granularity
double m_phiBinWidth
 phi granularity
double m_etaCoord
 eta coordinate of the trigger tower
double m_phiCoord
 phi coordinate of the trigger tower
double m_etaMin
 lower eta bounds of tower
double m_etaMax
 upper eta bounds of tower
double m_phiMin
 lower phi bounds of tower
double m_phiMax
 upper phi bounds of tower

Detailed Description

Simple class to mainly store eta/phi information (indices, granularity, trigger tower coordinates) as determined by the channel mappings classes.

Additionally, it stores information about the object and detector layer types (as enumerated types), and about the validity of the mapped channel (as boolean value).

Definition at line 8 of file L1CaloDetectorRegion.h.

Member Enumeration Documentation

◆ LayerTypeEnum

◆ ObjectTypeEnum

Constructor & Destructor Documentation

◆ L1CaloDetectorRegion() [1/2]

L1CaloDetectorRegion::L1CaloDetectorRegion ( )

Definition at line 18 of file L1CaloDetectorRegion.cxx.

20, m_valid (false)
21, m_etaIdx (99), m_phiIdx (99)
22, m_etaBinWidth (99.), m_phiBinWidth (99.)
23, m_etaCoord (99.), m_phiCoord (99.)
24, m_etaMin (99.), m_etaMax(99.)
25, m_phiMin (99.), m_phiMax(99.)
26{
27}
double m_etaMin
lower eta bounds of tower
double m_phiMax
upper phi bounds of tower
bool m_valid
validity of the mapped channel
double m_etaBinWidth
eta granularity
double m_etaCoord
eta coordinate of the trigger tower
double m_phiMin
lower phi bounds of tower
double m_phiCoord
phi coordinate of the trigger tower
double m_etaMax
upper eta bounds of tower
double m_phiBinWidth
phi granularity

◆ L1CaloDetectorRegion() [2/2]

L1CaloDetectorRegion::L1CaloDetectorRegion ( ObjectTypeEnum object,
LayerTypeEnum layer,
bool valid,
int etaIdx,
int phiIdx,
double etaBinWidth,
double phiBinWidth,
double etaCoord,
double phiCoord )

Definition at line 33 of file L1CaloDetectorRegion.cxx.

42: m_object (object), m_layer (layer)
43, m_valid (valid)
44, m_etaIdx (etaIdx), m_phiIdx (phiIdx)
45, m_etaBinWidth (etaBinWidth), m_phiBinWidth (phiBinWidth)
46, m_etaCoord (etaCoord), m_phiCoord (phiCoord)
47, m_etaMin (etaCoord-0.5*etaBinWidth)
48, m_etaMax (etaCoord+0.5*etaBinWidth)
49, m_phiMin (phiCoord-0.5*phiBinWidth)
50, m_phiMax (phiCoord+0.5*phiBinWidth)
51{
52}

◆ ~L1CaloDetectorRegion()

L1CaloDetectorRegion::~L1CaloDetectorRegion ( )

Definition at line 58 of file L1CaloDetectorRegion.cxx.

58 {
59}

Member Function Documentation

◆ getCaloDivision()

CaloDivision L1CaloDetectorRegion::getCaloDivision ( ) const

Method to return the calorimeter partition for this region.

There are sixteen possibilities, roughly following the TTC partitions in the calorimeters (four Tile, six LAr) but with some extra divisions for the EM barrel/endcap overlap regions and with the FCAL separate from the EMEC and HEC partitions.

Definition at line 140 of file L1CaloDetectorRegion.cxx.

140 {
141 CaloDivision part = CaloDivision::Invalid;
142 if (this->getLayer() == Electromagnetic) {
143 if (m_etaIdx < -32) { part = CaloDivision::LArFCAL1C; }
144 else if (m_etaIdx < -15) { part = CaloDivision::LArEMECC; }
145 else if (m_etaIdx < -14) { part = CaloDivision::LArOverlapC; }
146 else if (m_etaIdx < 0) { part = CaloDivision::LArEMBC; }
147 else if (m_etaIdx < 14) { part = CaloDivision::LArEMBA; }
148 else if (m_etaIdx < 15) { part = CaloDivision::LArOverlapA; }
149 else if (m_etaIdx < 32) { part = CaloDivision::LArEMECA; }
150 else { part = CaloDivision::LArFCAL1A; }
151 }
152 else {
153 if (m_etaIdx < -32) { part = CaloDivision::LArFCAL23C; }
154 else if (m_etaIdx < -15) { part = CaloDivision::LArHECC; }
155 else if (m_etaIdx < -9) { part = CaloDivision::TileEBC; }
156 else if (m_etaIdx < 0) { part = CaloDivision::TileLBC; }
157 else if (m_etaIdx < 9) { part = CaloDivision::TileLBA; }
158 else if (m_etaIdx < 15) { part = CaloDivision::TileEBA; }
159 else if (m_etaIdx < 32) { part = CaloDivision::LArHECA; }
161 }
162 return part;
163}
LayerTypeEnum getLayer() const

◆ getEtaBinWidth()

double L1CaloDetectorRegion::getEtaBinWidth ( ) const
inline

Definition at line 46 of file L1CaloDetectorRegion.h.

46{return m_etaBinWidth;};

◆ getEtaCoordinate()

double L1CaloDetectorRegion::getEtaCoordinate ( ) const
inline

Definition at line 48 of file L1CaloDetectorRegion.h.

48{return m_etaCoord;};

◆ getEtaIndex()

int L1CaloDetectorRegion::getEtaIndex ( ) const
inline

Definition at line 44 of file L1CaloDetectorRegion.h.

44{return m_etaIdx;};

◆ getEtaLetterBit()

unsigned int L1CaloDetectorRegion::getEtaLetterBit ( ) const

Method to return the bit number of the eta "letter".

Here we just use 16 bits which each roughly correspond to a 0.4 strip in eta except towards the endcaps. In contrast to the cabling document which adds non hex letters Z and G to represent the FCAL, here we lump the FCAL in with the neighbouring areas (letters 0 and F). So bits 0,F are +-2.9 to +-4.9, bits 1,E are +-2.4 to +-2.9 and all the rest are regular divisions of 0.4.

Definition at line 179 of file L1CaloDetectorRegion.cxx.

179 {
180 unsigned int bit = 16; // Invalid
181 if (m_etaIdx < -29) { bit = 0; }
182 else if (m_etaIdx < -24) { bit = 1; }
183 else if (m_etaIdx >= 29) { bit = 15; }
184 else if (m_etaIdx >= 24) { bit = 14; }
185 else { bit = ((m_etaIdx + 24) / 4) + 2; }
186 return bit;
187}

◆ getEtaMax()

double L1CaloDetectorRegion::getEtaMax ( ) const
inline

Definition at line 54 of file L1CaloDetectorRegion.h.

54{ return m_etaMax; }

◆ getEtaMin()

double L1CaloDetectorRegion::getEtaMin ( ) const
inline

Definition at line 53 of file L1CaloDetectorRegion.h.

53{ return m_etaMin; }

◆ getLayer()

LayerTypeEnum L1CaloDetectorRegion::getLayer ( ) const
inline

Definition at line 52 of file L1CaloDetectorRegion.h.

52{ return m_layer; }

◆ getObjectType()

ObjectTypeEnum L1CaloDetectorRegion::getObjectType ( ) const
inline

Definition at line 51 of file L1CaloDetectorRegion.h.

51{ return m_object; }

◆ getPhiBinWidth()

double L1CaloDetectorRegion::getPhiBinWidth ( ) const
inline

Definition at line 47 of file L1CaloDetectorRegion.h.

47{return m_phiBinWidth;};

◆ getPhiCoordinate()

double L1CaloDetectorRegion::getPhiCoordinate ( ) const
inline

Definition at line 49 of file L1CaloDetectorRegion.h.

49{return m_phiCoord;};

◆ getPhiIndex()

int L1CaloDetectorRegion::getPhiIndex ( ) const
inline

Definition at line 45 of file L1CaloDetectorRegion.h.

45{return m_phiIdx;};

◆ getPhiLetterBit()

unsigned int L1CaloDetectorRegion::getPhiLetterBit ( ) const

Method to return the bit number of the phi "letter".

The follows the cabling document using hex letters to divide the 64 phi bins into 16 strips of 0.4 each.

Definition at line 198 of file L1CaloDetectorRegion.cxx.

198 {
199 unsigned int bit = 16; // Invalid
200 if (m_phiIdx >= 0 && m_phiIdx < 64) { bit = m_phiIdx / 4; }
201 return bit;
202}

◆ getPhiMax()

double L1CaloDetectorRegion::getPhiMax ( ) const
inline

Definition at line 56 of file L1CaloDetectorRegion.h.

56{ return m_phiMax; }

◆ getPhiMin()

double L1CaloDetectorRegion::getPhiMin ( ) const
inline

Definition at line 55 of file L1CaloDetectorRegion.h.

55{ return m_phiMin; }

◆ getValidity()

bool L1CaloDetectorRegion::getValidity ( ) const
inline

Definition at line 50 of file L1CaloDetectorRegion.h.

50{return m_valid;};

◆ isCaloDisabled()

bool L1CaloDetectorRegion::isCaloDisabled ( unsigned int caloDivisionsDisabled) const

Method to check this region against patterns of disabled areas: caloDisabled bit pattern of disabled divisions of the calorimeter.

Definition at line 235 of file L1CaloDetectorRegion.cxx.

235 {
236
237 unsigned int caloBit = this->getCaloDivision().getEnum();
238 bool ret = (((1 << caloBit) & caloDivisionsDisabled) != 0);
239 return ret;
240}
CaloDivisionEnum getEnum() const
CaloDivision getCaloDivision() const
Method to return the calorimeter partition for this region.

◆ isDisabled()

bool L1CaloDetectorRegion::isDisabled ( unsigned int caloDivisionsDisabled,
unsigned int etaLetterBitsDisabled,
unsigned int phiLetterBitsDisabled ) const

Method to check this region against patterns of disabled areas: caloDisabled bit pattern of disabled divisions of the calorimeter etaDisabled bit pattern of disabled strips in eta (mainly 0.4) phiDisabled bit pattern of disabled strips in phi (0.4)

Definition at line 214 of file L1CaloDetectorRegion.cxx.

216 {
217
218 unsigned int caloBit = this->getCaloDivision().getEnum();
219 unsigned int etaBit = this->getEtaLetterBit();
220 unsigned int phiBit = this->getPhiLetterBit();
221 bool ret = (((1 << caloBit) & caloDivisionsDisabled) != 0) ||
222 (((1 << etaBit) & etaLetterBitsDisabled) != 0) ||
223 (((1 << phiBit) & phiLetterBitsDisabled) != 0);
224 return ret;
225}
unsigned int getPhiLetterBit() const
Method to return the bit number of the phi "letter".
unsigned int getEtaLetterBit() const
Method to return the bit number of the eta "letter".

◆ isEtaPhiDisabled()

bool L1CaloDetectorRegion::isEtaPhiDisabled ( unsigned int etaLetterBitsDisabled,
unsigned int phiLetterBitsDisabled ) const

Method to check this region against patterns of disabled areas: etaDisabled bit pattern of disabled strips in eta (mainly 0.4) phiDisabled bit pattern of disabled strips in phi (0.4)

Definition at line 251 of file L1CaloDetectorRegion.cxx.

252 {
253
254 unsigned int etaBit = this->getEtaLetterBit();
255 unsigned int phiBit = this->getPhiLetterBit();
256 bool ret = (((1 << etaBit) & etaLetterBitsDisabled) != 0) ||
257 (((1 << phiBit) & phiLetterBitsDisabled) != 0);
258 return ret;
259}

◆ layerToString()

std::string L1CaloDetectorRegion::layerToString ( )

Method to convert the enumerated type 'layer' to string.

Definition at line 110 of file L1CaloDetectorRegion.cxx.

110 {
111
112 std::string layer;
113 switch ( this->getLayer() ) {
114 case Electromagnetic: layer = "Electromagnetic"; break;
115 case Hadronic: layer = "Hadronic"; break;
116 case HadFcal2: layer = "HadFcal2"; break;
117 case HadFcal3: layer = "HadFcal3"; break;
118 case Presampler: layer = "Presampler"; break;
119 case Front: layer = "Front"; break;
120 case Middle: layer = "Middle"; break;
121 case Back: layer = "Back"; break;
122 case Both: layer = "Both"; break;
123 case None: layer = "None"; break;
124 }
125
126 return layer;
127}
@ layer
Definition HitInfo.h:79

◆ objectTypeToString()

std::string L1CaloDetectorRegion::objectTypeToString ( )

Method to convert the enumerated type 'object' to string.

Definition at line 87 of file L1CaloDetectorRegion.cxx.

87 {
88
89 std::string object;
90 switch ( this->getObjectType() ) {
91 case PPM: object = "PPM"; break;
92 case CPM: object = "CPM"; break;
93 case JEM: object = "JEM"; break;
94 case EFEX: object = "EFEX"; break;
95 case JFEX: object = "JFEX"; break;
96 case GFEX: object = "GFEX"; break;
97 case NONE: object = "NONE"; break;
98 }
99
100 return object;
101}
ObjectTypeEnum getObjectType() const

◆ operator==()

bool L1CaloDetectorRegion::operator== ( const L1CaloDetectorRegion & rhs)

Definition at line 66 of file L1CaloDetectorRegion.cxx.

66 {
67 if ( m_object != rhs.m_object )
68 return false;
69 if ( m_layer != rhs.m_layer )
70 return false;
71 if ( m_valid != rhs.m_valid )
72 return false;
73 if ( m_etaIdx != rhs.m_etaIdx )
74 return false;
75 if ( m_phiIdx != rhs.m_phiIdx )
76 return false;
77 return true;
78}

◆ printInfo()

void L1CaloDetectorRegion::printInfo ( )

Print the content of the L1CaloDetectorRegion object.

Definition at line 268 of file L1CaloDetectorRegion.cxx.

268 {
269
270 std::cout << "Region Object Type: " << objectTypeToString()
271 << " Layer: " << layerToString() << std::endl;
272 std::cout << " Valid Channel: "
273 << (getValidity() ? "yes" : "no") << std::endl;
274
275 if (m_valid) {
276 std::cout << " EtaIndex: " << getEtaIndex()
277 << " PhiIndex: " << getPhiIndex() << std::endl;
278 std::cout << " EtaBinWidth: " << getEtaBinWidth()
279 << " PhiBinWidth: " << getPhiBinWidth() << std::endl;
280 std::cout << " EtaCoordinate: " << getEtaCoordinate()
281 << " PhiCoordinate: " << getPhiCoordinate() << std::endl;
282 }
283
284 std::cout << std::endl;
285}
double getEtaCoordinate() const
std::string layerToString()
Method to convert the enumerated type 'layer' to string.
std::string objectTypeToString()
Method to convert the enumerated type 'object' to string.
double getPhiCoordinate() const

Member Data Documentation

◆ m_etaBinWidth

double L1CaloDetectorRegion::m_etaBinWidth
private

eta granularity

Definition at line 85 of file L1CaloDetectorRegion.h.

◆ m_etaCoord

double L1CaloDetectorRegion::m_etaCoord
private

eta coordinate of the trigger tower

Definition at line 87 of file L1CaloDetectorRegion.h.

◆ m_etaIdx

int L1CaloDetectorRegion::m_etaIdx
private

eta index

Definition at line 83 of file L1CaloDetectorRegion.h.

◆ m_etaMax

double L1CaloDetectorRegion::m_etaMax
private

upper eta bounds of tower

Definition at line 90 of file L1CaloDetectorRegion.h.

◆ m_etaMin

double L1CaloDetectorRegion::m_etaMin
private

lower eta bounds of tower

Definition at line 89 of file L1CaloDetectorRegion.h.

◆ m_layer

LayerTypeEnum L1CaloDetectorRegion::m_layer
private

Definition at line 79 of file L1CaloDetectorRegion.h.

◆ m_object

ObjectTypeEnum L1CaloDetectorRegion::m_object
private

Definition at line 78 of file L1CaloDetectorRegion.h.

◆ m_phiBinWidth

double L1CaloDetectorRegion::m_phiBinWidth
private

phi granularity

Definition at line 86 of file L1CaloDetectorRegion.h.

◆ m_phiCoord

double L1CaloDetectorRegion::m_phiCoord
private

phi coordinate of the trigger tower

Definition at line 88 of file L1CaloDetectorRegion.h.

◆ m_phiIdx

int L1CaloDetectorRegion::m_phiIdx
private

phi index

Definition at line 84 of file L1CaloDetectorRegion.h.

◆ m_phiMax

double L1CaloDetectorRegion::m_phiMax
private

upper phi bounds of tower

Definition at line 92 of file L1CaloDetectorRegion.h.

◆ m_phiMin

double L1CaloDetectorRegion::m_phiMin
private

lower phi bounds of tower

Definition at line 91 of file L1CaloDetectorRegion.h.

◆ m_valid

bool L1CaloDetectorRegion::m_valid
private

validity of the mapped channel

Definition at line 80 of file L1CaloDetectorRegion.h.


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