ATLAS Offline Software
TrkDetElementBase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TrkDetElementBase.h, (c) ATLAS Detector software
8 
9 #ifndef TRKDETELEMENTBASE_TRKDETELEMENTBASE_H
10 #define TRKDETELEMENTBASE_TRKDETELEMENTBASE_H
11 
12 // Math & Geometry library
15 
16 #include "GeoModelKernel/GeoVDetectorElement.h"
17 #include "Identifier/Identifier.h"
19 
20 namespace Trk {
21 
22 class Surface;
23 class SurfaceBounds;
24 
38 enum class DetectorElemType
39 {
40  SolidState = 0,
41  Silicon = 1,
42  TRT = 2,
43  Csc = 3,
44  Mdt = 4,
45  Rpc = 5,
46  Tgc = 6,
47  sTgc = 7,
48  MM = 8
49 };
50 
51 class TrkDetElementBase : public GeoVDetectorElement
52 {
53 
54 public:
56  TrkDetElementBase(const GeoVFullPhysVol* fullPhysVol);
57 
59  virtual ~TrkDetElementBase() = default;
60 
62  virtual Identifier identify() const = 0;
63 
65  virtual IdentifierHash identifyHash() const = 0;
66 
68  virtual const Amg::Transform3D& transform() const = 0;
69 
71  virtual const Amg::Transform3D& transform(const Identifier& id) const = 0;
72 
74  virtual const Surface& surface() const = 0;
75 
83  virtual const Surface& surface(const Identifier& id) const = 0;
84 
86  virtual const SurfaceBounds& bounds() const = 0;
87 
91  virtual const SurfaceBounds& bounds(const Identifier& id) const = 0;
92 
94  virtual const Amg::Vector3D& center() const = 0;
95 
98  virtual const Amg::Vector3D& center(const Identifier& id) const = 0;
99 
101  virtual const Amg::Vector3D& normal() const = 0;
102 
105  virtual const Amg::Vector3D& normal(const Identifier& id) const = 0;
106 
108  virtual DetectorElemType detectorType() const = 0;
109 
111  std::string detectorTypeString() const;
112 };
113 
114 } // end of ns
115 
116 #endif
117 
Trk::TrkDetElementBase::TrkDetElementBase
TrkDetElementBase(const GeoVFullPhysVol *fullPhysVol)
Constructor from GeoVFullPhysVolume.
Definition: TrkDetElementBase.cxx:7
Trk::TrkDetElementBase::surface
virtual const Surface & surface(const Identifier &id) const =0
Return surface associated with this identifier, which should come from the PrepRawData object (i....
Trk::TrkDetElementBase::transform
virtual const Amg::Transform3D & transform(const Identifier &id) const =0
Return local to global transform associated with this identifier.
Trk::DetectorElemType::Tgc
@ Tgc
Trk::SurfaceBounds
Definition: SurfaceBounds.h:47
Trk::TrkDetElementBase::~TrkDetElementBase
virtual ~TrkDetElementBase()=default
virtual Destructor
Trk::TrkDetElementBase::transform
virtual const Amg::Transform3D & transform() const =0
Return local to global transform.
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
Trk::TrkDetElementBase::identify
virtual Identifier identify() const =0
Identifier.
Trk::DetectorElemType::Csc
@ Csc
Trk::TrkDetElementBase::detectorType
virtual DetectorElemType detectorType() const =0
Return the Detector element type.
Trk::TrkDetElementBase::center
virtual const Amg::Vector3D & center(const Identifier &id) const =0
Return the center of the surface associated with this identifier In the case of silicon it returns th...
Trk::TrkDetElementBase::detectorTypeString
std::string detectorTypeString() const
Returns a string of the Detector element type.
Definition: TrkDetElementBase.cxx:10
Trk::DetectorElemType::Silicon
@ Silicon
GeoPrimitives.h
Trk::TrkDetElementBase::bounds
virtual const SurfaceBounds & bounds(const Identifier &id) const =0
Return the boundaries of the surface associated with this identifier.
TRT
Definition: HitInfo.h:33
Trk::DetectorElemType::SolidState
@ SolidState
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::TrkDetElementBase::surface
virtual const Surface & surface() const =0
Return surface associated with this detector element.
Trk::TrkDetElementBase::bounds
virtual const SurfaceBounds & bounds() const =0
Return the boundaries of the element.
Trk::DetectorElemType
DetectorElemType
Definition: TrkDetElementBase.h:39
Trk::DetectorElemType::sTgc
@ sTgc
EventPrimitives.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
IdentifierHash.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::DetectorElemType::MM
@ MM
Trk::DetectorElemType::Rpc
@ Rpc
Trk::TrkDetElementBase::normal
virtual const Amg::Vector3D & normal() const =0
Return the normal of the element.
Trk::TrkDetElementBase::identifyHash
virtual IdentifierHash identifyHash() const =0
Identifier hash.
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::TrkDetElementBase::normal
virtual const Amg::Vector3D & normal(const Identifier &id) const =0
Return the normal of the surface associated with this identifier In the case of silicon it returns th...
Trk::TrkDetElementBase::center
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
Trk::DetectorElemType::Mdt
@ Mdt
Identifier
Definition: IdentifierFieldParser.cxx:14