ATLAS Offline Software
Loading...
Searching...
No Matches
SolidStateDetectorElementBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9#ifndef READOUTGEOMETRYBASE_SOLIDSTATEDETECTORELEMENTBASE_H
10#define READOUTGEOMETRYBASE_SOLIDSTATEDETECTORELEMENTBASE_H
11
19#include "GeoModelKernel/GeoDefinitions.h"
20#include "Identifier/Identifier.h"
30
31#include "CLHEP/Geometry/Point3D.h"
32
33#include <limits>
34#include <memory>
35
36class AtlasDetectorID;
38class GeoVFullPhysVol;
39
40namespace Trk {
41 class SurfaceBounds;
42}
43
44namespace InDetDD {
45
46 class SiReadoutCellId;
47
130
131
133
134 public:
135
140 const DetectorDesign* design,
141 const GeoVFullPhysVol* geophysvol,
142 const SiCommonItems* commonItems,
143 const GeoAlignmentStore* geoAlignStore=nullptr);
144
149
154
159
164
169
174
181
186
194
200
204 virtual Identifier identify() const override final;
205
209 virtual IdentifierHash identifyHash() const override final;
210
215
225
227
232
236 virtual const Trk::Surface& surface() const override final;
240 virtual const Trk::Surface& surface(const Identifier&) const override final;
245
249
254 virtual const Amg::Transform3D& transform() const override final;
258 virtual const Amg::Transform3D& transform(const Identifier&) const override final;
259
266
272
276 //{@
277
291
316
320 virtual const Amg::Vector3D& normal() const override final;
324 virtual const Amg::Vector3D& normal(const Identifier&) const override final;
325
327
332
335 virtual const Amg::Vector3D& center() const override final;
339 virtual const Amg::Vector3D& center(const Identifier&) const override final;
340
343 virtual Trk::DetectorElemType detectorType() const override;
344
348 HepGeom::Point3D<double> globalPositionHit(const HepGeom::Point3D<double>& simulationLocalPos) const;
350
354 HepGeom::Point3D<double> globalPosition(const HepGeom::Point3D<double>& localPos) const;
356
360 Amg::Vector3D globalPosition(const Amg::Vector2D& localPos) const;
361
366 Amg::Vector2D hitLocalToLocal(double xEta, double xPhi) const;
370 HepGeom::Point3D<double> hitLocalToLocal3D(const HepGeom::Point3D<double>& hitPosition) const;
371
375 Amg::Vector2D localPosition(const HepGeom::Point3D<double>& globalPosition) const;
377
379
380
386 double rMin() const;
387 double rMax() const;
388 double zMin() const;
389 double zMax() const;
390 double phiMin() const;
391 double phiMax() const;
392
399 void getEtaPhiRegion(double deltaZ,
400 double& etaMin, double& etaMax,
401 double& phiMin, double& phiMax,
402 double& rz) const;
404 virtual double get_rz() const = 0;
405
410
414
416
417 virtual const Trk::SurfaceBounds& bounds() const override final;
421 virtual const Trk::SurfaceBounds& bounds(const Identifier&) const override final;
422
428 double width() const;
432 double minWidth() const;
436 double maxWidth() const;
440 double length() const;
441 double thickness() const;
442
456 double etaPitch() const;
457 double phiPitch() const;
458
463
474
476
481
491 SiIntersect inDetector(const Amg::Vector2D& localPosition, double phiTol, double etaTol) const;
492 SiIntersect inDetector(const Amg::Vector3D& globalPosition, double phiTol, double etaTol) const;
494
509
514 Identifier identifierOfPosition(const Amg::Vector2D& localPos) const;
518 SiCellId cellIdOfPosition(const Amg::Vector2D& localPos) const;
519
524 Amg::Vector2D rawLocalPositionOfCell(const SiCellId& cellId) const;
529
541
545 virtual void updateCache() const;
546
554 double etaAngle() const;
555 double phiAngle() const;
556
557 protected:
558 struct CachedVals;
559 private:
560
567
570 void commonConstructor();
571
577 void getExtent(CachedVals& cache) const;
578
584 void getCorners(HepGeom::Point3D<double>* corners) const;
585
591 void getEtaPhiPoint(const HepGeom::Point3D<double>& point, double deltaZ,
592 double& etaMin, double& etaMax, double& phi) const;
593
597 MsgStream& msg(MSG::Level lvl) const;
598
602 bool msgLvl(MSG::Level lvl) const;
604
608 protected:
613
618
622 const DetectorDesign* m_design{nullptr};
623
625 std::unique_ptr<Trk::Surface> m_surface;
627
635
640
645
653 struct AxisDir
654 {
662
666
674 };
676
678
703
705
706 };
707
708} // namespace InDetDD
709
714
715#endif // INDETREADOUTGEOMETRY_SIDETECTORELEMENTBASE_H
Scalar phi() const
phi method
Cached value with atomic update.
Eigen::Affine3d Transform3D
#define protected
static Double_t rz
Eigen::Matrix< double, 3, 1 > Vector3D
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Cached value with atomic update.
Definition CachedValue.h:55
Ensure that the extensions for the Vector3D are properly loaded.
This is a "hash" representation of an Identifier.
Base class for the detector design classes for ITk and HGTD.
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
Helper class to concentrate common items, such as the pointer to the IdHelper, the lorentzAngle tool ...
class to run intersection tests
Definition SiIntersect.h:23
Identifier for the strip or pixel readout cell.
bool depthDirection() const
Return information on orientation.
void getExtent(CachedVals &cache) const
Calculate extent in r,z and phi.
double length() const
Length in eta direction (z - barrel, r - endcap)
bool msgLvl(MSG::Level lvl) const
Declaring the Method providing Verbosity Level (inline)
virtual const DetectorDesign & design() const
access to the local description (inline):
HepGeom::Point3D< double > hitLocalToLocal3D(const HepGeom::Point3D< double > &hitPosition) const
Same as previuos method but 3D.
SiCellId connectedCell(const SiCellId cellId, int number) const
Get the cell ids sharing the readout for this cell.
SiCellId cellIdOfPosition(const Amg::Vector2D &localPos) const
As in previous method but returns SiCellId.
bool swapEtaReadoutDirection() const
For eta_index (only relevant for pixel) (inline)
SolidStateDetectorElementBase(SolidStateDetectorElementBase &&)=delete
Don't allow move constructor.
void getEtaPhiRegion(double deltaZ, double &etaMin, double &etaMax, double &phiMin, double &phiMax, double &rz) const
Method for building up region of interest table.
InDetDD::CarrierType carrierType() const
carrier type for readout.
Amg::Vector2D localPosition(const HepGeom::Point3D< double > &globalPosition) const
transform a global position into a 2D local position (reconstruction frame) (inline)
virtual Trk::DetectorElemType detectorType() const override
TrkDetElementBase interface detectorType.
double hitPhiDirection() const
See previous method.
const HepGeom::Transform3D recoToHitTransform() const
Transform to go from local reconstruction frame to local hit frame.
void getCorners(HepGeom::Point3D< double > *corners) const
Return the four corners of an element in local coordinates.
const DetectorDesign * m_design
local description of this detector element
double width() const
Methods from design (inline)
virtual SiCellId cellIdFromIdentifier(const Identifier &identifier) const =0
SiCellId from Identifier.
virtual const Amg::Vector3D & normal() const override final
Get reconstruction local normal axes in global frame.
virtual const Amg::Transform3D & transform() const override final
Return local to global transform.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
SolidStateDetectorElementBase & operator=(SolidStateDetectorElementBase &&)=delete
Don't allow move assignment operator.
SolidStateDetectorElementBase()=delete
Don't allow no-argument constructor.
HepGeom::Point3D< double > globalPositionHit(const HepGeom::Point3D< double > &simulationLocalPos) const
transform a hit local position into a global position (inline):
virtual const Trk::SurfaceBounds & bounds() const override final
Return the boundaries of the element.
int numberOfConnectedCells(const SiCellId cellId) const
Test if readout cell has more than one diode associated with it.
virtual double get_rz() const =0
virtual ~SolidStateDetectorElementBase()
Destructor.
double maxWidth() const
Max width.
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
SolidStateDetectorElementBase & operator=(const SolidStateDetectorElementBase &)=delete
Don't allow assignment operator.
virtual const Amg::Vector3D & center() const override final
Center in global coordinates.
SiIntersect inDetector(const Amg::Vector2D &localPosition, double phiTol, double etaTol) const
Test that it is in the active region.
virtual Identifier identify() const override final
identifier of this detector element (inline)
SolidStateDetectorElementBase(const Identifier &id, const DetectorDesign *design, const GeoVFullPhysVol *geophysvol, const SiCommonItems *commonItems, const GeoAlignmentStore *geoAlignStore=nullptr)
Constructor with parameters.
double hitDepthDirection() const
Directions of hit depth,phi,eta axes relative to reconstruction local position axes (LocalPosition).
MsgStream & msg(MSG::Level lvl) const
Declaring the Message method for further use (inline)
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.
Identifier identifierOfPosition(const Amg::Vector2D &localPos) const
Full identifier of the cell for a given position: assumes a raw local position (no Lorentz shift)
const GeoTrf::Transform3D & transformHit() const
Local (simulation/hit frame) to global transform.
const HepGeom::Vector3D< double > & phiAxisCLHEP() const
To determine if readout direction between online and offline needs swapping, see methods swapPhiReado...
virtual void updateCache() const
Recalculate cached values.
double minWidth() const
Min width.
IdentifierHash m_idHash
hash id of this detector element
const SiCommonItems * getCommonItems() const
bool swapPhiReadoutDirection() const
Determine if readout direction between online and offline needs swapping.
const HepGeom::Transform3D & transformCLHEP() const
Local (reconstruction frame) to global transform.
const HepGeom::Vector3D< double > & etaAxisCLHEP() const
Get reconstruction local eta axes in global frame.
const HepGeom::Transform3D defTransformCLHEP() const
Default Local (reconstruction frame) to global transform ie with no misalignment.
virtual Identifier identifierFromCellId(const SiCellId &cellId) const =0
Identifier <-> SiCellId (ie strip number or pixel eta_index,phi_index) Identifier from SiCellId (ie s...
SolidStateDetectorElementBase(const SolidStateDetectorElementBase &)=delete
Don't allow copy constructor.
double hitEtaDirection() const
See previous method.
void commonConstructor()
Common code for constructors.
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline)
void invalidate()
Signal that cached values are no longer valid.
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
Amg::Vector2D hitLocalToLocal(double xEta, double xPhi) const
Simulation/Hit local frame to reconstruction local frame.
Trk::Surface & surface()
Element Surface.
Identifier m_id
identifier of this detector element
double etaPitch() const
Pitch (inline methods)
Abstract base class for surface bounds to be specified.
This is the base class for all tracking detector elements with read-out relevant information.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Message Stream Member.
Definition MsgLevel.h:28
Ensure that the ATLAS eigen extensions are properly loaded.
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186
#define private