ATLAS Offline Software
Loading...
Searching...
No Matches
InDetDD::SCT_BarrelModuleSideDesign Class Reference

Barrel module design description for the SCT. More...

#include <SCT_BarrelModuleSideDesign.h>

Inheritance diagram for InDetDD::SCT_BarrelModuleSideDesign:
Collaboration diagram for InDetDD::SCT_BarrelModuleSideDesign:

Public Types

enum  Axis { xAxis =0 , yAxis , zAxis }

Public Member Functions

 SCT_BarrelModuleSideDesign (const SCT_BarrelModuleSideDesign &design)
 Copy constructor:
 SCT_BarrelModuleSideDesign (const double thickness, const int crystals, const int diodes, const int cells, const int shift, const bool swapStripReadout, InDetDD::CarrierType carrierType, const double stripPitch, const double stripLength, const double xEtaStripPatternCentre, const double xPhiStripPatternCentre, const double totalDeadLength, int readoutSide=-1)
 Constructor with parameters: strip pitch, 80 um in barrel SCT strip length geom position on G4 volume, care needed geom position on G4 volume, care needed includes detector edge and gap between decetors.
virtual ~SCT_BarrelModuleSideDesign ()=default
 Destructor:
SCT_BarrelModuleSideDesignoperator= (const SCT_BarrelModuleSideDesign &design)
 Assignment operator:
virtual double stripPitch () const
 strip pitch
double stripLength () const
 strip length
double etaStripPatternCentre () const
 centre of the strip pattern in eta
double phiStripPatternCentre () const
 centre of the strip pattern in phi
virtual void distanceToDetectorEdge (const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const
 Returns distance to nearest detector active edge +ve = inside -ve = outside.
virtual bool nearBondGap (const SiLocalPosition &localPosition, double etaTol) const
 Test if near bond gap within tolerances.
virtual bool inActiveArea (const SiLocalPosition &chargePos, bool checkBondGap=true) const
 check if the position is in active area
virtual double scaledDistanceToNearestDiode (const SiLocalPosition &chargePos) const
 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 an active area check, done in the Generator anyway, is removed here
virtual double stripPitch (const SiLocalPosition &chargePos) const
 give the strip pitch (dependence on position needed for forward)
virtual SiDiodesParameters parameters (const SiCellId &cellId) const
 readout or diode id -> position, size
virtual SiLocalPosition localPositionOfCell (const SiCellId &cellId) const
 id -> position
virtual SiLocalPosition localPositionOfCluster (const SiCellId &cellId, int clusterSize) const
virtual SiCellId cellIdOfPosition (const SiLocalPosition &localPos) const
 position -> id
virtual std::pair< SiLocalPosition, SiLocalPositionendsOfStrip (const SiLocalPosition &position) const
 this method returns the ends of the strip
virtual HepGeom::Vector3D< double > phiMeasureSegment (const SiLocalPosition &) const
 method for stereo angle computation - returns a vector parallel to the strip being hit
virtual double length () const
 Method to calculate length of a module.
virtual double width () const
 Method to calculate average width of a module.
virtual double minWidth () const
 Method to calculate minimum width of a module.
virtual double maxWidth () const
 Method to calculate maximum width of a module.
virtual double deadAreaLength () const
 give length of dead area
virtual double deadAreaUpperBoundary () const
 give upper boundary of dead area
virtual double deadAreaLowerBoundary () const
 give lower boundary of dead area
virtual double phiPitch () const
 Pitch in phi direction.
virtual double phiPitch (const SiLocalPosition &localPosition) const
 Pitch in phi direction.
virtual double etaPitch () const
 Pitch in eta direction.
virtual const Trk::SurfaceBoundsbounds () const
 Return the surface bounds.
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 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 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.
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.
virtual double sinStripAngleReco (double phiCoord, double etaCoord) const
 Give strip angle in the reco frame.
virtual Amg::Vector3D sensorCenter () const
 Return the centre of a sensor in the local reference frame.
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 phiAxis () const
 local axis corresponding to phi direction:
Axis depthAxis () const
 local axis corresponding to depth direction:
double thickness () const
 Method which returns thickness of the silicon wafer.
InDetDD::CarrierType carrierType () const
 Return carrier type (ie electrons or holes)
bool phiSymmetric () const
bool etaSymmetric () const
bool depthSymmetric () const
int readoutSide () const
 ReadoutSide.
virtual DetectorShape shape () const
 Shape of element.
virtual DetectorType type () const
 Type of element.
virtual const Amg::Transform3D moduleShift () const

Protected Attributes

SCT_ReadoutScheme m_scheme
InDetDD::DetectorType m_detectorType {Undefined}

Private Member Functions

 SCT_BarrelModuleSideDesign ()

Private Attributes

double m_stripPitch
 strip pitch, 80 um in barrel SCT
double m_stripLength
 strip length
double m_xEtaStripPatternCentre
 geom position on G4 volume, care needed
double m_xPhiStripPatternCentre
 geom position on G4 volume, care needed
double m_totalDeadLength
 includes detector edge and gap between decetors
double m_xPhiAbsSize
 size in xPhi/2 for active area
double m_xEtaAbsSizeLow
double m_xEtaAbsSizeHigh
 active area in xEta
Trk::RectangleBounds m_bounds
 surface bound description
bool m_swapStripReadout
const SCT_ModuleSideDesignm_motherDesign {nullptr}
std::map< int, const SCT_ModuleSideDesign * > m_childDesigns
Axis m_etaAxis
Axis m_phiAxis
Axis m_depthAxis
double m_thickness
InDetDD::CarrierType m_carrierType
bool m_phiSymmetric
bool m_etaSymmetric
bool m_depthSymmetric
bool m_readoutSidePosDepth

Detailed Description

Barrel module design description for the SCT.

Author
Szymon Gadomski, Alessandro Fornaini
  • modified: Grant Gorfine, Andreas Salzburger

Definition at line 34 of file SCT_BarrelModuleSideDesign.h.

Member Enumeration Documentation

◆ Axis

Enumerator
xAxis 
yAxis 
zAxis 

Definition at line 59 of file DetectorDesign.h.

Constructor & Destructor Documentation

◆ SCT_BarrelModuleSideDesign() [1/3]

InDetDD::SCT_BarrelModuleSideDesign::SCT_BarrelModuleSideDesign ( const SCT_BarrelModuleSideDesign & design)

Copy constructor:

◆ SCT_BarrelModuleSideDesign() [2/3]

InDetDD::SCT_BarrelModuleSideDesign::SCT_BarrelModuleSideDesign ( const double thickness,
const int crystals,
const int diodes,
const int cells,
const int shift,
const bool swapStripReadout,
InDetDD::CarrierType carrierType,
const double stripPitch,
const double stripLength,
const double xEtaStripPatternCentre,
const double xPhiStripPatternCentre,
const double totalDeadLength,
int readoutSide = -1 )

Constructor with parameters: strip pitch, 80 um in barrel SCT strip length geom position on G4 volume, care needed geom position on G4 volume, care needed includes detector edge and gap between decetors.

Definition at line 21 of file SCT_BarrelModuleSideDesign.cxx.

33 :
35 true, true, true, // phi,eta,depth axes symmetric
39 m_xEtaStripPatternCentre(xEtaStripPatternCentre),
40 m_xPhiStripPatternCentre(xPhiStripPatternCentre),
41 m_totalDeadLength(totalDeadLength)
42{
44 if(crystals==1) {
46 if (m_xEtaAbsSizeLow == 0) m_xEtaAbsSizeLow = -1.0 * CLHEP::mm; // Anything negative will do
48 }
49 else if(crystals==2) {
52 } else {
53 std::cout << "wrong number of crystals!\n";
55 }
56
58}
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.
double m_xEtaStripPatternCentre
geom position on G4 volume, care needed
virtual double width() const
Method to calculate average width of a module.
virtual double stripPitch() const
strip pitch
virtual double length() const
Method to calculate length of a module.
Trk::RectangleBounds m_bounds
surface bound description
double m_xPhiAbsSize
size in xPhi/2 for active area
double m_xPhiStripPatternCentre
geom position on G4 volume, care needed
double m_stripPitch
strip pitch, 80 um in barrel SCT
double m_totalDeadLength
includes detector edge and gap between decetors
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_BarrelModuleSideDesign()

virtual InDetDD::SCT_BarrelModuleSideDesign::~SCT_BarrelModuleSideDesign ( )
virtualdefault

Destructor:

◆ SCT_BarrelModuleSideDesign() [3/3]

InDetDD::SCT_BarrelModuleSideDesign::SCT_BarrelModuleSideDesign ( )
private

Member Function Documentation

◆ addChildDesign()

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

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

◆ bounds()

const Trk::SurfaceBounds & InDetDD::SCT_BarrelModuleSideDesign::bounds ( ) const
virtual

Return the surface bounds.

Implements InDetDD::DetectorDesign.

Definition at line 251 of file SCT_BarrelModuleSideDesign.cxx.

252{
253 return m_bounds;
254}

◆ carrierType()

InDetDD::CarrierType InDetDD::DetectorDesign::carrierType ( ) const
inlineinherited

Return carrier type (ie electrons or holes)

Definition at line 275 of file DetectorDesign.h.

275 {
276 return m_carrierType;
277}
InDetDD::CarrierType m_carrierType

◆ cellIdInRange()

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

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.

Reimplemented in InDetDD::StripAnnulusDesign, InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

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

◆ cellIdOfPosition()

SiCellId InDetDD::SCT_BarrelModuleSideDesign::cellIdOfPosition ( const SiLocalPosition & localPos) const
virtual

position -> id

Implements InDetDD::DetectorDesign.

Definition at line 235 of file SCT_BarrelModuleSideDesign.cxx.

236{
237 // NB We do not distinguish between the two crystals anymore.
238 // Check if we are in the active region. No bondgap check.
239 if (!inActiveArea(localPosition, false)) return {}; // return an invalid id
240 double xPhi=localPosition.xPhi();
241 double dstrip=(xPhi-m_xPhiStripPatternCentre)/m_stripPitch+0.5*diodes();
242 if (dstrip < 0) return {}; // return an invalid id
243 int strip = static_cast<int>(dstrip);
244 if (strip > diodes()) return {};// return an invalid id if strip # greater than number of diodes.
245 return {strip-shift()}; // strip numbering starts from first readout strip.
246 // Those to the left will have negative numbers.
247
248}
virtual bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap=true) const
check if the position is in active area
virtual int strip(int stripId1Dim) const

◆ cells()

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

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
inlineoverridevirtualinherited

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
inlineinherited

number of crystals within module side:

Definition at line 216 of file SCT_ModuleSideDesign.h.

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

◆ deadAreaLength()

double InDetDD::SCT_BarrelModuleSideDesign::deadAreaLength ( ) const
virtual

give length of dead area

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 164 of file SCT_BarrelModuleSideDesign.cxx.

165{
166 return m_totalDeadLength;
167}

◆ deadAreaLowerBoundary()

double InDetDD::SCT_BarrelModuleSideDesign::deadAreaLowerBoundary ( ) const
virtual

give lower boundary of dead area

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 175 of file SCT_BarrelModuleSideDesign.cxx.

176{
177 return -m_totalDeadLength/2;
178}

◆ deadAreaUpperBoundary()

double InDetDD::SCT_BarrelModuleSideDesign::deadAreaUpperBoundary ( ) const
virtual

give upper boundary of dead area

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 170 of file SCT_BarrelModuleSideDesign.cxx.

171{
172 return m_totalDeadLength/2;
173}

◆ depthAxis()

DetectorDesign::Axis InDetDD::DetectorDesign::depthAxis ( ) const
inlineinherited

local axis corresponding to depth direction:

Definition at line 267 of file DetectorDesign.h.

267 {
268 return m_depthAxis;
269}

◆ depthSymmetric()

bool InDetDD::DetectorDesign::depthSymmetric ( ) const
inlineinherited

Definition at line 287 of file DetectorDesign.h.

287 {
288 return m_depthSymmetric;
289}

◆ diodes()

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

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
inlinevirtualinherited

Reimplemented in InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

Definition at line 224 of file SCT_ModuleSideDesign.h.

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

◆ distanceToDetectorEdge()

void InDetDD::SCT_BarrelModuleSideDesign::distanceToDetectorEdge ( const SiLocalPosition & localPosition,
double & etaDist,
double & phiDist ) const
virtual

Returns distance to nearest detector active edge +ve = inside -ve = outside.

Implements InDetDD::DetectorDesign.

Definition at line 65 of file SCT_BarrelModuleSideDesign.cxx.

67{
68 // As the calculation is symmetric around 0,0 we only have to test it for one side.
69 double xEta = std::abs(localPosition.xEta() - m_xEtaStripPatternCentre);
70 double xPhi = std::abs(localPosition.xPhi() - m_xPhiStripPatternCentre);
71
72 double xEtaEdge = 0.5 * length();
73 double xPhiEdge = 0.5 * width();
74
75 // Distance to top/bottom
76 etaDist = xEtaEdge - xEta;
77
78 // Distance to right/left edge
79 phiDist = xPhiEdge - xPhi;
80
81}
double xPhi() const
position along phi direction:
double xEta() const
position along eta direction:

◆ endsOfStrip()

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

this method returns the ends of the strip

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 120 of file SCT_BarrelModuleSideDesign.cxx.

121{
122 // this method returns the ends of the strip
123 // assume input xPhi
124
125 SiLocalPosition end1(m_xEtaStripPatternCentre+m_xEtaAbsSizeHigh,position.xPhi());
126 SiLocalPosition end2(m_xEtaStripPatternCentre-m_xEtaAbsSizeHigh,position.xPhi());
127
128 std::pair<SiLocalPosition,SiLocalPosition> two_ends(end1,end2);
129 return two_ends;
130}

◆ etaAxis()

DetectorDesign::Axis InDetDD::DetectorDesign::etaAxis ( ) const
inlineinherited

local axis corresponding to eta direction:

Definition at line 259 of file DetectorDesign.h.

259 {
260 return m_etaAxis;
261}

◆ etaPitch()

double InDetDD::SCT_BarrelModuleSideDesign::etaPitch ( ) const
inlinevirtual

Pitch in eta direction.

Implements InDetDD::DetectorDesign.

Definition at line 216 of file SCT_BarrelModuleSideDesign.h.

217 {
218 return length();
219 }

◆ etaStripPatternCentre()

double InDetDD::SCT_BarrelModuleSideDesign::etaStripPatternCentre ( ) const
inline

centre of the strip pattern in eta

Definition at line 193 of file SCT_BarrelModuleSideDesign.h.

194 {
196 }

◆ etaSymmetric()

bool InDetDD::DetectorDesign::etaSymmetric ( ) const
inlineinherited

Definition at line 283 of file DetectorDesign.h.

283 {
284 return m_etaSymmetric;
285}

◆ gangedCell()

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

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
inlineinherited

Definition at line 287 of file SCT_ModuleSideDesign.h.

287 {
288 return m_childDesigns;
289 }

◆ getMother()

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

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
virtualinherited

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].

Reimplemented in InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

Definition at line 127 of file SCT_ModuleSideDesign.cxx.

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

◆ inActiveArea()

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

check if the position is in active area

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 92 of file SCT_BarrelModuleSideDesign.cxx.

94{
95 // in Phi
96 if (std::abs(chargePos.xPhi()-m_xPhiStripPatternCentre) > m_xPhiAbsSize) return false;
97
98 // in Eta
99 double relEta = std::abs(chargePos.xEta() - m_xEtaStripPatternCentre);
100 if (relEta > m_xEtaAbsSizeHigh) return false;
101
102 // bond gap
103 return !(checkBondGap && (relEta < m_xEtaAbsSizeLow));
104}

◆ inDetector()

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

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.

◆ length()

double InDetDD::SCT_BarrelModuleSideDesign::length ( ) const
virtual

Method to calculate length of a module.

Implements InDetDD::DetectorDesign.

Definition at line 133 of file SCT_BarrelModuleSideDesign.cxx.

134{
136}

◆ localPositionOfCell()

SiLocalPosition InDetDD::SCT_BarrelModuleSideDesign::localPositionOfCell ( const SiCellId & cellId) const
virtual

id -> position

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 183 of file SCT_BarrelModuleSideDesign.cxx.

184{
185
186 // NB. No check is made that cellId is valid or in the correct range.
187
188 int strip = cellId.strip();
189
190 // center of cluster (in units of number of strips) from detector center
191 double clusterCenter = strip - 0.5*cells() + 0.5;
192
193 double xPhi=m_xPhiStripPatternCentre + m_stripPitch * clusterCenter;
194
195 // Return the position.
196 // no matter how many crystals we have, xEta of the position is in the centre!
197 return SiLocalPosition(m_xEtaStripPatternCentre, xPhi);
198}

◆ localPositionOfCluster()

SiLocalPosition InDetDD::SCT_BarrelModuleSideDesign::localPositionOfCluster ( const SiCellId & cellId,
int clusterSize ) const
virtual

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 201 of file SCT_BarrelModuleSideDesign.cxx.

202{
203 // This method returns the position of the centre of the cluster starting at cellId.strip()
204
205 // NB. No check is made that cellId is valid or in the correct range.
206
207 if (clusterSize < 1) clusterSize = 1;
208
209 int strip = cellId.strip();
210
211 // center of cluster (in units of number of strips) from detector center
212 double clusterCenter = strip - 0.5*cells() + 0.5;
213 if (clusterSize>1) clusterCenter += 0.5 * (clusterSize-1);
214
215 double xPhi=m_xPhiStripPatternCentre + m_stripPitch * clusterCenter;
216
217 // Return the position.
218 // no matter how many crystals we have, xEta of the position is in the centre!
219 return SiLocalPosition(m_xEtaStripPatternCentre, xPhi);
220}

◆ maxWidth()

double InDetDD::SCT_BarrelModuleSideDesign::maxWidth ( ) const
virtual

Method to calculate maximum width of a module.

Implements InDetDD::DetectorDesign.

Definition at line 148 of file SCT_BarrelModuleSideDesign.cxx.

149{
150 return width();
151}

◆ minWidth()

double InDetDD::SCT_BarrelModuleSideDesign::minWidth ( ) const
virtual

Method to calculate minimum width of a module.

Implements InDetDD::DetectorDesign.

Definition at line 143 of file SCT_BarrelModuleSideDesign.cxx.

144{
145 return width();
146}

◆ moduleShift()

const Amg::Transform3D InDetDD::DetectorDesign::moduleShift ( ) const
virtualinherited

Reimplemented in InDetDD::StripBoxDesign.

Definition at line 130 of file DetectorDesign.cxx.

130 {
131 return Amg::Transform3D::Identity();
132 }

◆ nearBondGap()

bool InDetDD::SCT_BarrelModuleSideDesign::nearBondGap ( const SiLocalPosition & localPosition,
double etaTol ) const
virtual

Test if near bond gap within tolerances.

Implements InDetDD::SiDetectorDesign.

Definition at line 84 of file SCT_BarrelModuleSideDesign.cxx.

85{
86 // Symmetric around xEta = 0 so we can use absolute value.
87 if (m_totalDeadLength==0) return false;
88 return ( std::abs(localPosition.xEta()) < 0.5*m_totalDeadLength + etaTol);
89}

◆ neighboursOfCell()

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

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.

Reimplemented in InDetDD::StripAnnulusDesign, InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

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}

◆ numberOfConnectedCells()

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

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_BarrelModuleSideDesign & InDetDD::SCT_BarrelModuleSideDesign::operator= ( const SCT_BarrelModuleSideDesign & design)

Assignment operator:

◆ parameters()

SiDiodesParameters InDetDD::SCT_BarrelModuleSideDesign::parameters ( const SiCellId & cellId) const
virtual

readout or diode id -> position, size

Implements InDetDD::DetectorDesign.

Definition at line 224 of file SCT_BarrelModuleSideDesign.cxx.

225{
226 // NB. We treat the two crytals as one.
227 SiLocalPosition center=localPositionOfCell(cellId);
228 double xPhiSize=m_stripPitch;
229 double xEtaSize=2*m_xEtaAbsSizeHigh;
230 SiLocalPosition width(xEtaSize,xPhiSize);
231 return SiDiodesParameters(center,width);
232}
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const
id -> position

◆ phiAxis()

DetectorDesign::Axis InDetDD::DetectorDesign::phiAxis ( ) const
inlineinherited

local axis corresponding to phi direction:

Definition at line 263 of file DetectorDesign.h.

263 {
264 return m_phiAxis;
265}

◆ phiMeasureSegment()

HepGeom::Vector3D< double > InDetDD::SCT_BarrelModuleSideDesign::phiMeasureSegment ( const SiLocalPosition & ) const
virtual

method for stereo angle computation - returns a vector parallel to the strip being hit

Implements InDetDD::SiDetectorDesign.

Definition at line 156 of file SCT_BarrelModuleSideDesign.cxx.

157{
158 HepGeom::Vector3D<double> segment;
159 segment[etaAxis()]=1;
160 return segment;
161}
Axis etaAxis() const
local axis corresponding to eta direction:

◆ phiPitch() [1/2]

double InDetDD::SCT_BarrelModuleSideDesign::phiPitch ( ) const
inlinevirtual

Pitch in phi direction.

Implements InDetDD::DetectorDesign.

Definition at line 210 of file SCT_BarrelModuleSideDesign.h.

211 {
212 return m_stripPitch;
213 }

◆ phiPitch() [2/2]

double InDetDD::SCT_BarrelModuleSideDesign::phiPitch ( const SiLocalPosition & localPosition) const
inlinevirtual

Pitch in phi direction.

Implements InDetDD::DetectorDesign.

Definition at line 204 of file SCT_BarrelModuleSideDesign.h.

205 {
206 return m_stripPitch;
207 }

◆ phiStripPatternCentre()

double InDetDD::SCT_BarrelModuleSideDesign::phiStripPatternCentre ( ) const
inline

centre of the strip pattern in phi

Definition at line 198 of file SCT_BarrelModuleSideDesign.h.

199 {
201 }

◆ phiSymmetric()

bool InDetDD::DetectorDesign::phiSymmetric ( ) const
inlineinherited

Definition at line 279 of file DetectorDesign.h.

279 {
280 return m_phiSymmetric;
281}

◆ positionFromStrip()

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

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

DEPRECATED

Reimplemented in InDetDD::StripAnnulusDesign, InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

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
inlineoverridevirtualinherited

diode id -> readout id

Implements InDetDD::DetectorDesign.

Reimplemented in InDetDD::StripAnnulusDesign, InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

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
inlineoverridevirtualinherited

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

◆ readoutSide()

int InDetDD::DetectorDesign::readoutSide ( ) const
inlineinherited

ReadoutSide.

+1 = postive depth side, -1 = negative depth side.

Definition at line 291 of file DetectorDesign.h.

291 {
292 return (m_readoutSidePosDepth) ? +1 : -1;
293}

◆ row()

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

Reimplemented in InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

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()

double InDetDD::SCT_BarrelModuleSideDesign::scaledDistanceToNearestDiode ( const SiLocalPosition & chargePos) const
virtual

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 an active area check, done in the Generator anyway, is removed here

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 111 of file SCT_BarrelModuleSideDesign.cxx.

112{
113 double dstrip=std::abs(chargePos.xPhi()-m_xPhiStripPatternCentre)/m_stripPitch;
114 dstrip=dstrip-static_cast<double>(int(dstrip))-0.5;
115 // the above -0.5 is because we have an even number of strips, centre of detector
116 // is in the middle of an interstrip gap
117 return std::abs(dstrip);
118}

◆ sensorCenter()

Amg::Vector3D InDetDD::DetectorDesign::sensorCenter ( ) const
virtualinherited

Return the centre of a sensor in the local reference frame.

For most designs, this is the origin of the local reference frame. For StripStereoAnnulusDesign, this is not the case (coordinate origin is "on the beamline")

Reimplemented in InDetDD::StripAnnulusDesign, and InDetDD::StripStereoAnnulusDesign.

Definition at line 60 of file DetectorDesign.cxx.

60 {
61 return Amg::Vector3D(0., 0., 0.);
62}
Eigen::Matrix< double, 3, 1 > Vector3D

◆ setMother()

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

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 }

◆ setSymmetry()

void InDetDD::DetectorDesign::setSymmetry ( bool phiSymmetric,
bool etaSymmetric,
bool depthSymmetric )
inherited

Override default symmetries to prevent swapping of axes.

NB. Flags can be changed from true to false but not false to true.

Definition at line 65 of file DetectorDesign.cxx.

66 {
67 // Flags can be changed from true to false but not false to true.
68 if (m_phiSymmetric) {
70 }
71 else if (phiSymmetric) {
72 std::cout <<
73 "SiDetectorDesign: WARNING! Attempt to allow swapping of xPhi axis direction ignored."
74 << std::endl;
75 }
76
77 if (m_etaSymmetric) {
79 }
80 else if (etaSymmetric) {
81 std::cout <<
82 "SiDetectorDesign: WARNING! Attempt to allow swapping of xEta axis direction ignored."
83 << std::endl;
84 }
85
86 if (m_depthSymmetric) {
88 }
89 else if (depthSymmetric) {
90 std::cout <<
91 "SiDetectorDesign: WARNING! Attempt to allow swapping of xDepth axis direction ignored."
92 << std::endl;
93 }
94}

◆ shape()

DetectorShape InDetDD::DetectorDesign::shape ( ) const
virtualinherited

Shape of element.

Reimplemented in InDetDD::SCT_ForwardModuleSideDesign, and InDetDD::StripStereoAnnulusDesign.

Definition at line 96 of file DetectorDesign.cxx.

96 {
97 // Default is Box.
98 return InDetDD::Box;
99}

◆ shift()

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

number of edge strips before first readout strip.

Definition at line 232 of file SCT_ModuleSideDesign.h.

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

◆ sinStripAngleReco()

double InDetDD::SiDetectorDesign::sinStripAngleReco ( double phiCoord,
double etaCoord ) const
inlinevirtualinherited

Give strip angle in the reco frame.

Reimplemented in InDetDD::SCT_ForwardModuleSideDesign, and InDetDD::StripStereoAnnulusDesign.

Definition at line 132 of file SiDetectorDesign.h.

132 {
133 return 0.0; // pixel and barrel strip sensors always zero
134 }

◆ strip()

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

Reimplemented in InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

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
inlineoverridevirtualinherited

only relevant for SCT.

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

Reimplemented from InDetDD::SiDetectorDesign.

Reimplemented in InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

Definition at line 279 of file SCT_ModuleSideDesign.h.

279 {
280 return strip;
281}

◆ stripLength()

double InDetDD::SCT_BarrelModuleSideDesign::stripLength ( ) const
inline

strip length

Definition at line 188 of file SCT_BarrelModuleSideDesign.h.

189 {
190 return m_stripLength;
191 }

◆ stripPitch() [1/2]

double InDetDD::SCT_BarrelModuleSideDesign::stripPitch ( ) const
inlinevirtual

strip pitch

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 175 of file SCT_BarrelModuleSideDesign.h.

176 {
177 return m_stripPitch;
178 }

◆ stripPitch() [2/2]

double InDetDD::SCT_BarrelModuleSideDesign::stripPitch ( const SiLocalPosition & chargePos) const
inlinevirtual

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

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 182 of file SCT_BarrelModuleSideDesign.h.

183 {
184 return m_stripPitch;
185 }

◆ swapHitEtaReadoutDirection()

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

Implements InDetDD::DetectorDesign.

Reimplemented in InDetDD::StripAnnulusDesign, InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

Definition at line 267 of file SCT_ModuleSideDesign.h.

267 {
268 return false;
269}

◆ swapHitPhiReadoutDirection()

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

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

Implements InDetDD::DetectorDesign.

Reimplemented in InDetDD::StripAnnulusDesign, InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

Definition at line 263 of file SCT_ModuleSideDesign.h.

◆ thickness()

double InDetDD::DetectorDesign::thickness ( ) const
inlineinherited

Method which returns thickness of the silicon wafer.

Definition at line 271 of file DetectorDesign.h.

271 {
272 return m_thickness;
273}

◆ type()

DetectorType InDetDD::DetectorDesign::type ( ) const
virtualinherited

Type of element.

Reimplemented in InDetDD::PixelModuleDesign, InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

Definition at line 101 of file DetectorDesign.cxx.

101 {
102 // Default is Undefined.
103 return InDetDD::Undefined;
104}

◆ width()

double InDetDD::SCT_BarrelModuleSideDesign::width ( ) const
virtual

Method to calculate average width of a module.

Implements InDetDD::DetectorDesign.

Definition at line 138 of file SCT_BarrelModuleSideDesign.cxx.

139{
140 return m_stripPitch*diodes();
141}

Member Data Documentation

◆ m_bounds

Trk::RectangleBounds InDetDD::SCT_BarrelModuleSideDesign::m_bounds
private

surface bound description

Definition at line 169 of file SCT_BarrelModuleSideDesign.h.

◆ m_carrierType

InDetDD::CarrierType InDetDD::DetectorDesign::m_carrierType
privateinherited

Definition at line 240 of file DetectorDesign.h.

◆ m_childDesigns

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

Definition at line 210 of file SCT_ModuleSideDesign.h.

◆ m_depthAxis

Axis InDetDD::DetectorDesign::m_depthAxis
privateinherited

Definition at line 238 of file DetectorDesign.h.

◆ m_depthSymmetric

bool InDetDD::DetectorDesign::m_depthSymmetric
privateinherited

Definition at line 244 of file DetectorDesign.h.

◆ m_detectorType

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

Definition at line 197 of file SCT_ModuleSideDesign.h.

197{Undefined};

◆ m_etaAxis

Axis InDetDD::DetectorDesign::m_etaAxis
privateinherited

Definition at line 236 of file DetectorDesign.h.

◆ m_etaSymmetric

bool InDetDD::DetectorDesign::m_etaSymmetric
privateinherited

Definition at line 243 of file DetectorDesign.h.

◆ m_motherDesign

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

Definition at line 208 of file SCT_ModuleSideDesign.h.

208{nullptr};

◆ m_phiAxis

Axis InDetDD::DetectorDesign::m_phiAxis
privateinherited

Definition at line 237 of file DetectorDesign.h.

◆ m_phiSymmetric

bool InDetDD::DetectorDesign::m_phiSymmetric
privateinherited

Definition at line 242 of file DetectorDesign.h.

◆ m_readoutSidePosDepth

bool InDetDD::DetectorDesign::m_readoutSidePosDepth
privateinherited

Definition at line 246 of file DetectorDesign.h.

◆ m_scheme

SCT_ReadoutScheme InDetDD::SCT_ModuleSideDesign::m_scheme
protectedinherited

Definition at line 196 of file SCT_ModuleSideDesign.h.

◆ m_stripLength

double InDetDD::SCT_BarrelModuleSideDesign::m_stripLength
private

strip length

Definition at line 163 of file SCT_BarrelModuleSideDesign.h.

◆ m_stripPitch

double InDetDD::SCT_BarrelModuleSideDesign::m_stripPitch
private

strip pitch, 80 um in barrel SCT

Definition at line 162 of file SCT_BarrelModuleSideDesign.h.

◆ m_swapStripReadout

bool InDetDD::SCT_ModuleSideDesign::m_swapStripReadout
privateinherited

Definition at line 204 of file SCT_ModuleSideDesign.h.

◆ m_thickness

double InDetDD::DetectorDesign::m_thickness
privateinherited

Definition at line 239 of file DetectorDesign.h.

◆ m_totalDeadLength

double InDetDD::SCT_BarrelModuleSideDesign::m_totalDeadLength
private

includes detector edge and gap between decetors

Definition at line 166 of file SCT_BarrelModuleSideDesign.h.

◆ m_xEtaAbsSizeHigh

double InDetDD::SCT_BarrelModuleSideDesign::m_xEtaAbsSizeHigh
private

active area in xEta

Definition at line 168 of file SCT_BarrelModuleSideDesign.h.

◆ m_xEtaAbsSizeLow

double InDetDD::SCT_BarrelModuleSideDesign::m_xEtaAbsSizeLow
private

Definition at line 168 of file SCT_BarrelModuleSideDesign.h.

◆ m_xEtaStripPatternCentre

double InDetDD::SCT_BarrelModuleSideDesign::m_xEtaStripPatternCentre
private

geom position on G4 volume, care needed

Definition at line 164 of file SCT_BarrelModuleSideDesign.h.

◆ m_xPhiAbsSize

double InDetDD::SCT_BarrelModuleSideDesign::m_xPhiAbsSize
private

size in xPhi/2 for active area

Definition at line 167 of file SCT_BarrelModuleSideDesign.h.

◆ m_xPhiStripPatternCentre

double InDetDD::SCT_BarrelModuleSideDesign::m_xPhiStripPatternCentre
private

geom position on G4 volume, care needed

Definition at line 165 of file SCT_BarrelModuleSideDesign.h.


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