|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GeoModelKernel/GeoVFullPhysVol.h"
25 #include "CLHEP/Geometry/Vector3D.h"
26 #include "CLHEP/Units/SystemOfUnits.h"
27 #include "CLHEP/Vector/ThreeVector.h"
40 const GeoVFullPhysVol* geophysvol,
99 const PixelID* pixelIdHelper =
static_cast<const PixelID*
>(pAtlasHelper);
102 }
else if (
isSCT()) {
105 const SCT_ID* sctIdHelper =
static_cast<const SCT_ID*
>(pAtlasHelper);
108 }
else if (
isPLR()) {
110 const PLR_ID* plrIdHelper =
static_cast<const PLR_ID*
>(pAtlasHelper);
129 const auto *
const pixelIdHelper =
static_cast<const PixelID*
>(pAtlasHelper);
132 const SCT_ID* sctIdHelper =
static_cast<const SCT_ID*
>(pAtlasHelper);
148 const PLR_ID* plrIdHelper =
static_cast<const PLR_ID*
>(pAtlasHelper);
156 const std::vector<const Trk::Surface*>&
160 std::vector<const Trk::Surface*>
s;
195 return localTransform;
265 return (globalPos.x() *
normal.y() - globalPos.y() *
normal.x()) / globalPos.perp();
338 std::pair<Amg::Vector3D,Amg::Vector3D>
342 const std::pair<Amg::Vector2D,Amg::Vector2D> localEnds=
344 return std::pair<Amg::Vector3D,Amg::Vector3D >(
globalPosition(localEnds.first),
351 if (!
m_id.
is_valid())
throw std::runtime_error(
"SiDetectorElement: Invalid identifier");
389 if (!
m_idHash.
is_valid())
throw std::runtime_error(
"SiDetectorElement: Unable to set IdentifierHash");
392 m_surface = std::make_unique<Trk::PlaneSurface>(*
this);
410 ATH_MSG_WARNING(
"Element has endcap like orientation with barrel identifier.");
412 ATH_MSG_WARNING(
"Element has barrel like orientation with endcap identifier.");
422 if (std::abs(sinStereoThis - sinStereoOther) < 1
e-5) {
431 return (sinStereoThis > sinStereoOther);
474 double cosStereoReco = sqrt(1-sinStereoReco*sinStereoReco);
475 double radialShift = sensorCenter[0];
477 Amg::Vector2D localfocus(-radialShift*sinStereoReco, radialShift - radialShift*cosStereoReco);
518 sinStereo = (globalPos.y() *
etaAxis.x() - globalPos.x() *
etaAxis.y()) / globalPos.perp();
527 double norm = 1./(
radius*sqrt(stripAxisX*stripAxisX + stripAxisY*stripAxisY));
528 sinStereo =
norm * (stripAxisX * globalPos.y() - stripAxisY * globalPos.x());
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
bool is_pixel(Identifier id) const
Ensure that the extensions for the Vector3D are properly loaded.
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
int phi_index(const Identifier &id) const
Amg::Transform3D localToModuleTransform() const
Transformation from local element to module frame.
const T * ptr() const
Return a pointer to the cached value.
virtual Amg::Vector3D sensorCenter() const
Return the centre of a sensor in the local reference frame.
IdentifierHash m_idHash
hash id of this detector element
bool is_sct(Identifier id) const
Eigen::Matrix< double, 2, 1 > Vector2D
bool isValid() const
Test to see if the value is valid.
virtual DetectorShape shape() const
Shape of element.
const std::vector< const Trk::Surface * > & surfaces() const
Returns the full list of surfaces associated to this detector element.
virtual const Amg::Vector3D & center() const override final
Center in global coordinates.
const Amg::Vector3D & etaAxis() const
Amg::Transform3D localToModuleFrame(const Amg::Transform3D &localTransform) const
Take a transform of the local element frame and return its equivalent in the module frame.
This is an Identifier helper class for the PLR subdetector. This class inherits from PicelID.
bool isValid() const
Test if its in a valid state.
Trk::Surface & surface()
Element Surface.
This is an Identifier helper class for the PLR subdetector. This class inherits from PixelID.
int phiIndex() const
Get phi index. Equivalent to strip().
int strip() const
Get strip number. Equivalent to phiIndex().
CxxUtils::CachedValue< std::vector< const Trk::Surface * > > m_surfaces
SiDetectorElement()=delete
Don't allow no-argument constructor.
bool is_valid() const
Check if id is in a valid state.
CxxUtils::CachedValue< bool > m_isStereo
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline)
virtual double sinStripAngleReco(double phiCoord, double etaCoord) const
Give strip angle in the reco frame.
std::unique_ptr< Trk::Surface > m_surface
void commonConstructor()
Common code for constructors.
double sinTilt() const
Compute sin(tilt angle) at a given position: at center.
const SiDetectorDesign * m_siDesign
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
const DetectorDesign * m_design
local description of this detector element
const Amg::Transform3D defTransform() const
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for g...
virtual SiCellId cellIdFromIdentifier(const Identifier &identifier) const override final
SiCellId from Identifier.
int etaIndex() const
Get eta index.
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
virtual ~SiDetectorElement()
Destructor.
const Amg::Transform3D & moduleTransform() const
Module to global frame transform.
@ distEta
readout for silicon
bool isModuleFrame() const
Check if the element and module frame are the same.
virtual void updateCache() const override final
Recalculate cached values.
int row(const Identifier &id) const
virtual void updateCache() const
Recalculate cached values.
virtual Identifier identifierFromCellId(const SiCellId &cellId) const override final
Identifier <-> SiCellId (ie strip number or pixel eta_index,phi_index) Identifier from SiCellId (ie s...
Eigen::Affine3d Transform3D
double width() const
Methods from design (inline)
int eta_index(const Identifier &id) const
virtual DetectorType type() const
Type of element.
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
bool isInnermostPixelLayer() const
virtual const Amg::Vector3D & normal() const override final
Get reconstruction local normal axes in global frame.
bool is_valid() const
Check if id is in a valid state.
double sinStereo() const
Compute sin(stereo angle) at a given position: at center.
int layer_disk(const Identifier &id) const
virtual HelperType helper() const
Type of helper, defaulted to 'Unimplemented'.
std::pair< Amg::Vector3D, Amg::Vector3D > endsOfStrip(const Amg::Vector2D &position) const
Special method for SCT to retrieve the two ends of a "strip" Returned coordinates are in global frame...
const SiDetectorElement * otherSide() const
Useful for SCT only.
void set(const T &val) const
Set the value, assuming it is currently invalid.
Amg::Transform3D defModuleTransform() const
Default module to global frame transform, ie with no misalignment.
Eigen::Matrix< double, 3, 1 > Vector3D
virtual int strip1Dim(int strip, int row) const
only relevant for SCT.
const SiDetectorElement * m_otherSide
bool is_dbm(const Identifier &id) const
Test for dbm - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for gene...
Identifier m_id
identifier of this detector element
bool is_lumi(Identifier id) const
double minWidth() const
Min width.
#define ATH_MSG_WARNING(x)
int strip(const Identifier &id) const
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
const Amg::Vector3D & phiAxis() const
Identifier pixel_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
double sinStereoLocal(const Amg::Vector2D &localPos) const
Angle of strip in local frame with respect to the etaAxis.
virtual double get_rz() const override final
int side(const Identifier &id) const
double sinStereoImpl() const
Private implementation method with no lock at center.
bool nearBondGap(const Amg::Vector2D &localPosition, double etaTol) const
Test if near bond gap within tolerances.
Amg::Vector2D localPosition(const HepGeom::Point3D< double > &globalPosition) const
transform a global position into a 2D local position (reconstruction frame) (inline)
double length() const
Length in eta direction (z - barrel, r - endcap)
bool determineStereo() const
Find isStereo.
bool isStereo() const
Check if it is the stereo side (useful for SCT)
bool isNextToInnermostPixelLayer() const
virtual const Amg::Transform3D & transform() const override final
Return local to global transform.
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be sct id, otherwise answer is not accurate. Use SiliconID for gen...
CxxUtils::CachedValue< AxisDir > m_axisDir
Identifier strip_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
For an individual strip.
double maxWidth() const
Max width.