![]() |
ATLAS Offline Software
|
#include <TrapezoidBoundsExpander.h>
Classes | |
| struct | TrapezoidPatch |
| Helper struct to describe a sub trapezoid that is not aligned with the center of the coordinate system. More... | |
Public Types | |
| enum class | Side : std::int8_t { left = -1 , right = 1 } |
| Enum to select the left / right corners of a trapezoid. More... | |
| enum class | Level : std::int8_t { bottom = -1 , top = 1 } |
| Enum to select the top / bottom corners of a trapezoid. More... | |
| using | VolumeAligner_t = std::function<Acts::Transform3(const Acts::GeometryContext& tgContext)> |
| Abrivation of the transform getter. | |
Public Member Functions | |
| virtual void | expand (const Acts::GeometryContext &tgContext, const Acts::Volume &volume) override final |
| virtual std::shared_ptr< Acts::VolumeBounds > | makeBounds (Acts::VolumeBoundFactory &factory) override final |
| void | setMargin (const double margin) |
| Apply an extra margin to all four bound dimensions. | |
| void | setMargin (const double marginXlow, const double marginXhigh, const double marginY, const double marginZ) |
| Apply an extra margin to each individual bound side. | |
| BoundsExpander ()=default | |
| Use the constructor from the base class. | |
| BoundsExpander (const Acts::Transform3 &toVolume, std::unique_ptr< const Acts::Logger > loggerObj=nullptr) | |
| Use the constructor from the base class. | |
| void | expand (const Acts::GeometryContext &tgContext, const MuonGMR4::Chamber &chamber) |
| Use the expand overloads w.r.t. | |
| void | expand (const Acts::GeometryContext &tgContext, const MuonGMR4::SpectrometerSector §or) |
| Use the expand overloads w.r.t. | |
| void | expand (const Acts::GeometryContext &tgContext, const MuonGMR4::MuonReadoutElement &readoutElement, Acts::VolumeBoundFactory &boundFactory) |
| Use the expand overloads w.r.t. | |
| std::unique_ptr< Acts::TrackingVolume > | makeEnvelope (Acts::VolumeBoundFactory &factory, std::string_view volName) |
| Creates an empty tracking volume. | |
| Acts::Transform3 | toVertexCenter () const |
| Returns the transform from the ATLAS frame to the center of all seen vertices. | |
| const Acts::Transform3 & | boxMidPoint () const |
| Returns the transform from the nominal volume center to the middle point to all seen vertices. | |
| void | reCenter (std::span< const Amg::Vector3D > vertices) |
| Update the center point from a list of global vertices. | |
| std::span< const double > | minima () const |
| Returns the triplet of the minimum coordinates from the ensemble of all seen vertices. | |
| std::span< const double > | maxima () const |
| Returns the triplet of the maximum coordinates from the ensemble of all seen vertices. | |
| const Acts::Logger & | logger () const |
| Returns the ACTS logegr object. | |
Static Public Member Functions | |
| static Amg::Vector3D | makeVertex (const TrapezoidPatch &trapezoid, const Side side, const Level lvl) |
| Returns the vertex point from a trapezoid. | |
| static double | distanceToTrapezoid (const Amg::Vector3D &vertex, const Amg::Vector3D &edge, const Amg::Vector3D &testMe, const Side side) |
| Returns the distance to the inclided trapezoidal side Positive values imply that the test point is outside of the trapezoid edge. | |
| static std::uint8_t | toIndex (const Side side, const Level lvl) |
| Construct an index from [0;3] from the side and level. | |
| static std::shared_ptr< Acts::VolumeBounds > | makeBounds (const MuonGMR4::MuonReadoutElement &readoutElement, Acts::VolumeBoundFactory &boundFactory) |
| Use the makeBounds overload for the readout element. | |
| static std::vector< Amg::Vector3D > | cornerPoints (const Acts::GeometryContext &tgContext, const Acts::Volume &volume, const std::size_t nSegments=3) |
| Returns the vertices from a volume. | |
| static std::vector< Amg::Vector3D > | cornerPoints (const Acts::GeometryContext &tgContext, const Acts::Surface &surface, const std::size_t nSegments=3) |
| Returns the vertices from a surface. | |
Private Member Functions | |
| void | findTrapezoidEdge (Amg::Vector3D &botCorner, Amg::Vector3D &topCorner, const Side side, const std::size_t lowPatch, const std::size_t highPatch) const |
| Moves the position of the bottom and top corner of a trapezoid side such that all vertices are enclosed. | |
Private Attributes | |
| std::vector< TrapezoidPatch > | m_constituents {} |
| std::shared_ptr< Acts::VolumeBounds > | m_finalBounds {} |
| std::array< double, 4 > | m_margin {Acts::filledArray<double, 4>(0.)} |
| std::unique_ptr< const Acts::Logger > | m_logger |
| Acts::Transform3 | m_toVolume {Acts::Transform3::Identity()} |
| External method to go from ATLAS to the reference frame. | |
| Acts::Transform3 | m_shiftTrf {Acts::Transform3::Identity()} |
| Extra shift to center all the vertices. | |
| std::array< double, 3 > | m_locMax {Acts::filledArray<double, 3>(-2.*Acts::UnitConstants::km)} |
| Maximum value seen by the recenter method. | |
| std::array< double, 3 > | m_locMin {Acts::filledArray<double, 3>(2.*Acts::UnitConstants::km)} |
| Minimum value seen by the recenter method. | |
Friends | |
| std::ostream & | operator<< (std::ostream &ostr, const Side side) |
| Pipe the Side to an ostream. | |
| std::ostream & | operator<< (std::ostream &ostr, const Level lvl) |
| Pipe the Level to an ostream. | |
Definition at line 13 of file TrapezoidBoundsExpander.h.
|
inherited |
Abrivation of the transform getter.
Definition at line 62 of file BoundsExpander.h.
|
strong |
Enum to select the top / bottom corners of a trapezoid.
| Enumerator | |
|---|---|
| bottom | |
| top | |
Definition at line 38 of file TrapezoidBoundsExpander.h.
|
strong |
Enum to select the left / right corners of a trapezoid.
| Enumerator | |
|---|---|
| left | |
| right | |
Definition at line 36 of file TrapezoidBoundsExpander.h.
|
explicitdefault |
Use the constructor from the base class.
|
explicit |
Use the constructor from the base class.
Definition at line 69 of file BoundsExpander.cxx.
|
inherited |
Returns the transform from the nominal volume center to the middle point to all seen vertices.
Definition at line 42 of file BoundsExpander.cxx.
|
staticinherited |
Returns the vertices from a surface.
| tgContext | The geometry context to align the surface |
| volume | The surface from which the vertices shall be retrieved |
| nSegments | Number of segments to be generated |
Don't use the polyhedron representation for rectangles and trapezoids as we need the central point on the edge to properly constrain the radius of a surrounding cylinder
Definition at line 131 of file BoundsExpander.cxx.
|
staticinherited |
Returns the vertices from a volume.
| tgContext | The geometry context to align the volume |
| volume | The volume from which the vertices shall be retrieved |
| nSegments | Number of segments to be generated |
Definition at line 114 of file BoundsExpander.cxx.
|
static |
Returns the distance to the inclided trapezoidal side Positive values imply that the test point is outside of the trapezoid edge.
| vertex | The side vertex of the trapezoid |
| edge | The direction vector describing the inclined edge |
| testMe | The external point to test |
| side | Flag to toggle whether the edge is on the left or right |
Definition at line 62 of file TrapezoidBoundsExpander.cxx.
|
finaloverridevirtual |
Implements MuonGMR4::BoundsExpander.
Definition at line 50 of file TrapezoidBoundsExpander.cxx.
| void MuonGMR4::BoundsExpander::expand | ( | const Acts::GeometryContext & | tgContext, |
| const MuonGMR4::Chamber & | chamber ) |
Use the expand overloads w.r.t.
chamber, sector
Definition at line 74 of file BoundsExpander.cxx.
| void MuonGMR4::BoundsExpander::expand | ( | const Acts::GeometryContext & | tgContext, |
| const MuonGMR4::MuonReadoutElement & | readoutElement, | ||
| Acts::VolumeBoundFactory & | boundFactory ) |
Use the expand overloads w.r.t.
chamber, sector
Definition at line 86 of file BoundsExpander.cxx.
| void MuonGMR4::BoundsExpander::expand | ( | const Acts::GeometryContext & | tgContext, |
| const MuonGMR4::SpectrometerSector & | sector ) |
Use the expand overloads w.r.t.
chamber, sector
Definition at line 79 of file BoundsExpander.cxx.
|
private |
Moves the position of the bottom and top corner of a trapezoid side such that all vertices are enclosed.
The parallel lines are assumed to be at +-halfY. The inclined edge is tilted to enclose all vertices
| botCorner | The bottom corner to be moved |
| topCOrner | The top corner to be moved |
| side | Is the left or the right side of the trapezoid considered |
| lowPatch | First trapezoid patch to consider |
| highPatch | Last trapezoid patch to consider |
Update the slope of the tilted trapezoid edge to find the steepest one
If the point is outwards update the outer vertex and the slope
Try to decrease
Definition at line 183 of file TrapezoidBoundsExpander.cxx.
|
inherited |
|
finaloverridevirtual |
shift first the constituents by the centering transform
Hack to cope with the RPCs which may be rotated by 180 degrees around the x or z-axis in cases, they're upside down.
Find the first envelope which is a trapezoid (Needed to keep the opening angle low in EIL4/5
Implements MuonGMR4::BoundsExpander.
Definition at line 87 of file TrapezoidBoundsExpander.cxx.
|
static |
Use the makeBounds overload for the readout element.
Definition at line 59 of file BoundsExpander.cxx.
|
inherited |
Creates an empty tracking volume.
The volume will be positioned at the vertex center
| factory | The bound factory to create the bounds |
| volName | The name of the tracking volume |
Definition at line 190 of file BoundsExpander.cxx.
|
static |
Returns the vertex point from a trapezoid.
| trapezoid | Reference to the trapezoid of interest |
| side | Is the vertex on the left [-x] or positive side of the trapezoid |
| lvl | Is the vertex on the upper or the bottom edge of the trapezoid |
Definition at line 42 of file TrapezoidBoundsExpander.cxx.
|
inherited |
Returns the triplet of the maximum coordinates from the ensemble of all seen vertices.
Definition at line 111 of file BoundsExpander.cxx.
|
inherited |
Returns the triplet of the minimum coordinates from the ensemble of all seen vertices.
Definition at line 108 of file BoundsExpander.cxx.
|
inherited |
Update the center point from a list of global vertices.
| vertices | List of vertices expressed in th ATLAS frame |
Definition at line 91 of file BoundsExpander.cxx.
| void MuonGMR4::TrapezoidBoundsExpander::setMargin | ( | const double | margin | ) |
Apply an extra margin to all four bound dimensions.
| margin | The extra margin to apply to the bounds |
Definition at line 71 of file TrapezoidBoundsExpander.cxx.
| void MuonGMR4::TrapezoidBoundsExpander::setMargin | ( | const double | marginXlow, |
| const double | marginXhigh, | ||
| const double | marginY, | ||
| const double | marginZ ) |
Apply an extra margin to each individual bound side.
| marginXLow | The extra margin to apply to the halfX at low Y |
| marginXhigh | The extra margin to aplpy to the halfX at high Y |
| marginY | The extra margin to apply to the halfY |
| marginZ | The extgra margin to apply to the halfZ |
Definition at line 76 of file TrapezoidBoundsExpander.cxx.
Construct an index from [0;3] from the side and level.
Definition at line 58 of file TrapezoidBoundsExpander.cxx.
|
inherited |
Returns the transform from the ATLAS frame to the center of all seen vertices.
Definition at line 88 of file BoundsExpander.cxx.
Pipe the Level to an ostream.
Definition at line 48 of file TrapezoidBoundsExpander.h.
Pipe the Side to an ostream.
Definition at line 40 of file TrapezoidBoundsExpander.h.
|
private |
Definition at line 115 of file TrapezoidBoundsExpander.h.
|
private |
Definition at line 116 of file TrapezoidBoundsExpander.h.
|
privateinherited |
Maximum value seen by the recenter method.
Definition at line 132 of file BoundsExpander.h.
|
privateinherited |
Minimum value seen by the recenter method.
Definition at line 134 of file BoundsExpander.h.
|
privateinherited |
Definition at line 125 of file BoundsExpander.h.
|
private |
Definition at line 117 of file TrapezoidBoundsExpander.h.
|
privateinherited |
Extra shift to center all the vertices.
Definition at line 130 of file BoundsExpander.h.
|
privateinherited |
External method to go from ATLAS to the reference frame.
Definition at line 128 of file BoundsExpander.h.