ATLAS Offline Software
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"
29 class 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 
107  HECDetDescr(const HECDetDescr &right);
110  unsigned int m_samplingIndex;
111  unsigned int m_regionIndex;
112  CellBinning m_phiBinning;
113  unsigned int m_outerRadSegNumber;
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 
127 inline double HECDetDescr::getZMin (unsigned int block) const
128 {
129 
130  return m_zMin[block];
131 
132 }
133 
134 inline double HECDetDescr::getZMax (unsigned int block) const
135 {
136 
137  return m_zMax[block];
138 
139 }
140 
141 inline double HECDetDescr::getRMin (unsigned int block, unsigned int eta) const
142 {
143 
144 
145  // Check that it exists:
147  if (!segment) throw std::range_error("Error in HECDetDescr, nonexistent segment.");
148 
149  // Return value:
150  return segment->getMinVal();
151 
152 
153 }
154 
155 inline double HECDetDescr::getRMax (unsigned int block, unsigned int eta) const
156 {
157 
158 
159  // Check that it exists:
161  if (!segment) throw std::range_error("Error in HECDetDescr, nonexistent segment.");
162 
163  // Return value:
164  return segment->getMaxVal();
165 
166 
167 }
168 
169 inline 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 
181  return segment;
182 
183 }
184 
185 inline 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 
201 inline unsigned int HECDetDescr::getSamplingIndex () const
202 {
203 
204  return m_samplingIndex;
205 
206 }
207 
208 inline unsigned int HECDetDescr::getRegionIndex () const
209 {
210 
211  return m_regionIndex;
212 
213 }
214 
215 inline const CellBinning& HECDetDescr::getPhiBinning () const
216 {
217 
218  return m_phiBinning;
219 
220 }
221 
222 inline const CellBinning& HECDetDescr::getEtaBinning () const
223 {
224 
225  return m_etaBinning;
226 
227 }
228 
229 inline unsigned int HECDetDescr::getNumBlocks () const
230 {
231 
232  return m_numBlocks;
233 
234 }
235 
236 
237 
238 
239 
240 #endif
HECDetDescr::m_numBlocks
unsigned int m_numBlocks
Definition: HECDetDescr.h:115
HECDetDescr::m_regionIndex
unsigned int m_regionIndex
Definition: HECDetDescr.h:111
HECDetDescr::getRMin
double getRMin(unsigned int block, unsigned int eta) const
Returns min r for block i.
Definition: HECDetDescr.h:141
HECDetDescr::getRadialSegment
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.
Definition: HECDetDescr.h:169
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
HECDetDescr::getZMax
double getZMax(unsigned int block) const
Returns max z for the ith block at eta index.
Definition: HECDetDescr.h:134
index
Definition: index.py:1
HECDetDescr::getRegionIndex
unsigned int getRegionIndex() const
The region Index.
Definition: HECDetDescr.h:208
HECDetDescr::HECDetDescr
HECDetDescr(const HECDetDescr &right)
HECDetDescr::m_firstBlock
unsigned int m_firstBlock
Definition: HECDetDescr.h:116
HECDetDescr::m_manager
const HECDetectorManager * m_manager
Definition: HECDetDescr.h:109
HECDetDescr::HECDetDescr
HECDetDescr(const HECDetectorManager *detManager, unsigned int sampling, unsigned int region, const CellBinning &phiBinning, bool isTestBeam=false)
Constructor.
Definition: HECDetDescr.cxx:17
HECDetDescr::m_samplingIndex
unsigned int m_samplingIndex
Definition: HECDetDescr.h:110
HECDetDescr::~HECDetDescr
~HECDetDescr()
Destructor.
HECDetDescr::getBlockIndex
unsigned int getBlockIndex(unsigned int block) const
Gets the block index for the ith block (in case it is ever needed).
Definition: HECDetDescr.h:185
HECDetDescr::getRMax
double getRMax(unsigned int block, unsigned int eta) const
Returns max r at block i.
Definition: HECDetDescr.h:155
HECDetDescr::m_etaBinning
CellBinning m_etaBinning
Definition: HECDetDescr.h:114
HECDetDescr
Descriptor for regions of the hadronic endcap calorimeter.
Definition: HECDetDescr.h:30
HECDetDescr::getEtaBinning
const CellBinning & getEtaBinning() const
The Binning in Eta.
Definition: HECDetDescr.h:222
HECDetDescr::getManager
const HECDetectorManager * getManager() const
The manager.
Definition: HECDetDescr.h:194
HECLongBlock
Definition: HECLongBlock.h:32
HECDetectorManager
A manager class providing access to readout geometry information for the hadronic endcap calorimeter.
Definition: HECDetectorManager.h:28
HECDetectorManager::getBlock
const HECLongBlock * getBlock(unsigned int i) const
Random Access to Blocks.
Definition: HECDetectorManager.cxx:160
HECDetDescr::getNumBlocks
unsigned int getNumBlocks() const
Number of blocks in the region.
Definition: HECDetDescr.h:229
HECDetDescr::m_phiBinning
CellBinning m_phiBinning
Definition: HECDetDescr.h:112
HECDetDescr::m_zMin
std::vector< double > m_zMin
Definition: HECDetDescr.h:117
HECRadialSegment
Description of a radial segment of a HEC module.
Definition: HECRadialSegment.h:20
HECDetDescr::getPhiBinning
const CellBinning & getPhiBinning() const
The Binning in Phi.
Definition: HECDetDescr.h:215
HECDetDescr::getSamplingIndex
unsigned int getSamplingIndex() const
The sampling index.
Definition: HECDetDescr.h:201
HECLongBlock::getRadialSegment
const HECRadialSegment * getRadialSegment(unsigned int i) const
Returns a radial segment if it exists.
Definition: HECLongBlock.h:126
HECDetDescr::operator=
HECDetDescr & operator=(const HECDetDescr &right)
HECDetDescr::m_zMax
std::vector< double > m_zMax
Definition: HECDetDescr.h:118
HECDetDescr::m_outerRadSegNumber
unsigned int m_outerRadSegNumber
Definition: HECDetDescr.h:113
HECDetectorManager.h
HECDetDescr::getZMin
double getZMin(unsigned int block) const
Returns min z for the ith block at eta index.
Definition: HECDetDescr.h:127
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5