ATLAS Offline Software
Loading...
Searching...
No Matches
SiDetectorElement.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9#ifndef INDETREADOUTGEOMETRY_SIDETECTORELEMENT_H
10#define INDETREADOUTGEOMETRY_SIDETECTORELEMENT_H
11
18
19namespace InDetDD {
20
107
108
110
111 public:
112
118 const GeoVFullPhysVol* geophysvol,
119 const SiCommonItems* commonItems,
120 const GeoAlignmentStore* geoAlignStore=nullptr);
121
126
131
136
141
146
151
152
159 void setNextInEta(const SiDetectorElement* element);
160 void setPrevInEta(const SiDetectorElement* element);
161 void setNextInPhi(const SiDetectorElement* element);
162 void setPrevInPhi(const SiDetectorElement* element);
166 void setOtherSide(const SiDetectorElement* element);
168
183
189
190 bool isPixel() const;
191 bool isSCT() const;
192 bool isPLR() const;
193 bool isDBM() const;
194 bool isBarrel() const;
195 bool isEndcap() const; // inline
196 bool isBlayer() const;
197 bool isInnermostPixelLayer() const;
198 bool isNextToInnermostPixelLayer() const;
199
204 virtual Identifier identifierFromCellId(const SiCellId &cellId) const override final;
208 virtual SiCellId cellIdFromIdentifier(const Identifier& identifier) const override final;
209
211
216
220 const std::vector<const Trk::Surface*>& surfaces() const;
222
236
242 const Amg::Transform3D& moduleTransform() const;
243
251
255 Amg::Transform3D localToModuleFrame(const Amg::Transform3D& localTransform) const;
256
264
268 bool isModuleFrame() const;
270
275 virtual double get_rz() const override final;
277
282
286 double sinTilt() const;
290 double sinTilt(const Amg::Vector2D& localPos) const;
295
299 double sinStereo() const;
303 double sinStereo(const Amg::Vector2D& localPos) const;
308
313 double sinStereoLocal(const Amg::Vector2D& localPos) const;
317 double sinStereoLocal(const Amg::Vector3D& globalPos) const;
318
322 bool isStereo() const;
323
325
326
331
335 virtual const SiDetectorDesign& design() const override final;
336
350
351 double phiPitch() const;
356
361
372
374
379
382 bool nearBondGap(const Amg::Vector2D& localPosition, double etaTol) const;
383 bool nearBondGap(const Amg::Vector3D& globalPosition, double etaTol) const;
384
393
395
400
404 std::pair<Amg::Vector3D,Amg::Vector3D> endsOfStrip(const Amg::Vector2D& position) const;
406
409 virtual Trk::DetectorElemType detectorType() const override final;
410
411 private:
418
421 void commonConstructor();
422
426 bool determineStereo() const;
427
431 double sinStereoImpl() const;
436
440 protected:
441
446
453
459
464
465 bool m_isPixel{false};
466 bool m_isSCT{false};
467 bool m_isPLR{false};
468 bool m_isDBM{false};
469 bool m_isBarrel{false};
471
476 const SiDetectorElement* m_nextInEta{nullptr}; // set by setNextInEta
477 const SiDetectorElement* m_prevInEta{nullptr}; // set by setPrevInEta
478 const SiDetectorElement* m_nextInPhi{nullptr}; // set by setNextInPhi
479 const SiDetectorElement* m_prevInPhi{nullptr}; // set by setPrevInPhi
480 const SiDetectorElement* m_otherSide{nullptr}; // set by setOtherSide
482
489
493 MsgStream& msg(MSG::Level lvl) const;
494
498 bool msgLvl(MSG::Level lvl) const;
500
501 };
502
503} // namespace InDetDD
504
509
510#endif // INDETREADOUTGEOMETRY_SIDETECTORELEMENT_H
Cached value with atomic update.
#define protected
Eigen::Matrix< double, 3, 1 > Vector3D
Cached value with atomic update.
Definition CachedValue.h:55
Ensure that the extensions for the Vector3D are properly loaded.
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
Helper class to concentrate common items, such as the pointer to the IdHelper, the lorentzAngle tool ...
Base class for the detector design classes for Pixel and SCT.
virtual SiCellId cellIdFromIdentifier(const Identifier &identifier) const override final
SiCellId from Identifier.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
InDetDD::CarrierType carrierType() const
carrier type for readout.
void setPrevInEta(const SiDetectorElement *element)
bool swapEtaReadoutDirection() const
For eta_index (only relevant for pixel) (inline)
double phiPitch() const
Pitch (inline methods)
bool nearBondGap(const Amg::Vector2D &localPosition, double etaTol) const
Test if near bond gap within tolerances.
virtual double get_rz() const override final
SiDetectorElement(const SiDetectorElement &)=delete
Don't allow copy constructor.
virtual Trk::DetectorElemType detectorType() const override final
TrkDetElementBase interface detectorType.
bool isStereo() const
Check if it is the stereo side (useful for SCT)
const SiDetectorElement * m_nextInPhi
void setPrevInPhi(const SiDetectorElement *element)
SiDetectorElement(const Identifier &id, const SiDetectorDesign *design, const GeoVFullPhysVol *geophysvol, const SiCommonItems *commonItems, const GeoAlignmentStore *geoAlignStore=nullptr)
Constructor with parameters.
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...
void setNextInEta(const SiDetectorElement *element)
const SiDetectorElement * m_prevInPhi
Amg::Transform3D localToModuleFrame(const Amg::Transform3D &localTransform) const
Take a transform of the local element frame and return its equivalent in the module frame.
const SiDetectorElement * prevInPhi() const
double sinStereoImpl() const
Private implementation method with no lock at center.
CxxUtils::CachedValue< bool > m_isStereo
SiCellId gangedCell(const SiCellId &cellId) const
If cell is ganged return the id of the other cell which shares the readout for this cell,...
double sinStereo() const
Compute sin(stereo angle) at a given position: at center.
void commonConstructor()
Common code for constructors.
SiDetectorElement & operator=(SiDetectorElement &&)=delete
Don't allow move assignment operator.
Amg::Transform3D defModuleTransform() const
Default module to global frame transform, ie with no misalignment.
SiDetectorElement(SiDetectorElement &&)=delete
Don't allow move constructor.
const SiDetectorElement * nextInPhi() const
bool swapPhiReadoutDirection() const
Determine if readout direction between online and offline needs swapping.
MsgStream & msg(MSG::Level lvl) const
Declaring the Message method for further use (inline)
SiDetectorElement & operator=(const SiDetectorElement &)=delete
Don't allow assignment operator.
const SiDetectorElement * otherSide() const
Useful for SCT only.
const SiDetectorElement * prevInEta() const
double sinStereoLocal(const Amg::Vector2D &localPos) const
Angle of strip in local frame with respect to the etaAxis.
const SiDetectorElement * m_nextInEta
const SiDetectorElement * m_otherSide
const SiDetectorElement * m_prevInEta
void setOtherSide(const SiDetectorElement *element)
For SCT only.
void setNextInPhi(const SiDetectorElement *element)
double sinTilt() const
Compute sin(tilt angle) at a given position: at center.
virtual ~SiDetectorElement()
Destructor.
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...
const SiDetectorDesign * m_siDesign
Amg::Transform3D localToModuleTransform() const
Transformation from local element to module frame.
const Amg::Transform3D & moduleTransform() const
Module to global frame transform.
bool msgLvl(MSG::Level lvl) const
Declaring the Method providing Verbosity Level (inline)
const std::vector< const Trk::Surface * > & surfaces() const
Returns the full list of surfaces associated to this detector element.
bool isModuleFrame() const
Check if the element and module frame are the same.
const SiDetectorElement * nextInEta() const
SiDetectorElement()=delete
Don't allow no-argument constructor.
CxxUtils::CachedValue< std::vector< const Trk::Surface * > > m_surfaces
bool determineStereo() const
Find isStereo.
Class to hold geometrical description of a solid state detector element.
Amg::Vector2D localPosition(const HepGeom::Point3D< double > &globalPosition) const
transform a global position into a 2D local position (reconstruction frame) (inline)
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Affine3d Transform3D
Message Stream Member.
Ensure that the ATLAS eigen extensions are properly loaded.
STL namespace.
#define private