ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
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. More...
 
 ~HECDetectorRegion ()
 Destructor. More...
 
HECCellConstLink getHECCell (unsigned int ieta, unsigned int iphi) const
 Retrieve a cell with eta index and phi index. More...
 
const HECDetDescrgetDescriptor () const
 Returns the Descriptor for this region. More...
 
unsigned int getSamplingIndex () const
 Returns the Sampling Layer Index (0-3) More...
 
unsigned int getRegionIndex () const
 Returns the Region 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...
 
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...
 
HepGeom::Point3D< double > getRefPlanePos () const
 Returns the position of the center of the reference plane of the HEC (front face of the HEC volume). More...
 
HepGeom::Point3D< double > getFocalPointPos () const
 Returns the position of the focal point of the HEC. More...
 
Amg::Vector3D getRefPlanePosAmg () const
 Returns the position of the center of the reference plane of the HEC (front face of the HEC volume). More...
 
Amg::Vector3D getFocalPointPosAmg () const
 Returns the position of the focal point of the HEC. More...
 
HECDetectorRegion::DetectorSide getEndcapIndex () const
 The endcap index. More...
 
double getProjectivityDisplacement () const
 

Private Member Functions

 HECDetectorRegion (const HECDetectorRegion &right)
 
HECDetectorRegionoperator= (const HECDetectorRegion &right)
 

Private Attributes

GeoIntrusivePtr< const HECDetDescrm_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 30 of file HECDetectorRegion.h.

Member Enumeration Documentation

◆ DetectorSide

Enumerator
NEG 
POS 

Definition at line 34 of file HECDetectorRegion.h.

34 {NEG=0,POS=1} 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()

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 193 of file HECDetectorRegion.h.

194 {
195 
196  return m_descriptor->getEtaBinning().getFirstDivisionNumber();
197 
198 }

◆ beginPhiIndex()

unsigned int HECDetectorRegion::beginPhiIndex ( ) const
inline

returns the first phi index in the region.

Definition at line 179 of file HECDetectorRegion.h.

180 {
181 
182  return m_descriptor->getPhiBinning().getFirstDivisionNumber();
183 
184 }

◆ endEtaIndex()

unsigned int HECDetectorRegion::endEtaIndex ( ) const
inline

returns the end eta index in the region.

Definition at line 200 of file HECDetectorRegion.h.

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

◆ endPhiIndex()

unsigned int HECDetectorRegion::endPhiIndex ( ) const
inline

returns the end phi index in the region.

Definition at line 186 of file HECDetectorRegion.h.

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

◆ 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 158 of file HECDetectorRegion.h.

159 {
160 
161  return m_descriptor;
162 
163 }

◆ getEndcapIndex()

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

The endcap index.

0=negative, 1=positive.

Definition at line 209 of file HECDetectorRegion.h.

210 {
211 
212  return m_endcapIndex;
213 
214 }

◆ 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 }

◆ 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 }

◆ 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 216 of file HECDetectorRegion.h.

217 {
219 }

◆ 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 }

◆ 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 172 of file HECDetectorRegion.h.

173 {
174 
175  return getDescriptor()->getRegionIndex();
176 
177 }

◆ getSamplingIndex()

unsigned int HECDetectorRegion::getSamplingIndex ( ) const
inline

Returns the Sampling Layer Index (0-3)

Definition at line 165 of file HECDetectorRegion.h.

166 {
167 
168  return getDescriptor()->getSamplingIndex();
169 
170 }

◆ operator=()

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

Member Data Documentation

◆ m_descriptor

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

Definition at line 145 of file HECDetectorRegion.h.

◆ m_endcapIndex

HECDetectorRegion::DetectorSide HECDetectorRegion::m_endcapIndex
private

Definition at line 146 of file HECDetectorRegion.h.

◆ m_projectivityDisplacement

double HECDetectorRegion::m_projectivityDisplacement
private

Definition at line 148 of file HECDetectorRegion.h.


The documentation for this class was generated from the following files:
HECDetectorRegion::NEG
@ NEG
Definition: HECDetectorRegion.h:34
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
HECDetectorRegion::POS
@ POS
Definition: HECDetectorRegion.h:34
HECDetDescr::getRegionIndex
unsigned int getRegionIndex() const
The region Index.
Definition: HECDetDescr.h:208
HECDetectorRegion::m_endcapIndex
HECDetectorRegion::DetectorSide m_endcapIndex
Definition: HECDetectorRegion.h:146
HECDetectorRegion::getRefPlanePos
HepGeom::Point3D< double > getRefPlanePos() const
Returns the position of the center of the reference plane of the HEC (front face of the HEC volume).
Definition: HECDetectorRegion.cxx:60
HECDetectorRegion::DetectorSide
DetectorSide
Definition: HECDetectorRegion.h:34
HECCell
A cell of the hadronic endcap calorimeter readout geometry.
Definition: HECCell.h:31
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
HECDetectorRegion::m_descriptor
GeoIntrusivePtr< const HECDetDescr > m_descriptor
Definition: HECDetectorRegion.h:145
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
HepGeom
Definition: VP1String.h:30
HECDetDescr::getSamplingIndex
unsigned int getSamplingIndex() const
The sampling index.
Definition: HECDetDescr.h:201
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
HECDetectorRegion::getDescriptor
const HECDetDescr * getDescriptor() const
Returns the Descriptor for this region.
Definition: HECDetectorRegion.h:158
HECDetectorRegion::getFocalPointPos
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the HEC.
Definition: HECDetectorRegion.cxx:76
HECDetectorRegion::m_projectivityDisplacement
double m_projectivityDisplacement
Definition: HECDetectorRegion.h:148