ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArGeoModel
LArReadoutGeometry
src
EMECDetectorRegion.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArReadoutGeometry/EMECDetectorRegion.h
"
6
7
8
#include "GeoModelKernel/GeoVFullPhysVol.h"
9
#include "GeoModelKernel/GeoPcon.h"
10
#include "
GeoPrimitives/CLHEPtoEigenConverter.h
"
11
#include "
GeoModelUtilities/GeoAlignmentStore.h
"
12
13
EMECDetectorRegion::EMECDetectorRegion
(
const
GeoVFullPhysVol *physVol
14
,
const
EMECDetDescr
*emecDescriptor
15
,
DetectorSide
endcap
16
,
double
projectivityDisplacement)
17
: GeoVDetectorElement(physVol)
18
,
m_descriptor
(emecDescriptor)
19
,
m_endcapIndex
(endcap)
20
,
m_projectivityDisplacement
(projectivityDisplacement)
21
{
22
23
}
24
25
EMECDetectorRegion::~EMECDetectorRegion
() =
default
;
26
27
EMECCellConstLink
EMECDetectorRegion::getEMECCell
(
unsigned
int
ieta,
unsigned
int
iphi)
const
28
{
29
return
{
new
EMECCell
(
m_endcapIndex
,
m_descriptor
,ieta,iphi)};
30
}
31
32
HepGeom::Point3D<double>
EMECDetectorRegion::getRefPlanePos
()
const
33
{
34
const
GeoVFullPhysVol *physVol = getMaterialGeom();
35
const
GeoLogVol *logVol = physVol->getLogVol();
36
const
GeoShape *shape = logVol->getShape();
37
if
(shape->typeID()!=GeoPcon::getClassTypeID()) {
38
throw
std::runtime_error (
"EMECDetectorRegion cannot compute absolute position of reference plane"
);
39
}
40
const
GeoPcon *pcon =
static_cast<
const
GeoPcon *
>
(shape);
41
HepGeom::Point3D<double> center(0,0,pcon->getZPlane(0)-
m_descriptor
->getManager()->getRefToActive());
42
return
(
Amg::EigenTransformToCLHEP
(physVol->getAbsoluteTransform())*center);
43
}
44
45
HepGeom::Point3D<double>
EMECDetectorRegion::getFocalPointPos
()
const
46
{
47
HepGeom::Point3D<double> zRef =
getRefPlanePos
();
48
int
sgn =
m_endcapIndex
==0 ? -1 : +1;
49
HepGeom::Point3D<double> focalPos = HepGeom::Point3D<double>(0,0,sgn*
m_descriptor
->getManager()->getFocalToRef());
50
return
zRef - focalPos;
51
}
52
53
const
Amg::Transform3D
&
EMECDetectorRegion::getAbsoluteTransform
(
const
GeoAlignmentStore
* alignStore)
const
54
{
55
const
GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
56
return
alignStore
57
? fullPhysVol->getCachedAbsoluteTransform(alignStore)
58
: fullPhysVol->getAbsoluteTransform();
59
}
60
61
const
Amg::Transform3D
&
EMECDetectorRegion::getDefAbsoluteTransform
(
const
GeoAlignmentStore
* alignStore)
const
62
{
63
const
GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
64
return
alignStore
65
? fullPhysVol->getCachedDefAbsoluteTransform(alignStore)
66
: fullPhysVol->getDefAbsoluteTransform();
67
}
68
69
Amg::Vector3D
EMECDetectorRegion::getRefPlanePosAmg
()
const
70
{
71
const
HepGeom::Point3D<double> point =
getRefPlanePos
();
72
return
Amg::Vector3D
(point.x(), point.y(), point.z());
73
}
74
75
Amg::Vector3D
EMECDetectorRegion::getFocalPointPosAmg
()
const
76
{
77
const
HepGeom::Point3D<double> point =
getFocalPointPos
();
78
return
Amg::Vector3D
(point.x(),point.y(),point.z());
79
}
CLHEPtoEigenConverter.h
EMECDetectorRegion.h
GeoAlignmentStore.h
EMECCellConstLink
Smart Pointer to EMEC Cells.
EMECCell
A Cell of the electromagnetic endcap calorimeter readout geometry This class represents a single EMEC...
Definition
EMECCell.h:32
EMECDetDescr
Descriptor for regions of the electromagnetic endcap calorimeter.
Definition
EMECDetDescr.h:27
EMECDetectorRegion::~EMECDetectorRegion
~EMECDetectorRegion()
Destructor.
EMECDetectorRegion::getFocalPointPosAmg
Amg::Vector3D getFocalPointPosAmg() const
Returns the position of the focal point of the EMEC.
Definition
EMECDetectorRegion.cxx:75
EMECDetectorRegion::m_projectivityDisplacement
double m_projectivityDisplacement
Definition
EMECDetectorRegion.h:153
EMECDetectorRegion::getEMECCell
EMECCellConstLink getEMECCell(unsigned int ieta, unsigned int iphi) const
Access to Cells.
Definition
EMECDetectorRegion.cxx:27
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:32
EMECDetectorRegion::m_endcapIndex
EMECDetectorRegion::DetectorSide m_endcapIndex
Definition
EMECDetectorRegion.h:152
EMECDetectorRegion::getDefAbsoluteTransform
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition
EMECDetectorRegion.cxx:61
EMECDetectorRegion::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition
EMECDetectorRegion.cxx:53
EMECDetectorRegion::EMECDetectorRegion
EMECDetectorRegion(const GeoVFullPhysVol *physVol, const EMECDetDescr *emecDescriptor, DetectorSide endcap, double projectivityDisplacement=4 *Gaudi::Units::cm)
Constructor.
Definition
EMECDetectorRegion.cxx:13
EMECDetectorRegion::m_descriptor
GeoIntrusivePtr< const EMECDetDescr > m_descriptor
Definition
EMECDetectorRegion.h:151
EMECDetectorRegion::DetectorSide
DetectorSide
Definition
EMECDetectorRegion.h:35
EMECDetectorRegion::getFocalPointPos
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the EMEC.
Definition
EMECDetectorRegion.cxx:45
EMECDetectorRegion::getRefPlanePosAmg
Amg::Vector3D getRefPlanePosAmg() const
Returns the position of the center of the reference plane of the EMEC (back of front tranverse bars).
Definition
EMECDetectorRegion.cxx:69
GeoAlignmentStore
Ensure that the extensions for the Vector3D are properly loaded.
Definition
GeoAlignmentStore.h:24
Amg::EigenTransformToCLHEP
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
Definition
CLHEPtoEigenConverter.h:103
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition
GeoPrimitives.h:46
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:48
Generated on
for ATLAS Offline Software by
1.17.0