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

#include <EMECDetectorRegion.h>

Inheritance diagram for EMECDetectorRegion:
Collaboration diagram for EMECDetectorRegion:

Public Types

enum  DetectorSide { NEG =0, POS =1 }
 
enum  RadialPos { OUTER =0, INNER =1 }
 

Public Member Functions

 EMECDetectorRegion (const GeoVFullPhysVol *physVol, const EMECDetDescr *emecDescriptor, DetectorSide endcap, double projectivityDisplacement=4 *Gaudi::Units::cm)
 Constructor. More...
 
 ~EMECDetectorRegion ()
 Destructor
More...
 
EMECCellConstLink getEMECCell (unsigned int ieta, unsigned int iphi) const
 Access to Cells. More...
 
const EMECDetDescrgetDescriptor () const
 Returns the Descriptor for this region. More...
 
unsigned int getSamplingIndex () const
 Returns the Sampling Layer Index. More...
 
unsigned int getRegionIndex () const
 Returns the Region Index. More...
 
unsigned int getRadialIndex () const
 Returns the Radial (Outer Wheel=0,InnerWheel=1) Index. More...
 
unsigned int beginPhiIndex () const
 returns the first phi index in the region. More...
 
unsigned int endPhiIndex () const
 returns the end phi index in the region. More...
 
unsigned int beginEtaIndex () const
 returns the first eta index in the region. More...
 
unsigned int endEtaIndex () const
 returns the end eta index in the region. More...
 
HepGeom::Point3D< double > getRefPlanePos () const
 Returns the position of the center of the reference plane of the EMEC (back of front tranverse bars). More...
 
HepGeom::Point3D< double > getFocalPointPos () const
 Returns the position of the focal point of the EMEC. More...
 
const Amg::Transform3DgetAbsoluteTransform (const GeoAlignmentStore *alignStore=nullptr) const
 Returns the absolute transform of this element. More...
 
const Amg::Transform3DgetDefAbsoluteTransform (const GeoAlignmentStore *alignStore=nullptr) const
 Returns the absolute transform of this element. More...
 
Amg::Vector3D getRefPlanePosAmg () const
 Returns the position of the center of the reference plane of the EMEC (back of front tranverse bars). More...
 
Amg::Vector3D getFocalPointPosAmg () const
 Returns the position of the focal point of the EMEC. More...
 
EMECDetectorRegion::DetectorSide getEndcapIndex () const
 The endcap index. More...
 
double getProjectivityDisplacement () const
 

Private Member Functions

 EMECDetectorRegion (const EMECDetectorRegion &right)
 
EMECDetectorRegionoperator= (const EMECDetectorRegion &right)
 

Private Attributes

GeoIntrusivePtr< const EMECDetDescrm_descriptor {}
 
EMECDetectorRegion::DetectorSide m_endcapIndex
 
double m_projectivityDisplacement
 

Detailed Description

 @brief Description of a region of homogenous granularity in the 
 electromagnetic endcap calorimeter

This class combines a description of the cell
granularity with a physical volume to create a description of an EMEC region positioned within ATLAS. It provides access to the EMEC Cells.

Definition at line 29 of file EMECDetectorRegion.h.

Member Enumeration Documentation

◆ DetectorSide

Enumerator
NEG 
POS 

Definition at line 33 of file EMECDetectorRegion.h.

33 {NEG=0,POS=1} DetectorSide;

◆ RadialPos

Enumerator
OUTER 
INNER 

Definition at line 34 of file EMECDetectorRegion.h.

34 {OUTER=0,INNER=1} RadialPos;

Constructor & Destructor Documentation

◆ EMECDetectorRegion() [1/2]

EMECDetectorRegion::EMECDetectorRegion ( const GeoVFullPhysVol *  physVol,
const EMECDetDescr emecDescriptor,
DetectorSide  endcap,
double  projectivityDisplacement = 4*Gaudi::Units::cm 
)

Constructor.

Definition at line 12 of file EMECDetectorRegion.cxx.

16  : GeoVDetectorElement(physVol)
17  , m_descriptor(emecDescriptor)
18  , m_endcapIndex(endcap)
19  , m_projectivityDisplacement(projectivityDisplacement)
20 {
21 
22 }

◆ ~EMECDetectorRegion()

EMECDetectorRegion::~EMECDetectorRegion ( )
default

Destructor

◆ EMECDetectorRegion() [2/2]

EMECDetectorRegion::EMECDetectorRegion ( const EMECDetectorRegion right)
private

Member Function Documentation

◆ beginEtaIndex()

unsigned int EMECDetectorRegion::beginEtaIndex ( ) const
inline

returns the first eta index in the region.

Definition at line 199 of file EMECDetectorRegion.h.

200 {
201 
202  return m_descriptor->getEtaBinning().getFirstDivisionNumber();
203 
204 }

◆ beginPhiIndex()

unsigned int EMECDetectorRegion::beginPhiIndex ( ) const
inline

returns the first phi index in the region.

Definition at line 185 of file EMECDetectorRegion.h.

186 {
187 
188  return m_descriptor->getPhiBinning().getFirstDivisionNumber();
189 
190 }

◆ endEtaIndex()

unsigned int EMECDetectorRegion::endEtaIndex ( ) const
inline

returns the end eta index in the region.

Definition at line 206 of file EMECDetectorRegion.h.

207 {
208 
209  return m_descriptor->getEtaBinning().getFirstDivisionNumber() + m_descriptor->getEtaBinning().getNumDivisions();
210 
211 }

◆ endPhiIndex()

unsigned int EMECDetectorRegion::endPhiIndex ( ) const
inline

returns the end phi index in the region.

Definition at line 192 of file EMECDetectorRegion.h.

193 {
194 
195  return m_descriptor->getPhiBinning().getFirstDivisionNumber() + m_descriptor->getPhiBinning().getNumDivisions();
196 
197 }

◆ getAbsoluteTransform()

const Amg::Transform3D & EMECDetectorRegion::getAbsoluteTransform ( const GeoAlignmentStore alignStore = nullptr) const

Returns the absolute transform of this element.

Definition at line 52 of file EMECDetectorRegion.cxx.

53 {
54  const GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
55  return alignStore
56  ? fullPhysVol->getCachedAbsoluteTransform(alignStore)
57  : fullPhysVol->getAbsoluteTransform();
58 }

◆ getDefAbsoluteTransform()

const Amg::Transform3D & EMECDetectorRegion::getDefAbsoluteTransform ( const GeoAlignmentStore alignStore = nullptr) const

Returns the absolute transform of this element.

Definition at line 60 of file EMECDetectorRegion.cxx.

61 {
62  const GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
63  return alignStore
64  ? fullPhysVol->getCachedDefAbsoluteTransform(alignStore)
65  : fullPhysVol->getDefAbsoluteTransform();
66 }

◆ getDescriptor()

const EMECDetDescr * EMECDetectorRegion::getDescriptor ( ) const
inline

Returns the Descriptor for this region.

Definition at line 157 of file EMECDetectorRegion.h.

158 {
159 
160  return m_descriptor;
161 
162 }

◆ getEMECCell()

EMECCellConstLink EMECDetectorRegion::getEMECCell ( unsigned int  ieta,
unsigned int  iphi 
) const

Access to Cells.

Definition at line 26 of file EMECDetectorRegion.cxx.

27 {
28  return {new EMECCell(m_endcapIndex,m_descriptor,ieta,iphi)};
29 }

◆ getEndcapIndex()

EMECDetectorRegion::DetectorSide EMECDetectorRegion::getEndcapIndex ( ) const
inline

The endcap index.

0=negative, 1=positive.

Definition at line 214 of file EMECDetectorRegion.h.

215 {
216 
217  return m_endcapIndex;
218 
219 }

◆ getFocalPointPos()

HepGeom::Point3D< double > EMECDetectorRegion::getFocalPointPos ( ) const

Returns the position of the focal point of the EMEC.

This method is not fast, result should be cached if used frequently.

Definition at line 44 of file EMECDetectorRegion.cxx.

45 {
46  HepGeom::Point3D<double> zRef = getRefPlanePos();
47  int sgn = m_endcapIndex==0 ? -1 : +1;
48  HepGeom::Point3D<double> focalPos = HepGeom::Point3D<double>(0,0,sgn*m_descriptor->getManager()->getFocalToRef());
49  return zRef - focalPos;
50 }

◆ getFocalPointPosAmg()

Amg::Vector3D EMECDetectorRegion::getFocalPointPosAmg ( ) const

Returns the position of the focal point of the EMEC.

This method is not fast, result should be cached if used frequently.

Definition at line 74 of file EMECDetectorRegion.cxx.

75 {
76  const HepGeom::Point3D<double> point = getFocalPointPos();
77  return Amg::Vector3D(point.x(),point.y(),point.z());
78 }

◆ getProjectivityDisplacement()

double EMECDetectorRegion::getProjectivityDisplacement ( ) const
inline

Definition at line 221 of file EMECDetectorRegion.h.

222 {
224 }

◆ getRadialIndex()

unsigned int EMECDetectorRegion::getRadialIndex ( ) const
inline

Returns the Radial (Outer Wheel=0,InnerWheel=1) Index.

Definition at line 178 of file EMECDetectorRegion.h.

179 {
180 
181  return m_descriptor->getRadialIndex();
182 
183 }

◆ getRefPlanePos()

HepGeom::Point3D< double > EMECDetectorRegion::getRefPlanePos ( ) const

Returns the position of the center of the reference plane of the EMEC (back of front tranverse bars).

This method is not fast, the result should be cached if frequently used.

Definition at line 31 of file EMECDetectorRegion.cxx.

32 {
33  const GeoVFullPhysVol *physVol = getMaterialGeom();
34  const GeoLogVol *logVol = physVol->getLogVol();
35  const GeoShape *shape = logVol->getShape();
36  if (shape->typeID()!=GeoPcon::getClassTypeID()) {
37  throw std::runtime_error ("EMECDetectorRegion cannot compute absolute position of reference plane");
38  }
39  const GeoPcon *pcon = static_cast<const GeoPcon *> (shape);
40  HepGeom::Point3D<double> center(0,0,pcon->getZPlane(0)-m_descriptor->getManager()->getRefToActive());
41  return (Amg::EigenTransformToCLHEP(physVol->getAbsoluteTransform())*center);
42 }

◆ getRefPlanePosAmg()

Amg::Vector3D EMECDetectorRegion::getRefPlanePosAmg ( ) const

Returns the position of the center of the reference plane of the EMEC (back of front tranverse bars).

This method is not fast, the result should be cached if frequently used.

Definition at line 68 of file EMECDetectorRegion.cxx.

69 {
70  const HepGeom::Point3D<double> point = getRefPlanePos();
71  return Amg::Vector3D(point.x(), point.y(), point.z());
72 }

◆ getRegionIndex()

unsigned int EMECDetectorRegion::getRegionIndex ( ) const
inline

Returns the Region Index.

Definition at line 171 of file EMECDetectorRegion.h.

172 {
173 
174  return m_descriptor->getRegionIndex();
175 
176 }

◆ getSamplingIndex()

unsigned int EMECDetectorRegion::getSamplingIndex ( ) const
inline

Returns the Sampling Layer Index.

Definition at line 164 of file EMECDetectorRegion.h.

165 {
166 
167  return m_descriptor->getSamplingIndex();
168 
169 }

◆ operator=()

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

Member Data Documentation

◆ m_descriptor

GeoIntrusivePtr<const EMECDetDescr> EMECDetectorRegion::m_descriptor {}
private

Definition at line 149 of file EMECDetectorRegion.h.

◆ m_endcapIndex

EMECDetectorRegion::DetectorSide EMECDetectorRegion::m_endcapIndex
private

Definition at line 150 of file EMECDetectorRegion.h.

◆ m_projectivityDisplacement

double EMECDetectorRegion::m_projectivityDisplacement
private

Definition at line 151 of file EMECDetectorRegion.h.


The documentation for this class was generated from the following files:
EMECDetectorRegion::RadialPos
RadialPos
Definition: EMECDetectorRegion.h:34
EMECDetectorRegion::m_descriptor
GeoIntrusivePtr< const EMECDetDescr > m_descriptor
Definition: EMECDetectorRegion.h:149
EMECDetectorRegion::getRefPlanePos
HepGeom::Point3D< double > getRefPlanePos() const
Returns the position of the center of the reference plane of the EMEC (back of front tranverse bars).
Definition: EMECDetectorRegion.cxx:31
EMECDetectorRegion::DetectorSide
DetectorSide
Definition: EMECDetectorRegion.h:33
EMECDetectorRegion::POS
@ POS
Definition: EMECDetectorRegion.h:33
EMECCell
A Cell of the electromagnetic endcap calorimeter readout geometry This class represents a single EMEC...
Definition: EMECCell.h:32
EMECDetectorRegion::getFocalPointPos
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the EMEC.
Definition: EMECDetectorRegion.cxx:44
EMECDetectorRegion::INNER
@ INNER
Definition: EMECDetectorRegion.h:34
EMECDetectorRegion::OUTER
@ OUTER
Definition: EMECDetectorRegion.h:34
EMECDetectorRegion::NEG
@ NEG
Definition: EMECDetectorRegion.h:33
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
EMECDetectorRegion::m_projectivityDisplacement
double m_projectivityDisplacement
Definition: EMECDetectorRegion.h:151
Amg::EigenTransformToCLHEP
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
Definition: CLHEPtoEigenConverter.h:120
EMECDetectorRegion::m_endcapIndex
EMECDetectorRegion::DetectorSide m_endcapIndex
Definition: EMECDetectorRegion.h:150