ATLAS Offline Software
|
#include <SolidStateDetectorElementBase.h>
Classes | |
struct | AxisDir |
struct | CachedVals |
Public Member Functions | |
SolidStateDetectorElementBase (const Identifier &id, const DetectorDesign *design, const GeoVFullPhysVol *geophysvol, const SiCommonItems *commonItems, const GeoAlignmentStore *geoAlignStore=nullptr) | |
Constructor with parameters. More... | |
virtual | ~SolidStateDetectorElementBase () |
Destructor. More... | |
SolidStateDetectorElementBase ()=delete | |
Don't allow no-argument constructor. More... | |
SolidStateDetectorElementBase (const SolidStateDetectorElementBase &)=delete | |
Don't allow copy constructor. More... | |
SolidStateDetectorElementBase & | operator= (const SolidStateDetectorElementBase &)=delete |
Don't allow assignment operator. More... | |
SolidStateDetectorElementBase (SolidStateDetectorElementBase &&)=delete | |
Don't allow move constructor. More... | |
SolidStateDetectorElementBase & | operator= (SolidStateDetectorElementBase &&)=delete |
Don't allow move assignment operator. More... | |
std::string | detectorTypeString () const |
Returns a string of the Detector element type. More... | |
Identification | |
Methods to identify the element and identifier manipulation. | |
virtual Identifier | identify () const override final |
identifier of this detector element (inline) More... | |
virtual IdentifierHash | identifyHash () const override final |
identifier hash (inline) More... | |
const AtlasDetectorID * | getIdHelper () const |
Returns the id helper (inline) More... | |
virtual Identifier | identifierFromCellId (const SiCellId &cellId) const =0 |
Identifier <-> SiCellId (ie strip number or pixel eta_index,phi_index) Identifier from SiCellId (ie strip number or pixel eta_index,phi_index) More... | |
virtual SiCellId | cellIdFromIdentifier (const Identifier &identifier) const =0 |
SiCellId from Identifier. More... | |
Position | |
virtual const Amg::Vector3D & | center () const override final |
Center in global coordinates. More... | |
virtual const Amg::Vector3D & | center (const Identifier &) const override final |
TrkDetElementBase interface (inline) More... | |
virtual Trk::DetectorElemType | detectorType () const override |
TrkDetElementBase interface detectorType. More... | |
HepGeom::Point3D< double > | globalPositionHit (const HepGeom::Point3D< double > &simulationLocalPos) const |
transform a hit local position into a global position (inline): More... | |
Amg::Vector3D | globalPositionHit (const Amg::Vector3D &simulationLocalPos) const |
HepGeom::Point3D< double > | globalPosition (const HepGeom::Point3D< double > &localPos) const |
transform a reconstruction local position into a global position (inline): More... | |
Amg::Vector3D | globalPosition (const Amg::Vector3D &localPos) const |
Amg::Vector3D | globalPosition (const Amg::Vector2D &localPos) const |
as in previous method but for 2D local position (inline) More... | |
Amg::Vector2D | hitLocalToLocal (double xEta, double xPhi) const |
Simulation/Hit local frame to reconstruction local frame. More... | |
HepGeom::Point3D< double > | hitLocalToLocal3D (const HepGeom::Point3D< double > &hitPosition) const |
Same as previuos method but 3D. More... | |
Amg::Vector2D | localPosition (const HepGeom::Point3D< double > &globalPosition) const |
transform a global position into a 2D local position (reconstruction frame) (inline) More... | |
Amg::Vector2D | localPosition (const Amg::Vector3D &globalPosition) const |
Element Extent | |
double | rMin () const |
double | rMax () const |
double | zMin () const |
double | zMax () const |
double | phiMin () const |
double | phiMax () const |
void | getEtaPhiRegion (double deltaZ, double &etaMin, double &etaMax, double &phiMin, double &phiMax, double &rz) const |
Method for building up region of interest table. More... | |
virtual double | get_rz () const =0 |
Design methods | |
virtual const DetectorDesign & | design () const |
access to the local description (inline): More... | |
virtual const Trk::SurfaceBounds & | bounds () const override final |
Return the boundaries of the element. More... | |
virtual const Trk::SurfaceBounds & | bounds (const Identifier &) const override final |
TrkDetElementBase interface (inline) More... | |
double | width () const |
Methods from design (inline) More... | |
double | minWidth () const |
Min width. More... | |
double | maxWidth () const |
Max width. More... | |
double | length () const |
Length in eta direction (z - barrel, r - endcap) More... | |
double | thickness () const |
double | etaPitch () const |
Pitch (inline methods) More... | |
double | phiPitch () const |
InDetDD::CarrierType | carrierType () const |
carrier type for readout. More... | |
bool | swapPhiReadoutDirection () const |
Determine if readout direction between online and offline needs swapping. More... | |
bool | swapEtaReadoutDirection () const |
For eta_index (only relevant for pixel) (inline) More... | |
Readout cell id | |
Cell id's are the strip number in SCT and phi_index,eta_index in the pixel as defined in the offline identifier. Their direction runs in the distPhi, distEta direction in the Reconstruction local frame. For methods taking a SiCellId (basically phi,eta index for pixel or strip for SCT) you can do the following fro example:
| |
Identifier | identifierOfPosition (const Amg::Vector2D &localPos) const |
Full identifier of the cell for a given position: assumes a raw local position (no Lorentz shift) More... | |
SiCellId | cellIdOfPosition (const Amg::Vector2D &localPos) const |
As in previous method but returns SiCellId. More... | |
Amg::Vector2D | rawLocalPositionOfCell (const SiCellId &cellId) const |
Returns position (center) of cell. More... | |
Amg::Vector2D | rawLocalPositionOfCell (const Identifier &id) const |
As above. More... | |
int | numberOfConnectedCells (const SiCellId cellId) const |
Test if readout cell has more than one diode associated with it. More... | |
SiCellId | connectedCell (const SiCellId cellId, int number) const |
Get the cell ids sharing the readout for this cell. More... | |
virtual void | updateCache () const |
Recalculate cached values. More... | |
bool | depthDirection () const |
Return information on orientation. More... | |
bool | etaDirection () const |
bool | phiDirection () const |
double | depthAngle () const |
double | etaAngle () const |
double | phiAngle () const |
Private Methods | |
void | commonConstructor () |
Common code for constructors. More... | |
void | getExtent (CachedVals &cache) const |
Calculate extent in r,z and phi. More... | |
void | getCorners (HepGeom::Point3D< double > *corners) const |
Return the four corners of an element in local coordinates. More... | |
void | getEtaPhiPoint (const HepGeom::Point3D< double > &point, double deltaZ, double &etaMin, double &etaMax, double &phi) const |
Get eta and phi coresponding to a point in local coordinates. More... | |
MsgStream & | msg (MSG::Level lvl) const |
Declaring the Message method for further use (inline) More... | |
bool | msgLvl (MSG::Level lvl) const |
Declaring the Method providing Verbosity Level (inline) More... | |
Class to hold geometrical description of a solid state detector element. This base class is shared between the InnerDetetector/ITk/HGTD since there is a lot of commonality.
The following coordinate frames are used in these elements.
Directions of these correspond to the physical wafer. Consequently hitDepth and hitPhi axes go in different directions depending on the orientation of the module. The readout side is determined from design()->readoutSide().
The directions of the axes are defined as
Methods are grouped into the the following categories
The method updateCache of is of particular interest as it set all cache values.
The const methods call updateCache() when they need to perform lazy initialization
So as concurrent const operations are valid and do not race with each other.
The non-const methods can set the state of the cache or the cache itself (invalidate/setCache methods etc)
Note: Synchronisation of creating SiDetElements for different events and accessing for each events can be done via write/read handles or similar EventContext aware framework machinery.
Definition at line 132 of file SolidStateDetectorElementBase.h.
InDetDD::SolidStateDetectorElementBase::SolidStateDetectorElementBase | ( | const Identifier & | id, |
const DetectorDesign * | design, | ||
const GeoVFullPhysVol * | geophysvol, | ||
const SiCommonItems * | commonItems, | ||
const GeoAlignmentStore * | geoAlignStore = nullptr |
||
) |
|
virtualdefault |
Destructor.
|
delete |
Don't allow no-argument constructor.
|
delete |
Don't allow copy constructor.
|
delete |
Don't allow move constructor.
|
finaloverridevirtual |
Return the boundaries of the element.
Implements Trk::TrkDetElementBase.
Definition at line 198 of file SolidStateDetectorElementBase.cxx.
|
finaloverridevirtual |
TrkDetElementBase interface (inline)
Implements Trk::TrkDetElementBase.
InDetDD::CarrierType InDetDD::SolidStateDetectorElementBase::carrierType | ( | ) | const |
carrier type for readout.
ie holes for SCT and electrons for pixels. inline
|
pure virtual |
SiCellId from Identifier.
Implemented in InDetDD::SiDetectorElement, and InDetDD::HGTD_DetectorElement.
SiCellId InDetDD::SolidStateDetectorElementBase::cellIdOfPosition | ( | const Amg::Vector2D & | localPos | ) | const |
As in previous method but returns SiCellId.
Definition at line 224 of file SolidStateDetectorElementBase.cxx.
|
finaloverridevirtual |
Center in global coordinates.
Implements Trk::TrkDetElementBase.
|
finaloverridevirtual |
TrkDetElementBase interface (inline)
Implements Trk::TrkDetElementBase.
|
private |
Common code for constructors.
Definition at line 257 of file SolidStateDetectorElementBase.cxx.
SiCellId InDetDD::SolidStateDetectorElementBase::connectedCell | ( | const SiCellId | cellId, |
int | number | ||
) | const |
Get the cell ids sharing the readout for this cell.
number = 0 will return the primary readout cell id.
Definition at line 250 of file SolidStateDetectorElementBase.cxx.
const Amg::Transform3D InDetDD::SolidStateDetectorElementBase::defTransform | ( | ) | const |
Definition at line 60 of file SolidStateDetectorElementBase.cxx.
const HepGeom::Transform3D InDetDD::SolidStateDetectorElementBase::defTransformCLHEP | ( | ) | const |
Default Local (reconstruction frame) to global transform ie with no misalignment.
Definition at line 50 of file SolidStateDetectorElementBase.cxx.
double InDetDD::SolidStateDetectorElementBase::depthAngle | ( | ) | const |
bool InDetDD::SolidStateDetectorElementBase::depthDirection | ( | ) | const |
Return information on orientation.
|
virtual |
access to the local description (inline):
Reimplemented in InDetDD::SiDetectorElement, and InDetDD::HGTD_DetectorElement.
|
overridevirtual |
TrkDetElementBase interface detectorType.
Implements Trk::TrkDetElementBase.
Reimplemented in InDetDD::SiDetectorElement.
|
inherited |
double InDetDD::SolidStateDetectorElementBase::etaAngle | ( | ) | const |
const Amg::Vector3D & InDetDD::SolidStateDetectorElementBase::etaAxis | ( | ) | const |
Definition at line 88 of file SolidStateDetectorElementBase.cxx.
const HepGeom::Vector3D< double > & InDetDD::SolidStateDetectorElementBase::etaAxisCLHEP | ( | ) | const |
Get reconstruction local eta axes in global frame.
In direction of increasing z in the barrel and increasing r in the endcap.
Definition at line 81 of file SolidStateDetectorElementBase.cxx.
bool InDetDD::SolidStateDetectorElementBase::etaDirection | ( | ) | const |
double InDetDD::SolidStateDetectorElementBase::etaPitch | ( | ) | const |
Pitch (inline methods)
NOTE: phiPitch is ambiguous for the Forward SCT where it varies along the strip.
etaPitch is ambiguous for the pixel which has long pixels between FE chips.
For these cases:
phiPitch: For SCT Forward returns pitch at center.
etaPitch: For pixel returns average pitch. (Active_length/number_of_cells)
All return pitch in distance units.
|
pure virtual |
Implemented in InDetDD::SiDetectorElement, and InDetDD::HGTD_DetectorElement.
const SiCommonItems* InDetDD::SolidStateDetectorElementBase::getCommonItems | ( | ) | const |
|
private |
Return the four corners of an element in local coordinates.
Pass it an array of length 4. This function is used by getEtaPhiRegion()
Definition at line 551 of file SolidStateDetectorElementBase.cxx.
|
private |
Get eta and phi coresponding to a point in local coordinates.
Requires as input the vertex spread. Returns etaMin, etaMax, and phi. This function is used by getEtaPhiRegion()
Definition at line 589 of file SolidStateDetectorElementBase.cxx.
void InDetDD::SolidStateDetectorElementBase::getEtaPhiRegion | ( | double | deltaZ, |
double & | etaMin, | ||
double & | etaMax, | ||
double & | phiMin, | ||
double & | phiMax, | ||
double & | rz | ||
) | const |
Method for building up region of interest table.
Get eta/phi extent for the element. Returns min/max eta and phi and r (for barrel) or z (for endcap) Takes as input the vertex spread in z (-deltaZ to +deltaZ)
Definition at line 140 of file SolidStateDetectorElementBase.cxx.
|
private |
Calculate extent in r,z and phi.
The values are cached and there are rMin(), rMax etc methods. It is only used from updateCache
Definition at line 483 of file SolidStateDetectorElementBase.cxx.
const AtlasDetectorID* InDetDD::SolidStateDetectorElementBase::getIdHelper | ( | ) | const |
Returns the id helper (inline)
Amg::Vector3D InDetDD::SolidStateDetectorElementBase::globalPosition | ( | const Amg::Vector2D & | localPos | ) | const |
as in previous method but for 2D local position (inline)
Amg::Vector3D InDetDD::SolidStateDetectorElementBase::globalPosition | ( | const Amg::Vector3D & | localPos | ) | const |
HepGeom::Point3D<double> InDetDD::SolidStateDetectorElementBase::globalPosition | ( | const HepGeom::Point3D< double > & | localPos | ) | const |
transform a reconstruction local position into a global position (inline):
Amg::Vector3D InDetDD::SolidStateDetectorElementBase::globalPositionHit | ( | const Amg::Vector3D & | simulationLocalPos | ) | const |
HepGeom::Point3D<double> InDetDD::SolidStateDetectorElementBase::globalPositionHit | ( | const HepGeom::Point3D< double > & | simulationLocalPos | ) | const |
transform a hit local position into a global position (inline):
double InDetDD::SolidStateDetectorElementBase::hitDepthDirection | ( | ) | const |
Directions of hit depth,phi,eta axes relative to reconstruction local position axes (LocalPosition).
Returns +/-1. inline
double InDetDD::SolidStateDetectorElementBase::hitEtaDirection | ( | ) | const |
See previous method.
inline
Amg::Vector2D InDetDD::SolidStateDetectorElementBase::hitLocalToLocal | ( | double | xEta, |
double | xPhi | ||
) | const |
Simulation/Hit local frame to reconstruction local frame.
2D. TODO: Will change order of parameters at some point.
Definition at line 95 of file SolidStateDetectorElementBase.cxx.
HepGeom::Point3D< double > InDetDD::SolidStateDetectorElementBase::hitLocalToLocal3D | ( | const HepGeom::Point3D< double > & | hitPosition | ) | const |
double InDetDD::SolidStateDetectorElementBase::hitPhiDirection | ( | ) | const |
See previous method.
inline
|
pure virtual |
Identifier <-> SiCellId (ie strip number or pixel eta_index,phi_index) Identifier from SiCellId (ie strip number or pixel eta_index,phi_index)
Implemented in InDetDD::SiDetectorElement, and InDetDD::HGTD_DetectorElement.
Identifier InDetDD::SolidStateDetectorElementBase::identifierOfPosition | ( | const Amg::Vector2D & | localPos | ) | const |
Full identifier of the cell for a given position: assumes a raw local position (no Lorentz shift)
Definition at line 217 of file SolidStateDetectorElementBase.cxx.
|
finaloverridevirtual |
identifier of this detector element (inline)
Implements Trk::TrkDetElementBase.
|
finaloverridevirtual |
identifier hash (inline)
Implements Trk::TrkDetElementBase.
SiIntersect InDetDD::SolidStateDetectorElementBase::inDetector | ( | const Amg::Vector2D & | localPosition, |
double | phiTol, | ||
double | etaTol | ||
) | const |
Test that it is in the active region.
Intersect has 3 states bool SiIntersect::in() const // definitely in
bool SiIntersect::out() const // definitely out
bool SiIntersect::nearBoundary() const // near a boundary within the tolerances
bool SiIntersect::mayIntersect() const // in() OR nearBoundary()
Definition at line 204 of file SolidStateDetectorElementBase.cxx.
SiIntersect InDetDD::SolidStateDetectorElementBase::inDetector | ( | const Amg::Vector3D & | globalPosition, |
double | phiTol, | ||
double | etaTol | ||
) | const |
Definition at line 211 of file SolidStateDetectorElementBase.cxx.
void InDetDD::SolidStateDetectorElementBase::invalidate | ( | ) |
Signal that cached values are no longer valid.
Invalidate general cache (inline)
double InDetDD::SolidStateDetectorElementBase::length | ( | ) | const |
Length in eta direction (z - barrel, r - endcap)
Amg::Vector2D InDetDD::SolidStateDetectorElementBase::localPosition | ( | const Amg::Vector3D & | globalPosition | ) | const |
Amg::Vector2D InDetDD::SolidStateDetectorElementBase::localPosition | ( | const HepGeom::Point3D< double > & | globalPosition | ) | const |
transform a global position into a 2D local position (reconstruction frame) (inline)
double InDetDD::SolidStateDetectorElementBase::maxWidth | ( | ) | const |
Max width.
Needed for the SCT endcap.
double InDetDD::SolidStateDetectorElementBase::minWidth | ( | ) | const |
Min width.
Needed for the SCT endcap.
|
private |
Declaring the Message method for further use (inline)
|
private |
Declaring the Method providing Verbosity Level (inline)
|
finaloverridevirtual |
Get reconstruction local normal axes in global frame.
Choosen to give right-handed coordinate frame.
Implements Trk::TrkDetElementBase.
|
finaloverridevirtual |
TrkDetElementBase interface (inline)
Implements Trk::TrkDetElementBase.
Test if readout cell has more than one diode associated with it.
Number of cells sharing the same readout as this cell. ie generally 1 except for ganged pixels which will be 2.
Definition at line 243 of file SolidStateDetectorElementBase.cxx.
|
delete |
Don't allow assignment operator.
|
delete |
Don't allow move assignment operator.
double InDetDD::SolidStateDetectorElementBase::phiAngle | ( | ) | const |
const Amg::Vector3D & InDetDD::SolidStateDetectorElementBase::phiAxis | ( | ) | const |
Definition at line 74 of file SolidStateDetectorElementBase.cxx.
const HepGeom::Vector3D< double > & InDetDD::SolidStateDetectorElementBase::phiAxisCLHEP | ( | ) | const |
To determine if readout direction between online and offline needs swapping, see methods swapPhiReadoutDirection() and swapEtaReadoutDirection() below in "Readout Cell id" section.
Orientation. Directions.
Get reconstruction local phi axes in global frame. In same direction as increasing phi and identifier phi_index/strip.
Definition at line 67 of file SolidStateDetectorElementBase.cxx.
bool InDetDD::SolidStateDetectorElementBase::phiDirection | ( | ) | const |
double InDetDD::SolidStateDetectorElementBase::phiMax | ( | ) | const |
double InDetDD::SolidStateDetectorElementBase::phiMin | ( | ) | const |
double InDetDD::SolidStateDetectorElementBase::phiPitch | ( | ) | const |
Amg::Vector2D InDetDD::SolidStateDetectorElementBase::rawLocalPositionOfCell | ( | const Identifier & | id | ) | const |
Amg::Vector2D InDetDD::SolidStateDetectorElementBase::rawLocalPositionOfCell | ( | const SiCellId & | cellId | ) | const |
Returns position (center) of cell.
These are the raw positions NOT corrected for the Lorentz shift
Definition at line 230 of file SolidStateDetectorElementBase.cxx.
const HepGeom::Transform3D InDetDD::SolidStateDetectorElementBase::recoToHitTransform | ( | ) | const |
Transform to go from local reconstruction frame to local hit frame.
Definition at line 607 of file SolidStateDetectorElementBase.cxx.
double InDetDD::SolidStateDetectorElementBase::rMax | ( | ) | const |
double InDetDD::SolidStateDetectorElementBase::rMin | ( | ) | const |
void InDetDD::SolidStateDetectorElementBase::setCache | ( | ) |
Set/calculate cache values (inline)
Trk::Surface& InDetDD::SolidStateDetectorElementBase::surface | ( | ) |
Element Surface.
|
finaloverridevirtual |
Return surface associated with this detector element.
Implements Trk::TrkDetElementBase.
|
finaloverridevirtual |
TrkDetElementBase interface (inline)
Implements Trk::TrkDetElementBase.
bool InDetDD::SolidStateDetectorElementBase::swapEtaReadoutDirection | ( | ) | const |
For eta_index (only relevant for pixel) (inline)
bool InDetDD::SolidStateDetectorElementBase::swapPhiReadoutDirection | ( | ) | const |
Determine if readout direction between online and offline needs swapping.
Returns true if online and offline numbers run in opposite directions. For strip/phi_index (inline)
double InDetDD::SolidStateDetectorElementBase::thickness | ( | ) | const |
|
finaloverridevirtual |
Return local to global transform.
Implements Trk::TrkDetElementBase.
|
finaloverridevirtual |
TrkDetElementBase interface (inline)
Implements Trk::TrkDetElementBase.
const HepGeom::Transform3D & InDetDD::SolidStateDetectorElementBase::transformCLHEP | ( | ) | const |
Local (reconstruction frame) to global transform.
Definition at line 43 of file SolidStateDetectorElementBase.cxx.
const GeoTrf::Transform3D& InDetDD::SolidStateDetectorElementBase::transformHit | ( | ) | const |
Local (simulation/hit frame) to global transform.
|
virtual |
Recalculate cached values.
Reimplemented in InDetDD::SiDetectorElement.
Definition at line 272 of file SolidStateDetectorElementBase.cxx.
double InDetDD::SolidStateDetectorElementBase::width | ( | ) | const |
Methods from design (inline)
Width in phi direction. For the SCT endcap it returns the average width.
double InDetDD::SolidStateDetectorElementBase::zMax | ( | ) | const |
double InDetDD::SolidStateDetectorElementBase::zMin | ( | ) | const |
|
protected |
Definition at line 681 of file SolidStateDetectorElementBase.h.
|
protected |
Definition at line 708 of file SolidStateDetectorElementBase.h.
|
protected |
Definition at line 630 of file SolidStateDetectorElementBase.h.
|
protected |
local description of this detector element
Definition at line 628 of file SolidStateDetectorElementBase.h.
|
protected |
Definition at line 632 of file SolidStateDetectorElementBase.h.
|
protected |
Definition at line 639 of file SolidStateDetectorElementBase.h.
|
protected |
Axes.
Definition at line 637 of file SolidStateDetectorElementBase.h.
|
protected |
Definition at line 638 of file SolidStateDetectorElementBase.h.
|
protected |
identifier of this detector element
Definition at line 623 of file SolidStateDetectorElementBase.h.
|
protected |
hash id of this detector element
Definition at line 649 of file SolidStateDetectorElementBase.h.
|
protected |
Definition at line 631 of file SolidStateDetectorElementBase.h.