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

Extended TRT_BaseElement to describe a TRT readout element, this is a planar layer with n ( order of 20 ) straws, in one of the 32 sectors of the TRT barrel. More...

#include <TRT_BarrelElement.h>

Inheritance diagram for InDetDD::TRT_BarrelElement:
Collaboration diagram for InDetDD::TRT_BarrelElement:

Public Types

enum  Type { BARREL , ENDCAP }

Public Member Functions

 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:
 TRT_BarrelElement (const TRT_BarrelElement &right)
virtual ~TRT_BarrelElement ()=default
 Destructor:
virtual TRT_BaseElement::Type type () const override final
 Type information.
const TRT_BarrelDescriptorgetDescriptor () const
 Returns a pointer to a descriptor, giving common information on module construction:
double strawXPos (unsigned int i) const
 Get X Position: DEPRECATED.
double strawYPos (unsigned int i) const
 Get Y Position: DEPRECATED.
double strawZPos (unsigned int i) const
 Get Z Position: (active center) DEPRECATED.
virtual const double & strawLength () const override final
 Get the length of the straws (active length):
virtual int strawDirection () const override final
 StrawDirection.
const TRT_BarrelElementnextInPhi () const
 Returns the next-in-phi detector element, or zero if none (forseeing gaps, in other words).
const TRT_BarrelElementpreviousInPhi () const
 Returns the previous-in-phi detector element, or zero if none (forseeing gaps, in other words).
const TRT_BarrelElementnextInR () const
 Returns the next-in-R detector element, or zero if none.
const TRT_BarrelElementpreviousInR () const
 Returns the next-in-R detector element, or zero if none.
void setNextInPhi (const TRT_BarrelElement *element)
 Sets the next-in-phi detector.
void setPreviousInPhi (const TRT_BarrelElement *element)
 Sets the previous-in-phi detector.
void setNextInR (const TRT_BarrelElement *element)
 Sets the next-in-r detector.
void setPreviousInR (const TRT_BarrelElement *element)
 Sets the previous-in-r detector.
const TRT_BarrelCodegetCode () const
 Doomed (?):
virtual const Trk::SurfaceBoundsstrawBounds () const override final
 Surface 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_BarrelConditions * 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

const TRT_BarrelElementoperator= (const TRT_BarrelElement &right)=delete
 Illegal Operations:
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 deleteCache ()
 Helper method for cache dealing.

Private Attributes

TRT_BarrelCode m_code
const TRT_BarrelDescriptorm_descriptor
const TRT_BarrelElementm_nextInPhi
const TRT_BarrelElementm_previousInPhi
const TRT_BarrelElementm_nextInR
const TRT_BarrelElementm_previousInR

Detailed Description

Extended TRT_BaseElement to describe a TRT readout element, this is a planar layer with n ( order of 20 ) straws, in one of the 32 sectors of the TRT barrel.

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_BarrelElement.h.

Member Enumeration Documentation

◆ Type

Enumerator
BARREL 
ENDCAP 

Definition at line 56 of file TRT_BaseElement.h.

Constructor & Destructor Documentation

◆ TRT_BarrelElement() [1/2]

InDetDD::TRT_BarrelElement::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:

Definition at line 25 of file TRT_BarrelElement.cxx.

33 : TRT_BaseElement(volume,
34 idHelper->layer_id((isPositive ? 1 : -1),
35 phiIndex,
36 modIndex,
37 strawLayIndex),
38 idHelper,
40 , m_code(isPositive, modIndex, phiIndex, strawLayIndex)
41 , m_descriptor(descriptor)
42 , m_nextInPhi(nullptr)
43 , m_previousInPhi(nullptr)
44 , m_nextInR(nullptr)
45 , m_previousInR(nullptr)
46
47{
48 m_nstraws = m_descriptor->nStraws();
51}
const TRT_BarrelDescriptor * m_descriptor
const TRT_BarrelElement * m_nextInR
const TRT_BarrelElement * m_previousInPhi
const TRT_BarrelElement * m_nextInPhi
const TRT_BarrelElement * m_previousInR
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
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_BarrelElement() [2/2]

InDetDD::TRT_BarrelElement::TRT_BarrelElement ( const TRT_BarrelElement & right)

Definition at line 53 of file TRT_BarrelElement.cxx.

54 : TRT_BaseElement(right)
55 , m_code(right.m_code)
56 , m_descriptor(right.m_descriptor)
57 , m_nextInPhi(right.m_nextInPhi)
58 , m_previousInPhi(right.m_previousInPhi)
59 , m_nextInR(right.m_nextInR)
60 , m_previousInR(right.m_previousInR)
61{
62 m_nstraws = right.m_nstraws;
65}

◆ ~TRT_BarrelElement()

virtual InDetDD::TRT_BarrelElement::~TRT_BarrelElement ( )
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_BarrelElement::calculateLocalStrawTransform ( int straw) const
private

Definition at line 126 of file TRT_BarrelElement.cxx.

127{
128 const TRTCond::StrawDxContainer* container = conditions()->dxContainer();
129 HepGeom::Transform3D rc ;
130 if(!container) {
131 // std::cout << " TRT_BarrelElement: no local transform found " << std::endl;
132 } else {
133 // important note: dx1 moves the 'negative' wire endpoint end dx2
134 // the 'positive' wire endpoint in the local straw frame. In the
135 // global frame, 'dx1' corresponds to the readout side and 'dx2'
136 // to the wire joint side for both sides of the barrel.
137
138 int bec = getCode().isPosZ() ? +1 : -1 ;
139 int layer = getCode().getModuleIndex();
140 int phimodule = getCode().getPhiIndex();
141 int strawlayer = getCode().getStrawLayerIndex();
142 TRTCond::ExpandedIdentifier id = TRTCond::ExpandedIdentifier
143 (bec,layer,phimodule,strawlayer,straw,TRTCond::ExpandedIdentifier::STRAW);
144 double dx1 = container->getDx1(id);
145 double dx2 = container->getDx2(id);
146 double ang = (dx2-dx1)/strawLength();
147 double dx = (dx2+dx1)/2.;
148 rc = HepGeom::TranslateX3D(dx)*HepGeom::RotateY3D(ang) ;
149 }
150 return rc ;
151}
static Double_t rc
unsigned int isPosZ() const
unsigned int getPhiIndex() const
unsigned int getStrawLayerIndex() const
unsigned int getModuleIndex() const
virtual const double & strawLength() const override final
Get the length of the straws (active length):
const TRT_BarrelCode & getCode() const
Doomed (?):
const TRTCond::StrawDxContainer * dxContainer() const
float getDx2(const ExpandedIdentifier &id) const
float getDx1(const ExpandedIdentifier &id) const
access to unpacked dx
@ layer
Definition HitInfo.h:79

◆ calculateStrawTransform()

HepGeom::Transform3D InDetDD::TRT_BarrelElement::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 99 of file TRT_BarrelElement.cxx.

100{
101 // NB The tranformation to a straw is reconstructed here precisely as
102 // it was ... hopefully... in the factory. One could eliminate this
103 // requirement and make the code a little more robust in this regard but
104 // at the cost of doubling the descriptors. (One descriptor now suffices
105 // for both positive and negative endcaps).
106 //std::cout << "In calculateStrawTransform" << std::endl;
107
108 const GeoXF::Function *f= m_descriptor->getStrawTransform();
109 if (f) {
110 size_t offsetInto = m_descriptor->getStrawTransformOffset();
111 double zPos = -m_descriptor->strawZPos();
112 double zAng = m_code.isPosZ() ? M_PI : 0;
113 return Amg::EigenTransformToCLHEP(getMaterialGeom()->getAbsoluteTransform(alignStore)*((*f)(straw+offsetInto)))
114 * HepGeom::RotateY3D(zAng)*HepGeom::TranslateZ3D(zPos)
120 } else {
121 std::cout << "calculateStrawTransform: f is 0 !!!!" << std::endl;
122 return {};
123 }
124}
#define M_PI
HepGeom::Transform3D calculateLocalStrawTransform(int straw) const
const HepGeom::Transform3D getAbsoluteTransform(int straw) const
This is an alias to strawTransform(int straw)
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.

◆ 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
@ straw
Definition HitInfo.h:82

◆ 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/2]

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

create the cache for the element

Implements InDetDD::TRT_BaseElement.

Definition at line 166 of file TRT_BarrelElement.cxx.

167{
168 // create the surface cache
169 if (!m_surfaceCache.isValid()) {
171 }
172 // creaete the surface (only if needed, links are still ok even if cache
173 // update)
174 if (!m_surface) {
176 }
177}
virtual const Trk::Surface & elementSurface() const override
return the surface of the element
SurfaceCache createSurfaceCacheHelper(GeoAlignmentStore *alignStore) const
CxxUtils::CachedValue< SurfaceCache > m_surfaceCache
CxxUtils::CachedUniquePtr< Trk::Surface > m_surface

◆ createSurfaceCache() [2/2]

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

◆ createSurfaceCacheHelper()

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

Definition at line 179 of file TRT_BarrelElement.cxx.

179 {
180
181 // Calculate the surface from the two end straws.
182 int firstStraw = 0;
183 int lastStraw = nStraws() - 1;
184
185 const Amg::Vector3D& centerFirstStraw =
186 center(m_idHelper->straw_id(identify(), firstStraw), alignStore);
187 const Amg::Vector3D& centerLastStraw =
188 center(m_idHelper->straw_id(identify(), lastStraw), alignStore);
189
190 // Calculate center as the average position of the end straws.
191 auto center = Amg::Vector3D(0.5 * (centerFirstStraw + centerLastStraw));
192
193 Amg::Vector3D phiAxis = centerLastStraw - centerFirstStraw;
194 double width = phiAxis.mag();
195 phiAxis = phiAxis.normalized();
196 double elementWidth =
197 width + 2 * m_descriptor->innerTubeRadius(); // Add the straw tube radius
198
199 // Get local z-axis. This is roughly in +ve global z direction (exactly if no
200 // misalignment) We could probably use any straw for this but we average the
201 // first and last straw and renormalize to a unit vector.
202 Amg::Vector3D etaAxis = 0.5 * (strawAxis(firstStraw) + strawAxis(lastStraw));
203 etaAxis = etaAxis.normalized();
204
205 // Calculate normal. This will point away from the beam line based
206 // on the assumption that the straw numbering goes in the direction
207 // of increasing phi and the straw axis is in +ve z direction.
208 auto normal = Amg::Vector3D(phiAxis.cross(etaAxis)); // phi cross z
209
210 // Transform from local to global.
211 // local x axis -> phiAxis
212 // local y axis -> etaAxis
213 // local z axis -> cross product of local x and local y
214 // translation -> center
215
217 rotation.col(0) = phiAxis;
218 rotation.col(1) = etaAxis;
219 rotation.col(2) = normal;
220
221 // This constructor takes three points in the two coordinate systems.
223
224 // create the element bounds
225 auto elementBounds = std::make_unique<Trk::RectangleBounds>(
226 0.5 * elementWidth, 0.5 * strawLength());
227
228 return { transform, center, normal, std::move(elementBounds) };
229}
const double width
unsigned int nStraws() const
Number of straws in the element.
virtual Identifier identify() const override final
identifier of 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.
Amg::Vector3D strawAxis(int straw) const
Straw axis.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D

◆ 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_BarrelElement::elementSurface ( ) const
overrideprivatevirtual

return the surface of the element

Implements InDetDD::TRT_BaseElement.

Definition at line 158 of file TRT_BarrelElement.cxx.

159{
160 if (not m_surface) {
161 m_surface.set(std::make_unique<Trk::PlaneSurface>(*this));
162 }
163 return *m_surface;
164}

◆ 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_BarrelCode & InDetDD::TRT_BarrelElement::getCode ( ) const

Doomed (?):

◆ getConditionsData()

const TRT_BarrelConditions * InDetDD::TRT_BarrelElement::getConditionsData ( )
static

Returns a pointer to conditions data.

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

Definition at line 67 of file TRT_BarrelElement.cxx.

68{
69 return nullptr;
70}

◆ getDescriptor()

const TRT_BarrelDescriptor * InDetDD::TRT_BarrelElement::getDescriptor ( ) const

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

Definition at line 72 of file TRT_BarrelElement.cxx.

73{
74 return m_descriptor;
75}

◆ 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{};

◆ nextInPhi()

const TRT_BarrelElement * InDetDD::TRT_BarrelElement::nextInPhi ( ) const

Returns the next-in-phi detector element, or zero if none (forseeing gaps, in other words).

◆ nextInR()

const TRT_BarrelElement * InDetDD::TRT_BarrelElement::nextInR ( ) const

Returns the next-in-R detector element, or zero if none.

◆ 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_BarrelElement & InDetDD::TRT_BarrelElement::operator= ( const TRT_BarrelElement & right)
privatedelete

Illegal Operations:

◆ previousInPhi()

const TRT_BarrelElement * InDetDD::TRT_BarrelElement::previousInPhi ( ) const

Returns the previous-in-phi detector element, or zero if none (forseeing gaps, in other words).

◆ previousInR()

const TRT_BarrelElement * InDetDD::TRT_BarrelElement::previousInR ( ) const

Returns the next-in-R detector element, or zero if none.

◆ setNextInPhi()

void InDetDD::TRT_BarrelElement::setNextInPhi ( const TRT_BarrelElement * element)

Sets the next-in-phi detector.

Definition at line 77 of file TRT_BarrelElement.cxx.

78{
79 m_nextInPhi=element;
80}

◆ setNextInR()

void InDetDD::TRT_BarrelElement::setNextInR ( const TRT_BarrelElement * element)

Sets the next-in-r detector.

Definition at line 87 of file TRT_BarrelElement.cxx.

88{
89 m_nextInR=element;
90}

◆ setPreviousInPhi()

void InDetDD::TRT_BarrelElement::setPreviousInPhi ( const TRT_BarrelElement * element)

Sets the previous-in-phi detector.

Definition at line 82 of file TRT_BarrelElement.cxx.

83{
84 m_previousInPhi=element;
85}

◆ setPreviousInR()

void InDetDD::TRT_BarrelElement::setPreviousInR ( const TRT_BarrelElement * element)

Sets the previous-in-r detector.

Definition at line 92 of file TRT_BarrelElement.cxx.

93{
94 m_previousInR=element;
95}

◆ 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_BarrelElement::strawBounds ( ) const
finaloverridevirtual

Surface bounds.

Implements InDetDD::TRT_BaseElement.

Definition at line 153 of file TRT_BarrelElement.cxx.

154{
155 return m_descriptor->strawBounds();
156}

◆ 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}

◆ strawDirection()

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

StrawDirection.

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

Implements InDetDD::TRT_BaseElement.

Definition at line 231 of file TRT_BarrelElement.cxx.

232{
233 // Return +1 if the straw local axis is in the same direction as the z axis, -1 otherwise.
234 // The straw axis by convention goes in the direction away from the readout.
235 // So for -ve endcap this is the positive z direction (we return +1) and in the
236 // +ve endcap its in the -ve z direction (we return -1).
237 //
238 return !(m_code.isPosZ()) ? +1 : -1;
239}

◆ strawLength()

virtual const double & InDetDD::TRT_BarrelElement::strawLength ( ) const
finaloverridevirtual

Get the length of the straws (active length):

Implements InDetDD::TRT_BaseElement.

◆ 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}

◆ strawXPos()

double InDetDD::TRT_BarrelElement::strawXPos ( unsigned int i) const
inline

Get X Position: DEPRECATED.

Please use starwCenter(i).x()

◆ strawYPos()

double InDetDD::TRT_BarrelElement::strawYPos ( unsigned int i) const
inline

Get Y Position: DEPRECATED.

Please use starwCenter(i).y()

◆ strawZPos()

double InDetDD::TRT_BarrelElement::strawZPos ( unsigned int i) const
inline

Get Z Position: (active center) DEPRECATED.

Please use starwCenter(i).z()

◆ 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_BarrelElement::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_BarrelCode InDetDD::TRT_BarrelElement::m_code
private

Definition at line 136 of file TRT_BarrelElement.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_BarrelDescriptor* InDetDD::TRT_BarrelElement::m_descriptor
private

Definition at line 137 of file TRT_BarrelElement.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_nextInPhi

const TRT_BarrelElement* InDetDD::TRT_BarrelElement::m_nextInPhi
private

Definition at line 138 of file TRT_BarrelElement.h.

◆ m_nextInR

const TRT_BarrelElement* InDetDD::TRT_BarrelElement::m_nextInR
private

Definition at line 140 of file TRT_BarrelElement.h.

◆ m_nstraws

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

Definition at line 206 of file TRT_BaseElement.h.

◆ m_previousInPhi

const TRT_BarrelElement* InDetDD::TRT_BarrelElement::m_previousInPhi
private

Definition at line 139 of file TRT_BarrelElement.h.

◆ m_previousInR

const TRT_BarrelElement* InDetDD::TRT_BarrelElement::m_previousInR
private

Definition at line 141 of file TRT_BarrelElement.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: