ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Trk::CompoundLayer Class Referenceabstract

A class to represent complex geometries requiring a description using multiple surfaces. More...

#include <CompoundLayer.h>

Collaboration diagram for Trk::CompoundLayer:

Public Member Functions

 CompoundLayer ()
 Default construactor. More...
 
virtual ~CompoundLayer ()
 Destructor, deletes the consituent surfaces. More...
 
virtual const LayerlayerRepresentation () const =0
 
const std::vector< const Surface * > & constituentSurfaces () const
 
virtual std::vector< const Surface * > closestSurfaces (const Amg::Vector3D &gp, const Amg::Vector3D &dir, bool alsoBackward=false) const
 
bool isOnCompoundLayer (const Amg::Vector3D &gp, double thickness) const
 Searches through the surfaces with Layer specific tolerance to see if the gp is on one of the subsurfaces. More...
 

Protected Member Functions

void resize (const VolumeBounds &, double) const
 Resize the layer to the tracking volume - not (yet) supported for Compound Layer. More...
 

Protected Attributes

std::vector< const Surface * > m_surfaces
 The constituent surfaces. More...
 

Detailed Description

A class to represent complex geometries requiring a description using multiple surfaces.

Base class for complex layers, where a few different Surfaces need to be stitched together to create the geometry of the Layer. The CompoundLayer has a single surface representation which is a single simple Surface that gives a rough description of the whole geometry (eg. for a cylider with conical end-pieces, the barrel cylinder extended to the edges of the cones are used).

The CompoundLayer class provides routines for the extrapolator to use to test the various Surfaces in order of most to least likely given a particular position and direction.

Classes which derived from this class should also derive from Layer to be used by the extrapolator properly, the CompoundLayer class just ensures that the extra functionality required is present.

The best practice is to derive from an already specified layer type, for instance ConeCylinderConeLayer derives from CylinderLayer, so in places like LayerBuilders, the compound layer can be used without needing to redevelop the interface.

Author
Ian.W.nosp@m.atso.nosp@m.n@cer.nosp@m.n.ch

Definition at line 60 of file CompoundLayer.h.

Constructor & Destructor Documentation

◆ CompoundLayer()

Trk::CompoundLayer::CompoundLayer ( )
inline

Default construactor.

Definition at line 63 of file CompoundLayer.h.

63 {}

◆ ~CompoundLayer()

Trk::CompoundLayer::~CompoundLayer ( )
virtual

Destructor, deletes the consituent surfaces.

Definition at line 22 of file CompoundLayer.cxx.

22  {
23  for (auto & surface : m_surfaces) {
24  delete surface;
25  }
26 }

Member Function Documentation

◆ closestSurfaces()

std::vector< const Surface * > Trk::CompoundLayer::closestSurfaces ( const Amg::Vector3D gp,
const Amg::Vector3D dir,
bool  alsoBackward = false 
) const
inlinevirtual

Definition at line 90 of file CompoundLayer.h.

91  {
92  return m_surfaces;
93 }

◆ constituentSurfaces()

const std::vector< const Surface * > & Trk::CompoundLayer::constituentSurfaces ( ) const
inline

Definition at line 87 of file CompoundLayer.h.

87  {
88  return m_surfaces;
89 }

◆ isOnCompoundLayer()

bool Trk::CompoundLayer::isOnCompoundLayer ( const Amg::Vector3D gp,
double  thickness 
) const

Searches through the surfaces with Layer specific tolerance to see if the gp is on one of the subsurfaces.

Definition at line 12 of file CompoundLayer.cxx.

13  {
14  // try each surface in turn
15  bool onSurface = false;
16  for (unsigned int i = 0; !onSurface && i < m_surfaces.size(); ++i) {
17  onSurface = m_surfaces[i]->isOnSurface(gp, true, thickness);
18  }
19  return onSurface;
20 }

◆ layerRepresentation()

virtual const Layer& Trk::CompoundLayer::layerRepresentation ( ) const
pure virtual

◆ resize()

void Trk::CompoundLayer::resize ( const VolumeBounds ,
double   
) const
inlineprotected

Resize the layer to the tracking volume - not (yet) supported for Compound Layer.

Definition at line 82 of file CompoundLayer.h.

82 {};

Member Data Documentation

◆ m_surfaces

std::vector<const Surface*> Trk::CompoundLayer::m_surfaces
protected

The constituent surfaces.

Definition at line 84 of file CompoundLayer.h.


The documentation for this class was generated from the following files:
Trk::CompoundLayer::m_surfaces
std::vector< const Surface * > m_surfaces
The constituent surfaces.
Definition: CompoundLayer.h:82
lumiFormat.i
int i
Definition: lumiFormat.py:85