ATLAS Offline Software
Loading...
Searching...
No Matches
InDetDD::TRT_EndcapElement Class Referencefinal

Extended class of a TRT_BaseElement to describe a readout elment in the endcap. More...

#include <TRT_EndcapElement.h>

Inheritance diagram for InDetDD::TRT_EndcapElement:
Collaboration diagram for InDetDD::TRT_EndcapElement:

Public Types

enum  Type { BARREL , ENDCAP }

Public Member Functions

 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.
 TRT_EndcapElement (const TRT_EndcapElement &right)
virtual ~TRT_EndcapElement ()
 Destructor:
virtual TRT_BaseElement::Type type () const override final
 Type information:
virtual const double & strawLength () const override
 Active straw length.
virtual int strawDirection () const override final
 StrawDirection.
const TRT_EndcapDescriptorgetDescriptor () const
 Returns a pointer to a descriptor, giving common information on module construction.
const TRT_EndcapElementnextInZ () const
 Next in Z:
const TRT_EndcapElementpreviousInZ () const
 Prev in Z:
void setNextInZ (const TRT_EndcapElement *element)
 Set Next in Z.
void setPreviousInZ (const TRT_EndcapElement *element)
 Set Previous in Z.
const TRT_EndcapCodegetCode () const
 Doomed (?
virtual const Trk::SurfaceBoundsstrawBounds () const override final
 the straw bounds
virtual Identifier identify () const override final
 identifier of this detector element:
virtual IdentifierHash identifyHash () const override final
 identifier hash
const GeoTrf::Transform3D & defTransform () const
 Get Default Transform (of module in barrel, layer in endcap) from GeoModel before alignment corrections.
const HepGeom::Transform3D getAbsoluteTransform (int straw) const
 This is an alias to strawTransform(int straw)
virtual const Trk::Surfacesurface () const override final
 Element Surface: access to the Surface (straw layer)
virtual const Trk::Surfacesurface (const Identifier &id) const override final
 Straw Surface: access to the surface via identifier.
virtual const Trk::SurfaceBoundsbounds () const override final
 Straw layer bounds.
virtual const Trk::SurfaceBoundsbounds (const Identifier &id) const override final
 Straw Surface: access to the bounds via Identifier.
virtual const Amg::Transform3Dtransform () const override final
 Element Surface: Get Transform of element in Tracking frame: Amg.
virtual const Amg::Transform3Dtransform (const Identifier &id) const override final
 Straw Surface: access to the transform of individual straw in Tracking frame: Amg.
virtual const Amg::Vector3Dcenter () const override final
 Element Surface: center of a straw layer.
virtual const Amg::Vector3Dcenter (const Identifier &id) const override final
 Straw Surface: Center of a straw using Identifier Straw center and straw axis can be obtained by the following: (The straw center is the center of the active region) Amg::Transform3D& transform = element->strawTransform(straw); Amb::Vector3D& center = element->strawCenter(); double r = element->strawCenter()->perp(); double phi = element->strawCenter()->phi(); Amg::Vector3D strawAxis = element->strawTransform(straw)* Vector3D(0,0,1) * strawDirection()
virtual const Amg::Vector3Dnormal () const override final
 Element Surface: normal of a straw layer.
virtual const Amg::Vector3Dnormal (const Identifier &id) const override final
 Normal of a straw.
virtual Trk::DetectorElemType detectorType () const override final
 TrkDetElementBase interface detectorTyoe.
const std::vector< const Trk::Surface * > & surfaces () const
 Returns the full list of all detection surfaces associated to this detector element.
const Amg::Transform3DstrawTransform (unsigned int straw) const
 Straw transform - fast access in array, in Tracking frame: Amg.
const Amg::Transform3DstrawTransform (int straw) const
 Straw Surface: Local -> global transform of the straw via integer.
const Trk::StraightLineSurfacestrawSurface (int straw) const
 Straw Surface: access to the surface via integer.
const Amg::Vector3DstrawCenter (int straw) const
 Straw Surface: Local -> global transform of the straw via integer.
Amg::Vector3D strawAxis (int straw) const
 Straw axis.
unsigned int nStraws () const
 Number of straws in the element.
void invalidate ()
 Invalidate cache.
void updateAllCaches (GeoAlignmentStore *alignStore=nullptr) const
 Update all caches.
const TRT_Conditionsconditions () const
 Return the TRT_Conditions object associated to this Detector element.
void createSurfaceCache (Identifier id, GeoAlignmentStore *alignStore=nullptr) const
 create the surface & surface cache for the straw
void invalidateOther () const
 invalidate action on the cache
std::string detectorTypeString () const
 Returns a string of the Detector element type.

Static Public Member Functions

static const TRT_EndcapConditions * getConditionsData ()
 Returns a pointer to conditions data.

Protected Member Functions

const Amg::Vector3Dcenter (const Identifier &id, GeoAlignmentStore *alignStore) const

Protected Attributes

Identifier m_id
IdentifierHash m_idHash
unsigned int m_nstraws = 0
const TRT_IDm_idHelper =nullptr
const TRT_Conditionsm_conditions =nullptr
CxxUtils::CachedUniquePtr< Trk::Surfacem_surface
std::vector< CxxUtils::CachedUniquePtr< Trk::StraightLineSurface > > m_strawSurfaces {}
std::vector< CxxUtils::CachedUniquePtr< SurfaceCacheBase > > m_strawSurfacesCache {}
 helper element surface for the cache
CxxUtils::CachedValue< std::vector< const Trk::Surface * > > m_surfaces
CxxUtils::CachedValue< SurfaceCachem_surfaceCache

Private Member Functions

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 CLHEP.
HepGeom::Transform3D calculateLocalStrawTransform (int straw) const
virtual const Trk::SurfaceelementSurface () const override
 return the surface of the element
virtual void createSurfaceCache (GeoAlignmentStore *alignStore) const override
 create the cache for the element
SurfaceCache createSurfaceCacheHelper (GeoAlignmentStore *alignStore) const
void createSurfaceCache (Identifier id) const
 create the cache for the straw of identifier id
const TRT_EndcapElementoperator= (const TRT_EndcapElement &right)=delete
void deleteCache ()
 Helper method for cache dealing.

Private Attributes

TRT_EndcapCode m_code
const TRT_EndcapDescriptorm_descriptor
const TRT_EndcapElementm_nextInZ
const TRT_EndcapElementm_previousInZ

Detailed Description

Extended class of a TRT_BaseElement to describe a readout elment in the endcap.

It secifies the strawTransfrom methods by getting the information from GeoModel

The readout element in the EC is a wheel with straws radially placed on it.

The number of straws described by this readout element can be retrieved by nStraws()

Author
: Grant Gorfine
  • modified & maintained: Nick Styles, Andreas Salzburger

Definition at line 43 of file TRT_EndcapElement.h.

Member Enumeration Documentation

◆ Type

Enumerator
BARREL 
ENDCAP 

Definition at line 56 of file TRT_BaseElement.h.

Constructor & Destructor Documentation

◆ TRT_EndcapElement() [1/2]

InDetDD::TRT_EndcapElement::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.

Definition at line 27 of file TRT_EndcapElement.cxx.

35 :
36
37 TRT_BaseElement(volume,
38 idHelper->layer_id((isPositive ? 2 : -2),
39 phiIndex,
40 wheelIndex,
41 strawLayIndex),
42 idHelper,
44 , m_code(isPositive, wheelIndex, strawLayIndex, phiIndex)
45 , m_descriptor(descriptor)
46 , m_nextInZ(nullptr)
47 , m_previousInZ(nullptr)
48{
49 m_nstraws = m_descriptor->nStraws();
52}
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.
std::vector< CxxUtils::CachedUniquePtr< SurfaceCacheBase > > m_strawSurfacesCache
helper element surface for the cache
std::vector< CxxUtils::CachedUniquePtr< Trk::StraightLineSurface > > m_strawSurfaces
const TRT_EndcapDescriptor * m_descriptor
const TRT_EndcapElement * m_nextInZ
const TRT_EndcapElement * m_previousInZ
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
Definition TRT_ID.h:494

◆ TRT_EndcapElement() [2/2]

InDetDD::TRT_EndcapElement::TRT_EndcapElement ( const TRT_EndcapElement & right)

Definition at line 54 of file TRT_EndcapElement.cxx.

55 : TRT_BaseElement(right)
56 , m_code(right.m_code)
57 , m_descriptor(right.m_descriptor)
58 , m_nextInZ(right.m_nextInZ)
59 , m_previousInZ(right.m_previousInZ)
60{
61 m_nstraws = right.m_nstraws;
64}

◆ ~TRT_EndcapElement()

InDetDD::TRT_EndcapElement::~TRT_EndcapElement ( )
virtualdefault

Destructor:

Member Function Documentation

◆ bounds() [1/2]

virtual const Trk::SurfaceBounds & InDetDD::TRT_BaseElement::bounds ( ) const
finaloverridevirtualinherited

Straw layer bounds.

Implements Trk::TrkDetElementBase.

◆ bounds() [2/2]

const Trk::SurfaceBounds & InDetDD::TRT_BaseElement::bounds ( const Identifier & id) const
finaloverridevirtualinherited

Straw Surface: access to the bounds via Identifier.

Implements Trk::TrkDetElementBase.

Definition at line 72 of file TRT_BaseElement.cxx.

73{
74 return strawBounds();
75}
virtual const Trk::SurfaceBounds & strawBounds() const =0
the straw bounds

◆ calculateLocalStrawTransform()

HepGeom::Transform3D InDetDD::TRT_EndcapElement::calculateLocalStrawTransform ( int straw) const
private

Definition at line 144 of file TRT_EndcapElement.cxx.

145{
146 const TRTCond::StrawDxContainer* container = conditions()->dxContainer();
147 HepGeom::Transform3D rc;
148 if (container) {
149
150 // important note: dx1 moves the 'negative' wire endpoint end dx2
151 // the 'positive' wire endpoint in the local straw frame.
152 // In the global frame, 'dx1' corresponds to the readout side and 'dx2'
153 // to the side closest the beampipe.
154
155 int bec = getCode().isPosZ() ? +2 : -2;
156 int wheel = getCode().getWheelIndex();
157 int phimodule = getCode().getPhiIndex();
158 int strawlayer = getCode().getStrawLayerIndex();
159 TRTCond::ExpandedIdentifier id =
160 TRTCond::ExpandedIdentifier(bec,
161 wheel,
162 phimodule,
163 strawlayer,
164 straw,
166
167 double dx1 = container->getDx1(id);
168 double dx2 = container->getDx2(id);
169 double ang = (dx2 - dx1) / strawLength();
170 double dy = -1 * (dx2 + dx1) / 2.;
171
172 // In the local straw frame:
173 // - the z-axis is along the straw and points toward the beampipe
174 // - the x-axis is along global-z and away from the interaction point
175 // (locX = globZ A-side / locX = -1 *gobZ C-side)
176 // - the y-axis is along global phi_hat direction determined by the
177 // other 2.
178 // (clockwise C-side, counter clockwise A-Side)
179 rc = HepGeom::TranslateY3D(dy) * HepGeom::RotateX3D(ang);
180 }
181 return rc;
182}
static Double_t rc
const TRTCond::StrawDxContainer * dxContainer() const
unsigned int isPosZ() const
unsigned int getPhiIndex() const
unsigned int getStrawLayerIndex() const
unsigned int getWheelIndex() const
virtual const double & strawLength() const override
Active straw length.
const TRT_EndcapCode & getCode() const
Doomed (?
float getDx2(const ExpandedIdentifier &id) const
float getDx1(const ExpandedIdentifier &id) const
access to unpacked dx

◆ calculateStrawTransform()

HepGeom::Transform3D InDetDD::TRT_EndcapElement::calculateStrawTransform ( int straw,
GeoAlignmentStore * alignStore ) const
overrideprivatevirtual

These transforms are effectively to the local coord system of a straw derived from GeoModel -> hence CLHEP.

Implements InDetDD::TRT_BaseElement.

Definition at line 100 of file TRT_EndcapElement.cxx.

101{
102 // NB The tranformation to a straw is reconstructed here precisely as
103 // it was ... hopefully... in the factory. One could eliminate this
104 // requirement and make the code a little more robust in this regard but
105 // at the cost of doubling the descriptors. (One descriptor now suffices
106 // for both positive and negative endcaps).
107 const GeoXF::Function* f = m_descriptor->getStrawTransform();
108
109 if (f) {
110 int istraw = m_code.isPosZ() ? straw : m_descriptor->nStraws() - 1 - straw;
111
112 size_t offsetInto = m_descriptor->getStrawTransformOffset();
113
115 getMaterialGeom()->getAbsoluteTransform(alignStore) *
116 ((*f)(istraw + offsetInto))) *
120
121 } else {
122
123 // Will not work properly with alignments.
124 std::cout << "ALTERNATIVE METHOD" << std::endl;
125
126 double phi = m_descriptor->startPhi() + m_descriptor->strawPitch() * straw;
127 double r = m_descriptor->innerRadius() + 0.5 * m_descriptor->strawLength();
128 CLHEP::Hep3Vector pos(
129 r * cos(phi),
130 r * sin(phi),
131 (Amg::EigenTransformToCLHEP(getMaterialGeom()->getAbsoluteTransform(alignStore)) *
132 HepGeom::Point3D<double>())
133 .z());
134 CLHEP::HepRotation rot;
135 // Axis (in local (0,0,1)) points towards beam axis.
136 rot.rotateY(-0.5 * M_PI); // Make it point along -ve X.
137 rot.rotateZ(phi);
138 return HepGeom::Transform3D(rot, pos);
139 }
140}
#define M_PI
Scalar phi() const
phi method
#define z
const HepGeom::Transform3D getAbsoluteTransform(int straw) const
This is an alias to strawTransform(int straw)
HepGeom::Transform3D calculateLocalStrawTransform(int straw) const
int r
Definition globals.cxx:22
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
@ straw
Definition HitInfo.h:82

◆ center() [1/3]

virtual const Amg::Vector3D & InDetDD::TRT_BaseElement::center ( ) const
finaloverridevirtualinherited

Element Surface: center of a straw layer.

Implements Trk::TrkDetElementBase.

◆ center() [2/3]

const Amg::Vector3D & InDetDD::TRT_BaseElement::center ( const Identifier & id) const
finaloverridevirtualinherited

Straw Surface: Center of a straw using Identifier Straw center and straw axis can be obtained by the following: (The straw center is the center of the active region) Amg::Transform3D& transform = element->strawTransform(straw); Amb::Vector3D& center = element->strawCenter(); double r = element->strawCenter()->perp(); double phi = element->strawCenter()->phi(); Amg::Vector3D strawAxis = element->strawTransform(straw)* Vector3D(0,0,1) * strawDirection()

Implements Trk::TrkDetElementBase.

Definition at line 110 of file TRT_BaseElement.cxx.

111{
112 int straw = m_idHelper->straw(id);
113 if (!m_strawSurfacesCache[straw]) {
115 }
116 // forward the transform of the cache
117 return m_strawSurfacesCache[straw]->center();
118}
virtual void createSurfaceCache(GeoAlignmentStore *alignStore=nullptr) const =0
create the surface cache of the detector element, to be implementd in the deried class

◆ center() [3/3]

const Amg::Vector3D & InDetDD::TRT_BaseElement::center ( const Identifier & id,
GeoAlignmentStore * alignStore ) const
protectedinherited

Definition at line 121 of file TRT_BaseElement.cxx.

122{
123 int straw = m_idHelper->straw(id);
124 if (!m_strawSurfacesCache[straw]) {
125 createSurfaceCache(id, alignStore);
126 }
127 // forward the transform of the cache
128 return m_strawSurfacesCache[straw]->center();
129}

◆ conditions()

const TRT_Conditions * InDetDD::TRT_BaseElement::conditions ( ) const
inherited

Return the TRT_Conditions object associated to this Detector element.

◆ createSurfaceCache() [1/3]

void InDetDD::TRT_BaseElement::createSurfaceCache ( Identifier id,
GeoAlignmentStore * alignStore = nullptr ) const
inherited

create the surface & surface cache for the straw

Definition at line 172 of file TRT_BaseElement.cxx.

173{
174 int straw = m_idHelper->straw(id);
175
176 // convert neccessary parts to Amg
177 if (!m_strawSurfacesCache[straw]) {
178 // create the surface cache & fill it
180 }
181 // creaete the surface only if needed (the links are still intact)
182 if (!m_strawSurfaces[straw]) {
184 std::make_unique<Trk::StraightLineSurface>(*this, id));
185 }
186}
std::unique_ptr< SurfaceCacheBase > createSurfaceCacheHelper(int straw, GeoAlignmentStore *alignStore=nullptr) const

◆ createSurfaceCache() [2/3]

void InDetDD::TRT_EndcapElement::createSurfaceCache ( GeoAlignmentStore * alignStore) const
overrideprivatevirtual

create the cache for the element

Implements InDetDD::TRT_BaseElement.

Definition at line 199 of file TRT_EndcapElement.cxx.

200{
201 if (!m_surfaceCache.isValid()) {
203 }
204 // create the surface if needed
205 if (!m_surface) {
207 }
208}
CxxUtils::CachedValue< SurfaceCache > m_surfaceCache
CxxUtils::CachedUniquePtr< Trk::Surface > m_surface
virtual const Trk::Surface & elementSurface() const override
return the surface of the element
SurfaceCache createSurfaceCacheHelper(GeoAlignmentStore *alignStore) const

◆ createSurfaceCache() [3/3]

void InDetDD::TRT_EndcapElement::createSurfaceCache ( Identifier id) const
private

create the cache for the straw of identifier id

◆ createSurfaceCacheHelper()

SurfaceCache InDetDD::TRT_EndcapElement::createSurfaceCacheHelper ( GeoAlignmentStore * alignStore) const
private

Definition at line 211 of file TRT_EndcapElement.cxx.

212{
213 // Calculate the surface
214 double phiCenter = m_descriptor->startPhi() +
215 m_descriptor->strawPitch() * 0.5 * (nStraws() - 1);
216 double phiHalfWidth = 0.5 * m_descriptor->strawPitch() * nStraws();
217 double rMin = m_descriptor->innerRadius();
218 double rMax = rMin + m_descriptor->strawLength();
219
220 // The transform of the endcap is a translation in z for no
221 // misalignement. For the -ve endcap there is also a 180deg rotation
222 // around the y axis. getAbsoluteTransform() will also include the
223 // misalignment.
224 //
225 // To get the transform of the element we have to first rotate
226 // around z to the phi center of the element. We want the local z
227 // to point in the same direction for both endcaps (approximately
228 // global z axis). For the negative endcap we therefore have to
229 // rotate 180 CLHEP::deg around the Y axis.
230
231 // We need to rotate to phi center before we apply the
232 // misalignment. However, in the negative endcap the the phi
233 // location is inverted (due to 180 rotation around y axis). This is
234 // taken care of by the extra 180 CLHEP::deg rotation around Y that we do
235 // to get the z axis pointing in the correct direction.
236 auto transform =
237 m_code.isPosZ()
238 ? Amg::Transform3D((getMaterialGeom()->getAbsoluteTransform(alignStore) *
239 GeoTrf::RotateZ3D(phiCenter)))
240 : Amg::Transform3D((getMaterialGeom()->getAbsoluteTransform(alignStore) *
241 GeoTrf::RotateY3D(180 * CLHEP::deg) *
242 GeoTrf::RotateZ3D(phiCenter)));
243
244 // create the igredients and the cache
245 auto center = Amg::Vector3D(transform.translation());
246 auto bounds = std::make_unique<Trk::DiscBounds>(rMin, rMax, phiHalfWidth);
247 auto normal = Amg::Vector3D(transform.rotation().col(2));
248
249 return {transform, center, normal, std::move(bounds)};
250}
Eigen::Affine3d Transform3D
#define deg
unsigned int nStraws() const
Number of straws in the element.
virtual const Trk::SurfaceBounds & bounds() const override final
Straw layer bounds.
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.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D

◆ defTransform()

const GeoTrf::Transform3D & InDetDD::TRT_BaseElement::defTransform ( ) const
inherited

Get Default Transform (of module in barrel, layer in endcap) from GeoModel before alignment corrections.

◆ deleteCache()

void InDetDD::TRT_BaseElement::deleteCache ( )
privateinherited

Helper method for cache dealing.

Definition at line 211 of file TRT_BaseElement.cxx.

212{
213 // for all straws
214 for (auto & i : m_strawSurfacesCache) {
215 i.release();
216 }
217}

◆ detectorType()

virtual Trk::DetectorElemType InDetDD::TRT_BaseElement::detectorType ( ) const
finaloverridevirtualinherited

TrkDetElementBase interface detectorTyoe.

Implements Trk::TrkDetElementBase.

◆ detectorTypeString()

std::string Trk::TrkDetElementBase::detectorTypeString ( ) const
inherited

Returns a string of the Detector element type.

Definition at line 10 of file TrkDetElementBase.cxx.

10 {
11 auto type = detectorType();
13 return "SolidState";
14 else if (type == Trk::DetectorElemType::Silicon)
15 return "Silicon";
16 else if (type == Trk::DetectorElemType::TRT)
17 return "TRT";
18 else if (type == Trk::DetectorElemType::Csc)
19 return "Csc";
20 else if (type == Trk::DetectorElemType::Mdt)
21 return "Mdt";
22 else if (type == Trk::DetectorElemType::Rpc)
23 return "Rpc";
24 else if (type == Trk::DetectorElemType::Tgc)
25 return "Tgc";
26 else if (type == Trk::DetectorElemType::sTgc)
27 return "sTgc";
28 else if (type == Trk::DetectorElemType::MM)
29 return "Mm";
30 return "Unknown";
31}
virtual DetectorElemType detectorType() const =0
Return the Detector element type.

◆ elementSurface()

const Trk::Surface & InDetDD::TRT_EndcapElement::elementSurface ( ) const
overrideprivatevirtual

return the surface of the element

Implements InDetDD::TRT_BaseElement.

Definition at line 191 of file TRT_EndcapElement.cxx.

192{
193 if (not m_surface)
194 m_surface.set(std::make_unique<Trk::DiscSurface>(*this));
195 return *m_surface;
196}

◆ getAbsoluteTransform()

const HepGeom::Transform3D InDetDD::TRT_BaseElement::getAbsoluteTransform ( int straw) const
inherited

This is an alias to strawTransform(int straw)

Definition at line 42 of file TRT_BaseElement.cxx.

43{
45}
const Amg::Transform3D & strawTransform(unsigned int straw) const
Straw transform - fast access in array, in Tracking frame: Amg.

◆ getCode()

const TRT_EndcapCode & InDetDD::TRT_EndcapElement::getCode ( ) const

Doomed (?

?)

◆ getConditionsData()

const TRT_EndcapConditions * InDetDD::TRT_EndcapElement::getConditionsData ( )
static

Returns a pointer to conditions data.

This includes information on dead and noisy wires, as well as wire sags.

Definition at line 76 of file TRT_EndcapElement.cxx.

77{
78 return nullptr;
79}

◆ getDescriptor()

const TRT_EndcapDescriptor * InDetDD::TRT_EndcapElement::getDescriptor ( ) const

Returns a pointer to a descriptor, giving common information on module construction.

Definition at line 82 of file TRT_EndcapElement.cxx.

83{
84 return m_descriptor;
85}

◆ identify()

virtual Identifier InDetDD::TRT_BaseElement::identify ( ) const
finaloverridevirtualinherited

identifier of this detector element:

Implements Trk::TrkDetElementBase.

◆ identifyHash()

virtual IdentifierHash InDetDD::TRT_BaseElement::identifyHash ( ) const
finaloverridevirtualinherited

identifier hash

Implements Trk::TrkDetElementBase.

◆ invalidate()

void InDetDD::TRT_BaseElement::invalidate ( )
inherited

Invalidate cache.

Definition at line 201 of file TRT_BaseElement.cxx.

202{
203 // Invalidate the caches
204 // Call and barrel or endcap specific invalidation
206 // Its enough to delete and zero the caches.
207 deleteCache();
208}
void deleteCache()
Helper method for cache dealing.
void invalidateOther() const
invalidate action on the cache

◆ invalidateOther()

void InDetDD::TRT_BaseElement::invalidateOther ( ) const
inlineinherited

invalidate action on the cache

Definition at line 188 of file TRT_BaseElement.h.

188{};

◆ nextInZ()

const TRT_EndcapElement * InDetDD::TRT_EndcapElement::nextInZ ( ) const

Next in Z:

◆ normal() [1/2]

virtual const Amg::Vector3D & InDetDD::TRT_BaseElement::normal ( ) const
finaloverridevirtualinherited

Element Surface: normal of a straw layer.

Implements Trk::TrkDetElementBase.

◆ normal() [2/2]

const Amg::Vector3D & InDetDD::TRT_BaseElement::normal ( const Identifier & id) const
finaloverridevirtualinherited

Normal of a straw.

(Not very meaningful).

Implements Trk::TrkDetElementBase.

Definition at line 100 of file TRT_BaseElement.cxx.

101{
102 // Not sure if the normal of the straw is ever used.
103 // nor is there a well defined normal.
104 // This wont be corrected for alignments.
105 // Just return the element normal
106 return normal();
107}

◆ nStraws()

unsigned int InDetDD::TRT_BaseElement::nStraws ( ) const
inherited

Number of straws in the element.

◆ operator=()

const TRT_EndcapElement & InDetDD::TRT_EndcapElement::operator= ( const TRT_EndcapElement & right)
privatedelete

◆ previousInZ()

const TRT_EndcapElement * InDetDD::TRT_EndcapElement::previousInZ ( ) const

Prev in Z:

◆ setNextInZ()

void InDetDD::TRT_EndcapElement::setNextInZ ( const TRT_EndcapElement * element)

Set Next in Z.

Definition at line 88 of file TRT_EndcapElement.cxx.

89{
90 m_nextInZ = element;
91}

◆ setPreviousInZ()

void InDetDD::TRT_EndcapElement::setPreviousInZ ( const TRT_EndcapElement * element)

Set Previous in Z.

Definition at line 94 of file TRT_EndcapElement.cxx.

95{
96 m_previousInZ = element;
97}

◆ strawAxis()

Amg::Vector3D InDetDD::TRT_BaseElement::strawAxis ( int straw) const
inherited

Straw axis.

Always in direction of increasing eta. +ve z direction in barrel (for both +ve and -ve half) Away from beam pipe in -ve z endcap, Towards beam pipe in +ve endcap.

Definition at line 165 of file TRT_BaseElement.cxx.

166{
167 return (strawTransform(straw).linear() * Amg::Vector3D::UnitZ() *
169}
virtual int strawDirection() const =0
StrawDirection.

◆ strawBounds()

const Trk::SurfaceBounds & InDetDD::TRT_EndcapElement::strawBounds ( ) const
finaloverridevirtual

the straw bounds

Implements InDetDD::TRT_BaseElement.

Definition at line 185 of file TRT_EndcapElement.cxx.

186{
187 return m_descriptor->strawBounds();
188}

◆ strawCenter()

const Amg::Vector3D & InDetDD::TRT_BaseElement::strawCenter ( int straw) const
inherited

Straw Surface: Local -> global transform of the straw via integer.

Definition at line 154 of file TRT_BaseElement.cxx.

155{
156 if (!m_strawSurfacesCache[straw]) {
157 Identifier id = m_idHelper->straw_id(identify(), straw);
159 }
160 // forward the transform of the cache
161 return m_strawSurfacesCache[straw]->center();
162}
virtual Identifier identify() const override final
identifier of this detector element:

◆ strawDirection()

int InDetDD::TRT_EndcapElement::strawDirection ( ) const
finaloverridevirtual

StrawDirection.

+1 if axis is in same direction as local coordinate, -1 otherwise.

Implements InDetDD::TRT_BaseElement.

Definition at line 253 of file TRT_EndcapElement.cxx.

254{
255 // Return +1 if the straw local axis is in the same direction as increasing
256 // eta direction,
257 // -1 otherwise.
258 // The straw axis by convention goes in the direction away from the readout.
259 // This is towards the beam pipe. For +ve endcap it is what we want. For -ve
260 // endcap it is oppposite.
261 //
262 //
263 return (m_code.isPosZ()) ? +1 : -1;
264}

◆ strawLength()

const double & InDetDD::TRT_EndcapElement::strawLength ( ) const
overridevirtual

Active straw length.

Implements InDetDD::TRT_BaseElement.

Definition at line 70 of file TRT_EndcapElement.cxx.

71{
72 return m_descriptor->strawLength();
73}

◆ strawSurface()

const Trk::StraightLineSurface & InDetDD::TRT_BaseElement::strawSurface ( int straw) const
inherited

Straw Surface: access to the surface via integer.

Definition at line 132 of file TRT_BaseElement.cxx.

133{
134 if (!m_strawSurfaces[straw]) {
135 // get the straw identifier to the given straw number and element identifier
136 Identifier id = m_idHelper->straw_id(identify(), straw);
138 }
139 return *(m_strawSurfaces[straw].get());
140}

◆ strawTransform() [1/2]

const Amg::Transform3D & InDetDD::TRT_BaseElement::strawTransform ( int straw) const
inherited

Straw Surface: Local -> global transform of the straw via integer.

Definition at line 143 of file TRT_BaseElement.cxx.

144{
145 if (!m_strawSurfacesCache[straw]) {
146 Identifier id = m_idHelper->straw_id(identify(), straw);
148 }
149 // forward the transform of the cache
150 return m_strawSurfacesCache[straw]->transform();
151}

◆ strawTransform() [2/2]

const Amg::Transform3D & InDetDD::TRT_BaseElement::strawTransform ( unsigned int straw) const
inherited

Straw transform - fast access in array, in Tracking frame: Amg.

Straw Surface: access to the transform of individual straw in Tracking frame: Amg

Definition at line 89 of file TRT_BaseElement.cxx.

90{
91 if (!m_strawSurfacesCache[straw]) {
92 Identifier id = m_idHelper->straw_id(identify(), straw);
94 }
95 // forward the transform of the cache
96 return m_strawSurfacesCache[straw]->transform();
97}

◆ surface() [1/2]

virtual const Trk::Surface & InDetDD::TRT_BaseElement::surface ( ) const
finaloverridevirtualinherited

Element Surface: access to the Surface (straw layer)

Implements Trk::TrkDetElementBase.

◆ surface() [2/2]

const Trk::Surface & InDetDD::TRT_BaseElement::surface ( const Identifier & id) const
finaloverridevirtualinherited

Straw Surface: access to the surface via identifier.

Implements Trk::TrkDetElementBase.

Definition at line 48 of file TRT_BaseElement.cxx.

49{
50 int straw = m_idHelper->straw(id);
51 if (!m_strawSurfaces[straw]) {
53 }
54 return *(m_strawSurfaces[straw]);
55}

◆ surfaces()

const std::vector< const Trk::Surface * > & InDetDD::TRT_BaseElement::surfaces ( ) const
inherited

Returns the full list of all detection surfaces associated to this detector element.

Definition at line 58 of file TRT_BaseElement.cxx.

59{
60 if (!m_surfaces.isValid()) {
61 std::vector<const Trk::Surface*> tmp_surfaces;
62 tmp_surfaces.reserve(nStraws());
63 for (unsigned is = 0; is < nStraws(); ++is) {
64 tmp_surfaces.push_back(&strawSurface(is));
65 }
66 m_surfaces.set(tmp_surfaces);
67 }
68 return *(m_surfaces.ptr());
69}
CxxUtils::CachedValue< std::vector< const Trk::Surface * > > m_surfaces
const Trk::StraightLineSurface & strawSurface(int straw) const
Straw Surface: access to the surface via integer.

◆ transform() [1/2]

virtual const Amg::Transform3D & InDetDD::TRT_BaseElement::transform ( ) const
finaloverridevirtualinherited

Element Surface: Get Transform of element in Tracking frame: Amg.

Implements Trk::TrkDetElementBase.

◆ transform() [2/2]

const Amg::Transform3D & InDetDD::TRT_BaseElement::transform ( const Identifier & id) const
finaloverridevirtualinherited

Straw Surface: access to the transform of individual straw in Tracking frame: Amg.

Implements Trk::TrkDetElementBase.

Definition at line 78 of file TRT_BaseElement.cxx.

79{
80 int straw = m_idHelper->straw(id);
81 if (!m_strawSurfacesCache[straw]) {
83 }
84 // forward the transform of the cache
85 return m_strawSurfacesCache[straw]->transform();
86}

◆ type()

virtual TRT_BaseElement::Type InDetDD::TRT_EndcapElement::type ( ) const
finaloverridevirtual

Type information:

Implements InDetDD::TRT_BaseElement.

◆ updateAllCaches()

void InDetDD::TRT_BaseElement::updateAllCaches ( GeoAlignmentStore * alignStore = nullptr) const
inherited

Update all caches.

Definition at line 220 of file TRT_BaseElement.cxx.

221{
222 // Strawlayer caches
223 if (!m_surfaceCache.isValid()){
224 createSurfaceCache(alignStore);
225 }
226 // Loop over all straws and request items that get cached.
227 for (unsigned int iStraw = 0; iStraw < nStraws(); iStraw++) {
228 Identifier strawId = m_idHelper->straw_id(identify(), iStraw);
229 createSurfaceCache(strawId,alignStore);
230 }
231}

Member Data Documentation

◆ m_code

TRT_EndcapCode InDetDD::TRT_EndcapElement::m_code
private

Definition at line 118 of file TRT_EndcapElement.h.

◆ m_conditions

const TRT_Conditions* InDetDD::TRT_BaseElement::m_conditions =nullptr
protectedinherited

Definition at line 208 of file TRT_BaseElement.h.

◆ m_descriptor

const TRT_EndcapDescriptor* InDetDD::TRT_EndcapElement::m_descriptor
private

Definition at line 119 of file TRT_EndcapElement.h.

◆ m_id

Identifier InDetDD::TRT_BaseElement::m_id
protectedinherited

Definition at line 199 of file TRT_BaseElement.h.

◆ m_idHash

IdentifierHash InDetDD::TRT_BaseElement::m_idHash
protectedinherited

Definition at line 200 of file TRT_BaseElement.h.

◆ m_idHelper

const TRT_ID* InDetDD::TRT_BaseElement::m_idHelper =nullptr
protectedinherited

Definition at line 207 of file TRT_BaseElement.h.

◆ m_nextInZ

const TRT_EndcapElement* InDetDD::TRT_EndcapElement::m_nextInZ
private

Definition at line 120 of file TRT_EndcapElement.h.

◆ m_nstraws

unsigned int InDetDD::TRT_BaseElement::m_nstraws = 0
protectedinherited

Definition at line 206 of file TRT_BaseElement.h.

◆ m_previousInZ

const TRT_EndcapElement* InDetDD::TRT_EndcapElement::m_previousInZ
private

Definition at line 121 of file TRT_EndcapElement.h.

◆ m_strawSurfaces

std::vector<CxxUtils::CachedUniquePtr<Trk::StraightLineSurface> > InDetDD::TRT_BaseElement::m_strawSurfaces {}
protectedinherited

Definition at line 211 of file TRT_BaseElement.h.

211{};

◆ m_strawSurfacesCache

std::vector<CxxUtils::CachedUniquePtr<SurfaceCacheBase> > InDetDD::TRT_BaseElement::m_strawSurfacesCache {}
protectedinherited

helper element surface for the cache

Definition at line 212 of file TRT_BaseElement.h.

212{};

◆ m_surface

CxxUtils::CachedUniquePtr<Trk::Surface> InDetDD::TRT_BaseElement::m_surface
protectedinherited

Definition at line 209 of file TRT_BaseElement.h.

◆ m_surfaceCache

CxxUtils::CachedValue<SurfaceCache> InDetDD::TRT_BaseElement::m_surfaceCache
protectedinherited

Definition at line 215 of file TRT_BaseElement.h.

◆ m_surfaces

CxxUtils::CachedValue<std::vector<const Trk::Surface*> > InDetDD::TRT_BaseElement::m_surfaces
protectedinherited

Definition at line 214 of file TRT_BaseElement.h.


The documentation for this class was generated from the following files: