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

Descriptor for regions of the hadronic endcap calorimeter. More...

#include <HECDetDescr.h>

Inheritance diagram for HECDetDescr:
Collaboration diagram for HECDetDescr:

Public Member Functions

 HECDetDescr (const HECDetectorManager *detManager, unsigned int sampling, unsigned int region, const CellBinning &phiBinning, bool isTestBeam=false)
 Constructor. More...
 
 ~HECDetDescr ()
 Destructor. More...
 
double getZMin (unsigned int block) const
 Returns min z for the ith block at eta index. More...
 
double getZMax (unsigned int block) const
 Returns max z for the ith block at eta index. More...
 
double getRMin (unsigned int block, unsigned int eta) const
 Returns min r for block i. More...
 
double getRMax (unsigned int block, unsigned int eta) const
 Returns max r at block i. More...
 
const HECRadialSegmentgetRadialSegment (unsigned int block, unsigned int eta) const
 Returns the radial segment of in block b with eta index i, or else NULL. More...
 
unsigned int getBlockIndex (unsigned int block) const
 Gets the block index for the ith block (in case it is ever needed). More...
 
const HECDetectorManagergetManager () const
 The manager. More...
 
unsigned int getSamplingIndex () const
 The sampling index. More...
 
unsigned int getRegionIndex () const
 The region Index. More...
 
const CellBinning & getPhiBinning () const
 The Binning in Phi. More...
 
const CellBinning & getEtaBinning () const
 The Binning in Eta. More...
 
unsigned int getNumBlocks () const
 Number of blocks in the region. More...
 

Private Member Functions

 HECDetDescr (const HECDetDescr &right)
 
HECDetDescroperator= (const HECDetDescr &right)
 

Private Attributes

const HECDetectorManagerm_manager
 
unsigned int m_samplingIndex
 
unsigned int m_regionIndex
 
CellBinning m_phiBinning
 
unsigned int m_outerRadSegNumber
 
CellBinning m_etaBinning
 
unsigned int m_numBlocks
 
unsigned int m_firstBlock
 
std::vector< double > m_zMin
 
std::vector< double > m_zMax
 

Detailed Description

Descriptor for regions of the hadronic endcap calorimeter.

This class describes completely the segmentation in "eta" and phi. Eta appears in quotes because the HEC does not have eta boundaries, it has a staircase of radial boundaries that roughly adhere to an eta value. Keeping that in mind, this region describes the phi granularity of a region of the HEC and the radial and longitudinal division of the cells within the HEC. This descriptor does not need to ever be accessed directly. If you are tempted to use it directly, look first at the HECDetectorRegion and the HECCell class. HECCells obtained from a HECDetectorRegion is normally a preferred way to access all of the information in the HECDetDescr class.

Definition at line 29 of file HECDetDescr.h.

Constructor & Destructor Documentation

◆ HECDetDescr() [1/2]

HECDetDescr::HECDetDescr ( const HECDetectorManager detManager,
unsigned int  sampling,
unsigned int  region,
const CellBinning &  phiBinning,
bool  isTestBeam = false 
)

Constructor.

Definition at line 17 of file HECDetDescr.cxx.

22  : m_manager(detManager)
23  , m_samplingIndex(sampling)
24  , m_regionIndex(region)
25  , m_phiBinning(phiBinning)
26  , m_outerRadSegNumber(region==0 ? 9: 3)
27  , m_etaBinning(0,0,1,0)
28  , m_numBlocks(sampling==0 ? 1:2)
29  , m_firstBlock(sampling==0 ? 0 : 2*sampling-1)
30 {
31  // This will soon be unnecessary (when the wheels are divided!
32  ISvcLocator *svcLocator = Gaudi::svcLocator();
33  IRDBAccessSvc *rdbAccess{nullptr};
34  IGeoModelSvc *geoModel{nullptr};
35  IGeoDbTagSvc *geoDbTagSvc{nullptr};
36 
37  if(svcLocator->service("GeoModelSvc",geoModel) == StatusCode::FAILURE)
38  throw std::runtime_error("Error in HECDetectorManager, cannot access GeoModelSvc");
39 
40  if(svcLocator->service("GeoDbTagSvc",geoDbTagSvc) == StatusCode::FAILURE)
41  throw std::runtime_error("Error in HECDetectorManager, cannot access GeoDbTagSvc");
42 
43  if(svcLocator->service(geoDbTagSvc->getParamSvcName(),rdbAccess) == StatusCode::FAILURE)
44  throw std::runtime_error("Error in HECDetectorManager, cannot access RDBAccessSvc");
45 
46  std::string larKey, larNode;
47  if(geoDbTagSvc->getSqliteReader()==nullptr) {
48  DecodeVersionKey larVersionKey(geoModel, "LAr");
49  larKey = larVersionKey.tag();
50  larNode = larVersionKey.node();
51  }
52 
53 IRDBRecordset_ptr hadronicEndcap = rdbAccess->getRecordsetPtr("HadronicEndcap", larKey, larNode);
54 
55  if (hadronicEndcap->size()==0) throw std::runtime_error("Error getting HadronicEndcap table");
56  // End of soon-to-be-unnecessary part.
57 
58  if(!isTestBeam) {
59  m_etaBinning = CellBinning( region==0 ? (sampling<2 ? 1.5: (sampling<3 ? 1.6: 1.7)) : 2.5,
60  region==0 ? 2.5 : (sampling==0 || sampling==3) ? 3.3 : 3.1,
61  region==0 ? (sampling<2 ? 10: (sampling<3 ? 9:8)) : (sampling==0 || sampling==3) ? 4:3,
62  region==0 ? (sampling<2 ? 0: (sampling<3 ? 1:2)):0);
63  } else {
64  m_etaBinning = CellBinning( region==0 ? (sampling<2 ? 2.1: 2.3) : 2.5,
65  region==0 ? 2.5 : (sampling==0 ) ? 3.3 : 3.1,
66  region==0 ? (sampling<2 ? 4: 2) : (sampling==0) ? 4:3,
67  region==0 ? (sampling<2 ? 6: 8):0);
68  }
69 
70 
71  unsigned int startBlock = m_samplingIndex <2 ? 0 : 3;
72  if(isTestBeam) startBlock = 0;
73  {
74  double pos=0.0;
75  for (unsigned int b=startBlock;b<m_manager->getNumBlocks();b++) {
77  double front = pos;
78  double back = pos+m_manager->getBlock(b)->getDepth();
79  m_zMin.push_back(front);
80  m_zMax.push_back(back);
81  }
83  if(isTestBeam && b==2) pos += (*hadronicEndcap)[0]->getDouble("GAPWHL")*Gaudi::Units::cm;
84  }
85  }
86 }

◆ ~HECDetDescr()

HECDetDescr::~HECDetDescr ( )
default

Destructor.

◆ HECDetDescr() [2/2]

HECDetDescr::HECDetDescr ( const HECDetDescr right)
private

Member Function Documentation

◆ getBlockIndex()

unsigned int HECDetDescr::getBlockIndex ( unsigned int  block) const
inline

Gets the block index for the ith block (in case it is ever needed).

Definition at line 185 of file HECDetDescr.h.

186 {
187 
188  return m_firstBlock+block;
189 
190 }

◆ getEtaBinning()

const CellBinning & HECDetDescr::getEtaBinning ( ) const
inline

The Binning in Eta.

Definition at line 222 of file HECDetDescr.h.

223 {
224 
225  return m_etaBinning;
226 
227 }

◆ getManager()

const HECDetectorManager * HECDetDescr::getManager ( ) const
inline

The manager.

Definition at line 194 of file HECDetDescr.h.

195 {
196 
197  return m_manager;
198 
199 }

◆ getNumBlocks()

unsigned int HECDetDescr::getNumBlocks ( ) const
inline

Number of blocks in the region.

Definition at line 229 of file HECDetDescr.h.

230 {
231 
232  return m_numBlocks;
233 
234 }

◆ getPhiBinning()

const CellBinning & HECDetDescr::getPhiBinning ( ) const
inline

The Binning in Phi.

Definition at line 215 of file HECDetDescr.h.

216 {
217 
218  return m_phiBinning;
219 
220 }

◆ getRadialSegment()

const HECRadialSegment * HECDetDescr::getRadialSegment ( unsigned int  block,
unsigned int  eta 
) const
inline

Returns the radial segment of in block b with eta index i, or else NULL.

Definition at line 169 of file HECDetDescr.h.

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 }

◆ getRegionIndex()

unsigned int HECDetDescr::getRegionIndex ( ) const
inline

The region Index.

Definition at line 208 of file HECDetDescr.h.

209 {
210 
211  return m_regionIndex;
212 
213 }

◆ getRMax()

double HECDetDescr::getRMax ( unsigned int  block,
unsigned int  eta 
) const
inline

Returns max r at block i.

Definition at line 155 of file HECDetDescr.h.

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 }

◆ getRMin()

double HECDetDescr::getRMin ( unsigned int  block,
unsigned int  eta 
) const
inline

Returns min r for block i.

Definition at line 141 of file HECDetDescr.h.

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 }

◆ getSamplingIndex()

unsigned int HECDetDescr::getSamplingIndex ( ) const
inline

The sampling index.

Definition at line 201 of file HECDetDescr.h.

202 {
203 
204  return m_samplingIndex;
205 
206 }

◆ getZMax()

double HECDetDescr::getZMax ( unsigned int  block) const
inline

Returns max z for the ith block at eta index.

Definition at line 134 of file HECDetDescr.h.

135 {
136 
137  return m_zMax[block];
138 
139 }

◆ getZMin()

double HECDetDescr::getZMin ( unsigned int  block) const
inline

Returns min z for the ith block at eta index.

Definition at line 127 of file HECDetDescr.h.

128 {
129 
130  return m_zMin[block];
131 
132 }

◆ operator=()

HECDetDescr& HECDetDescr::operator= ( const HECDetDescr right)
private

Member Data Documentation

◆ m_etaBinning

CellBinning HECDetDescr::m_etaBinning
private

Definition at line 114 of file HECDetDescr.h.

◆ m_firstBlock

unsigned int HECDetDescr::m_firstBlock
private

Definition at line 116 of file HECDetDescr.h.

◆ m_manager

const HECDetectorManager* HECDetDescr::m_manager
private

Definition at line 109 of file HECDetDescr.h.

◆ m_numBlocks

unsigned int HECDetDescr::m_numBlocks
private

Definition at line 115 of file HECDetDescr.h.

◆ m_outerRadSegNumber

unsigned int HECDetDescr::m_outerRadSegNumber
private

Definition at line 113 of file HECDetDescr.h.

◆ m_phiBinning

CellBinning HECDetDescr::m_phiBinning
private

Definition at line 112 of file HECDetDescr.h.

◆ m_regionIndex

unsigned int HECDetDescr::m_regionIndex
private

Definition at line 111 of file HECDetDescr.h.

◆ m_samplingIndex

unsigned int HECDetDescr::m_samplingIndex
private

Definition at line 110 of file HECDetDescr.h.

◆ m_zMax

std::vector<double> HECDetDescr::m_zMax
private

Definition at line 118 of file HECDetDescr.h.

◆ m_zMin

std::vector<double> HECDetDescr::m_zMin
private

Definition at line 117 of file HECDetDescr.h.


The documentation for this class was generated from the following files:
HECLongBlock::getDepth
double getDepth() const
Depth of block (CLHEP::mm)
Definition: HECLongBlock.h:163
HECDetDescr::m_numBlocks
unsigned int m_numBlocks
Definition: HECDetDescr.h:115
HECDetDescr::m_regionIndex
unsigned int m_regionIndex
Definition: HECDetDescr.h:111
IGeoModelSvc
Definition: IGeoModelSvc.h:17
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:79
index
Definition: index.py:1
HECDetDescr::m_firstBlock
unsigned int m_firstBlock
Definition: HECDetDescr.h:116
HECDetDescr::m_manager
const HECDetectorManager * m_manager
Definition: HECDetDescr.h:109
HECDetDescr::m_samplingIndex
unsigned int m_samplingIndex
Definition: HECDetDescr.h:110
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
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
HECDetDescr::m_etaBinning
CellBinning m_etaBinning
Definition: HECDetDescr.h:114
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
DecodeVersionKey
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Definition: DecodeVersionKey.h:18
HECDetDescr::getManager
const HECDetectorManager * getManager() const
The manager.
Definition: HECDetDescr.h:194
IGeoDbTagSvc
Definition: IGeoDbTagSvc.h:26
HECLongBlock
Definition: HECLongBlock.h:32
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
HECDetectorManager::getBlock
const HECLongBlock * getBlock(unsigned int i) const
Random Access to Blocks.
Definition: HECDetectorManager.cxx:160
HECDetDescr::m_phiBinning
CellBinning m_phiBinning
Definition: HECDetDescr.h:112
HECDetDescr::m_zMin
std::vector< double > m_zMin
Definition: HECDetDescr.h:117
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
HECDetectorManager::getNumBlocks
unsigned int getNumBlocks() const
Gets the number of blocks in the set of blocks.
Definition: HECDetectorManager.cxx:165
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
HECRadialSegment
Description of a radial segment of a HEC module.
Definition: HECRadialSegment.h:20
HECLongBlock::getRadialSegment
const HECRadialSegment * getRadialSegment(unsigned int i) const
Returns a radial segment if it exists.
Definition: HECLongBlock.h:126
HECDetDescr::m_zMax
std::vector< double > m_zMax
Definition: HECDetDescr.h:118
HECDetDescr::m_outerRadSegNumber
unsigned int m_outerRadSegNumber
Definition: HECDetDescr.h:113
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5