ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
Trk::Surface Class Referenceabstract

#include <Surface.h>

Inheritance diagram for Trk::Surface:
Collaboration diagram for Trk::Surface:

Classes

struct  Transforms
 

Public Types

using ChargedTrackParametersUniquePtr = std::unique_ptr< ParametersBase< 5, Trk::Charged > >
 Unique ptr types. More...
 
using NeutralTrackParametersUniquePtr = std::unique_ptr< ParametersBase< 5, Trk::Neutral > >
 

Public Member Functions

 Surface ()
 Default Constructor for inheriting classes. More...
 
virtual ~Surface ()
 Virtual Destructor. More...
 
 Surface (const Surface &sf, const Amg::Transform3D &transf)
 Copy constructor with shift. More...
 
 Surface (const Amg::Transform3D &htrans)
 Constructor with Amg::Transform3D reference. More...
 
 Surface (const TrkDetElementBase &detelement)
 Constructor from TrkDetElement. More...
 
 Surface (const TrkDetElementBase &detelement, const Identifier &id)
 Constructor form TrkDetElement and Identifier. More...
 
virtual bool operator== (const Surface &sf) const =0
 Equality operator. More...
 
bool operator!= (const Surface &sf) const
 Non-equality operator. More...
 
virtual Surfaceclone () const =0
 Implicit constructor - uses the copy constructor. More...
 
std::unique_ptr< SurfaceuniqueClone () const
 NVI method returning unique_ptr clone. More...
 
constexpr virtual SurfaceType type () const =0
 Returns the Surface type to avoid dynamic casts. More...
 
const Amg::Transform3DcachedTransform () const
 Return the cached transformation directly. More...
 
const Amg::Transform3Dtransform () const
 Returns HepGeom::Transform3D by reference. More...
 
const Amg::Vector3Dcenter () const
 Returns the center position of the Surface. More...
 
virtual const Amg::Vector3Dnormal () const
 Returns the normal vector of the Surface (i.e. More...
 
virtual Amg::Vector3D normal (const Amg::Vector2D &lp) const
 Returns a normal vector at a specific local position. More...
 
virtual const Amg::Vector3DglobalReferencePoint () const
 Returns a global reference point on the surface, for PlaneSurface, StraightLineSurface, PerigeeSurface this is equal to center(), for CylinderSurface and DiscSurface this is a new member. More...
 
const TrkDetElementBaseassociatedDetectorElement () const
 return associated Detector Element More...
 
Identifier associatedDetectorElementIdentifier () const
 return Identifier of the associated Detector Element More...
 
const Trk::LayerassociatedLayer () const
 return the associated Layer More...
 
const Trk::LayermaterialLayer () const
 return the material Layer More...
 
Trk::LayermaterialLayer ()
 
virtual const Trk::SurfacebaseSurface () const
 return the base surface (simplified for persistification) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
std::optional< Amg::Vector2DpositionOnSurface (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 returns the value of globalToLocal (including nullptr possibility), if BoundaryCheck==true it checks whether the point is inside bounds or not (returns std::nullopt in this case). More...
 
template<class T >
bool onSurface (const T &parameters, const BoundaryCheck &bchk=BoundaryCheck(true)) const
 The templated Parameters OnSurface method - checks on surface pointer first. More...
 
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 whether the local position is inside boundaries or not. More...
 
virtual bool insideBounds (const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
 virtual methods to be overwritten by the inherited surfaces More...
 
virtual bool insideBoundsCheck (const Amg::Vector2D &locpos, const BoundaryCheck &bchk) const =0
 
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. More...
 
Amg::Vector3D localToGlobal (const Amg::Vector2D &locpos) const
 This method returns the GlobalPosition from a LocalPosition uses the per surface localToGlobal. More...
 
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 bounds - for generality with momentum. More...
 
Amg::Vector3D localToGlobal (const LocalParameters &locpars) const
 This method returns the GlobalPosition from LocalParameters The LocalParameters can be outside Surface bounds. More...
 
Amg::Vector3D localToGlobal (const LocalParameters &locpars, const Amg::Vector3D &glomom) const
 This method returns the GlobalPosition from LocalParameters The LocalParameters can be outside Surface bounds - for generality with momentum. More...
 
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 checks if on surface. More...
 
std::optional< Amg::Vector2DglobalToLocal (const Amg::Vector3D &glopos, double tol=0.) const
 This method returns the LocalPosition from a provided GlobalPosition. More...
 
std::optional< Amg::Vector2DglobalToLocal (const Amg::Vector3D &glopos, const Amg::Vector3D &glomom) const
 This method returns the LocalPosition from a provided GlobalPosition. More...
 
virtual Amg::Vector2D localParametersToPosition (const LocalParameters &locpars) const
 Optionally specified by each surface type : LocalParameters to Vector2D. More...
 
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 positive or negative More...
 
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 Perigee Surface. More...
 
template<class T >
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 More...
 
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 length forceFwd is to provide the closest forward solution More...
 
virtual DistanceSolution straightLineDistanceEstimate (const Amg::Vector3D &pos, const Amg::Vector3D &dir) const =0
 fast straight line distance evaluation to Surface More...
 
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 More...
 
virtual const SurfaceBoundsbounds () const =0
 Surface Bounds method. More...
 
bool isFree () const
 Returns 'true' if this surface is 'free', i.e. More...
 
bool isActive () const
 Return 'true' if this surface is owned by the detector element. More...
 
void setTransform (const Amg::Transform3D &trans)
 Set the transform updates center and normal. More...
 
void setOwner (SurfaceOwner x)
 set Ownership More...
 
SurfaceOwner owner () const
 return ownership More...
 
void setMaterialLayer (std::shared_ptr< Layer > mlay)
 set material layer More...
 
virtual MsgStream & dump (MsgStream &sl) const
 Output Method for MsgStream, to be overloaded by child classes. More...
 
virtual std::ostream & dump (std::ostream &sl) const
 Output Method for std::ostream, to be overloaded by child classes. More...
 
virtual std::string name () const =0
 Return properly formatted class name. More...
 
void associateLayer (const Layer &lay)
 method to associate the associated Trk::Layer which is alreay owned More...
 

Static Public Member Functions

static std::size_t numberOfInstantiations ()
 

Static Public Attributes

static std::atomic_size_t s_numberOfInstantiations
 

Protected Member Functions

 Surface (const Surface &sf)
 Copy operators for inheriting classes They resets the associated detector element to nullptr and the identifier to invalid, as the copy cannot be owned by the same detector element as the original. More...
 
Surfaceoperator= (const Surface &sf)
 
 Surface (Surface &&sf) noexcept=default
 
Surfaceoperator= (Surface &&sf) noexcept=default
 
Amg::Transform3D inverseTransformHelper () const
 Helper method to factorize in one place common operations calculate inverse transofrm and multiply with position. More...
 
Amg::Vector3D inverseTransformMultHelper (const Amg::Vector3D &glopos) const
 

Protected Attributes

std::unique_ptr< Transformsm_transforms {}
 
const TrkDetElementBasem_associatedDetElement {}
 Not owning Pointer to the TrkDetElementBase. More...
 
Identifier m_associatedDetElementId {}
 Identifier for the TrkDetElementBase. More...
 
const Layerm_associatedLayer {}
 The associated layer Trk::Layer. More...
 
std::shared_ptr< Layerm_materialLayer {}
 Possibility to attach a material descrption. More...
 
SurfaceOwner m_owner {SurfaceOwner::noOwn}
 enum for surface owner : 0 free surface More...
 

Static Protected Attributes

static constexpr double s_onSurfaceTolerance = 10e-5
 Tolerance for being on Surface. More...
 

Friends

class ::SurfaceCnv_p1
 Unique Pointer to the Transforms struct*‍/. More...
 

Detailed Description

Abstract Base Class for tracking surfaces

For all isOnSurface, or positionOnSurface and insideBounds methods two tolerance parameters can be given which correspond to the two local natural coordinates of the surface loc1, loc2.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Christos Anastopoulos (Thread safety and interface cleanup)
Shaun Roe (interface cleanup)

Definition at line 74 of file Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h.

Member Typedef Documentation

◆ ChargedTrackParametersUniquePtr

Unique ptr types.

Definition at line 124 of file Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h.

◆ NeutralTrackParametersUniquePtr

Constructor & Destructor Documentation

◆ Surface() [1/7]

Surface::Surface ( )
default

Default Constructor for inheriting classes.

◆ ~Surface()

Surface::~Surface ( )
virtualdefault

Virtual Destructor.

◆ Surface() [2/7]

ATH_FLATTEN Surface::Surface ( const Surface sf,
const Amg::Transform3D transf 
)

Copy constructor with shift.

Definition at line 73 of file Surface.cxx.

76 {
77  if (sf.m_transforms) {
78  m_transforms = std::make_unique<Transforms>(
79  shift * sf.m_transforms->transform, shift * sf.m_transforms->center);
80  } else {
81  m_transforms = std::make_unique<Transforms>(Amg::Transform3D(shift));
82  }
83 }

◆ Surface() [3/7]

ATH_FLATTEN Surface::Surface ( const Amg::Transform3D htrans)

Constructor with Amg::Transform3D reference.

Definition at line 26 of file Surface.cxx.

28  , m_transforms(std::make_unique<Transforms>(tform))
29 {
30 }

◆ Surface() [4/7]

Surface::Surface ( const TrkDetElementBase detelement)

Constructor from TrkDetElement.

Definition at line 32 of file Surface.cxx.

34  , m_associatedDetElement(&detelement)
36 {
37 }

◆ Surface() [5/7]

Surface::Surface ( const TrkDetElementBase detelement,
const Identifier id 
)

Constructor form TrkDetElement and Identifier.

Definition at line 39 of file Surface.cxx.

42  , m_associatedDetElement(&detelement)
45 {
46 }

◆ Surface() [6/7]

ATH_FLATTEN Surface::Surface ( const Surface sf)
protected

Copy operators for inheriting classes They resets the associated detector element to nullptr and the identifier to invalid, as the copy cannot be owned by the same detector element as the original.

Definition at line 56 of file Surface.cxx.

58  , m_transforms(std::make_unique<Transforms>(sf.transform()))
59  , m_associatedLayer(sf.m_associatedLayer)
60  , m_materialLayer(sf.m_materialLayer)
62 {
63 }

◆ Surface() [7/7]

Trk::Surface::Surface ( Surface &&  sf)
protecteddefaultnoexcept

Member Function Documentation

◆ associatedDetectorElement()

const TrkDetElementBase* Trk::Surface::associatedDetectorElement ( ) const

return associated Detector Element

◆ associatedDetectorElementIdentifier()

Identifier Trk::Surface::associatedDetectorElementIdentifier ( ) const

return Identifier of the associated Detector Element

◆ associatedLayer()

const Trk::Layer* Trk::Surface::associatedLayer ( ) const

return the associated Layer

◆ associateLayer()

void Trk::Surface::associateLayer ( const Layer lay)

method to associate the associated Trk::Layer which is alreay owned

  • only allowed by LayerBuilder
  • only done if no Layer is set already

◆ baseSurface()

virtual const Trk::Surface* Trk::Surface::baseSurface ( ) const
virtual

return the base surface (simplified for persistification)

◆ bounds()

virtual const SurfaceBounds& Trk::Surface::bounds ( ) const
pure virtual

◆ cachedTransform()

const Amg::Transform3D* Trk::Surface::cachedTransform ( ) const

Return the cached transformation directly.

Don't try to make a new transform if it's not here.

◆ center()

const Amg::Vector3D& Trk::Surface::center ( ) const

Returns the center position of the Surface.

◆ clone()

virtual Surface* Trk::Surface::clone ( ) const
pure virtual

◆ createUniqueNeutralParameters() [1/2]

virtual NeutralTrackParametersUniquePtr Trk::Surface::createUniqueNeutralParameters ( const Amg::Vector3D ,
const Amg::Vector3D ,
double  charge = 0.,
std::optional< AmgSymMatrix(5)>  cov = std::nullopt 
) const
pure virtual

◆ createUniqueNeutralParameters() [2/2]

virtual NeutralTrackParametersUniquePtr Trk::Surface::createUniqueNeutralParameters ( double  l1,
double  l2,
double  phi,
double  theat,
double  qop,
std::optional< AmgSymMatrix(5)>  cov = std::nullopt 
) const
pure virtual

◆ createUniqueTrackParameters() [1/2]

virtual ChargedTrackParametersUniquePtr Trk::Surface::createUniqueTrackParameters ( const Amg::Vector3D ,
const Amg::Vector3D ,
double  ,
std::optional< AmgSymMatrix(5)>  cov = std::nullopt 
) const
pure virtual

◆ createUniqueTrackParameters() [2/2]

virtual ChargedTrackParametersUniquePtr Trk::Surface::createUniqueTrackParameters ( double  l1,
double  l2,
double  phi,
double  theat,
double  qop,
std::optional< AmgSymMatrix(5)>  cov = std::nullopt 
) const
pure virtual

◆ dump() [1/2]

MsgStream & Surface::dump ( MsgStream &  sl) const
virtual

Output Method for MsgStream, to be overloaded by child classes.

Reimplemented in Trk::PerigeeSurface, and Trk::DetElementSurface.

Definition at line 157 of file Surface.cxx.

158 {
159  sl << std::setiosflags(std::ios::fixed);
160  sl << std::setprecision(4);
161  sl << name() << std::endl;
162  if (associatedDetectorElement()!=nullptr){
163  sl<<" Detector Type = "<<associatedDetectorElement()->detectorTypeString()<<std::endl;
164  }
165  sl << " Center position (x, y, z) = (" << center().x() << ", " << center().y() << ", " << center().z() << ")"
166  << std::endl;
168  Amg::Vector3D rotX(rot.col(0));
169  Amg::Vector3D rotY(rot.col(1));
170  Amg::Vector3D rotZ(rot.col(2));
171  sl << std::setprecision(6);
172  sl << " Rotation: colX = (" << rotX(0) << ", " << rotX(1) << ", " << rotX(2) << ")" << std::endl;
173  sl << " colY = (" << rotY(0) << ", " << rotY(1) << ", " << rotY(2) << ")" << std::endl;
174  sl << " colZ = (" << rotZ(0) << ", " << rotZ(1) << ", " << rotZ(2) << ")" << std::endl;
175  sl << " Bounds : " << bounds();
176  if (!checkTransform(*this)) {
177  sl << std::endl << " NOT a strict rotation matrix." << std::endl;
178  }
179  sl << std::setprecision(-1);
180  return sl;
181 }

◆ dump() [2/2]

std::ostream & Surface::dump ( std::ostream &  sl) const
virtual

Output Method for std::ostream, to be overloaded by child classes.

Reimplemented in Trk::PerigeeSurface, and Trk::DetElementSurface.

Definition at line 185 of file Surface.cxx.

186 {
187  sl << std::setiosflags(std::ios::fixed);
188  sl << std::setprecision(4);
189  sl << name() << std::endl;
190  if (associatedDetectorElement()!=nullptr){
191  sl<<" Detector Type = "<<associatedDetectorElement()->detectorTypeString()<<std::endl;
192  }
193  sl << " Center position (x, y, z) = (" << center().x() << ", " << center().y() << ", " << center().z() << ")"
194  << std::endl;
196  Amg::Vector3D rotX(rot.col(0));
197  Amg::Vector3D rotY(rot.col(1));
198  Amg::Vector3D rotZ(rot.col(2));
199  sl << std::setprecision(6);
200  sl << " Rotation: colX = (" << rotX(0) << ", " << rotX(1) << ", " << rotX(2) << ")" << std::endl;
201  sl << " colY = (" << rotY(0) << ", " << rotY(1) << ", " << rotY(2) << ")" << std::endl;
202  sl << " colZ = (" << rotZ(0) << ", " << rotZ(1) << ", " << rotZ(2) << ")" << std::endl;
203  sl << " Bounds : " << bounds();
204  if (!checkTransform(*this)) {
205  sl << std::endl << " NOT a strict rotation matrix." << std::endl;
206  }
207  sl << std::setprecision(-1);
208  return sl;
209 }

◆ globalReferencePoint()

virtual const Amg::Vector3D& Trk::Surface::globalReferencePoint ( ) const
virtual

Returns a global reference point on the surface, for PlaneSurface, StraightLineSurface, PerigeeSurface this is equal to center(), for CylinderSurface and DiscSurface this is a new member.

Reimplemented in Trk::DiscSurface, Trk::CylinderSurface, and Trk::ConeSurface.

◆ globalToLocal() [1/3]

virtual bool Trk::Surface::globalToLocal ( const Amg::Vector3D glob,
const Amg::Vector3D mom,
Amg::Vector2D loc 
) const
pure virtual

Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean checks if on surface.

Implemented in Trk::PlaneSurface, Trk::ConeSurface, Trk::StraightLineSurface, Trk::PerigeeSurface, Trk::SlidingDiscSurface, Trk::SlidingCylinderSurface, Trk::DiscSurface, Trk::CylinderSurface, and Trk::DetElementSurface.

◆ globalToLocal() [2/3]

std::optional<Amg::Vector2D> Trk::Surface::globalToLocal ( const Amg::Vector3D glopos,
const Amg::Vector3D glomom 
) const

This method returns the LocalPosition from a provided GlobalPosition.

If the GlobalPosition is not on the Surface, it returns a nullopt This method does not check if the calculated LocalPosition is inside surface bounds. If this check is needed, use positionOnSurface - for generality with momentum

◆ globalToLocal() [3/3]

std::optional<Amg::Vector2D> Trk::Surface::globalToLocal ( const Amg::Vector3D glopos,
double  tol = 0. 
) const

This method returns the LocalPosition from a provided GlobalPosition.

If the GlobalPosition is not on the Surface, it returns nullopt This method does not check if the calculated LocalPosition is inside surface bounds. If this check is needed, use positionOnSurface - only for planar, cylinder surface fully defined

◆ insideBounds()

virtual bool Trk::Surface::insideBounds ( const Amg::Vector2D locpos,
double  tol1 = 0.,
double  tol2 = 0. 
) const
pure virtual

◆ insideBoundsCheck()

virtual bool Trk::Surface::insideBoundsCheck ( const Amg::Vector2D locpos,
const BoundaryCheck bchk 
) const
pure virtual

◆ inverseTransformHelper()

Amg::Transform3D Trk::Surface::inverseTransformHelper ( ) const
protected

Helper method to factorize in one place common operations calculate inverse transofrm and multiply with position.

◆ inverseTransformMultHelper()

Amg::Vector3D Trk::Surface::inverseTransformMultHelper ( const Amg::Vector3D glopos) const
protected

◆ isActive()

bool Trk::Surface::isActive ( ) const

Return 'true' if this surface is owned by the detector element.

◆ isFree()

bool Trk::Surface::isFree ( ) const

Returns 'true' if this surface is 'free', i.e.

it does not belong to a detector element (and returns false otherwise

◆ isOnSurface()

bool Surface::isOnSurface ( const Amg::Vector3D glopo,
const BoundaryCheck bchk = true,
double  tol1 = 0.,
double  tol2 = 0. 
) const
virtual

This method returns true if the GlobalPosition is on the Surface for both, within or without check of whether the local position is inside boundaries or not.

Reimplemented in Trk::StraightLineSurface, Trk::PerigeeSurface, Trk::PlaneSurface, Trk::SlidingDiscSurface, Trk::SlidingCylinderSurface, Trk::CylinderSurface, Trk::DiscSurface, and Trk::DetElementSurface.

Definition at line 123 of file Surface.cxx.

127 {
128  std::optional<Amg::Vector2D> posOnSurface =
129  positionOnSurface(glopo, bchk, tol1, tol2);
130  return static_cast<bool>(posOnSurface);
131 }

◆ localParametersToPosition()

virtual Amg::Vector2D Trk::Surface::localParametersToPosition ( const LocalParameters locpars) const
virtual

Optionally specified by each surface type : LocalParameters to Vector2D.

Reimplemented in Trk::DiscSurface, Trk::CylinderSurface, and Trk::ConeSurface.

◆ localToGlobal() [1/5]

virtual void Trk::Surface::localToGlobal ( const Amg::Vector2D locp,
const Amg::Vector3D mom,
Amg::Vector3D glob 
) const
pure virtual

Specified by each surface type: LocalToGlobal method without dynamic memory allocation.

Implemented in Trk::PlaneSurface, Trk::ConeSurface, Trk::PerigeeSurface, Trk::StraightLineSurface, Trk::SlidingDiscSurface, Trk::SlidingCylinderSurface, Trk::DiscSurface, Trk::CylinderSurface, and Trk::DetElementSurface.

◆ localToGlobal() [2/5]

Amg::Vector3D Trk::Surface::localToGlobal ( const Amg::Vector2D locpos) const

This method returns the GlobalPosition from a LocalPosition uses the per surface localToGlobal.

◆ localToGlobal() [3/5]

Amg::Vector3D Trk::Surface::localToGlobal ( const Amg::Vector2D locpos,
const Amg::Vector3D glomom 
) const

This method returns the GlobalPosition from a LocalPosition The LocalPosition can be outside Surface bounds - for generality with momentum.

◆ localToGlobal() [4/5]

Amg::Vector3D Trk::Surface::localToGlobal ( const LocalParameters locpars) const

This method returns the GlobalPosition from LocalParameters The LocalParameters can be outside Surface bounds.

◆ localToGlobal() [5/5]

Amg::Vector3D Trk::Surface::localToGlobal ( const LocalParameters locpars,
const Amg::Vector3D glomom 
) const

This method returns the GlobalPosition from LocalParameters The LocalParameters can be outside Surface bounds - for generality with momentum.

◆ materialLayer() [1/2]

Trk::Layer* Trk::Surface::materialLayer ( )

◆ materialLayer() [2/2]

const Trk::Layer* Trk::Surface::materialLayer ( ) const

return the material Layer

◆ measurementFrame()

Amg::RotationMatrix3D Surface::measurementFrame ( const Amg::Vector3D glopos,
const Amg::Vector3D glomom 
) const
virtual

Return the measurement frame - this is needed for alignment, in particular for StraightLine and Perigee Surface.

  • the default implementation is the the RotationMatrix3D of the transform

Reimplemented in Trk::CylinderSurface, Trk::ConeSurface, Trk::StraightLineSurface, and Trk::PerigeeSurface.

Definition at line 135 of file Surface.cxx.

136 {
137  return transform().linear();
138 }

◆ name()

virtual std::string Trk::Surface::name ( ) const
pure virtual

◆ normal() [1/2]

virtual const Amg::Vector3D& Trk::Surface::normal ( ) const
virtual

Returns the normal vector of the Surface (i.e.

in generall z-axis of rotation)

Reimplemented in Trk::PerigeeSurface.

◆ normal() [2/2]

virtual Amg::Vector3D Trk::Surface::normal ( const Amg::Vector2D lp) const
virtual

Returns a normal vector at a specific local position.

Reimplemented in Trk::PerigeeSurface, Trk::CylinderSurface, and Trk::ConeSurface.

◆ numberOfInstantiations()

static std::size_t Trk::ObjectCounter< Trk::Surface >::numberOfInstantiations ( )
inlinestaticinherited

Definition at line 25 of file TrkObjectCounter.h.

26  {
27 #ifndef NDEBUG
28  return s_numberOfInstantiations.load();
29 #endif
30  return 0;
31  }

◆ onSurface()

template<class T >
bool Trk::Surface::onSurface ( const T &  parameters,
const BoundaryCheck bchk = BoundaryCheck(true) 
) const

The templated Parameters OnSurface method - checks on surface pointer first.

◆ operator!=()

bool Trk::Surface::operator!= ( const Surface sf) const

Non-equality operator.

◆ operator=() [1/2]

Trk::Surface & Surface::operator= ( const Surface sf)
protected

Definition at line 91 of file Surface.cxx.

92 {
93  if (this != &sf) {
94  m_transforms = std::make_unique<Transforms>(sf.transform());
95  m_associatedDetElement = nullptr;
97  m_associatedLayer = sf.m_associatedLayer;
98  m_materialLayer = sf.m_materialLayer;
100  }
101  return *this;
102 }

◆ operator=() [2/2]

Surface& Trk::Surface::operator= ( Surface &&  sf)
protecteddefaultnoexcept

◆ operator==()

virtual bool Trk::Surface::operator== ( const Surface sf) const
pure virtual

◆ owner()

SurfaceOwner Trk::Surface::owner ( ) const

return ownership

◆ pathCorrection()

virtual double Trk::Surface::pathCorrection ( const Amg::Vector3D pos,
const Amg::Vector3D mom 
) const
virtual

the pathCorrection for derived classes with thickness - it reflects if the direction projection is positive or negative

Reimplemented in Trk::CylinderSurface, Trk::StraightLineSurface, Trk::PerigeeSurface, and Trk::ConeSurface.

◆ positionOnSurface()

std::optional< Amg::Vector2D > Surface::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 returns the value of globalToLocal (including nullptr possibility), if BoundaryCheck==true it checks whether the point is inside bounds or not (returns std::nullopt in this case).

Definition at line 106 of file Surface.cxx.

110 {
111  std::optional<Amg::Vector2D> posOnSurface = globalToLocal(glopo, tol1);
112  if (!bchk){
113  return posOnSurface;
114  }
115  if (posOnSurface && insideBounds(*posOnSurface, tol1, tol2)){
116  return posOnSurface;
117  }
118  return std::nullopt;
119 }

◆ setMaterialLayer()

void Trk::Surface::setMaterialLayer ( std::shared_ptr< Layer mlay)

set material layer

◆ setOwner()

void Trk::Surface::setOwner ( SurfaceOwner  x)

set Ownership

◆ setTransform()

void Trk::Surface::setTransform ( const Amg::Transform3D trans)

Set the transform updates center and normal.

◆ straightLineDistanceEstimate() [1/2]

virtual DistanceSolution Trk::Surface::straightLineDistanceEstimate ( const Amg::Vector3D pos,
const Amg::Vector3D dir 
) const
pure virtual

◆ straightLineDistanceEstimate() [2/2]

virtual DistanceSolution Trk::Surface::straightLineDistanceEstimate ( const Amg::Vector3D pos,
const Amg::Vector3D dir,
bool  Bound 
) const
pure virtual

◆ straightLineIntersection() [1/2]

virtual Intersection Trk::Surface::straightLineIntersection ( const Amg::Vector3D pos,
const Amg::Vector3D dir,
bool  forceDir = false,
Trk::BoundaryCheck  bchk = false 
) const
pure virtual

fast straight line intersection schema - standard: provides closest intersection and (signed) path length forceFwd is to provide the closest forward solution

Implemented in Trk::CylinderSurface, Trk::DiscSurface, Trk::PerigeeSurface, Trk::ConeSurface, Trk::PlaneSurface, Trk::StraightLineSurface, and Trk::DetElementSurface.

◆ straightLineIntersection() [2/2]

template<class T >
Intersection Trk::Surface::straightLineIntersection ( const T &  pars,
bool  forceDir = false,
const Trk::BoundaryCheck bchk = false 
) const
inline

fst straight line intersection schema - templated for charged and neutral parameters

Definition at line 351 of file Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h.

355  {
357  pars.position(), pars.momentum().unit(), forceDir, bchk);
358  }

◆ transform()

const Amg::Transform3D& Trk::Surface::transform ( ) const

Returns HepGeom::Transform3D by reference.

◆ type()

constexpr virtual SurfaceType Trk::Surface::type ( ) const
constexprpure virtual

◆ uniqueClone()

std::unique_ptr<Surface> Trk::Surface::uniqueClone ( ) const

NVI method returning unique_ptr clone.

Friends And Related Function Documentation

◆ ::SurfaceCnv_p1

friend class ::SurfaceCnv_p1
friend

Unique Pointer to the Transforms struct*‍/.

Definition at line 433 of file Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h.

Member Data Documentation

◆ m_associatedDetElement

const TrkDetElementBase* Trk::Surface::m_associatedDetElement {}
protected

Not owning Pointer to the TrkDetElementBase.

Definition at line 439 of file Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h.

◆ m_associatedDetElementId

Identifier Trk::Surface::m_associatedDetElementId {}
protected

◆ m_associatedLayer

const Layer* Trk::Surface::m_associatedLayer {}
protected

The associated layer Trk::Layer.

  • layer in which the Surface is embedded (not owning pointed)

Definition at line 448 of file Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h.

◆ m_materialLayer

std::shared_ptr<Layer> Trk::Surface::m_materialLayer {}
protected

Possibility to attach a material descrption.

  • potentially given as the associated material layer (not owning pointer)

Definition at line 453 of file Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h.

◆ m_owner

SurfaceOwner Trk::Surface::m_owner {SurfaceOwner::noOwn}
protected

enum for surface owner : 0 free surface

Definition at line 455 of file Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h.

◆ m_transforms

std::unique_ptr<Transforms> Trk::Surface::m_transforms {}
protected

◆ s_numberOfInstantiations

std::atomic_size_t Trk::ObjectCounter< Trk::Surface >::s_numberOfInstantiations
inlinestaticinherited

Definition at line 22 of file TrkObjectCounter.h.

◆ s_onSurfaceTolerance

constexpr double Trk::Surface::s_onSurfaceTolerance = 10e-5
staticconstexprprotected

Tolerance for being on Surface.

Definition at line 458 of file Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h.


The documentation for this class was generated from the following files:
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Trk::Surface::m_associatedDetElement
const TrkDetElementBase * m_associatedDetElement
Not owning Pointer to the TrkDetElementBase.
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:439
Trk::Surface::m_owner
SurfaceOwner m_owner
enum for surface owner : 0 free surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:455
Trk::Surface::associatedDetectorElement
const TrkDetElementBase * associatedDetectorElement() const
return associated Detector Element
Trk::Surface::name
virtual std::string name() const =0
Return properly formatted class name.
Trk::Surface::straightLineIntersection
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
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:351
Trk::noOwn
@ noOwn
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:54
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
Trk::ObjectCounter< Trk::Surface >
Trk::TrkDetElementBase::detectorTypeString
std::string detectorTypeString() const
Returns a string of the Detector element type.
Definition: TrkDetElementBase.cxx:10
Trk::Surface::m_associatedLayer
const Layer * m_associatedLayer
The associated layer Trk::Layer.
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:448
Trk::Surface::m_transforms
std::unique_ptr< Transforms > m_transforms
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:436
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
dumpNswErrorDb.linear
def linear
Definition: dumpNswErrorDb.py:23
Trk::Surface::m_materialLayer
std::shared_ptr< Layer > m_materialLayer
Possibility to attach a material descrption.
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:453
Trk::DetElOwn
@ DetElOwn
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:56
Trk::Surface::bounds
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
Trk::Surface::insideBounds
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
virtual methods to be overwritten by the inherited surfaces
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::Surface::m_associatedDetElementId
Identifier m_associatedDetElementId
Identifier for the TrkDetElementBase.
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:442
Trk::ObjectCounter< Trk::Surface >::s_numberOfInstantiations
static std::atomic_size_t s_numberOfInstantiations
Definition: TrkObjectCounter.h:22
Trk::Surface::globalToLocal
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...
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition: GeoPrimitives.h:49
Trk::Surface::positionOnSurface
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...
Definition: Surface.cxx:106
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Identifier
Definition: IdentifierFieldParser.cxx:14