ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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. More...
 
 ~EMECDetDescr ()
 Destructor
More...
 
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.). More...
 
double getHalfLength (unsigned int etaIndex) const
 gets the cell half-length in z. More...
 
const EMECDetectorManagergetManager () const
 The manager. More...
 
unsigned int getSamplingIndex () const
 The sampling index. More...
 
unsigned int getRegionIndex () const
 The region index. More...
 
unsigned int getRadialIndex () const
 The radial index of this cell (0=Outer Wheel, 1=Inner Wheel). More...
 
const CellBinning & getPhiBinning () const
 The Binning in Phi. More...
 
const CellBinning & getEtaBinning () const
 The Binning in Eta. More...
 

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. More...
 
std::vector< double > m_offset
 Vector of cell center positions for the cells, one for each eta index. More...
 

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) {
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;
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 
87  }
88  else if (sampling==3) {
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;
101  }
102  else if (sampling==2) {
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 }

◆ ~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:
EMECDetectorManager::getZSEP23
double getZSEP23(unsigned int i) const
This method provides access to the Array ZSEP23, which in turn comes from the database (EmecSamplingS...
Definition: EMECDetectorManager.h:355
max
#define max(a, b)
Definition: cfImp.cxx:41
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
EMECDetDescr::m_offset
std::vector< double > m_offset
Vector of cell center positions for the cells, one for each eta index.
Definition: EMECDetDescr.h:116
EMECDetDescr::m_etaBinning
CellBinning m_etaBinning
Definition: EMECDetDescr.h:94
EMECDetDescr::m_halfLength
std::vector< double > m_halfLength
Vector of half-lengths for the cells, one for each eta index.
Definition: EMECDetDescr.h:100
EMECDetectorManager::getZIW
double getZIW(unsigned int i) const
This method provides access to the Array ZIW, which in turn comes from the database.
Definition: EMECDetectorManager.h:327
lumiFormat.i
int i
Definition: lumiFormat.py:92
EMECDetectorManager::getRefToActive
double getRefToActive() const
This provides the distance in CLHEP::mm from the Active EMEC volume to the reference plane.
Definition: EMECDetectorManager.h:292
min
#define min(a, b)
Definition: cfImp.cxx:40
EMECDetDescr::m_radialIndex
unsigned int m_radialIndex
Definition: EMECDetDescr.h:92
EMECDetDescr::m_regionIndex
unsigned int m_regionIndex
Definition: EMECDetDescr.h:91
EMECDetDescr::m_samplingIndex
unsigned int m_samplingIndex
Definition: EMECDetDescr.h:90
EMECDetectorManager::getActiveLength
double getActiveLength() const
Gives the overall active length of the EMEC outer and inner wheel volumes.
Definition: EMECDetectorManager.h:299
EMECDetDescr::m_manager
const EMECDetectorManager * m_manager
Definition: EMECDetDescr.h:89
EMECDetectorManager::getZSEP12
double getZSEP12(unsigned int i) const
This method provides access to the Array ZSEP12, which in turn comes from the database (EmecSamplingS...
Definition: EMECDetectorManager.h:341
EMECDetectorManager::getPresamplerFullLength
double getPresamplerFullLength() const
Gives the overall active length of the presampler volume.
Definition: EMECDetectorManager.h:313
EMECDetectorManager::getFocalToRef
double getFocalToRef() const
This provides the distance in CLHEP::mm from the Focal Plane to the reference plane.
Definition: EMECDetectorManager.h:285
EMECDetDescr::m_phiBinning
CellBinning m_phiBinning
Definition: EMECDetDescr.h:93
TauGNNUtils::Variables::Track::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:525