ATLAS Offline Software
Loading...
Searching...
No Matches
StripAnnulusDesign.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INDETREADOUTGEOMETRY_STRIPANNULUSDESIGN_H
6#define INDETREADOUTGEOMETRY_STRIPANNULUSDESIGN_H
7
8//
9// Annulus shaped sensor design, no stereo angle. Developed (i) as a stepping stone to the more difficult
10// StripStereoAnnulusDesign (ii) so we can at some time compare performance with one side of a petal radial, the other
11// stereo. Totally untested as of 17/Feb/2015; I moved on to the StripStereoAnnulusDesign as soon as this
12// compiled and linked.
13//
14// Local reference system is centred on the beamline (i.e. not in the wafer centre; it is made in GeoModel as
15// an intersection of a tube with a (translated) generic trap. x is along the centre strip; y is in phi direction;
16// z is the depth direction. Strips are on the +ve z side.
17//
18// /) ^ y
19// / ) |
20// ) ) --> x
21// \ )
22// \‍) z towards you and you are looking at the strip side
23//
24//
25//
26
27// Base class
29
31#include "CLHEP/Geometry/Vector3D.h" // For unused phiMeasureSegment
32#include "CLHEP/Geometry/Transform3D.h"
33
34#include <stdexcept> // For throw stuff
35#include <vector>
36
37namespace Trk {
38class RectangleBounds;
39class SurfaceBounds;
40}
41
42namespace InDetDD {
44
46public:
47 StripAnnulusDesign(const SiDetectorDesign::Axis &stripDirection,
48 const SiDetectorDesign::Axis &thicknessDirection,
49 const double &thickness,
50 const int &readoutSide,
51 const InDetDD::CarrierType &carrier,
52 const int &nStrips,
53 const double &pitch,
54 const double &stripStart,
55 const double &stripEnd);
56
58
60
61 // Copy constructor and assignment:
64
65//
66// Pure virtual methods in base class:
67//
68 // Distance to nearest detector active edge (+ve = inside, -ve = outside)
69 void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist,
70 double &phiDist) const;
71
72 // check if the position is in active area
73 bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap = false) const;
74
75 // Element boundary
76 const Trk::SurfaceBounds &bounds() const;
77
78 // Retrieve the two ends of a "strip"
79 std::pair<SiLocalPosition, SiLocalPosition> endsOfStrip(
80 const SiLocalPosition &position) const;
81
82 // Phi-pitch (strip-width). Two names for same thing
83 double stripPitch(const SiLocalPosition &localPosition) const;
84 double stripPitch() const;
85 double phiPitch(const SiLocalPosition &localPosition) const;
86 double phiPitch() const;
87
88 // distance to the nearest diode in units of pitch, from 0.0 to 0.5,
89 // this method should be fast as it is called for every surface charge
90 // in the SCT_SurfaceChargesGenerator
91 // an active area check, done in the Generator anyway, is removed here
92 double scaledDistanceToNearestDiode(const SiLocalPosition &chargePos) const;
93
94 // readout or diode id -> position, size
95 SiDiodesParameters parameters(const SiCellId &cellId) const;
96 SiLocalPosition localPositionOfCell(const SiCellId &cellId) const;
97 SiLocalPosition localPositionOfCluster(const SiCellId &cellId, int clusterSize) const;
98
99 // position -> id
100 SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const;
101 // id to position
102 SiLocalPosition positionFromStrip(const SiCellId &cellId) const;
103 SiLocalPosition positionFromStrip(const int stripNumber) const;
104
105
106 // Find and fill a vector with all neighbour strips of a given cell
107 void neighboursOfCell(const SiCellId &cellId,
108 std::vector<SiCellId> &neighbours) const;
109 SiCellId cellIdInRange(const SiCellId &) const;
110
111 // For Strip sensors, readout cell == diode cell. Overload the SCT_ModuleSideDesign
112 // member
113 SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const;
114
115 // ---------------------------------------------------------------------------------------
116 // DEPRECATED at least for Strips
117 HepGeom::Vector3D<double> phiMeasureSegment(const SiLocalPosition &position) const;
118
119 // Method to calculate length of a strip. Which strip??
120 double length() const;
121
122 // Method to calculate average width of a module. What is it used for??
123 double width() const;
124
125 // Method to calculate minimum width of a module
126 double minWidth() const;
127
128 // Method to calculate maximum width of a module
129 double maxWidth() const;
130
131 // Pitch in eta direction Deprecated for strips: it varies in endcap
132 double etaPitch() const;
133
134 // Return true if hit local direction is the same as readout direction.
135 bool swapHitPhiReadoutDirection() const;
136 bool swapHitEtaReadoutDirection() const;
137
138 bool nearBondGap(const SiLocalPosition &, double) const;
139
140
141 // Transform from SiHit to GeoModel frame
142 static const Amg::Transform3D SiHitToGeoModel() ;
143
144 // ------------------------------------------------------------------------------------------
145
146//
147// Accessors
148//
149 double pitch(const SiCellId &cellId) const;
150 double stripLength(const SiCellId &cellId) const;
151
152 // Give upper and lower boundaries, and length, of dead area
153 double deadAreaUpperBoundary() const;
154 double deadAreaLowerBoundary() const;
155 double deadAreaLength() const;
156private:
158 double m_pitch;
161 std::unique_ptr<Trk::RectangleBounds> m_bounds;
162};
163
165// Inline methods:
167
168// Unfortunately SCT introduced the name stripPitch as an alternative to phiPitch so
169// everything gets doubled - one of these should be removed!
170
172 return phiPitch();
173}
174
175inline double StripAnnulusDesign::stripPitch() const {
176 return phiPitch();
177}
178
179inline double StripAnnulusDesign::phiPitch(const SiLocalPosition &) const {
180 return m_pitch;
181}
182
183inline double StripAnnulusDesign::phiPitch() const {
184 return m_pitch;
185}
186
187inline bool StripAnnulusDesign::nearBondGap(const SiLocalPosition &, double) const {
188// No bond gap in strip modules
189 return false;
190}
191
193 int strip1D = cellId.phiIndex();
194 return SiReadoutCellId(strip1D, 0);
195}
196
197HepGeom::Vector3D<double> StripAnnulusDesign::phiMeasureSegment(const SiLocalPosition & /*position*/)
198const {
199 throw std::runtime_error("Call to phiMeasureSegment, DEPRECATED, not implemented.");
200}
201
204 double & /*etaDist*/,
205 double & /*phiDist*/) const {
206 throw std::runtime_error(
207 "Call to distanceToDetectorEdge which is Deprecated and not yet implemented");
208}
209
212 return 0.;
213}
214
216 return 0.;
217}
218
220 return 0.;
221}
222
224 return false;
225}
226
228 return false;
229}
230} // namespace InDetDD
231#endif // INDETREADOUTGEOMETRY_STRIPANNULUSDESIGN_H
double thickness() const
Method which returns thickness of the silicon wafer.
int readoutSide() const
ReadoutSide.
SCT_ModuleSideDesign(const double thickness, const bool phiSymmetric, const bool etaSymmetric, const bool depthSymmetric, const int crystals, const int diodes, const int cells, const int shift, const bool swapStripReadout, InDetDD::CarrierType carrierType, int readoutSide)
Constructor with parameters: local axis corresponding to eta direction local axis corresponding to ph...
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
int phiIndex() const
Get phi index. Equivalent to strip().
Definition SiCellId.h:122
Class to handle the position of the centre and the width of a diode or a cluster of diodes Version 1....
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.
double phiPitch() const
Pitch in phi direction.
SiLocalPosition localPositionOfCluster(const SiCellId &cellId, int clusterSize) const
std::unique_ptr< Trk::RectangleBounds > m_bounds
double deadAreaLength() const
give length of dead area
bool nearBondGap(const SiLocalPosition &, double) const
Test if near bond gap within tolerances, only relevant for SCT.
StripAnnulusDesign & operator=(const StripAnnulusDesign &design)
double stripPitch() const
give the strip pitch (For Forward returns pitch at center)
HepGeom::Vector3D< double > phiMeasureSegment(const SiLocalPosition &position) const
Helper method for stereo angle computation, DEPRECATED.
double minWidth() const
Method to calculate minimum width of a module.
double pitch(const SiCellId &cellId) const
SiLocalPosition localPositionOfCell(const SiCellId &cellId) const
id -> position
bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap=false) const
check if the position is in active area
double maxWidth() const
Method to calculate maximum width of a module.
StripAnnulusDesign(const StripAnnulusDesign &design)
const Trk::SurfaceBounds & bounds() const
Element boundary.
SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const
position -> id
void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const
DEPRECATED: Unused (2014)
double deadAreaUpperBoundary() const
DEPRECATED for StripAnnulusDesign; no dead area.
bool swapHitPhiReadoutDirection() const
Return true if hit local direction is the same as readout direction.
SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const
diode id -> readout id
SiCellId cellIdInRange(const SiCellId &) const
Check if cell is in range.
double stripLength(const SiCellId &cellId) const
double scaledDistanceToNearestDiode(const SiLocalPosition &chargePos) const
give distance to the nearest diode in units of pitch, from 0.0 to 0.5, this method should be fast as ...
double width() const
Method to calculate average width of a module.
Amg::Vector3D sensorCenter() const
Return the centre of a sensor in the local reference frame.
StripAnnulusDesign(const SiDetectorDesign::Axis &stripDirection, const SiDetectorDesign::Axis &thicknessDirection, const double &thickness, const int &readoutSide, const InDetDD::CarrierType &carrier, const int &nStrips, const double &pitch, const double &stripStart, const double &stripEnd)
SiLocalPosition positionFromStrip(const SiCellId &cellId) const
double deadAreaLowerBoundary() const
give lower boundary of dead area
std::pair< SiLocalPosition, SiLocalPosition > endsOfStrip(const SiLocalPosition &position) const
Give end points of the strip that covers the given position.
double length() const
Method to calculate length of a module.
SiDiodesParameters parameters(const SiCellId &cellId) const
Return strip width, centre, length etc. Hard to find if this is used or not.
static const Amg::Transform3D SiHitToGeoModel()
void neighboursOfCell(const SiCellId &cellId, std::vector< SiCellId > &neighbours) const
Get the neighbouring diodes of a given diode: Cell for which the neighbours must be found List of cel...
Bounds for a rectangular, planar surface.
Abstract base class for surface bounds to be specified.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Message Stream Member.
Ensure that the ATLAS eigen extensions are properly loaded.