ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
Trk::ApproachDescriptor Class Reference

#include <ApproachDescriptor.h>

Inheritance diagram for Trk::ApproachDescriptor:
Collaboration diagram for Trk::ApproachDescriptor:

Public Member Functions

 ApproachDescriptor (std::unique_ptr< ApproachSurfaces > aSurfaces, bool rebuild=true)
 
 ApproachDescriptor (std::unique_ptr< BinnedArray< const ApproachSurfaces >> aSurfaceArray, std::unique_ptr< Surface > aSurfaceArraySurface=nullptr)
 
virtual const ApproachSurfacesapproachSurfaces (const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override final
 get the compatible surfaces More...
 
void registerLayer (const Layer &lay)
 
bool rebuild () const
 

Protected Attributes

std::unique_ptr< ApproachSurfacesm_approachSurfaces
 
std::unique_ptr< Surfacem_approachSurfaceArraySurface
 
std::unique_ptr< BinnedArray< const ApproachSurfaces > > m_approachSurfaceArray
 
bool m_rebuild
 

Private Member Functions

void registerLayerToSurfaces (const Layer &lay, const ApproachSurfaces &aSurfaces)
 

Detailed Description

Class to decide and return which approaching surface to be taken.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 24 of file ApproachDescriptor.h.

Constructor & Destructor Documentation

◆ ApproachDescriptor() [1/2]

Trk::ApproachDescriptor::ApproachDescriptor ( std::unique_ptr< ApproachSurfaces aSurfaces,
bool  rebuild = true 
)
inline

Definition at line 28 of file ApproachDescriptor.h.

30  : IApproachDescriptor(std::move(aSurfaces), rebuild)
31  {}

◆ ApproachDescriptor() [2/2]

Trk::ApproachDescriptor::ApproachDescriptor ( std::unique_ptr< BinnedArray< const ApproachSurfaces >>  aSurfaceArray,
std::unique_ptr< Surface aSurfaceArraySurface = nullptr 
)
inline

Definition at line 34 of file ApproachDescriptor.h.

37  : IApproachDescriptor(std::move(aSurfaceArray), std::move(aSurfaceArraySurface))
38  {}

Member Function Documentation

◆ approachSurfaces()

const Trk::ApproachSurfaces * Trk::ApproachDescriptor::approachSurfaces ( const Amg::Vector3D pos,
const Amg::Vector3D dir 
) const
finaloverridevirtual

get the compatible surfaces

  • return : a boolean indicating if an actual intersection had been tried
  • fill vector of intersections
  • primary bin surface : sf
  • position & direction : pos, dir

Implements Trk::IApproachDescriptor.

Definition at line 12 of file ApproachDescriptor.cxx.

13  {
14  // return the single approach surfaces
15  if (m_approachSurfaces) return (m_approachSurfaces.get());
16  // there's new surface given
18  Trk::Intersection asInter =
19  m_approachSurfaceArraySurface->straightLineIntersection(pos, dir);
20  if (asInter.valid)
21  return (m_approachSurfaceArray->object(asInter.position));
22  }
23  // get the bin
24  return (m_approachSurfaceArray->object(pos));
25 }

◆ rebuild()

bool Trk::IApproachDescriptor::rebuild ( ) const
inlineinherited

Definition at line 96 of file IApproachDescriptor.h.

96 { return m_rebuild; }

◆ registerLayer()

void Trk::IApproachDescriptor::registerLayer ( const Layer lay)
inlineinherited

Definition at line 98 of file IApproachDescriptor.h.

98  {
101  m_approachSurfaceArraySurface->associateLayer(lay);
103  }
105  BinnedArraySpan<ApproachSurfaces const * const> aSurfaceObjects =
106  m_approachSurfaceArray->arrayObjects();
107  for (auto& aSurfaces : aSurfaceObjects) {
108  registerLayerToSurfaces(lay, *aSurfaces);
109  }
110  }
111 }

◆ registerLayerToSurfaces()

void Trk::IApproachDescriptor::registerLayerToSurfaces ( const Layer lay,
const ApproachSurfaces aSurfaces 
)
inlineprivateinherited

Definition at line 113 of file IApproachDescriptor.h.

114  {
115  for (Trk::Surface* aSurface : aSurfaces) {
116  aSurface->associateLayer(lay);
117  aSurface->setOwner(Trk::TGOwn);
118  }
119 }

Member Data Documentation

◆ m_approachSurfaceArray

std::unique_ptr<BinnedArray<const ApproachSurfaces> > Trk::IApproachDescriptor::m_approachSurfaceArray
protectedinherited

Definition at line 92 of file IApproachDescriptor.h.

◆ m_approachSurfaceArraySurface

std::unique_ptr<Surface> Trk::IApproachDescriptor::m_approachSurfaceArraySurface
protectedinherited

Definition at line 91 of file IApproachDescriptor.h.

◆ m_approachSurfaces

std::unique_ptr<ApproachSurfaces> Trk::IApproachDescriptor::m_approachSurfaces
protectedinherited

Definition at line 90 of file IApproachDescriptor.h.

◆ m_rebuild

bool Trk::IApproachDescriptor::m_rebuild
protectedinherited

Definition at line 93 of file IApproachDescriptor.h.


The documentation for this class was generated from the following files:
Trk::Intersection
Definition: Intersection.h:24
Trk::IApproachDescriptor::IApproachDescriptor
IApproachDescriptor(std::unique_ptr< ApproachSurfaces > aSurfaces, bool rebuild=true)
Definition: IApproachDescriptor.h:48
Trk::IApproachDescriptor::m_approachSurfaceArraySurface
std::unique_ptr< Surface > m_approachSurfaceArraySurface
Definition: IApproachDescriptor.h:91
Trk::IApproachDescriptor::m_approachSurfaces
std::unique_ptr< ApproachSurfaces > m_approachSurfaces
Definition: IApproachDescriptor.h:90
Trk::IApproachDescriptor::registerLayerToSurfaces
void registerLayerToSurfaces(const Layer &lay, const ApproachSurfaces &aSurfaces)
Definition: IApproachDescriptor.h:113
Trk::IApproachDescriptor::m_approachSurfaceArray
std::unique_ptr< BinnedArray< const ApproachSurfaces > > m_approachSurfaceArray
Definition: IApproachDescriptor.h:92
Trk::IApproachDescriptor::m_rebuild
bool m_rebuild
Definition: IApproachDescriptor.h:93
Trk::Intersection::position
Amg::Vector3D position
Definition: Intersection.h:25
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk::TGOwn
@ TGOwn
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:55
Trk::Intersection::valid
bool valid
Definition: Intersection.h:28
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::IApproachDescriptor::rebuild
bool rebuild() const
Definition: IApproachDescriptor.h:96