ATLAS Offline Software
DetectorDesign.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // DetectorDesign.h
8 // (c) ATLAS Detector software
10 
11 #ifndef READOUTGEOMETRYBASE_DETECTORDESIGN_H
12 #define READOUTGEOMETRYBASE_DETECTORDESIGN_H
13 
14 // base class
17 #include "GeoModelKernel/RCBase.h"
18 
21 #include "CLHEP/Geometry/Point3D.h"
22 #include "CLHEP/Geometry/Vector3D.h"
23 #include "CLHEP/Geometry/Transform3D.h"
25 
26 #include <list>
27 #include <vector>
28 
29 namespace Trk {
30 class SurfaceBounds;
31 }
32 
33 namespace InDetDD {
34 class SiReadoutCellId;
35 class SiCellId;
36 class SiDiode;
37 class SiReadoutCell;
38 class SiLocalPosition;
39 class SiIntersect;
40 
43 };
44 
47 };
48 
57 class DetectorDesign: public RCBase {
58 public:
59  enum Axis {
61  };
62 
64  // Public methods:
66 public:
78  bool phiSymmetric,
79  bool etaSymmetric,
80  bool depthSymmetric,
82  int readoutSide);
83 
85  bool phiSymmetric,
86  bool etaSymmetric,
87  bool depthSymmetric,
89  int readoutSide,
90  Axis stripDirection,
91  Axis depthDirection);
92 
93  // Destructor
95 
97  // Const methods:
99 
102  //virtual HepGeom::Point3D<double> sensorCenter() const;
103  virtual Amg::Vector3D sensorCenter() const;
104 
106  virtual SiIntersect inDetector(const SiLocalPosition &localPosition, double phiTol,
107  double etaTol) const;
108 
111  void setSymmetry(bool phiSymmetric, bool etaSymmetric, bool depthSymmetric);
112 
114  Axis etaAxis() const;
115 
117  Axis phiAxis() const;
118 
120  Axis depthAxis() const;
121 
123  double thickness() const;
124 
127 
128  bool phiSymmetric() const;
129  bool etaSymmetric() const;
130  bool depthSymmetric() const;
131 
133  int readoutSide() const;
134 
136  // Pure virtual methods:
138 
142  virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition,
143  double &etaDist, double &phiDist) const = 0;
144 
146  virtual DetectorShape shape() const;
147 
149  virtual DetectorType type() const;
150 
152  virtual double length() const = 0;
153 
155  virtual double width() const = 0;
156 
158  virtual double minWidth() const = 0;
159 
161  virtual double maxWidth() const = 0;
162 
164  virtual double phiPitch() const = 0;
165 
167  virtual double phiPitch(const SiLocalPosition &localPosition) const = 0;
168 
169  // ** Pitch in eta direction */
170  virtual double etaPitch() const = 0;
171 
173  virtual bool swapHitPhiReadoutDirection() const = 0;
174  virtual bool swapHitEtaReadoutDirection() const = 0;
175 
177  virtual const Trk::SurfaceBounds &bounds() const = 0;
178 
179  //Transform for "split" modules
180  virtual const Amg::Transform3D moduleShift() const;
181 
183  //
184  // The following will replace existing methods but are not all implemented yet
185  //
186 
188  virtual SiDiodesParameters parameters(const SiCellId &cellId) const = 0;
189 
191  virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const = 0;
192 
195  virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const = 0;
196 
202  virtual SiCellId connectedCell(const SiReadoutCellId &readoutId,
203  int number) const = 0;
204 
208  virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const = 0;
209 
211  virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition &localPos) const = 0;
212 
214  virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const = 0;
215 
219  virtual void neighboursOfCell(const SiCellId &cellId,
220  std::vector<SiCellId> &neighbours) const = 0;
221 
224  virtual SiCellId cellIdInRange(const SiCellId &cellId) const = 0;
225 
227  // Private methods:
229 private:
231 
233  // Private data:
235 private:
236  Axis m_etaAxis; // !< local axis corresponding to eta direction
237  Axis m_phiAxis; // !< local axis corresponding to phi direction
238  Axis m_depthAxis; // !< local axis corresponding to depth direction
239  double m_thickness; // !< thickness of silicon sensor
240  InDetDD::CarrierType m_carrierType; // !< carrier type that drifts towards readout
241  // !< (ie holes fro SCT and electrons for pixel)
245 
246  bool m_readoutSidePosDepth; // !< Control which side readout is on.
247  // !< true = positive Depth Side, false = negative Depth
248  // Side
249 
250  // Disallow Copy and assignment;
253 };
254 
256 // Inline methods:
258 
260  return m_etaAxis;
261 }
262 
264  return m_phiAxis;
265 }
266 
268  return m_depthAxis;
269 }
270 
271 inline double DetectorDesign::thickness() const {
272  return m_thickness;
273 }
274 
276  return m_carrierType;
277 }
278 
279 inline bool DetectorDesign::phiSymmetric() const {
280  return m_phiSymmetric;
281 }
282 
283 inline bool DetectorDesign::etaSymmetric() const {
284  return m_etaSymmetric;
285 }
286 
287 inline bool DetectorDesign::depthSymmetric() const {
288  return m_depthSymmetric;
289 }
290 
291 inline int DetectorDesign::readoutSide() const {
292  return (m_readoutSidePosDepth) ? +1 : -1;
293 }
294 
295 } // namespace InDetDD
296 
297 #endif // READOUTGEOMETRYBASE_DETECTORDESIGN_H
InDetDD::DetectorDesign::xAxis
@ xAxis
Definition: DetectorDesign.h:60
InDetDD::DetectorDesign::m_etaSymmetric
bool m_etaSymmetric
Definition: DetectorDesign.h:243
InDetDD::StripEndcap
@ StripEndcap
Definition: DetectorDesign.h:46
InDetDD::DetectorDesign::m_phiSymmetric
bool m_phiSymmetric
Definition: DetectorDesign.h:242
InDetDD::DetectorDesign::depthSymmetric
bool depthSymmetric() const
Definition: DetectorDesign.h:287
InDetDD::DetectorDesign::neighboursOfCell
virtual void neighboursOfCell(const SiCellId &cellId, std::vector< SiCellId > &neighbours) const =0
Get the neighbouring diodes of a given diode: Cell for which the neighbours must be found List of cel...
InDetDD::DetectorDesign::readoutIdOfPosition
virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition &localPos) const =0
position -> id
InDetDD::DetectorDesign::m_thickness
double m_thickness
Definition: DetectorDesign.h:239
InDetDD::DetectorDesign::parameters
virtual SiDiodesParameters parameters(const SiCellId &cellId) const =0
readout or diode id -> position, size
InDetDD::DetectorDesign::width
virtual double width() const =0
Method to calculate average width of a module.
InDetDD::DetectorDesign::thickness
double thickness() const
Method which returns thickness of the silicon wafer.
Definition: DetectorDesign.h:271
InDetDD::PLR
@ PLR
Definition: DetectorDesign.h:46
InDetDD::DetectorDesign::etaSymmetric
bool etaSymmetric() const
Definition: DetectorDesign.h:283
InDetDD::DetectorDesign::m_carrierType
InDetDD::CarrierType m_carrierType
Definition: DetectorDesign.h:240
InDetDD::Other
@ Other
Definition: DetectorDesign.h:42
InDetDD::DetectorDesign::m_depthAxis
Axis m_depthAxis
Definition: DetectorDesign.h:238
InDetDD::DetectorDesign::moduleShift
virtual const Amg::Transform3D moduleShift() const
Definition: DetectorDesign.cxx:130
InDetDD::DetectorDesign::sensorCenter
virtual Amg::Vector3D sensorCenter() const
Return the centre of a sensor in the local reference frame.
Definition: DetectorDesign.cxx:60
InDetDD::DetectorDesign::~DetectorDesign
~DetectorDesign()
Trk::SurfaceBounds
Definition: SurfaceBounds.h:47
InDetDD::DetectorDesign::shape
virtual DetectorShape shape() const
Shape of element.
Definition: DetectorDesign.cxx:96
InDetDD::DetectorDesign::yAxis
@ yAxis
Definition: DetectorDesign.h:60
InDetDD::DetectorDesign::etaPitch
virtual double etaPitch() const =0
InDetDD::DetectorDesign::localPositionOfCell
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const =0
readout or diode id -> position.
InDetDD::DetectorDesign::length
virtual double length() const =0
Method to calculate length of a module.
InDetDD::DetectorDesign::m_phiAxis
Axis m_phiAxis
Definition: DetectorDesign.h:237
InDetDD::DetectorDesign::readoutSide
int readoutSide() const
ReadoutSide.
Definition: DetectorDesign.h:291
InDetDD::DetectorDesign::carrierType
InDetDD::CarrierType carrierType() const
Return carrier type (ie electrons or holes)
Definition: DetectorDesign.h:275
InDetDD::DetectorDesign::connectedCell
virtual SiCellId connectedCell(const SiReadoutCellId &readoutId, int number) const =0
readout id -> id of connected diodes.
InDetDD::DetectorDesign::DetectorDesign
DetectorDesign(const DetectorDesign &design)
InDetDD::DetectorDesign::Axis
Axis
Definition: DetectorDesign.h:59
InDetDD::DetectorDesign::m_etaAxis
Axis m_etaAxis
Definition: DetectorDesign.h:236
InDetDD::DetectorDesign::numberOfConnectedCells
virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const =0
number of connected cells.
InDetDD::PixelInclined
@ PixelInclined
Definition: DetectorDesign.h:46
InDetDD::DetectorDesign::depthAxis
Axis depthAxis() const
local axis corresponding to depth direction:
Definition: DetectorDesign.h:267
InDetDD::PixelEndcap
@ PixelEndcap
Definition: DetectorDesign.h:46
InDetDD::SiLocalPosition
Definition: SiLocalPosition.h:31
InDetDD::DetectorDesign::readoutIdOfCell
virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const =0
diode id -> readout id NB assignment of a SiReadoutCellId to a SiCellId is allowed so you are can pas...
GeoPrimitives.h
InDetDD::DetectorDesign::swapHitPhiReadoutDirection
virtual bool swapHitPhiReadoutDirection() const =0
Return true if hit local direction is the same as readout direction.
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
InDetDD_Defs.h
InDetDD::DetectorDesign::inDetector
virtual SiIntersect inDetector(const SiLocalPosition &localPosition, double phiTol, double etaTol) const
Test if point is in the active part of the detector with specified tolerances.
Definition: DetectorDesign.cxx:106
InDetDD::DetectorDesign::phiPitch
virtual double phiPitch(const SiLocalPosition &localPosition) const =0
Pitch in phi direction.
HGTD
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
Definition: Clustering.h:28
InDetDD::DetectorType
DetectorType
Definition: DetectorDesign.h:45
InDetDD::Annulus
@ Annulus
Definition: DetectorDesign.h:42
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
InDetDD::DetectorDesign
Definition: DetectorDesign.h:57
InDetDD::PolarAnnulus
@ PolarAnnulus
Definition: DetectorDesign.h:42
InDetDD::DetectorDesign::type
virtual DetectorType type() const
Type of element.
Definition: DetectorDesign.cxx:101
InDetDD::DetectorDesign::maxWidth
virtual double maxWidth() const =0
Method to calculate maximum width of a module.
Box
Acts::Volume::BoundingBox Box
Definition: ActsCaloTrackingVolumeBuilder.cxx:29
InDetDD::DetectorDesign::distanceToDetectorEdge
virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const =0
Returns distance to nearest detector active edge +ve = inside -ve = outside.
InDetDD::DetectorDesign::setSymmetry
void setSymmetry(bool phiSymmetric, bool etaSymmetric, bool depthSymmetric)
Override default symmetries to prevent swapping of axes.
Definition: DetectorDesign.cxx:65
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDetDD::DetectorDesign::bounds
virtual const Trk::SurfaceBounds & bounds() const =0
Element boundary.
InDetDD::DetectorDesign::phiAxis
Axis phiAxis() const
local axis corresponding to phi direction:
Definition: DetectorDesign.h:263
python.selection.number
number
Definition: selection.py:20
InDetDD::DetectorDesign::operator=
DetectorDesign & operator=(const DetectorDesign &design)
InDetDD::PixelBarrel
@ PixelBarrel
Definition: DetectorDesign.h:46
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDetDD::DetectorShape
DetectorShape
Definition: DetectorDesign.h:41
InDetDD::BCMPrime
@ BCMPrime
Definition: DetectorDesign.h:46
InDetDD::DetectorDesign::DetectorDesign
DetectorDesign()
InDetDD::SiIntersect
Definition: SiIntersect.h:23
InDetDD::DetectorDesign::cellIdOfPosition
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const =0
position -> id
InDetDD::SiCellId
Definition: SiCellId.h:29
SiDiodesParameters.h
InDetDD::CarrierType
CarrierType
Definition: InDetDD_Defs.h:17
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDetDD::DetectorDesign::minWidth
virtual double minWidth() const =0
Method to calculate minimum width of a module.
InDetDD::DetectorDesign::swapHitEtaReadoutDirection
virtual bool swapHitEtaReadoutDirection() const =0
InDetDD::DetectorDesign::phiSymmetric
bool phiSymmetric() const
Definition: DetectorDesign.h:279
InDetDD::DetectorDesign::m_depthSymmetric
bool m_depthSymmetric
Definition: DetectorDesign.h:244
InDetDD::DetectorDesign::m_readoutSidePosDepth
bool m_readoutSidePosDepth
Definition: DetectorDesign.h:246
InDetDD::StripBarrel
@ StripBarrel
Definition: DetectorDesign.h:46
InDetDD::Undefined
@ Undefined
Definition: DetectorDesign.h:46
InDetDD::SiReadoutCellId
Definition: SiReadoutCellId.h:42
InDetDD::DetectorDesign::cellIdInRange
virtual SiCellId cellIdInRange(const SiCellId &cellId) const =0
Check if cell is in range.
InDetDD::DetectorDesign::etaAxis
Axis etaAxis() const
local axis corresponding to eta direction:
Definition: DetectorDesign.h:259
InDetDD::DetectorDesign::phiPitch
virtual double phiPitch() const =0
Pitch in phi direction.
InDetDD::DetectorDesign::zAxis
@ zAxis
Definition: DetectorDesign.h:60
InDetDD::Trapezoid
@ Trapezoid
Definition: DetectorDesign.h:42
InDetDD::SiDiodesParameters
Definition: SiDiodesParameters.h:25