ATLAS Offline Software
RotatedTrapezoidBounds.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // RotatedTrapezoidBounds.h, (c) ATLAS Detector software
8 
9 #ifndef TRKSURFACES_ROTATEDTRAPEZOIDBOUNDS_H
10 #define TRKSURFACES_ROTATEDTRAPEZOIDBOUNDS_H
11 
15 
16 #include <math.h>
17 
18 #ifdef TRKDETDESCR_USEFLOATPRECISON
19 typedef float TDD_real_t;
20 #else
21 typedef double TDD_real_t;
22 #endif
23 
24 class MsgStream;
26 
27 namespace Trk {
28 
45 {
46 
47 public:
50  {
51  bv_halfX = 0,
54  bv_length = 3
55  };
56 
59 
62 
65 
67  RotatedTrapezoidBounds(RotatedTrapezoidBounds&& trabo) noexcept = default;
68 
71 
73  virtual ~RotatedTrapezoidBounds() = default;
74 
76  RotatedTrapezoidBounds(double halex, double minhalex, double maxhalex);
78  RotatedTrapezoidBounds(double halex, double minhalex, double maxhalex, double alpha);
79 
80 
82  virtual RotatedTrapezoidBounds* clone() const override;
83 
85  virtual BoundsType type() const override { return SurfaceBounds::RotatedTrapezoid; }
86 
88  virtual bool operator==(const SurfaceBounds& trabo) const override final;
89 
91  double halflengthX() const;
92 
94  double minHalflengthY() const;
95 
97  double maxHalflengthY() const;
98 
100  virtual double r() const override;
101 
127  virtual bool inside(const Amg::Vector2D& locpo, double tol1 = 0., double tol2 = 0.) const override final;
128  virtual bool inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk) const override final;
129 
134  virtual bool insideLoc1(const Amg::Vector2D& locpo, double tol1 = 0.) const override final;
135 
140  virtual bool insideLoc2(const Amg::Vector2D& locpo, double tol2 = 0.) const override final;
141 
143  virtual double minDistance(const Amg::Vector2D& pos) const override final;
144 
146  virtual MsgStream& dump(MsgStream& sl) const override final;
147 
149  virtual std::ostream& dump(std::ostream& sl) const override final;
150 
151 private:
153 
155  bool isBelow(double locX, double fabsLocY, double tol1, double tol2) const;
156 
158  virtual void initCache() override final;
159 
166  AmgSymMatrix(2) m_rotMat{AmgSymMatrix(2)::Identity()};
167 };
168 } // end of namespace
169 
171 #endif // TRKSURFACES_TRAPEZOIDBOUNDS_H
Trk::RotatedTrapezoidBounds::r
virtual double r() const override
This method returns the maximal extension on the local plane.
Trk::RotatedTrapezoidBounds::m_boundValues
std::vector< TDD_real_t > m_boundValues
The internal storage of the bounds can be float/double.
Definition: RotatedTrapezoidBounds.h:161
Trk::RotatedTrapezoidBounds::RotatedTrapezoidBounds
RotatedTrapezoidBounds(const RotatedTrapezoidBounds &trabo)=default
Copy constructor.
Trk::SurfaceBounds::BoundsType
BoundsType
Definition: SurfaceBounds.h:59
Trk::RotatedTrapezoidBounds::isBelow
bool isBelow(double locX, double fabsLocY, double tol1, double tol2) const
isBelow() method for checking whether a point lies above or under a straight line
Definition: RotatedTrapezoidBounds.cxx:156
Trk::locX
@ locX
Definition: ParamDefs.h:43
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::SurfaceBounds
Definition: SurfaceBounds.h:47
Trk::RotatedTrapezoidBounds
Definition: RotatedTrapezoidBounds.h:45
Trk::RotatedTrapezoidBounds::operator==
virtual bool operator==(const SurfaceBounds &trabo) const override final
Equality operator.
Definition: RotatedTrapezoidBounds.cxx:52
Trk::RotatedTrapezoidBounds::BoundValues
BoundValues
Definition: RotatedTrapezoidBounds.h:50
Trk::RotatedTrapezoidBounds::insideLoc2
virtual bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const override final
This method checks inside bounds in loc2.
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
RotatedTrapezoidBoundsCnv_p1
Definition: RotatedTrapezoidBoundsCnv_p1.h:23
Trk::RotatedTrapezoidBounds::halflengthX
double halflengthX() const
This method returns the minimal halflength in X (first coordinate of local surface frame)
ParamDefs.h
Trk::RotatedTrapezoidBounds::minDistance
virtual double minDistance(const Amg::Vector2D &pos) const override final
Minimal distance to boundary ( > 0 if outside and <=0 if inside)
Definition: RotatedTrapezoidBounds.cxx:163
Trk::RotatedTrapezoidBounds::m_delta
TDD_real_t m_delta
Definition: RotatedTrapezoidBounds.h:163
Trk::RotatedTrapezoidBounds::operator=
RotatedTrapezoidBounds & operator=(const RotatedTrapezoidBounds &sbo)=default
Assignment operator.
Trk::RotatedTrapezoidBounds::clone
virtual RotatedTrapezoidBounds * clone() const override
Virtual constructor.
Trk::RotatedTrapezoidBounds::initCache
virtual void initCache() override final
Helper function for angle parameter initialization.
Definition: RotatedTrapezoidBounds.cxx:42
GeoPrimitives.h
SurfaceBounds.h
RotatedTrapezoidBounds.icc
vector
Definition: MultiHisto.h:13
Trk::RotatedTrapezoidBounds::type
virtual BoundsType type() const override
Return the type of the bounds for persistency.
Definition: RotatedTrapezoidBounds.h:85
Trk::RotatedTrapezoidBounds::bv_length
@ bv_length
Definition: RotatedTrapezoidBounds.h:54
Trk::RotatedTrapezoidBounds::bv_maxHalfY
@ bv_maxHalfY
Definition: RotatedTrapezoidBounds.h:53
Trk::RotatedTrapezoidBounds::dump
virtual MsgStream & dump(MsgStream &sl) const override final
Output Method for MsgStream.
Definition: RotatedTrapezoidBounds.cxx:217
Trk::RotatedTrapezoidBounds::operator=
RotatedTrapezoidBounds & operator=(RotatedTrapezoidBounds &&sbo) noexcept=default
Move Assignment operator.
Trk::RotatedTrapezoidBounds::bv_halfX
@ bv_halfX
Definition: RotatedTrapezoidBounds.h:51
Trk::RotatedTrapezoidBounds::maxHalflengthY
double maxHalflengthY() const
This method returns the halflength in Y (second coordinate of local surface frame)
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
Trk::RotatedTrapezoidBounds::minHalflengthY
double minHalflengthY() const
This method returns the maximal halflength in X (first coordinate of local surface frame)
Trk::RotatedTrapezoidBounds::RotatedTrapezoidBounds
RotatedTrapezoidBounds(RotatedTrapezoidBounds &&trabo) noexcept=default
Move constructor.
Trk::RotatedTrapezoidBounds::~RotatedTrapezoidBounds
virtual ~RotatedTrapezoidBounds()=default
Destructor.
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::RotatedTrapezoidBounds::m_kappa
TDD_real_t m_kappa
Definition: RotatedTrapezoidBounds.h:162
Trk::BoundaryCheck
Definition: BoundaryCheck.h:51
Trk::RotatedTrapezoidBounds::insideLoc1
virtual bool insideLoc1(const Amg::Vector2D &locpo, double tol1=0.) const override final
This method checks inside bounds in loc1.
Trk::RotatedTrapezoidBounds::bv_minHalfY
@ bv_minHalfY
Definition: RotatedTrapezoidBounds.h:52
Trk::SurfaceBounds::RotatedTrapezoid
@ RotatedTrapezoid
Definition: SurfaceBounds.h:66
Trk::RotatedTrapezoidBounds::AmgSymMatrix
AmgSymMatrix(2) m_rotMat
Transformation matrix to define surface bounds which are tilted w.r.t.
Definition: RotatedTrapezoidBounds.h:166
TDD_real_t
double TDD_real_t
Definition: RotatedTrapezoidBounds.h:21
Trk::RotatedTrapezoidBounds::inside
virtual bool inside(const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const override final
The orientation of the Trapezoid is according to the figure above, in words: the shorter of the two p...
Definition: RotatedTrapezoidBounds.cxx:134
TDD_real_t
double TDD_real_t
Definition: AnnulusBounds.h:20
Trk::RotatedTrapezoidBounds::RotatedTrapezoidBounds
RotatedTrapezoidBounds()
Default Constructor, needed for persistency.
Definition: RotatedTrapezoidBounds.cxx:19