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-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "GeoModelKernel/GeoVFullPhysVol.h"
6
7
#include "
LArReadoutGeometry/EMECDetectorRegion.h
"
8
#include "GeoModelKernel/GeoPcon.h"
9
#include "
GeoPrimitives/CLHEPtoEigenConverter.h
"
10
#include "
GeoModelUtilities/GeoAlignmentStore.h
"
11
12
EMECDetectorRegion::EMECDetectorRegion
(
const
GeoVFullPhysVol *physVol
13
,
const
EMECDetDescr
*emecDescriptor
14
,
DetectorSide
endcap
15
,
double
projectivityDisplacement)
16
: GeoVDetectorElement(physVol)
17
,
m_descriptor
(emecDescriptor)
18
,
m_endcapIndex
(endcap)
19
,
m_projectivityDisplacement
(projectivityDisplacement)
20
{
21
22
}
23
24
EMECDetectorRegion::~EMECDetectorRegion
() =
default
;
25
26
EMECCellConstLink
EMECDetectorRegion::getEMECCell
(
unsigned
int
ieta,
unsigned
int
iphi)
const
27
{
28
return
{
new
EMECCell
(
m_endcapIndex
,
m_descriptor
,ieta,iphi)};
29
}
30
31
HepGeom::Point3D<double>
EMECDetectorRegion::getRefPlanePos
()
const
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
}
43
44
HepGeom::Point3D<double>
EMECDetectorRegion::getFocalPointPos
()
const
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
}
51
52
const
Amg::Transform3D
&
EMECDetectorRegion::getAbsoluteTransform
(
const
GeoAlignmentStore
* alignStore)
const
53
{
54
const
GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
55
return
alignStore
56
? fullPhysVol->getCachedAbsoluteTransform(alignStore)
57
: fullPhysVol->getAbsoluteTransform();
58
}
59
60
const
Amg::Transform3D
&
EMECDetectorRegion::getDefAbsoluteTransform
(
const
GeoAlignmentStore
* alignStore)
const
61
{
62
const
GeoVFullPhysVol *fullPhysVol = getMaterialGeom();
63
return
alignStore
64
? fullPhysVol->getCachedDefAbsoluteTransform(alignStore)
65
: fullPhysVol->getDefAbsoluteTransform();
66
}
67
68
Amg::Vector3D
EMECDetectorRegion::getRefPlanePosAmg
()
const
69
{
70
const
HepGeom::Point3D<double> point =
getRefPlanePos
();
71
return
Amg::Vector3D
(point.x(), point.y(), point.z());
72
}
73
74
Amg::Vector3D
EMECDetectorRegion::getFocalPointPosAmg
()
const
75
{
76
const
HepGeom::Point3D<double> point =
getFocalPointPos
();
77
return
Amg::Vector3D
(point.x(),point.y(),point.z());
78
}
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:74
EMECDetectorRegion::m_projectivityDisplacement
double m_projectivityDisplacement
Definition
EMECDetectorRegion.h:151
EMECDetectorRegion::getEMECCell
EMECCellConstLink getEMECCell(unsigned int ieta, unsigned int iphi) const
Access to Cells.
Definition
EMECDetectorRegion.cxx:26
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::m_endcapIndex
EMECDetectorRegion::DetectorSide m_endcapIndex
Definition
EMECDetectorRegion.h:150
EMECDetectorRegion::getDefAbsoluteTransform
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition
EMECDetectorRegion.cxx:60
EMECDetectorRegion::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition
EMECDetectorRegion.cxx:52
EMECDetectorRegion::EMECDetectorRegion
EMECDetectorRegion(const GeoVFullPhysVol *physVol, const EMECDetDescr *emecDescriptor, DetectorSide endcap, double projectivityDisplacement=4 *Gaudi::Units::cm)
Constructor.
Definition
EMECDetectorRegion.cxx:12
EMECDetectorRegion::m_descriptor
GeoIntrusivePtr< const EMECDetDescr > m_descriptor
Definition
EMECDetectorRegion.h:149
EMECDetectorRegion::DetectorSide
DetectorSide
Definition
EMECDetectorRegion.h:33
EMECDetectorRegion::getFocalPointPos
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the EMEC.
Definition
EMECDetectorRegion.cxx:44
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:68
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:120
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