|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef TRKSURFACES_SURFACE_H
10 #define TRKSURFACES_SURFACE_H
35 #include "Identifier/Identifier.h"
48 class TrkDetElementBase;
125 std::unique_ptr<ParametersBase<5, Trk::Charged>>;
127 std::unique_ptr<ParametersBase<5, Trk::Neutral>>;
255 double tol2 = 0.)
const;
269 double tol2 = 0.)
const;
274 double tol2 = 0.)
const = 0;
321 double tol = 0.)
const;
353 bool forceDir =
false,
357 pars.position(),
pars.momentum().unit(), forceDir, bchk);
367 bool forceDir =
false,
379 bool Bound)
const = 0;
404 virtual MsgStream&
dump(MsgStream& sl)
const;
407 virtual std::ostream&
dump(std::ostream& sl)
const;
410 virtual std::string
name()
const = 0;
433 friend class ::SurfaceCnv_p1;
471 #endif // TRKSURFACES_SURFACE_H
virtual Amg::Vector2D localParametersToPosition(const LocalParameters &locpars) const
Optionally specified by each surface type : LocalParameters to Vector2D.
const TrkDetElementBase * m_associatedDetElement
Not owning Pointer to the TrkDetElementBase.
Surface(Surface &&sf) noexcept=default
bool operator!=(const Surface &sf) const
Non-equality operator.
SurfaceOwner m_owner
enum for surface owner : 0 free surface
virtual double pathCorrection(const Amg::Vector3D &pos, const Amg::Vector3D &mom) const
the pathCorrection for derived classes with thickness - it reflects if the direction projection is po...
virtual bool operator==(const Surface &sf) const =0
Equality operator.
virtual ChargedTrackParametersUniquePtr createUniqueTrackParameters(const Amg::Vector3D &, const Amg::Vector3D &, double, std::optional< AmgSymMatrix(5)> cov=std::nullopt) const =0
Use the Surface as a ParametersBase constructor, from global parameters - charged.
const TrkDetElementBase * associatedDetectorElement() const
return associated Detector Element
virtual std::string name() const =0
Return properly formatted class name.
std::optional< Amg::Vector2D > globalToLocal(const Amg::Vector3D &glopos, double tol=0.) const
This method returns the LocalPosition from a provided GlobalPosition.
Intersection straightLineIntersection(const T &pars, bool forceDir=false, const Trk::BoundaryCheck &bchk=false) const
fst straight line intersection schema - templated for charged and neutral parameters
void setOwner(SurfaceOwner x)
set Ownership
void setTransform(const Amg::Transform3D &trans)
Set the transform updates center and normal.
std::unique_ptr< ParametersBase< 5, Trk::Charged > > ChargedTrackParametersUniquePtr
Unique ptr types.
Eigen::Matrix< double, 2, 1 > Vector2D
Handle conditional ownership of surfaces.
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const =0
fast straight line distance evaluation to Surface
virtual ~Surface()
Virtual Destructor.
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
virtual NeutralTrackParametersUniquePtr createUniqueNeutralParameters(const Amg::Vector3D &, const Amg::Vector3D &, double charge=0., std::optional< AmgSymMatrix(5)> cov=std::nullopt) const =0
Use the Surface as a ParametersBase constructor, from global parameters - neutral.
virtual Amg::Vector3D normal(const Amg::Vector2D &lp) const
Returns a normal vector at a specific local position.
virtual bool insideBoundsCheck(const Amg::Vector2D &locpos, const BoundaryCheck &bchk) const =0
std::unique_ptr< ParametersBase< 5, Trk::Neutral > > NeutralTrackParametersUniquePtr
SurfaceUniquePtrT< Trk::Surface > SurfaceUniquePtr
Amg::Vector3D localToGlobal(const LocalParameters &locpars) const
This method returns the GlobalPosition from LocalParameters The LocalParameters can be outside Surfac...
virtual const Amg::Vector3D & globalReferencePoint() const
Returns a global reference point on the surface, for PlaneSurface, StraightLineSurface,...
const Amg::Vector3D & center() const
Returns the center position of the Surface.
Trk::Layer * materialLayer()
Helper to enable counting number of instantiations in debug builds.
virtual const Trk::Surface * baseSurface() const
return the base surface (simplified for persistification)
Amg::Vector3D inverseTransformMultHelper(const Amg::Vector3D &glopos) const
virtual Amg::RotationMatrix3D measurementFrame(const Amg::Vector3D &glopos, const Amg::Vector3D &glomom) const
Return the measurement frame - this is needed for alignment, in particular for StraightLine and Perig...
void setMaterialLayer(std::shared_ptr< Layer > mlay)
set material layer
AmgSymMatrix(5) &GXFTrackState
Surface & operator=(const Surface &sf)
const Layer * m_associatedLayer
The associated layer Trk::Layer.
SurfaceOwner owner() const
return ownership
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
std::unique_ptr< Transforms > m_transforms
std::unique_ptr< Surface > uniqueClone() const
NVI method returning unique_ptr clone.
static constexpr double s_onSurfaceTolerance
Tolerance for being on Surface.
const Amg::Transform3D * cachedTransform() const
Return the cached transformation directly.
virtual ChargedTrackParametersUniquePtr createUniqueTrackParameters(double l1, double l2, double phi, double theat, double qop, std::optional< AmgSymMatrix(5)> cov=std::nullopt) const =0
Use the Surface as a ParametersBase constructor, from local parameters - charged.
Eigen::Affine3d Transform3D
Cached unique_ptr with atomic update.
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
const Trk::Layer * materialLayer() const
return the material Layer
virtual NeutralTrackParametersUniquePtr createUniqueNeutralParameters(double l1, double l2, double phi, double theat, double qop, std::optional< AmgSymMatrix(5)> cov=std::nullopt) const =0
Use the Surface as a ParametersBase constructor, from local parameters - neutral.
std::shared_ptr< Layer > m_materialLayer
Possibility to attach a material descrption.
Amg::Transform3D inverseTransformHelper() const
Helper method to factorize in one place common operations calculate inverse transofrm and multiply wi...
std::optional< Amg::Vector2D > globalToLocal(const Amg::Vector3D &glopos, const Amg::Vector3D &glomom) const
This method returns the LocalPosition from a provided GlobalPosition.
Ensure that the ATLAS eigen extensions are properly loaded.
Amg::Vector3D localToGlobal(const LocalParameters &locpars, const Amg::Vector3D &glomom) const
This method returns the GlobalPosition from LocalParameters The LocalParameters can be outside Surfac...
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
void associateLayer(const Layer &lay)
method to associate the associated Trk::Layer which is alreay owned
Surface & operator=(Surface &&sf) noexcept=default
Surface()
Default Constructor for inheriting classes.
double charge(const T &p)
std::unique_ptr< S, SurfaceDeleter< S > > SurfaceUniquePtrT
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
virtual methods to be overwritten by the inherited surfaces
Eigen::Matrix< double, 3, 1 > Vector3D
Identifier m_associatedDetElementId
Identifier for the TrkDetElementBase.
virtual Intersection straightLineIntersection(const Amg::Vector3D &pos, const Amg::Vector3D &dir, bool forceDir=false, Trk::BoundaryCheck bchk=false) const =0
fast straight line intersection schema - standard: provides closest intersection and (signed) path le...
virtual Surface * clone() const =0
Implicit constructor - uses the copy constructor.
SurfaceUniquePtrT< const Trk::Surface > ConstSurfaceUniquePtr
bool isFree() const
Returns 'true' if this surface is 'free', i.e.
bool isActive() const
Return 'true' if this surface is owned by the detector element.
Amg::Vector3D localToGlobal(const Amg::Vector2D &locpos) const
This method returns the GlobalPosition from a LocalPosition uses the per surface localToGlobal.
const Trk::Layer * associatedLayer() const
return the associated Layer
virtual MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir, bool Bound) const =0
fast straight line distance evaluation to Surface - with bound option
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
std::optional< Amg::Vector2D > positionOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const
positionOnSurface() returns the LocalPosition on the Surface, If BoundaryCheck==false it just return...
bool onSurface(const T ¶meters, const BoundaryCheck &bchk=BoundaryCheck(true)) const
The templated Parameters OnSurface method - checks on surface pointer first.
Amg::Vector3D localToGlobal(const Amg::Vector2D &locpos, const Amg::Vector3D &glomom) const
This method returns the GlobalPosition from a LocalPosition The LocalPosition can be outside Surface ...
Define macros for attributes used to control the static checker.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
constexpr virtual SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.