ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_ModuleSideDesign.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6// SCT_ModuleSideDesign.h
8// (c) ATLAS Detector software
10
11
12#ifndef INDETREADOUTGEOMETRY_SCT_MODULESIDEDESIGN_H
13#define INDETREADOUTGEOMETRY_SCT_MODULESIDEDESIGN_H
14
15// Base class
17
18// Data member class
20
21// Other includes
22#include "ReadoutGeometryBase/InDetDD_Defs.h" //InDetDD::CarrierType enum
23#include <vector>
24#include <utility> //std::pair
25#include <map> //data member
26
27namespace InDetDD{
28 class SiCellId;
29}
30
31namespace InDetDD {
39
41public:
52 const bool phiSymmetric,
53 const bool etaSymmetric,
54 const bool depthSymmetric,
55 const int crystals,
56 const int diodes,
57 const int cells,
58 const int shift,
59 const bool swapStripReadout,
61 int readoutSide);
62
73 const bool phiSymmetric,
74 const bool etaSymmetric,
75 const bool depthSymmetric,
76 const int crystals,
77 const int diodes,
78 const int cells,
79 const int shift,
80 const bool swapStripReadout,
82 int readoutSide,
83 const SiDetectorDesign::Axis stripDirection,
84 const SiDetectorDesign::Axis thicknessDirection);
85
86
88 virtual ~SCT_ModuleSideDesign() = default;
89
93 virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const override;
94 virtual SiCellId connectedCell(const SiReadoutCellId &readoutId, int number) const override;
95
99 virtual SiCellId gangedCell(const SiCellId &cellId) const override;
100
102 virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const override;
103
105 virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition &localPos) const override;
106
108 virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const override = 0;
110 int cluserSize) const = 0;
111
114 virtual SiCellId cellIdInRange(const SiCellId &cellId) const override;
115
119 virtual void neighboursOfCell(const SiCellId &cellId,
120 std::vector<SiCellId> &neighbours) const override;
121
123 virtual bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap =
124 true) const = 0;
125
129 virtual double scaledDistanceToNearestDiode(const SiLocalPosition &chargePos) const =
130 0;
131
133 virtual double stripPitch(const SiLocalPosition &chargePos) const = 0;
134
136 virtual double stripPitch() const = 0;
137
139 virtual std::pair<SiLocalPosition, SiLocalPosition>
140 endsOfStrip(const SiLocalPosition &position) const override = 0;
141
146 virtual SiLocalPosition positionFromStrip(const int stripNumber) const;
147
149 virtual double deadAreaLength() const = 0;
150
152 virtual double deadAreaUpperBoundary() const = 0;
153
155 virtual double deadAreaLowerBoundary() const = 0;
156
158 int crystals() const;
159
161 int diodes() const;
162 virtual int diodesInRow(const int row) const; // Introduced for upgrade sensors which have several rows
163
165 int cells() const;
166
168 int shift() const;
169
171 virtual bool swapHitPhiReadoutDirection() const override;
172 virtual bool swapHitEtaReadoutDirection() const override;
173
174 virtual int row(int stripId1Dim) const; // For SCT, is 0; otherwise takes a 1-dim strip ID and returns its row
175 virtual int strip(int stripId1Dim) const; // For SCT, returns stripId1Dim; otherwise returns strip within row.
176 virtual int strip1Dim(int strip, int row) const override; // For SCT, returns strip. Else inverse of above two.
177
178 void setMother(SCT_ModuleSideDesign* mother);
179 const SCT_ModuleSideDesign * getMother() const;
180 const std::map<int, const SCT_ModuleSideDesign *>& getChildren() const;
181 void addChildDesign(int index, const SCT_ModuleSideDesign * element);
182 virtual std::pair<int,int> getStripRow(SiCellId id) const;
184 virtual SiIntersect inDetector(const SiLocalPosition &localPosition, double phiTol, double etaTol) const override;
185
186private:
188
189 // Copy constructor:
191
192 // Assignment operator:
194
195protected:
196 SCT_ReadoutScheme m_scheme; // !< connection between diodes and readout cells
198
199
201 // Private data:
203private:
204 bool m_swapStripReadout; // !< Flag to indicate if readout direction is opposite
205 // !< to hit local phi direction
206
207 //container design for split sensors - owned by DetectorManager
209 //if this design *is* a mother design, these are its children
210 std::map<int, const SCT_ModuleSideDesign *> m_childDesigns;
211};
212
214// Inline methods:
217 return m_scheme.crystals();
218}
219
221 return m_scheme.diodes();
222}
223
224inline int SCT_ModuleSideDesign::diodesInRow(const int /* row */) const {
225 return m_scheme.diodes();
226}
227
228inline int SCT_ModuleSideDesign::cells() const {
229 return m_scheme.cells();
230}
231
232inline int SCT_ModuleSideDesign::shift() const {
233 return m_scheme.shift();
234}
235
237const {
238 return m_scheme.numberOfConnectedCells(readoutId);
239}
240
242 int number) const {
243 return m_scheme.connectedCell(readoutId, number);
244}
245
247 // No ganged cells in SCT so always return invalid id.
248 return SiCellId();
249}
250
252{
253 return m_scheme.readoutIdOfCell(cellId);
254}
255
257 const SiLocalPosition &localPos) const {
258 // Get the cellId then convert it to a readoutId.
259 // NEED to think about active area and bond gap check
260 return readoutIdOfCell(cellIdOfPosition(localPos));
261}
262
266
268 return false;
269}
270
271inline int SCT_ModuleSideDesign::row(int /*stripId1Dim not used */) const {
272 return -1; // Use -1 to realise this is an SCT module without rows
273}
274
275inline int SCT_ModuleSideDesign::strip(int stripId1Dim) const {
276 return stripId1Dim;
277}
278
279inline int SCT_ModuleSideDesign::strip1Dim(int strip, int /*row not used */) const {
280 return strip;
281}
282
284 return m_motherDesign;
285 }
286
287 inline const std::map<int, const SCT_ModuleSideDesign *>& SCT_ModuleSideDesign::getChildren() const {
288 return m_childDesigns;
289 }
290
291
293 m_childDesigns.emplace(index,child);
294 }
295
296} // namespace InDetDD
297#endif // INDETREADOUTGEOMETRY_SCT_MODULESIDEDESIGN_H
double thickness() const
Method which returns thickness of the silicon wafer.
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const =0
position -> id
InDetDD::CarrierType carrierType() const
Return carrier type (ie electrons or holes)
int readoutSide() const
ReadoutSide.
virtual bool swapHitPhiReadoutDirection() const override
Return true if hit local direction is the same as readout direction.
virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const override
diode id -> readout id
std::map< int, const SCT_ModuleSideDesign * > m_childDesigns
virtual std::pair< int, int > getStripRow(SiCellId id) const
Get the strip and row number of the cell.
virtual SiCellId cellIdInRange(const SiCellId &cellId) const override
Check if cell is in range.
SCT_ModuleSideDesign & operator=(const SCT_ModuleSideDesign &design)
int diodes() const
number of strips within crystal:
void addChildDesign(int index, const SCT_ModuleSideDesign *element)
virtual double deadAreaUpperBoundary() const =0
give upper boundary of dead area
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const override=0
id -> position
int cells() const
number of readout stips within module side:
virtual bool swapHitEtaReadoutDirection() const override
int crystals() const
number of crystals within module side:
virtual double scaledDistanceToNearestDiode(const SiLocalPosition &chargePos) const =0
give distance to the nearest diode in units of pitch, from 0.0 to 0.5, this method should be fast as ...
virtual double stripPitch() const =0
give the strip pitch (For Forward returns pitch at center)
virtual int strip(int stripId1Dim) const
const SCT_ModuleSideDesign * m_motherDesign
int shift() const
number of edge strips before first readout strip.
virtual double deadAreaLength() const =0
give length of dead area
virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition &localPos) const override
position -> id
const std::map< int, const SCT_ModuleSideDesign * > & getChildren() const
const SCT_ModuleSideDesign * getMother() const
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...
virtual bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap=true) const =0
check if the position is in active area
virtual int row(int stripId1Dim) const
virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const override
readout id -> id of connected diodes Not particularly useful for the SCT but implemented to keep a un...
virtual SiIntersect inDetector(const SiLocalPosition &localPosition, double phiTol, double etaTol) const override
Test if point is in the active part of the detector with specified tolerances.
virtual SiLocalPosition positionFromStrip(const int stripNumber) const
gives position of strip center ALTERNATIVE/PREFERED way is to use localPositionOfCell(const SiCellId ...
virtual double stripPitch(const SiLocalPosition &chargePos) const =0
give the strip pitch (dependence on position needed for forward)
virtual void neighboursOfCell(const SiCellId &cellId, std::vector< SiCellId > &neighbours) const override
Get the neighbouring diodes of a given diode: Cell for which the neighbours must be found List of cel...
virtual int strip1Dim(int strip, int row) const override
only relevant for SCT.
virtual SiLocalPosition localPositionOfCluster(const SiCellId &cellId, int cluserSize) const =0
virtual double deadAreaLowerBoundary() const =0
give lower boundary of dead area
void setMother(SCT_ModuleSideDesign *mother)
virtual SiCellId connectedCell(const SiReadoutCellId &readoutId, int number) const override
readout id -> id of connected diodes.
virtual int diodesInRow(const int row) const
virtual SiCellId gangedCell(const SiCellId &cellId) const override
If cell is ganged return the other cell, otherwise return an invalid id.
SCT_ModuleSideDesign(const SCT_ModuleSideDesign &design)
virtual std::pair< SiLocalPosition, SiLocalPosition > endsOfStrip(const SiLocalPosition &position) const override=0
give the ends of strips
virtual ~SCT_ModuleSideDesign()=default
Destructor:
Definition of the readout scheme in the SCT detector describing, number of sides, cells,...
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
SiDetectorDesign(double thickness, bool phiSymmetric, bool etaSymmetric, bool depthSymmetric, InDetDD::CarrierType carrierType, int readoutSide)
Constructor.
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.
Message Stream Member.
Definition index.py:1
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186