ATLAS Offline Software
Loading...
Searching...
No Matches
HECDetDescr.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 LARREADOUTGEOMETRY_HECDETDESCR_H
6#define LARREADOUTGEOMETRY_HECDETDESCR_H
8#include "GeoModelKernel/CellBinning.h"
9#include "GeoModelKernel/RCBase.h"
13
29class HECDetDescr : public RCBase
30{
31
32 public:
33
34
38 HECDetDescr (const HECDetectorManager *detManager, unsigned int sampling, unsigned int region, const CellBinning &phiBinning, bool isTestBeam = false);
39
44
48 double getZMin (unsigned int block) const;
49
53 double getZMax (unsigned int block) const;
54
58 double getRMin (unsigned int block, unsigned int eta) const;
59
63 double getRMax (unsigned int block, unsigned int eta) const;
64
68 const HECRadialSegment * getRadialSegment (unsigned int block, unsigned int eta) const;
69
73 unsigned int getBlockIndex (unsigned int block) const;
74
78 const HECDetectorManager * getManager () const;
79
83 unsigned int getSamplingIndex () const;
84
88 unsigned int getRegionIndex () const;
89
93 const CellBinning& getPhiBinning () const;
94
98 const CellBinning& getEtaBinning () const;
99
103 unsigned int getNumBlocks () const;
104
105 private:
106
110 unsigned int m_samplingIndex;
111 unsigned int m_regionIndex;
112 CellBinning m_phiBinning;
114 CellBinning m_etaBinning;
115 unsigned int m_numBlocks;
116 unsigned int m_firstBlock;
117 std::vector<double> m_zMin;
118 std::vector<double> m_zMax;
119};
120
121
122
123
124
125
126
127inline double HECDetDescr::getZMin (unsigned int block) const
128{
129
130 return m_zMin[block];
131
132}
133
134inline double HECDetDescr::getZMax (unsigned int block) const
135{
136
137 return m_zMax[block];
138
139}
140
141inline double HECDetDescr::getRMin (unsigned int block, unsigned int eta) const
142{
143
144
145 // Check that it exists:
146 const HECRadialSegment *segment = getRadialSegment(block,eta);
147 if (!segment) throw std::range_error("Error in HECDetDescr, nonexistent segment.");
148
149 // Return value:
150 return segment->getMinVal();
151
152
153}
154
155inline double HECDetDescr::getRMax (unsigned int block, unsigned int eta) const
156{
157
158
159 // Check that it exists:
160 const HECRadialSegment *segment = getRadialSegment(block,eta);
161 if (!segment) throw std::range_error("Error in HECDetDescr, nonexistent segment.");
162
163 // Return value:
164 return segment->getMaxVal();
165
166
167}
168
169inline const HECRadialSegment * HECDetDescr::getRadialSegment (unsigned int block, unsigned int eta) const
170{
171
172 // Get the block.
173 const HECLongBlock *bPtr = getManager()->getBlock(getBlockIndex(block));
174 // Check that it exists:
175 if (!bPtr) throw std::range_error("Error in HECDetDescr, nonexistent block.");
176
177 // From the block, get the radial segment:
178 unsigned int index = m_outerRadSegNumber-eta;
179
180 const HECRadialSegment *segment=bPtr->getRadialSegment(index);
181 return segment;
182
183}
184
185inline unsigned int HECDetDescr::getBlockIndex (unsigned int block) const
186{
187
188 return m_firstBlock+block;
189
190}
191
192
193
195{
196
197 return m_manager;
198
199}
200
201inline unsigned int HECDetDescr::getSamplingIndex () const
202{
203
204 return m_samplingIndex;
205
206}
207
208inline unsigned int HECDetDescr::getRegionIndex () const
209{
210
211 return m_regionIndex;
212
213}
214
215inline const CellBinning& HECDetDescr::getPhiBinning () const
216{
217
218 return m_phiBinning;
219
220}
221
222inline const CellBinning& HECDetDescr::getEtaBinning () const
223{
224
225 return m_etaBinning;
226
227}
228
229inline unsigned int HECDetDescr::getNumBlocks () const
230{
231
232 return m_numBlocks;
233
234}
235
236
237
238
239
240#endif
Scalar eta() const
pseudorapidity method
unsigned int m_samplingIndex
unsigned int getBlockIndex(unsigned int block) const
Gets the block index for the ith block (in case it is ever needed).
unsigned int getSamplingIndex() const
The sampling index.
std::vector< double > m_zMin
HECDetDescr(const HECDetDescr &right)
double getRMax(unsigned int block, unsigned int eta) const
Returns max r at block i.
~HECDetDescr()
Destructor.
double getZMax(unsigned int block) const
Returns max z for the ith block at eta index.
const HECDetectorManager * getManager() const
The manager.
unsigned int m_regionIndex
unsigned int getNumBlocks() const
Number of blocks in the region.
CellBinning m_phiBinning
HECDetDescr & operator=(const HECDetDescr &right)
unsigned int m_firstBlock
HECDetDescr(const HECDetectorManager *detManager, unsigned int sampling, unsigned int region, const CellBinning &phiBinning, bool isTestBeam=false)
Constructor.
unsigned int m_outerRadSegNumber
const HECDetectorManager * m_manager
const HECRadialSegment * getRadialSegment(unsigned int block, unsigned int eta) const
Returns the radial segment of in block b with eta index i, or else NULL.
double getRMin(unsigned int block, unsigned int eta) const
Returns min r for block i.
const CellBinning & getPhiBinning() const
The Binning in Phi.
CellBinning m_etaBinning
double getZMin(unsigned int block) const
Returns min z for the ith block at eta index.
std::vector< double > m_zMax
unsigned int m_numBlocks
unsigned int getRegionIndex() const
The region Index.
const CellBinning & getEtaBinning() const
The Binning in Eta.
A manager class providing access to readout geometry information for the hadronic endcap calorimeter.
const HECLongBlock * getBlock(unsigned int i) const
Random Access to Blocks.
const HECRadialSegment * getRadialSegment(unsigned int i) const
Returns a radial segment if it exists.
Description of a radial segment of a HEC module.
double getMaxVal() const
Maximum Range Value.
double getMinVal() const
Minimum Range Value.
Definition index.py:1