ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_ModuleSideDesign Class Referenceabstract

Base class for the SCT module side design, extended by the Forward and Barrel module design. More...

#include <SCT_ModuleSideDesign.h>

Inheritance diagram for SCT_ModuleSideDesign:
Collaboration diagram for SCT_ModuleSideDesign:

Public Member Functions

 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 phi direction local axis corresponding to depth direction thickness of silicon sensor number of crystals within module side number of diodes within crystal number of cells within module side index of diode connected to cell with index 0.
 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, const SiDetectorDesign::Axis stripDirection, const SiDetectorDesign::Axis thicknessDirection)
 Constructor with parameters with access to enum Axis: local axis corresponding to eta direction local axis corresponding to phi direction local axis corresponding to depth direction thickness of silicon sensor number of crystals within module side number of diodes within crystal number of cells within module side index of diode connected to cell with index 0.
virtual ~SCT_ModuleSideDesign ()=default
 Destructor:
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 uniform interface.
virtual SiCellId connectedCell (const SiReadoutCellId &readoutId, int number) const override
 readout id -> id of connected diodes.
virtual SiCellId gangedCell (const SiCellId &cellId) const override
 If cell is ganged return the other cell, otherwise return an invalid id.
virtual SiReadoutCellId readoutIdOfCell (const SiCellId &cellId) const override
 diode id -> readout id
virtual SiReadoutCellId readoutIdOfPosition (const SiLocalPosition &localPos) const override
 position -> id
virtual SiLocalPosition localPositionOfCell (const SiCellId &cellId) const override=0
 id -> position
virtual SiLocalPosition localPositionOfCluster (const SiCellId &cellId, int cluserSize) const=0
virtual SiCellId cellIdInRange (const SiCellId &cellId) const override
 Check if cell is in range.
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 cells which are neighbours of the given one.
virtual bool inActiveArea (const SiLocalPosition &chargePos, bool checkBondGap=true) const=0
 check if the position is in active area
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 it is called for every surface charge in the SCT_SurfaceChargesGenerator
virtual double stripPitch (const SiLocalPosition &chargePos) const=0
 give the strip pitch (dependence on position needed for forward)
virtual double stripPitch () const=0
 give the strip pitch (For Forward returns pitch at center)
virtual std::pair< SiLocalPosition, SiLocalPositionendsOfStrip (const SiLocalPosition &position) const override=0
 give the ends of strips
virtual SiLocalPosition positionFromStrip (const int stripNumber) const
 gives position of strip center ALTERNATIVE/PREFERED way is to use localPositionOfCell(const SiCellId & cellId) or rawLocalPositionOfCell method in SiDetectorElement.
virtual double deadAreaLength () const=0
 give length of dead area
virtual double deadAreaUpperBoundary () const=0
 give upper boundary of dead area
virtual double deadAreaLowerBoundary () const=0
 give lower boundary of dead area
int crystals () const
 number of crystals within module side:
int diodes () const
 number of strips within crystal:
virtual int diodesInRow (const int row) const
int cells () const
 number of readout stips within module side:
int shift () const
 number of edge strips before first readout strip.
virtual bool swapHitPhiReadoutDirection () const override
 Return true if hit local direction is the same as readout direction.
virtual bool swapHitEtaReadoutDirection () const override
virtual int row (int stripId1Dim) const
virtual int strip (int stripId1Dim) const
virtual int strip1Dim (int strip, int row) const override
 only relevant for SCT.
void setMother (SCT_ModuleSideDesign *mother)
const SCT_ModuleSideDesigngetMother () const
const std::map< int, const SCT_ModuleSideDesign * > & getChildren () const
void addChildDesign (int index, const SCT_ModuleSideDesign *element)
virtual std::pair< int, int > getStripRow (SiCellId id) const
 Get the strip and row number of the cell.
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.

Protected Attributes

SCT_ReadoutScheme m_scheme
InDetDD::DetectorType m_detectorType {Undefined}

Private Member Functions

 SCT_ModuleSideDesign ()
 SCT_ModuleSideDesign (const SCT_ModuleSideDesign &design)
SCT_ModuleSideDesignoperator= (const SCT_ModuleSideDesign &design)

Private Attributes

bool m_swapStripReadout
const SCT_ModuleSideDesignm_motherDesign {nullptr}
std::map< int, const SCT_ModuleSideDesign * > m_childDesigns

Detailed Description

Base class for the SCT module side design, extended by the Forward and Barrel module design.

Author
Alessandro Fornaini, Grant Gorfine

Definition at line 40 of file SCT_ModuleSideDesign.h.

Constructor & Destructor Documentation

◆ SCT_ModuleSideDesign() [1/4]

InDetDD::SCT_ModuleSideDesign::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 phi direction local axis corresponding to depth direction thickness of silicon sensor number of crystals within module side number of diodes within crystal number of cells within module side index of diode connected to cell with index 0.

Definition at line 33 of file SCT_ModuleSideDesign.cxx.

43 :
46 m_swapStripReadout(swapStripReadout) {
47}
double thickness() const
Method which returns thickness of the silicon wafer.
InDetDD::CarrierType carrierType() const
Return carrier type (ie electrons or holes)
int readoutSide() const
ReadoutSide.
int diodes() const
number of strips within crystal:
int cells() const
number of readout stips within module side:
int crystals() const
number of crystals within module side:
int shift() const
number of edge strips before first readout strip.

◆ SCT_ModuleSideDesign() [2/4]

InDetDD::SCT_ModuleSideDesign::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,
const SiDetectorDesign::Axis stripDirection,
const SiDetectorDesign::Axis thicknessDirection )

Constructor with parameters with access to enum Axis: local axis corresponding to eta direction local axis corresponding to phi direction local axis corresponding to depth direction thickness of silicon sensor number of crystals within module side number of diodes within crystal number of cells within module side index of diode connected to cell with index 0.

Definition at line 49 of file SCT_ModuleSideDesign.cxx.

62 :
64 stripDirection, thicknessDirection),
66 m_swapStripReadout(swapStripReadout) {
67}

◆ SCT_ModuleSideDesign() [3/4]

InDetDD::SCT_ModuleSideDesign::SCT_ModuleSideDesign ( )
private

◆ SCT_ModuleSideDesign() [4/4]

InDetDD::SCT_ModuleSideDesign::SCT_ModuleSideDesign ( const SCT_ModuleSideDesign & design)
private

◆ ~SCT_ModuleSideDesign()

virtual InDetDD::SCT_ModuleSideDesign::~SCT_ModuleSideDesign ( )
virtualdefault

Destructor:

Member Function Documentation

◆ addChildDesign()

void InDetDD::SCT_ModuleSideDesign::addChildDesign ( int index,
const SCT_ModuleSideDesign * element )
inline

Definition at line 292 of file SCT_ModuleSideDesign.h.

292 {
293 m_childDesigns.emplace(index,child);
294 }
std::map< int, const SCT_ModuleSideDesign * > m_childDesigns

◆ cellIdInRange()

SiCellId InDetDD::SCT_ModuleSideDesign::cellIdInRange ( const SiCellId & cellId) const
overridevirtual

Check if cell is in range.

Check if cell is in range. Returns the original cellId if it is in range, otherwise it.

Returns the original cellId if it is in range, otherwise it returns an invalid id.

Implements InDetDD::DetectorDesign.

Definition at line 101 of file SCT_ModuleSideDesign.cxx.

101 {
102 if (!cellId.isValid() ||
103 cellId.strip() < 0 || cellId.strip() >= cells()) {
104 return {}; // Invalid
105 }
106 return cellId;
107}
int strip() const
Get strip number. Equivalent to phiIndex().
Definition SiCellId.h:131
bool isValid() const
Test if its in a valid state.
Definition SiCellId.h:136

◆ cells()

int InDetDD::SCT_ModuleSideDesign::cells ( ) const
inline

number of readout stips within module side:

Definition at line 228 of file SCT_ModuleSideDesign.h.

228 {
229 return m_scheme.cells();
230}

◆ connectedCell()

SiCellId InDetDD::SCT_ModuleSideDesign::connectedCell ( const SiReadoutCellId & readoutId,
int number ) const
inlineoverridevirtual

readout id -> id of connected diodes.

parameter number = 0 will refer to the primary diode and in general the cell number will be the same. NB. SiCellId cellId = connectedCell(readoutId, 0) will in general be equivalent to SiCellId cellId = readoutId

Implements InDetDD::DetectorDesign.

Definition at line 241 of file SCT_ModuleSideDesign.h.

242 {
243 return m_scheme.connectedCell(readoutId, number);
244}
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186

◆ crystals()

int InDetDD::SCT_ModuleSideDesign::crystals ( ) const
inline

number of crystals within module side:

Definition at line 216 of file SCT_ModuleSideDesign.h.

216 {
217 return m_scheme.crystals();
218}

◆ deadAreaLength()

virtual double InDetDD::SCT_ModuleSideDesign::deadAreaLength ( ) const
pure virtual

give length of dead area

◆ deadAreaLowerBoundary()

virtual double InDetDD::SCT_ModuleSideDesign::deadAreaLowerBoundary ( ) const
pure virtual

give lower boundary of dead area

◆ deadAreaUpperBoundary()

virtual double InDetDD::SCT_ModuleSideDesign::deadAreaUpperBoundary ( ) const
pure virtual

give upper boundary of dead area

◆ diodes()

int InDetDD::SCT_ModuleSideDesign::diodes ( ) const
inline

number of strips within crystal:

Definition at line 220 of file SCT_ModuleSideDesign.h.

220 {
221 return m_scheme.diodes();
222}

◆ diodesInRow()

int InDetDD::SCT_ModuleSideDesign::diodesInRow ( const int row) const
inlinevirtual

Definition at line 224 of file SCT_ModuleSideDesign.h.

224 {
225 return m_scheme.diodes();
226}

◆ endsOfStrip()

virtual std::pair< SiLocalPosition, SiLocalPosition > InDetDD::SCT_ModuleSideDesign::endsOfStrip ( const SiLocalPosition & position) const
overridepure virtual

give the ends of strips

Implements InDetDD::SiDetectorDesign.

◆ gangedCell()

SiCellId InDetDD::SCT_ModuleSideDesign::gangedCell ( const SiCellId & cellId) const
inlineoverridevirtual

If cell is ganged return the other cell, otherwise return an invalid id.

Not particularly useful for the SCT but implemented to keep a uniform interface. For SCT always returns an invalid id.

Implements InDetDD::SiDetectorDesign.

Definition at line 246 of file SCT_ModuleSideDesign.h.

246 {
247 // No ganged cells in SCT so always return invalid id.
248 return SiCellId();
249}

◆ getChildren()

const std::map< int, const SCT_ModuleSideDesign * > & InDetDD::SCT_ModuleSideDesign::getChildren ( ) const
inline

Definition at line 287 of file SCT_ModuleSideDesign.h.

287 {
288 return m_childDesigns;
289 }

◆ getMother()

const SCT_ModuleSideDesign * InDetDD::SCT_ModuleSideDesign::getMother ( ) const
inline

Definition at line 283 of file SCT_ModuleSideDesign.h.

283 {
284 return m_motherDesign;
285 }
const SCT_ModuleSideDesign * m_motherDesign

◆ getStripRow()

std::pair< int, int > InDetDD::SCT_ModuleSideDesign::getStripRow ( SiCellId id) const
virtual

Get the strip and row number of the cell.

Can be used as auto [strip, row] = getStripRow(cellId); For SCT sensors, return 0 as there should only be one row; derived versions for ITk strip implement specializations

Parameters
cellIdThe SiCellId
Returns
std::pair<int,int> A pair of ints representing the strip ID and row ID. In this case, [0,0].

Definition at line 127 of file SCT_ModuleSideDesign.cxx.

127 {
128 return {0,0};
129 }

◆ inActiveArea()

virtual bool InDetDD::SCT_ModuleSideDesign::inActiveArea ( const SiLocalPosition & chargePos,
bool checkBondGap = true ) const
pure virtual

check if the position is in active area

◆ inDetector()

SiIntersect InDetDD::SCT_ModuleSideDesign::inDetector ( const SiLocalPosition & localPosition,
double phiTol,
double etaTol ) const
overridevirtual

Test if point is in the active part of the detector with specified tolerances.

Reimplemented from InDetDD::DetectorDesign.

Definition at line 131 of file SCT_ModuleSideDesign.cxx.

131 {
132
133 double etaDist = 0;
134 double phiDist = 0;
135
136 distanceToDetectorEdge(localPosition, etaDist, phiDist);
137
138 SiIntersect state;
139
140 if (phiDist < -phiTol || etaDist < -etaTol) {
141 state.setOut();
142 return state;
143 }
144
145 if (phiDist > phiTol && etaDist > etaTol) {
146 state.setIn();
147 return state;
148 }
149
150 // Near boundary.
151 state.setNearBoundary();
152 return state;
153}
virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const =0
Returns distance to nearest detector active edge +ve = inside -ve = outside.

◆ localPositionOfCell()

virtual SiLocalPosition InDetDD::SCT_ModuleSideDesign::localPositionOfCell ( const SiCellId & cellId) const
overridepure virtual

id -> position

◆ localPositionOfCluster()

virtual SiLocalPosition InDetDD::SCT_ModuleSideDesign::localPositionOfCluster ( const SiCellId & cellId,
int cluserSize ) const
pure virtual

◆ neighboursOfCell()

void InDetDD::SCT_ModuleSideDesign::neighboursOfCell ( const SiCellId & cellId,
std::vector< SiCellId > & neighbours ) const
overridevirtual

Get the neighbouring diodes of a given diode: Cell for which the neighbours must be found List of cells which are neighbours of the given one.

Implements InDetDD::DetectorDesign.

Definition at line 70 of file SCT_ModuleSideDesign.cxx.

71 {
72 neighbours.clear();
73 neighbours.reserve(2);
74
75 if (!cellId.isValid()) {
76 return;
77 }
78
79 int strip = cellId.strip();
80 int stripM = strip - 1;
81 int stripP = strip + 1;
82
83 if (stripM >= m_scheme.shift()) {
84 neighbours.emplace_back(stripM);
85 }
86 if (stripP < m_scheme.diodes() + m_scheme.shift()) {
87 neighbours.emplace_back(stripP);
88 }
89}
virtual int strip(int stripId1Dim) const

◆ numberOfConnectedCells()

int InDetDD::SCT_ModuleSideDesign::numberOfConnectedCells ( const SiReadoutCellId & readoutId) const
inlineoverridevirtual

readout id -> id of connected diodes Not particularly useful for the SCT but implemented to keep a uniform interface.

Implements InDetDD::DetectorDesign.

Definition at line 236 of file SCT_ModuleSideDesign.h.

237 {
238 return m_scheme.numberOfConnectedCells(readoutId);
239}

◆ operator=()

SCT_ModuleSideDesign & InDetDD::SCT_ModuleSideDesign::operator= ( const SCT_ModuleSideDesign & design)
private

◆ positionFromStrip()

SiLocalPosition InDetDD::SCT_ModuleSideDesign::positionFromStrip ( const int stripNumber) const
virtual

gives position of strip center ALTERNATIVE/PREFERED way is to use localPositionOfCell(const SiCellId & cellId) or rawLocalPositionOfCell method in SiDetectorElement.

DEPRECATED

Definition at line 95 of file SCT_ModuleSideDesign.cxx.

95 {
96 return localPositionOfCell(SiCellId(stripNumber));
97}
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const override=0
id -> position

◆ readoutIdOfCell()

SiReadoutCellId InDetDD::SCT_ModuleSideDesign::readoutIdOfCell ( const SiCellId & cellId) const
inlineoverridevirtual

diode id -> readout id

Implements InDetDD::DetectorDesign.

Definition at line 251 of file SCT_ModuleSideDesign.h.

252{
253 return m_scheme.readoutIdOfCell(cellId);
254}

◆ readoutIdOfPosition()

SiReadoutCellId InDetDD::SCT_ModuleSideDesign::readoutIdOfPosition ( const SiLocalPosition & localPos) const
inlineoverridevirtual

position -> id

Implements InDetDD::DetectorDesign.

Definition at line 256 of file SCT_ModuleSideDesign.h.

257 {
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}
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const =0
position -> id
virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const override
diode id -> readout id

◆ row()

int InDetDD::SCT_ModuleSideDesign::row ( int stripId1Dim) const
inlinevirtual

Definition at line 271 of file SCT_ModuleSideDesign.h.

271 {
272 return -1; // Use -1 to realise this is an SCT module without rows
273}

◆ scaledDistanceToNearestDiode()

virtual double InDetDD::SCT_ModuleSideDesign::scaledDistanceToNearestDiode ( const SiLocalPosition & chargePos) const
pure virtual

give distance to the nearest diode in units of pitch, from 0.0 to 0.5, this method should be fast as it is called for every surface charge in the SCT_SurfaceChargesGenerator

◆ setMother()

void InDetDD::SCT_ModuleSideDesign::setMother ( SCT_ModuleSideDesign * mother)

Definition at line 109 of file SCT_ModuleSideDesign.cxx.

109 {
110 if(m_motherDesign){
111 const std::string errMsg=std::string("SCT_ModuleSideDesign already has a mother set!");
112 throw std::runtime_error(errMsg);
113 }
114 m_motherDesign = mother;
115
116 }

◆ shift()

int InDetDD::SCT_ModuleSideDesign::shift ( ) const
inline

number of edge strips before first readout strip.

Definition at line 232 of file SCT_ModuleSideDesign.h.

232 {
233 return m_scheme.shift();
234}

◆ strip()

int InDetDD::SCT_ModuleSideDesign::strip ( int stripId1Dim) const
inlinevirtual

Definition at line 275 of file SCT_ModuleSideDesign.h.

275 {
276 return stripId1Dim;
277}

◆ strip1Dim()

int InDetDD::SCT_ModuleSideDesign::strip1Dim ( int strip,
int row ) const
inlineoverridevirtual

only relevant for SCT.

Return strip1Dim(int strip, int row) if SCT; otherwise -1

Reimplemented from InDetDD::SiDetectorDesign.

Definition at line 279 of file SCT_ModuleSideDesign.h.

279 {
280 return strip;
281}

◆ stripPitch() [1/2]

virtual double InDetDD::SCT_ModuleSideDesign::stripPitch ( ) const
pure virtual

give the strip pitch (For Forward returns pitch at center)

◆ stripPitch() [2/2]

virtual double InDetDD::SCT_ModuleSideDesign::stripPitch ( const SiLocalPosition & chargePos) const
pure virtual

give the strip pitch (dependence on position needed for forward)

◆ swapHitEtaReadoutDirection()

bool InDetDD::SCT_ModuleSideDesign::swapHitEtaReadoutDirection ( ) const
inlineoverridevirtual

Implements InDetDD::DetectorDesign.

Definition at line 267 of file SCT_ModuleSideDesign.h.

267 {
268 return false;
269}

◆ swapHitPhiReadoutDirection()

bool InDetDD::SCT_ModuleSideDesign::swapHitPhiReadoutDirection ( ) const
inlineoverridevirtual

Return true if hit local direction is the same as readout direction.

Implements InDetDD::DetectorDesign.

Definition at line 263 of file SCT_ModuleSideDesign.h.

263 {
264 return m_swapStripReadout;
265}

Member Data Documentation

◆ m_childDesigns

std::map<int, const SCT_ModuleSideDesign *> InDetDD::SCT_ModuleSideDesign::m_childDesigns
private

Definition at line 210 of file SCT_ModuleSideDesign.h.

◆ m_detectorType

InDetDD::DetectorType InDetDD::SCT_ModuleSideDesign::m_detectorType {Undefined}
protected

Definition at line 197 of file SCT_ModuleSideDesign.h.

197{Undefined};
@ Undefined

◆ m_motherDesign

const SCT_ModuleSideDesign* InDetDD::SCT_ModuleSideDesign::m_motherDesign {nullptr}
private

Definition at line 208 of file SCT_ModuleSideDesign.h.

208{nullptr};

◆ m_scheme

SCT_ReadoutScheme InDetDD::SCT_ModuleSideDesign::m_scheme
protected

Definition at line 196 of file SCT_ModuleSideDesign.h.

◆ m_swapStripReadout

bool InDetDD::SCT_ModuleSideDesign::m_swapStripReadout
private

Definition at line 204 of file SCT_ModuleSideDesign.h.


The documentation for this class was generated from the following files: