5#ifndef INDETREADOUTGEOMETRY_STRIPSTEREOANNULUSDESIGN_H
6#define INDETREADOUTGEOMETRY_STRIPSTEREOANNULUSDESIGN_H
37#include "CLHEP/Geometry/Vector3D.h"
38#include "CLHEP/Geometry/Transform3D.h"
58 const std::vector<int> &nStrips,
59 const std::vector<double> &
pitch,
60 const std::vector<double> &stripStart,
61 const std::vector<double> &stripEnd,
62 const double &stereoAngle,
73 const std::vector<int> &nStrips,
74 const std::vector<double> &
pitch,
75 const std::vector<double> &stripStart,
76 const std::vector<double> &stripEnd,
77 const double &stereoAngle,
107 double &phiDist)
const override;
116 virtual std::pair<SiLocalPosition, SiLocalPosition>
endsOfStrip(
125 virtual double phiPitch()
const override;
159 virtual int row(
int stripId1Dim)
const override;
160 virtual int strip(
int stripId1Dim)
const override;
164 std::vector<SiCellId> &neighbours)
const override;
274 const double radius = (
m_usePC) ? pos.xEta() : std::hypot(pos.xEta(), pos.xPhi());
286 const int middleRow =
m_nRows*0.5;
287 const int middleStrip =
m_nStrips[middleRow]*0.5;
304 const int middleRow =
m_nRows *0.5;
305 const int middleStrip =
m_nStrips[middleRow] *0.5;
343 int rowNum = std::distance(
m_firstStrip.begin(), endPtr) - 1;
344 if (rowNum < 0 || rowNum >=
m_nRows) {
345 const std::string errMsg=std::string(
"StripId1Dim index out of acceptable range ") + __FILE__+std::string(
": ")+std::to_string(__LINE__);
346 throw std::runtime_error(errMsg);
352 int rowNum =
row(stripId1Dim);
355 if (strip2D < 0 || strip2D >=
m_firstStrip[rowNum + 1]) {
356 std::cout <<
"str1D " << stripId1Dim <<
" gives strip " << strip2D <<
" which is outside range 0 - " <<
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...
InDetDD::DetectorType m_detectorType
Identifier for the strip or pixel cell.
int phiIndex() const
Get phi index. Equivalent to strip().
int etaIndex() const
Get eta index.
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.
virtual bool nearBondGap(const SiLocalPosition &, double) const override
Test if near bond gap within tolerances, only relevant for SCT.
virtual double deadAreaUpperBoundary() const override
DEPRECATED for StripStereoAnnulusDesign; no dead area.
std::unique_ptr< Trk::SurfaceBounds > m_bounds
SiLocalPosition beamToStripPC(const SiLocalPosition &pos) const
StripStereoAnnulusDesign(const StripStereoAnnulusDesign &design)
virtual int strip1Dim(int strip, int row) const override
only relevant for SCT.
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 bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap=true) const override
check if the position is in active area
SiLocalPosition stripToBeamPC(const SiLocalPosition &pos) const
virtual double maxWidth() const override
Method to calculate maximum width of a module.
const std::vector< double > m_stripStartRadius
StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection, const SiDetectorDesign::Axis &thicknessDirection, const double &thickness, const int &readoutSide, const InDetDD::CarrierType &carrier, const int &nRows, const std::vector< int > &nStrips, const std::vector< double > &pitch, const std::vector< double > &stripStart, const std::vector< double > &stripEnd, const double &stereoAngle, const double ¢reR, const bool &usePC, InDetDD::DetectorType detectorType=InDetDD::Undefined)
SiLocalPosition stripPosAtR(int strip, int row, double r) const
virtual int row(int stripId1Dim) const override
InDetDD::DetectorType type() const override final
Type of element.
virtual double phiPitch() const override
Pitch in phi direction.
~StripStereoAnnulusDesign()=default
virtual double width() const override
Method to calculate average width of a module.
virtual double deadAreaLength() const override
give length of dead area
virtual DetectorShape shape() const override
Shape of element.
virtual SiLocalPosition localPositionOfCluster(const SiCellId &cellId, int clusterSize) const override
virtual double scaledDistanceToNearestDiode(const SiLocalPosition &chargePos) const override
give distance to the nearest diode in units of pitch, from 0.0 to 0.5, this method should be fast as ...
virtual double sinStripAngleReco(double phiCoord, double etaCoord) const override
Give strip angle in the reco frame.
SiLocalPosition beamToStripPCpolar(const SiLocalPosition &pos) const
Version of StripStereoAnnulusDesign::beamToStripPC transform based exclusively in a polar system.
virtual SiCellId cellIdInRange(const SiCellId &) const override
DEPRECATED: only used in a stupid example (2014) Check if cell is in range.
const std::vector< int > m_nStrips
virtual double deadAreaLowerBoundary() const override
give lower boundary of dead area
virtual bool swapHitPhiReadoutDirection() const override
Return true if hit local direction is the same as readout direction.
SiLocalPosition stripToBeamPCpolar(const SiLocalPosition &pos) const
Version of StripStereoAnnulusDesign::stripToBeamPC transform based exclusively in a polar system.
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const override
id -> position
const double m_waferCentreR
virtual std::pair< SiLocalPosition, SiLocalPosition > endsOfStrip(const SiLocalPosition &position) const override
Give end points of the strip that covers the given position.
double waferCentreR() const
SiLocalPosition beamToStrip(const SiLocalPosition &pos) const
virtual HepGeom::Vector3D< double > phiMeasureSegment(const SiLocalPosition &position) const override
Helper method for stereo angle computation, DEPRECATED.
double phiPitchPhi() const
double pitch(const SiCellId &cellId) const
SiLocalPosition localPositionOfCellPC(const SiCellId &cellId) const
This is for debugging only.
double stripLength(const SiCellId &cellId) const
std::pair< int, int > getStripRow(SiCellId cellId) const final
Get the strip and row number of the cell.
virtual bool swapHitEtaReadoutDirection() const override
virtual const Trk::SurfaceBounds & bounds() const override
Get a reference to the module bounds object.
virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const override
Returns distance to nearest detector active edge +ve = inside -ve = outside.
virtual double stripPitch() const override
give the strip pitch (For Forward returns pitch at center)
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const override
position -> id
SiLocalPosition stripToBeam(const SiLocalPosition &pos) const
virtual Amg::Vector3D sensorCenter() const override
Return the centre of a sensor in the local reference frame.
const std::vector< double > m_stripEndRadius
SiLocalPosition localPositionOfClusterPC(const SiCellId &cellId, int clusterSize) const
This is for debugging only.
StripStereoAnnulusDesign & operator=(const StripStereoAnnulusDesign &design)
virtual double etaPitch() const override
SiLocalPosition positionFromStrip(const SiCellId &cellId) const
virtual double length() const override
Method to calculate length of a module.
virtual SiDiodesParameters parameters(const SiCellId &cellId) const override
Return strip width, centre, length etc. Hard to find if this is used or not.
const double m_cosNegStereo
const std::vector< double > m_pitch
virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const override
diode id -> readout id
std::vector< int > m_firstStrip
virtual int strip(int stripId1Dim) const override
virtual double minWidth() const override
Method to calculate minimum width of a module.
virtual int diodesInRow(const int row) const override
const double m_sinNegStereo
Abstract base class for surface bounds to be specified.
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.