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

Descriptor for regions of the electromagnetic barrel calorimeter. More...

#include <EMBDetDescr.h>

Inheritance diagram for EMBDetDescr:
Collaboration diagram for EMBDetDescr:

Public Member Functions

 EMBDetDescr (const EMBDetectorManager *detManager, unsigned int sampling, unsigned int region, const CellBinning &phiBinning)
 Constructor.
 ~EMBDetDescr ()
 Destructor.
double getOffset (unsigned int etaIndex) const
 Gets the offset position (cell centers with respect to the position of the front of the active volume of the EMEC, or middle of the presamper.).
double getHalfLength (unsigned int etaIndex) const
 gets the cell half-length in z.
const EMBDetectorManagergetManager () const
 The manager.
unsigned int getSamplingIndex () const
 The sampling index.
unsigned int getRegionIndex () const
 The region index.
const CellBinning & getPhiBinning () const
 The Binning in Phi.
const CellBinning & getEtaBinning () const
 The Binning in Eta.

Private Member Functions

 EMBDetDescr (const EMBDetDescr &right)
EMBDetDescroperator= (const EMBDetDescr &right)

Private Attributes

const EMBDetectorManagerm_manager
unsigned int m_samplingIndex
unsigned int m_regionIndex
CellBinning m_phiBinning
CellBinning m_etaBinning
std::vector< double > m_halfLength
 Vector of half-lengths for the cells, one for each eta index.
std::vector< double > m_offset
 Vector of cell center positions for the cells, one for each eta index.

Detailed Description

Descriptor for regions of the electromagnetic barrel calorimeter.

This class describes completely the segmentation in eta and phi, and also the depth boundaries of cells within a region of the EMB. This descriptor does not need to ever be accessed directly. If you are tempted to use it directly, look first at the EMBDetectorRegion and the EMBCell class. EMBCells obtained from a EMBDetector Region is normally a preferred way to access all of the information in the EMBDetDescr class.

Definition at line 26 of file EMBDetDescr.h.

Constructor & Destructor Documentation

◆ EMBDetDescr() [1/2]

EMBDetDescr::EMBDetDescr ( const EMBDetectorManager * detManager,
unsigned int sampling,
unsigned int region,
const CellBinning & phiBinning )

Constructor.

Definition at line 32 of file EMBDetDescr.cxx.

33 :m_manager(detManager),m_samplingIndex(sampling),m_regionIndex(region),m_phiBinning(phiBinning),m_etaBinning(etaBoundariesBarrel[sampling][region].min,
34 etaBoundariesBarrel[sampling][region].max,
35 etaBoundariesBarrel[sampling][region].nDiv,
36 etaBoundariesBarrel[sampling][region].firstDiv)
37{
38
39 for (unsigned int i=0;i<m_etaBinning.getFirstDivisionNumber()+m_etaBinning.getNumDivisions();i++) {
40 if (i<m_etaBinning.getFirstDivisionNumber()) {
41 m_offset.push_back(0);
42 m_halfLength.push_back(0);
43 }
44 else {
45 double front, back;
46 switch (sampling) {
47 case 0:
48 front = m_manager->getBasicReadoutNumbers()->getPresamplerRadius();
49 back = m_manager->getBasicReadoutNumbers()->getRinAc();
50 break;
51 case 1:
52 front = m_manager->getBasicReadoutNumbers()->getRinAc();
53 back = region==0 ? m_manager->getBasicReadoutNumbers()->getEMBSamplingSepInnerRMax(i) : m_manager->getBasicReadoutNumbers()->getEMBSamplingSepInnerRMax(447);
54 break;
55 case 2:
56 front = region==0 ? m_manager->getBasicReadoutNumbers()->getEMBSamplingSepInnerRMax(std::max((unsigned int) 0,8*i+7)) : m_manager->getBasicReadoutNumbers()->getEMBSamplingSepInnerRMax(447);
57 back = m_manager->getBasicReadoutNumbers()->getRMX23(std::min((unsigned int) 52,i));
58 break;
59 case 3:
60 front = (m_manager->getBasicReadoutNumbers()->getRMX23(std::min((unsigned int)52,2*i))+m_manager->getBasicReadoutNumbers()->getRMX23(std::min((unsigned int)52,2*i+1)))/2.0;
61 back = m_manager->getBasicReadoutNumbers()->getRoutAc();
62 break;
63 default:
64 throw std::range_error("Attempt to construct EMEB DetDescr with illegal sampling index");
65
66 }
67 m_offset.push_back((front+back)/2.);
68 m_halfLength.push_back((back-front)/2.);
69 }
70 }
71}
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
CellBinning m_phiBinning
Definition EMBDetDescr.h:97
CellBinning m_etaBinning
Definition EMBDetDescr.h:98
unsigned int m_samplingIndex
Definition EMBDetDescr.h:95
std::vector< double > m_halfLength
Vector of half-lengths for the cells, one for each eta index.
std::vector< double > m_offset
Vector of cell center positions for the cells, one for each eta index.
unsigned int m_regionIndex
Definition EMBDetDescr.h:96
const EMBDetectorManager * m_manager
Definition EMBDetDescr.h:94

◆ ~EMBDetDescr()

EMBDetDescr::~EMBDetDescr ( )
default

Destructor.

◆ EMBDetDescr() [2/2]

EMBDetDescr::EMBDetDescr ( const EMBDetDescr & right)
private

Member Function Documentation

◆ getEtaBinning()

const CellBinning & EMBDetDescr::getEtaBinning ( ) const
inline

The Binning in Eta.

Definition at line 184 of file EMBDetDescr.h.

185{
186
187 return m_etaBinning;
188
189}

◆ getHalfLength()

double EMBDetDescr::getHalfLength ( unsigned int etaIndex) const
inline

gets the cell half-length in z.

Definition at line 146 of file EMBDetDescr.h.

147{
148
149 if (m_halfLength.size()==1) return m_halfLength[0];
150 return m_halfLength[etaIndex];
151
152}

◆ getManager()

const EMBDetectorManager * EMBDetDescr::getManager ( ) const
inline

The manager.

Definition at line 156 of file EMBDetDescr.h.

157{
158
159 return m_manager;
160
161}

◆ getOffset()

double EMBDetDescr::getOffset ( unsigned int etaIndex) const
inline

Gets the offset position (cell centers with respect to the position of the front of the active volume of the EMEC, or middle of the presamper.).

Definition at line 138 of file EMBDetDescr.h.

139{
140
141 if (m_offset.size()==1) return m_offset[0];
142 return m_offset[etaIndex];
143
144}

◆ getPhiBinning()

const CellBinning & EMBDetDescr::getPhiBinning ( ) const
inline

The Binning in Phi.

Definition at line 177 of file EMBDetDescr.h.

178{
179
180 return m_phiBinning;
181
182}

◆ getRegionIndex()

unsigned int EMBDetDescr::getRegionIndex ( ) const
inline

The region index.

Definition at line 170 of file EMBDetDescr.h.

171{
172
173 return m_regionIndex;
174
175}

◆ getSamplingIndex()

unsigned int EMBDetDescr::getSamplingIndex ( ) const
inline

The sampling index.

Definition at line 163 of file EMBDetDescr.h.

164{
165
166 return m_samplingIndex;
167
168}

◆ operator=()

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

Member Data Documentation

◆ m_etaBinning

CellBinning EMBDetDescr::m_etaBinning
private

Definition at line 98 of file EMBDetDescr.h.

◆ m_halfLength

std::vector<double> EMBDetDescr::m_halfLength
private

Vector of half-lengths for the cells, one for each eta index.

Definition at line 106 of file EMBDetDescr.h.

◆ m_manager

const EMBDetectorManager* EMBDetDescr::m_manager
private

Definition at line 94 of file EMBDetDescr.h.

◆ m_offset

std::vector<double> EMBDetDescr::m_offset
private

Vector of cell center positions for the cells, one for each eta index.

These numbers are relative to the front face of the EMEC active volume. This happens to be the z=0 face of the local coordinate system in the EMEC, but that little detail depends critically on the way the Geo Model description is implemented and may be false by the time you read this comment. For the presampler the offset is relative to the middle of the presampler active volume, which is also z=0 for the presampler local coordinate (with the same caveats as above).

(From the database table EmecSamplingSep and other related tables.)

Definition at line 124 of file EMBDetDescr.h.

◆ m_phiBinning

CellBinning EMBDetDescr::m_phiBinning
private

Definition at line 97 of file EMBDetDescr.h.

◆ m_regionIndex

unsigned int EMBDetDescr::m_regionIndex
private

Definition at line 96 of file EMBDetDescr.h.

◆ m_samplingIndex

unsigned int EMBDetDescr::m_samplingIndex
private

Definition at line 95 of file EMBDetDescr.h.


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