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

Description of a region of homogenous granularity in the hadronic endcap calorimeter. More...

#include <HECDetectorRegion.h>

Inheritance diagram for HECDetectorRegion:
Collaboration diagram for HECDetectorRegion:

Public Types

enum  DetectorSide { NEG =0 , POS =1 }

Public Member Functions

 HECDetectorRegion (const GeoVFullPhysVol *physVol, const HECDetDescr *hecDescriptor, DetectorSide endcap, double projectivityDisplacement=4 *Gaudi::Units::cm)
 Constructor.
 ~HECDetectorRegion ()
 Destructor.
HECCellConstLink getHECCell (unsigned int ieta, unsigned int iphi) const
 Retrieve a cell with eta index and phi index.
const HECDetDescr * getDescriptor () const
 Returns the Descriptor for this region.
unsigned int getSamplingIndex () const
 Returns the Sampling Layer Index (0-3).
unsigned int getRegionIndex () const
 Returns the Region Index.
unsigned int beginPhiIndex () const
 returns the first phi index in the region.
unsigned int endPhiIndex () const
 returns the end phi index in the region.
unsigned int beginEtaIndex () const
 returns the first eta index in the region.
unsigned int endEtaIndex () const
 returns the end eta index in the region.
const Amg::Transform3D & getAbsoluteTransform (const GeoAlignmentStore *alignStore=nullptr) const
 Returns the absolute transform of this element.
const Amg::Transform3D & getDefAbsoluteTransform (const GeoAlignmentStore *alignStore=nullptr) const
 Returns the absolute transform of this element.
HepGeom::Point3D< double > getRefPlanePos () const
 Returns the position of the center of the reference plane of the HEC (front face of the HEC volume).
HepGeom::Point3D< double > getFocalPointPos () const
 Returns the position of the focal point of the HEC.
Amg::Vector3D getRefPlanePosAmg () const
 Returns the position of the center of the reference plane of the HEC (front face of the HEC volume).
Amg::Vector3D getFocalPointPosAmg () const
 Returns the position of the focal point of the HEC.
HECDetectorRegion::DetectorSide getEndcapIndex () const
 The endcap index.
double getProjectivityDisplacement () const

Private Member Functions

 HECDetectorRegion (const HECDetectorRegion &right)
HECDetectorRegion & operator= (const HECDetectorRegion &right)

Private Attributes

GeoIntrusivePtr< const HECDetDescr > m_descriptor {}
HECDetectorRegion::DetectorSide m_endcapIndex
double m_projectivityDisplacement

Detailed Description

Description of a region of homogenous granularity in the hadronic endcap calorimeter.

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

Definition at line 32 of file HECDetectorRegion.h.

Member Enumeration Documentation

◆ DetectorSide

Constructor & Destructor Documentation

◆ HECDetectorRegion() [1/2]

HECDetectorRegion::HECDetectorRegion ( const GeoVFullPhysVol * physVol,
const HECDetDescr * hecDescriptor,
DetectorSide endcap,
double projectivityDisplacement = 4*Gaudi::Units::cm )

Constructor.

Definition at line 11 of file HECDetectorRegion.cxx.

15 : GeoVDetectorElement(physVol)
16 , m_descriptor(hecDescriptor)
17 , m_endcapIndex(endcap)
18 , m_projectivityDisplacement(projectivityDisplacement)
19{
20
21}
HECDetectorRegion::DetectorSide m_endcapIndex
GeoIntrusivePtr< const HECDetDescr > m_descriptor

◆ ~HECDetectorRegion()

HECDetectorRegion::~HECDetectorRegion ( )
default

Destructor.

◆ HECDetectorRegion() [2/2]

HECDetectorRegion::HECDetectorRegion ( const HECDetectorRegion & right)
private

Member Function Documentation

◆ beginEtaIndex()

unsigned int HECDetectorRegion::beginEtaIndex ( ) const
inline

returns the first eta index in the region.

Definition at line 195 of file HECDetectorRegion.h.

196{
197
198 return m_descriptor->getEtaBinning().getFirstDivisionNumber();
199
200}

◆ beginPhiIndex()

unsigned int HECDetectorRegion::beginPhiIndex ( ) const
inline

returns the first phi index in the region.

Definition at line 181 of file HECDetectorRegion.h.

182{
183
184 return m_descriptor->getPhiBinning().getFirstDivisionNumber();
185
186}

◆ endEtaIndex()

unsigned int HECDetectorRegion::endEtaIndex ( ) const
inline

returns the end eta index in the region.

Definition at line 202 of file HECDetectorRegion.h.

203{
204
205 return m_descriptor->getEtaBinning().getFirstDivisionNumber() + m_descriptor->getEtaBinning().getNumDivisions();
206
207}

◆ endPhiIndex()

unsigned int HECDetectorRegion::endPhiIndex ( ) const
inline

returns the end phi index in the region.

Definition at line 188 of file HECDetectorRegion.h.

189{
190
191 return m_descriptor->getPhiBinning().getFirstDivisionNumber() + m_descriptor->getPhiBinning().getNumDivisions();
192
193}

◆ getAbsoluteTransform()

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

Returns the absolute transform of this element.

Definition at line 37 of file HECDetectorRegion.cxx.

38{
39 const GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
40 return alignStore
41 ? fullPhysVol->getCachedAbsoluteTransform(alignStore)
42 : fullPhysVol->getAbsoluteTransform();
43}

◆ getDefAbsoluteTransform()

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

Returns the absolute transform of this element.

Definition at line 45 of file HECDetectorRegion.cxx.

46{
47 const GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
48 return alignStore
49 ? fullPhysVol->getCachedDefAbsoluteTransform(alignStore)
50 : fullPhysVol->getDefAbsoluteTransform();
51}

◆ getDescriptor()

const HECDetDescr * HECDetectorRegion::getDescriptor ( ) const
inline

Returns the Descriptor for this region.

Definition at line 160 of file HECDetectorRegion.h.

161{
162
163 return m_descriptor;
164
165}

◆ getEndcapIndex()

HECDetectorRegion::DetectorSide HECDetectorRegion::getEndcapIndex ( ) const
inline

The endcap index.

0=negative, 1=positive.

Definition at line 211 of file HECDetectorRegion.h.

212{
213
214 return m_endcapIndex;
215
216}

◆ getFocalPointPos()

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

Returns the position of the focal point of the HEC.

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

Definition at line 76 of file HECDetectorRegion.cxx.

77{
78 HepGeom::Point3D<double> zRef = getRefPlanePos();
79 int sgn = m_endcapIndex==0 ? -1 : +1;
80 bool hec2 = m_descriptor->getSamplingIndex()>1;
81 HepGeom::Point3D<double> focalPos = hec2 ?
82 HepGeom::Point3D<double>(0,0,sgn*m_descriptor->getManager()->getFocalToRef2()):
83 HepGeom::Point3D<double>(0,0,sgn*m_descriptor->getManager()->getFocalToRef1());
84 return zRef - focalPos;
85}
HepGeom::Point3D< double > getRefPlanePos() const
Returns the position of the center of the reference plane of the HEC (front face of the HEC volume).

◆ getFocalPointPosAmg()

Amg::Vector3D HECDetectorRegion::getFocalPointPosAmg ( ) const

Returns the position of the focal point of the HEC.

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

Definition at line 53 of file HECDetectorRegion.cxx.

54{
55 HepGeom::Point3D<double> clhepPoint = getFocalPointPos();
56 return Amg::Vector3D(clhepPoint.x(), clhepPoint.y(), clhepPoint.z());
57}
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the HEC.
Eigen::Matrix< double, 3, 1 > Vector3D

◆ getHECCell()

HECCellConstLink HECDetectorRegion::getHECCell ( unsigned int ieta,
unsigned int iphi ) const

Retrieve a cell with eta index and phi index.

Definition at line 26 of file HECDetectorRegion.cxx.

27{
28 HECCell *cell = new HECCell(m_endcapIndex,m_descriptor,ieta,iphi);
29 return {cell};
30}

◆ getProjectivityDisplacement()

double HECDetectorRegion::getProjectivityDisplacement ( ) const
inline

Definition at line 218 of file HECDetectorRegion.h.

219{
221}

◆ getRefPlanePos()

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

Returns the position of the center of the reference plane of the HEC (front face of the HEC volume).

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

Definition at line 60 of file HECDetectorRegion.cxx.

61{
62
63 // Get the material geometry:
64
65 const GeoVFullPhysVol *physVol = getMaterialGeom();
66 const GeoLogVol *logVol = physVol->getLogVol();
67 const GeoShape *shape = logVol->getShape();
68 if (shape->typeID()!=GeoPcon::getClassTypeID()) {
69 throw std::runtime_error ("HECDetectorRegion cannot compute absolute position of reference plane");
70 }
71 const GeoPcon *pcon = static_cast<const GeoPcon *> (shape);
72 HepGeom::Point3D<double> center(0,0,pcon->getZPlane(0));
73 return (Amg::EigenTransformToCLHEP(physVol->getAbsoluteTransform())*center);
74}
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.

◆ getRefPlanePosAmg()

Amg::Vector3D HECDetectorRegion::getRefPlanePosAmg ( ) const

Returns the position of the center of the reference plane of the HEC (front face of the HEC volume).

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

Definition at line 32 of file HECDetectorRegion.cxx.

33{
34 HepGeom::Point3D<double> clhepPoint = getRefPlanePos();
35 return Amg::Vector3D(clhepPoint.x(), clhepPoint.y(), clhepPoint.z());
36}

◆ getRegionIndex()

unsigned int HECDetectorRegion::getRegionIndex ( ) const
inline

Returns the Region Index.

Definition at line 174 of file HECDetectorRegion.h.

175{
176
177 return getDescriptor()->getRegionIndex();
178
179}
unsigned int getRegionIndex() const
The region Index.
const HECDetDescr * getDescriptor() const
Returns the Descriptor for this region.

◆ getSamplingIndex()

unsigned int HECDetectorRegion::getSamplingIndex ( ) const
inline

Returns the Sampling Layer Index (0-3).

Definition at line 167 of file HECDetectorRegion.h.

168{
169
171
172}
unsigned int getSamplingIndex() const
The sampling index.

◆ operator=()

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

Member Data Documentation

◆ m_descriptor

GeoIntrusivePtr<const HECDetDescr> HECDetectorRegion::m_descriptor {}
private

Definition at line 147 of file HECDetectorRegion.h.

147{};

◆ m_endcapIndex

HECDetectorRegion::DetectorSide HECDetectorRegion::m_endcapIndex
private

Definition at line 148 of file HECDetectorRegion.h.

◆ m_projectivityDisplacement

double HECDetectorRegion::m_projectivityDisplacement
private

Definition at line 150 of file HECDetectorRegion.h.


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