9#include "Identifier/Identifier.h"
15#include "CLHEP/Geometry/Transform3D.h"
16#include "GeoModelKernel/GeoDefinitions.h"
30 unsigned int wheelIndex,
31 unsigned int strawLayIndex,
32 unsigned int phiIndex,
38 idHelper->layer_id((isPositive ? 2 : -2),
44 ,
m_code(isPositive, wheelIndex, strawLayIndex, phiIndex)
75const TRT_EndcapConditions*
107 const GeoXF::Function* f =
m_descriptor->getStrawTransform();
112 size_t offsetInto =
m_descriptor->getStrawTransformOffset();
116 ((*f)(istraw + offsetInto))) *
124 std::cout <<
"ALTERNATIVE METHOD" << std::endl;
128 CLHEP::Hep3Vector pos(
132 HepGeom::Point3D<double>())
134 CLHEP::HepRotation rot;
136 rot.rotateY(-0.5 *
M_PI);
138 return HepGeom::Transform3D(rot, pos);
147 HepGeom::Transform3D
rc;
170 double dy = -1 * (dx2 + dx1) / 2.;
179 rc = HepGeom::TranslateY3D(dy) * HepGeom::RotateX3D(ang);
194 m_surface.set(std::make_unique<Trk::DiscSurface>(*
this));
239 GeoTrf::RotateZ3D(phiCenter)))
241 GeoTrf::RotateY3D(180 * CLHEP::deg) *
242 GeoTrf::RotateZ3D(phiCenter)));
246 auto bounds = std::make_unique<Trk::DiscBounds>(rMin, rMax, phiHalfWidth);
263 return (
m_code.isPosZ()) ? +1 : -1;
Scalar phi() const
phi method
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.
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.
virtual const Trk::SurfaceBounds & bounds() const override final
Straw layer bounds.
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
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
unsigned int isPosZ() const
unsigned int getPhiIndex() const
unsigned int getStrawLayerIndex() const
unsigned int getWheelIndex() const
class TRT_EndcapDescriptor
virtual const double & strawLength() const override
Active straw length.
TRT_EndcapElement(const GeoVFullPhysVol *volume, const TRT_EndcapDescriptor *descriptor, bool isPositive, unsigned int wheelIndex, unsigned int strawLayIndex, unsigned int phiIndex, const TRT_ID *idHelper, const TRT_Conditions *conditions)
Constructor.
const TRT_EndcapCode & getCode() const
Doomed (?
const TRT_EndcapDescriptor * m_descriptor
void setNextInZ(const TRT_EndcapElement *element)
Set Next in Z.
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 ...
virtual const Trk::Surface & elementSurface() const override
return the surface of the element
virtual ~TRT_EndcapElement()
Destructor:
virtual const Trk::SurfaceBounds & strawBounds() const override final
the straw bounds
const TRT_EndcapElement * m_nextInZ
const TRT_EndcapDescriptor * getDescriptor() const
Returns a pointer to a descriptor, giving common information on module construction.
virtual int strawDirection() const override final
StrawDirection.
SurfaceCache createSurfaceCacheHelper(GeoAlignmentStore *alignStore) const
void setPreviousInZ(const TRT_EndcapElement *element)
Set Previous in Z.
const TRT_EndcapElement * m_previousInZ
HepGeom::Transform3D calculateLocalStrawTransform(int straw) const
static const TRT_EndcapConditions * getConditionsData()
Returns a pointer to conditions data.
virtual void createSurfaceCache(GeoAlignmentStore *alignStore) const override
create the cache for the element
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::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D