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

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

#include <EMECDetDescr.h>

Inheritance diagram for EMECDetDescr:
Collaboration diagram for EMECDetDescr:

Public Member Functions

 EMECDetDescr (const EMECDetectorManager *detManager, unsigned int sampling, unsigned int region, unsigned int radialPart, const CellBinning &phiBinning)
 Constructor.
 ~EMECDetDescr ()
 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 EMECDetectorManagergetManager () const
 The manager.
unsigned int getSamplingIndex () const
 The sampling index.
unsigned int getRegionIndex () const
 The region index.
unsigned int getRadialIndex () const
 The radial index of this cell (0=Outer Wheel, 1=Inner Wheel).
const CellBinning & getPhiBinning () const
 The Binning in Phi.
const CellBinning & getEtaBinning () const
 The Binning in Eta.

Private Member Functions

 EMECDetDescr (const EMECDetDescr &right)

Private Attributes

const EMECDetectorManagerm_manager
unsigned int m_samplingIndex
unsigned int m_regionIndex
unsigned int m_radialIndex
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 endcap calorimeter.

This class describes completely the segmentation in eta and phi, and also the longitudinal boundaries of cells within a region of the EMEC. This descriptor does not need to ever be accessed directly. If you are tempted to use it directly, look first at the EMECDetectorRegion and the EMECCell class. EMECCells obtained from a EMECDetectorRegion is normally a preferred way to access all of the information in the EMECDetDescr class.

Definition at line 26 of file EMECDetDescr.h.

Constructor & Destructor Documentation

◆ EMECDetDescr() [1/2]

EMECDetDescr::EMECDetDescr ( const EMECDetectorManager * detManager,
unsigned int sampling,
unsigned int region,
unsigned int radialPart,
const CellBinning & phiBinning )

Constructor.

Definition at line 35 of file EMECDetDescr.cxx.

40 : m_manager(detManager)
41 , m_samplingIndex(sampling)
42 , m_regionIndex(region)
43 , m_radialIndex(radialPart)
44 , m_phiBinning(phiBinning)
45 , m_etaBinning(etaBoundariesEndcap[sampling][radialPart][region].min
46 ,etaBoundariesEndcap[sampling][radialPart][region].max
47 ,etaBoundariesEndcap[sampling][radialPart][region].nDiv)
48{
49 // This contains some logic for decoding the sampling separation arrays:
50 if (sampling==0) {
51 m_halfLength.push_back(m_manager->getPresamplerFullLength()/2.0);
52 m_offset.push_back (0);
53 return;
54 }
55
56 double eta0, dEta;
57 if (m_radialIndex ==0 ) { // Outer Wheel.
58 eta0=1.4;
59 dEta=0.025;
60 }
61 else if (m_radialIndex==1) { // Inner Wheel
62 eta0=2.5;
63 dEta=0.1;
64 }
65 else {
66 throw std::range_error("Attempt to construct EMEC DetDescr with illegal index combinations");
67 }
68
69 const double inv_dEta = 1. / dEta;
70
71 for (unsigned int i=0;i<m_etaBinning.getNumDivisions();i++) {
72 double eta = m_etaBinning.binCenter(i);
73 int ipad = int((eta - eta0) * inv_dEta);
74 double front,back;
75 if (m_radialIndex ==0 ) { // Outer Wheel.
76 if (sampling==1) {
77 front=0;
78 back = m_manager->getZSEP12(ipad)-m_manager->getFocalToRef()-m_manager->getRefToActive();
79 }
80 else if (sampling==2) {
81
82 // std::min is used to max out the length to the total active length; this is for
83 // cells that spill out the side. They will have funny volumes.
84
85 front = m_manager->getZSEP12(ipad)-m_manager->getFocalToRef()-m_manager->getRefToActive();
86 back = std::min(m_manager->getActiveLength(),m_manager->getZSEP23(ipad/2)-m_manager->getFocalToRef()-m_manager->getRefToActive());
87 }
88 else if (sampling==3) {
89 front = m_manager->getZSEP23(ipad/2)-m_manager->getFocalToRef()-m_manager->getRefToActive();
90 back = m_manager->getActiveLength();
91 }
92 else {
93 throw std::range_error("Attempt to construct EMEC DetDescr with illegal index combinations");
94 }
95
96 }
97 else if (m_radialIndex==1) { // Inner Wheel
98 if (sampling==1) {
99 front=0;
100 back = m_manager->getZIW(ipad) - m_manager->getFocalToRef() - m_manager->getRefToActive();
101 }
102 else if (sampling==2) {
103 front = m_manager->getZIW(ipad) - m_manager->getFocalToRef() - m_manager->getRefToActive();
104 back = m_manager->getActiveLength();
105 }
106 else {
107 throw std::range_error("Attempt to construct EMEC DetDescr with illegal index combinations");
108 }
109 }
110 else {
111 throw std::range_error("Attempt to construct EMEC DetDescr with illegal index combinations");
112 }
113 m_offset.push_back((front+back)/2.);
114 m_halfLength.push_back((back-front)/2.);
115 }
116}
Scalar eta() const
pseudorapidity method
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
CellBinning m_phiBinning
std::vector< double > m_offset
Vector of cell center positions for the cells, one for each eta index.
unsigned int m_regionIndex
const EMECDetectorManager * m_manager
unsigned int m_radialIndex
CellBinning m_etaBinning
std::vector< double > m_halfLength
Vector of half-lengths for the cells, one for each eta index.
unsigned int m_samplingIndex
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)

◆ ~EMECDetDescr()

EMECDetDescr::~EMECDetDescr ( )
default

Destructor.

◆ EMECDetDescr() [2/2]

EMECDetDescr::EMECDetDescr ( const EMECDetDescr & right)
private

Member Function Documentation

◆ getEtaBinning()

const CellBinning & EMECDetDescr::getEtaBinning ( ) const
inline

The Binning in Eta.

Definition at line 177 of file EMECDetDescr.h.

178{
179
180 return m_etaBinning;
181
182}

◆ getHalfLength()

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

gets the cell half-length in z.

Definition at line 132 of file EMECDetDescr.h.

133{
134
135 if (m_halfLength.size()==1) return m_halfLength[0];
136 return m_halfLength[etaIndex];
137
138}

◆ getManager()

const EMECDetectorManager * EMECDetDescr::getManager ( ) const
inline

The manager.

Definition at line 142 of file EMECDetDescr.h.

143{
144
145 return m_manager;
146
147}

◆ getOffset()

double EMECDetDescr::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 124 of file EMECDetDescr.h.

125{
126
127 if (m_offset.size()==1) return m_offset[0];
128 return m_offset[etaIndex];
129
130}

◆ getPhiBinning()

const CellBinning & EMECDetDescr::getPhiBinning ( ) const
inline

The Binning in Phi.

Definition at line 170 of file EMECDetDescr.h.

171{
172
173 return m_phiBinning;
174
175}

◆ getRadialIndex()

unsigned int EMECDetDescr::getRadialIndex ( ) const
inline

The radial index of this cell (0=Outer Wheel, 1=Inner Wheel).

Definition at line 163 of file EMECDetDescr.h.

164{
165
166 return m_radialIndex;
167
168}

◆ getRegionIndex()

unsigned int EMECDetDescr::getRegionIndex ( ) const
inline

The region index.

Definition at line 156 of file EMECDetDescr.h.

157{
158
159 return m_regionIndex;
160
161}

◆ getSamplingIndex()

unsigned int EMECDetDescr::getSamplingIndex ( ) const
inline

The sampling index.

Definition at line 149 of file EMECDetDescr.h.

150{
151
152 return m_samplingIndex;
153
154}

Member Data Documentation

◆ m_etaBinning

CellBinning EMECDetDescr::m_etaBinning
private

Definition at line 94 of file EMECDetDescr.h.

◆ m_halfLength

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

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

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

Definition at line 100 of file EMECDetDescr.h.

◆ m_manager

const EMECDetectorManager* EMECDetDescr::m_manager
private

Definition at line 89 of file EMECDetDescr.h.

◆ m_offset

std::vector<double> EMECDetDescr::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 116 of file EMECDetDescr.h.

◆ m_phiBinning

CellBinning EMECDetDescr::m_phiBinning
private

Definition at line 93 of file EMECDetDescr.h.

◆ m_radialIndex

unsigned int EMECDetDescr::m_radialIndex
private

Definition at line 92 of file EMECDetDescr.h.

◆ m_regionIndex

unsigned int EMECDetDescr::m_regionIndex
private

Definition at line 91 of file EMECDetDescr.h.

◆ m_samplingIndex

unsigned int EMECDetDescr::m_samplingIndex
private

Definition at line 90 of file EMECDetDescr.h.


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