ATLAS Offline Software
Loading...
Searching...
No Matches
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
29namespace Trk {
30class SurfaceBounds;
31}
32
33namespace InDetDD {
34class SiReadoutCellId;
35class SiCellId;
36class SiDiode;
37class SiReadoutCell;
38class SiLocalPosition;
39class SiIntersect;
40
44
48
56
57class DetectorDesign: public RCBase {
58public:
59 enum Axis {
61 };
62
64 // Public methods:
66public:
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
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:
229private:
231
233 // Private data:
235private:
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
262
266
270
271inline double DetectorDesign::thickness() const {
272 return m_thickness;
273}
274
278
279inline bool DetectorDesign::phiSymmetric() const {
280 return m_phiSymmetric;
281}
282
283inline bool DetectorDesign::etaSymmetric() const {
284 return m_etaSymmetric;
285}
286
288 return m_depthSymmetric;
289}
290
291inline int DetectorDesign::readoutSide() const {
292 return (m_readoutSidePosDepth) ? +1 : -1;
293}
294
295} // namespace InDetDD
296
297#endif // READOUTGEOMETRYBASE_DETECTORDESIGN_H
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
virtual DetectorShape shape() const
Shape of element.
virtual DetectorType type() const
Type of element.
virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const =0
Returns distance to nearest detector active edge +ve = inside -ve = outside.
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...
DetectorDesign(double thickness, bool phiSymmetric, bool etaSymmetric, bool depthSymmetric, InDetDD::CarrierType carrierType, int readoutSide)
Constructor.
virtual SiCellId connectedCell(const SiReadoutCellId &readoutId, int number) const =0
readout id -> id of connected diodes.
void setSymmetry(bool phiSymmetric, bool etaSymmetric, bool depthSymmetric)
Override default symmetries to prevent swapping of axes.
Axis etaAxis() const
local axis corresponding to eta direction:
Axis depthAxis() const
local axis corresponding to depth direction:
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...
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const =0
readout or diode id -> position.
virtual double etaPitch() const =0
virtual bool swapHitEtaReadoutDirection() const =0
virtual const Amg::Transform3D moduleShift() const
virtual bool swapHitPhiReadoutDirection() const =0
Return true if hit local direction is the same as readout direction.
virtual SiDiodesParameters parameters(const SiCellId &cellId) const =0
readout or diode id -> position, size
virtual const Trk::SurfaceBounds & bounds() const =0
Element boundary.
double thickness() const
Method which returns thickness of the silicon wafer.
virtual double maxWidth() const =0
Method to calculate maximum width of a module.
virtual double phiPitch() const =0
Pitch in phi direction.
virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const =0
number of connected cells.
virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition &localPos) const =0
position -> id
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const =0
position -> id
virtual Amg::Vector3D sensorCenter() const
Return the centre of a sensor in the local reference frame.
virtual double minWidth() const =0
Method to calculate minimum width of a module.
DetectorDesign & operator=(const DetectorDesign &design)
virtual double length() const =0
Method to calculate length of a module.
virtual double phiPitch(const SiLocalPosition &localPosition) const =0
Pitch in phi direction.
Axis phiAxis() const
local axis corresponding to phi direction:
virtual SiCellId cellIdInRange(const SiCellId &cellId) const =0
Check if cell is in range.
virtual double width() const =0
Method to calculate average width of a module.
InDetDD::CarrierType carrierType() const
Return carrier type (ie electrons or holes)
int readoutSide() const
ReadoutSide.
InDetDD::CarrierType m_carrierType
DetectorDesign(const DetectorDesign &design)
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.
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
Class to handle the position of the centre and the width of a diode or a cluster of diodes Version 1....
class to run intersection tests
Definition SiIntersect.h:23
Class to represent a position in the natural frame of a silicon sensor, for Pixel and SCT For Pixel: ...
Identifier for the strip or pixel readout cell.
Abstract base class for surface bounds to be specified.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
Message Stream Member.
Ensure that the ATLAS eigen extensions are properly loaded.
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186