ATLAS Offline Software
Loading...
Searching...
No Matches
DetElementSurface.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRKEVENTCNVTOOLS_DETELEMENTSURFACE_H
6#define TRKEVENTCNVTOOLS_DETELEMENTSURFACE_H
13#include <cstdlib>//for "abort"
14#include <memory>
15
16namespace Trk
17{
18
21// template <class SURFACE>
22// class DetElementSurface : public SURFACE
23// {
24// public:
25// DetElementSurface( const DetElementSurface& rhs) : SURFACE(rhs) {}
26// };
27
28
29template<int DIM, class T, class S> class ParametersT;
30
32{
33 public:
37// Normally the Surface copy ctor sets the Identifier to be invalid. Store it, to get around this.
38 bool operator==(const Trk::Surface&) const { return false;}
39 Surface * clone () const { return nullptr; }
40 std::unique_ptr<Surface> uniqueClone() const {return nullptr; }
41 bool insideBounds(const Amg::Vector2D &, double, double) const {return false;}
42 bool insideBoundsCheck(const Amg::Vector2D& /*locpos*/, const BoundaryCheck& /*bchk*/) const { return false;}
43 const Amg::Vector3D * localToGlobal (const Amg::Vector2D &) const { return nullptr; }
44 const Amg::Vector3D * localToGlobal (const LocalParameters &) const { return nullptr; }
45 const Amg::Vector2D * globalToLocal (const Amg::Vector3D &, const double) const { return nullptr; }
47 const SurfaceBounds & bounds () const { std::abort();/*should never be called*/ }
48 MsgStream & dump (MsgStream &sl) const { return sl;}
49 std::ostream & dump (std::ostream &sl) const { return sl;};
51 bool isFree() {return true;}// To avoid memory leaks
54 bool globalToLocal(const Amg::Vector3D&, const Amg::Vector3D&, Amg::Vector2D&) const {return false;}
55 std::string name() const { return "Trk::DetElementSurface";}
56 // A dummy method required for consistency of the package and
57 virtual std::unique_ptr<ParametersBase<5, Trk::Charged>>
59 double,
60 double,
61 double,
62 double,
63 std::optional<AmgSymMatrix(5)> = std::nullopt) const
64 {
65 return nullptr;
66 }
67 virtual std::unique_ptr<ParametersBase<5, Trk::Charged>>
69 const Amg::Vector3D&,
70 double,
71 std::optional<AmgSymMatrix(5)> = std::nullopt) const
72 {
73 return nullptr;
74 }
75
76 virtual std::unique_ptr<ParametersBase<5, Trk::Neutral>>
78 double,
79 double,
80 double,
81 double,
82 std::optional<AmgSymMatrix(5)> = std::nullopt) const
83 {
84 return nullptr;
85 }
86 virtual std::unique_ptr<ParametersBase<5, Trk::Neutral>>
88 const Amg::Vector3D&,
89 double,
90 std::optional<AmgSymMatrix(5)> = std::nullopt) const
91 {
92 return nullptr;
93 }
94
96 const Amg::Vector3D&,
97 bool, Trk::BoundaryCheck) const { return Trk::Intersection(Amg::Vector3D(0.,0.,0.),0.,false); }
98
99
100// persistency libraries..
102 const Amg::Vector3D&, bool) const {return 0;}
103
104 virtual bool isOnSurface(const Amg::Vector3D&, const Trk::BoundaryCheck&, double, double) const {return false;}
105
106private:
108};
109
110
111}
112
113#endif
#define AmgSymMatrix(dim)
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
virtual std::unique_ptr< ParametersBase< 5, Trk::Charged > > createUniqueTrackParameters(double, double, double, double, double, std::optional< AmgSymMatrix(5)>=std::nullopt) const
Use the Surface as a ParametersBase constructor, from local parameters - charged.
bool globalToLocal(const Amg::Vector3D &, const Amg::Vector3D &, Amg::Vector2D &) const
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
DetElementSurface(const Surface &rhs)
const Amg::Vector2D * globalToLocal(const Amg::Vector3D &, const double) const
std::unique_ptr< Surface > uniqueClone() const
virtual std::unique_ptr< ParametersBase< 5, Trk::Charged > > createUniqueTrackParameters(const Amg::Vector3D &, const Amg::Vector3D &, double, std::optional< AmgSymMatrix(5)>=std::nullopt) const
Use the Surface as a ParametersBase constructor, from global parameters - charged.
virtual std::unique_ptr< ParametersBase< 5, Trk::Neutral > > createUniqueNeutralParameters(double, double, double, double, double, std::optional< AmgSymMatrix(5)>=std::nullopt) const
Use the Surface as a ParametersBase constructor, from local parameters - neutral.
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &, const Amg::Vector3D &) const
fast straight line distance evaluation to Surface
Surface * clone() const
Implicit constructor - uses the copy constructor.
MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
bool insideBounds(const Amg::Vector2D &, double, double) const
virtual methods to be overwritten by the inherited surfaces
void localToGlobal(const Amg::Vector2D &, const Amg::Vector3D &, Amg::Vector3D &) const
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
virtual Intersection straightLineIntersection(const Amg::Vector3D &, const Amg::Vector3D &, bool, Trk::BoundaryCheck) const
fast straight line intersection schema - standard: provides closest intersection and (signed) path le...
const Amg::Vector3D * localToGlobal(const Amg::Vector2D &) const
bool operator==(const Trk::Surface &) const
Equality operator.
bool insideBoundsCheck(const Amg::Vector2D &, const BoundaryCheck &) const
const Amg::Vector3D * localToGlobal(const LocalParameters &) const
std::string name() const
Return properly formatted class name.
const Identifier associatedDetectorElementIdentifier() const
virtual std::unique_ptr< ParametersBase< 5, Trk::Neutral > > createUniqueNeutralParameters(const Amg::Vector3D &, const Amg::Vector3D &, double, std::optional< AmgSymMatrix(5)>=std::nullopt) const
Use the Surface as a ParametersBase constructor, from global parameters - neutral.
SurfaceType type() const
Returns the Surface type to avoid dynamic casts.
virtual bool isOnSurface(const Amg::Vector3D &, const Trk::BoundaryCheck &, double, double) const
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
virtual Trk::DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &, const Amg::Vector3D &, bool) const
fast straight line distance evaluation to Surface - with bound option
DetElementSurface(Identifier id)
std::ostream & dump(std::ostream &sl) const
Output Method for std::ostream, to be overloaded by child classes.
const SurfaceBounds & bounds() const
Surface Bounds method.
Access to distance solutions.
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition ParametersT.h:49
Abstract base class for surface bounds to be specified.
Abstract Base Class for tracking surfaces.
Surface()
Default Constructor for inheriting classes.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
SurfaceType
This enumerator simplifies the persistency & calculations,.