5#include "Identifier/Identifier.h"
28 unsigned int modIndex,
29 unsigned int phiIndex,
30 unsigned int strawLayIndex,
34 idHelper->layer_id((isPositive ? 1 : -1),
40 ,
m_code(isPositive, modIndex, phiIndex, strawLayIndex)
108 const GeoXF::Function *f=
m_descriptor->getStrawTransform();
110 size_t offsetInto =
m_descriptor->getStrawTransformOffset();
114 * HepGeom::RotateY3D(zAng)*HepGeom::TranslateZ3D(zPos)
121 std::cout <<
"calculateStrawTransform: f is 0 !!!!" << std::endl;
129 HepGeom::Transform3D
rc ;
147 double dx = (dx2+dx1)/2.;
148 rc = HepGeom::TranslateX3D(dx)*HepGeom::RotateY3D(ang) ;
161 m_surface.set(std::make_unique<Trk::PlaneSurface>(*
this));
194 double width = phiAxis.mag();
195 phiAxis = phiAxis.normalized();
196 double elementWidth =
203 etaAxis = etaAxis.normalized();
217 rotation.col(0) = phiAxis;
218 rotation.col(1) = etaAxis;
225 auto elementBounds = std::make_unique<Trk::RectangleBounds>(
238 return !(
m_code.isPosZ()) ? +1 : -1;
Class for storing/accessing trt endpoint corrections data.
This is an Identifier helper class for the TRT subdetector.
Ensure that the extensions for the Vector3D are properly loaded.
unsigned int isPosZ() const
unsigned int getPhiIndex() const
unsigned int getStrawLayerIndex() const
unsigned int getModuleIndex() const
Local Straw Positions (from the center of the module.)
virtual int strawDirection() const override final
StrawDirection.
virtual const Trk::Surface & elementSurface() const override
return the surface of the element
HepGeom::Transform3D calculateLocalStrawTransform(int straw) const
virtual const Trk::SurfaceBounds & strawBounds() const override final
Surface bounds.
virtual void createSurfaceCache(GeoAlignmentStore *alignStore) const override
create the cache for the element
void setPreviousInR(const TRT_BarrelElement *element)
Sets the previous-in-r detector.
const TRT_BarrelDescriptor * m_descriptor
static const TRT_BarrelConditions * getConditionsData()
Returns a pointer to conditions data.
const TRT_BarrelElement * m_nextInR
const TRT_BarrelElement * m_previousInPhi
const TRT_BarrelElement * m_nextInPhi
void setNextInPhi(const TRT_BarrelElement *element)
Sets the next-in-phi detector.
const TRT_BarrelElement * m_previousInR
virtual HepGeom::Transform3D calculateStrawTransform(int straw, GeoAlignmentStore *alignStore) const override
These transforms are effectively to the local coord system of a straw derived from GeoModel -> hence ...
SurfaceCache createSurfaceCacheHelper(GeoAlignmentStore *alignStore) const
virtual const double & strawLength() const override final
Get the length of the straws (active length):
const TRT_BarrelCode & getCode() const
Doomed (?):
const TRT_BarrelDescriptor * getDescriptor() const
Returns a pointer to a descriptor, giving common information on module construction:
TRT_BarrelElement(const GeoVFullPhysVol *volume, const TRT_BarrelDescriptor *descriptor, bool isPositive, unsigned int modIndex, unsigned int phiIndex, unsigned int strawLayIndex, const TRT_ID *idHelper, const TRT_Conditions *conditions)
Constructor:
void setNextInR(const TRT_BarrelElement *element)
Sets the next-in-r detector.
void setPreviousInPhi(const TRT_BarrelElement *element)
Sets the previous-in-phi detector.
const HepGeom::Transform3D getAbsoluteTransform(int straw) const
This is an alias to strawTransform(int straw)
unsigned int nStraws() const
Number of straws in the element.
const TRT_ID * m_idHelper
virtual Identifier identify() const override final
identifier of this detector element:
TRT_BaseElement(const GeoVFullPhysVol *volume, const Identifier &id, const TRT_ID *idHelper, const TRT_Conditions *conditions)
Constructor:
const TRT_Conditions * conditions() const
Return the TRT_Conditions object associated to this Detector element.
virtual const Amg::Vector3D & normal() const override final
Element Surface: normal of a straw layer.
virtual const Amg::Transform3D & transform() const override final
Element Surface: Get Transform of element in Tracking frame: Amg.
virtual const Amg::Vector3D & center() const override final
Element Surface: center of a straw layer.
CxxUtils::CachedValue< SurfaceCache > m_surfaceCache
std::vector< CxxUtils::CachedUniquePtr< SurfaceCacheBase > > m_strawSurfacesCache
helper element surface for the cache
Amg::Vector3D strawAxis(int straw) const
Straw axis.
CxxUtils::CachedUniquePtr< Trk::Surface > m_surface
std::vector< CxxUtils::CachedUniquePtr< Trk::StraightLineSurface > > m_strawSurfaces
This class is an interface to conditions objects.
const TRTCond::StrawDxContainer * dxContainer() const
Identifier for TRT detector elements in the conditions code.
specialise to detector level
This is an Identifier helper class for the TRT subdetector.
Abstract base class for surface bounds to be specified.
Abstract Base Class for tracking surfaces.
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D