ATLAS Offline Software
DiscTrapezoidalBounds.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 // DiscTrapezoidalBounds.h, c) ATLAS Detector software
8 
9 #ifndef TRKSURFACES_DISCTRAPEZOIDALBOUNDS_H
10 #define TRKSURFACES_DISCTRAPEZOIDALBOUNDS_H
11 
12 // Trk
15 //
16 #include <cmath>
17 #include <math.h>
18 // Eigen
20 
21 class MsgStream;
22 
23 #ifdef TRKDETDESCR_USEFLOATPRECISON
24 typedef float TDD_real_t;
25 #else
26 typedef double TDD_real_t;
27 #endif
28 
29 namespace Trk {
30 
42 {
43 
44 public:
47  {
48  bv_rMin = 0,
49  bv_rMax = 1,
52  bv_halfY = 4,
56  bv_stereo = 8,
57  bv_length = 9
58  };
59 
62 
65 
68 
70  DiscTrapezoidalBounds(DiscTrapezoidalBounds&& disctrbo) noexcept = default;
71 
73  DiscTrapezoidalBounds& operator=(DiscTrapezoidalBounds&& disctrbo) noexcept = default;
74 
77 
79  DiscTrapezoidalBounds(double minhalfx, double maxhalfx, double rMin, double rMax, double avephi, double stereo = 0.);
80 
82  virtual bool operator==(const SurfaceBounds& sbo) const override;
83 
85  virtual DiscTrapezoidalBounds* clone() const override;
86 
89 
92  virtual bool inside(const Amg::Vector2D& locpo, double tol1 = 0., double tol2 = 0.) const override final;
93  virtual bool inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk) const override final;
94 
97  virtual bool insideLoc1(const Amg::Vector2D& locpo, double tol1 = 0.) const override final;
98 
101  virtual bool insideLoc2(const Amg::Vector2D& locpo, double tol2 = 0.) const override final;
102 
104  virtual double minDistance(const Amg::Vector2D& pos) const override final;
105 
107  double rMin() const;
108 
110  double rMax() const;
111 
113  virtual double r() const override;
114 
116  double averagePhi() const;
117 
119  double rCenter() const;
120 
122  double stereo() const;
123 
126 
129 
132 
134  double halflengthY() const;
135 
137  virtual MsgStream& dump(MsgStream& sl) const override;
138 
140  virtual std::ostream& dump(std::ostream& sl) const override;
141 
142 private:
145 };
146 
147 } // end of namespace
148 #include "TrkSurfaces/DiscTrapezoidalBounds.icc"
149 #endif // TRKSURFACES_DISCTRAPEZOIDALBOUNDS_H
Trk::DiscTrapezoidalBounds::operator=
DiscTrapezoidalBounds & operator=(DiscTrapezoidalBounds &&disctrbo) noexcept=default
Move Assignment operator.
Trk::DiscTrapezoidalBounds::bv_rMin
@ bv_rMin
Definition: DiscTrapezoidalBounds.h:48
Trk::DiscTrapezoidalBounds::clone
virtual DiscTrapezoidalBounds * clone() const override
Virtual constructor.
Trk::SurfaceBounds::BoundsType
BoundsType
Definition: SurfaceBounds.h:59
Trk::DiscTrapezoidalBounds::BoundValues
BoundValues
enumeration for readability
Definition: DiscTrapezoidalBounds.h:47
Trk::DiscTrapezoidalBounds::operator=
DiscTrapezoidalBounds & operator=(const DiscTrapezoidalBounds &disctrbo)
Assignment operator.
Definition: DiscTrapezoidalBounds.cxx:64
Trk::SurfaceBounds::DiscTrapezoidal
@ DiscTrapezoidal
Definition: SurfaceBounds.h:69
Trk::DiscTrapezoidalBounds::bv_stereo
@ bv_stereo
Definition: DiscTrapezoidalBounds.h:56
Trk::DiscTrapezoidalBounds::bv_rCenter
@ bv_rCenter
Definition: DiscTrapezoidalBounds.h:55
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::SurfaceBounds
Definition: SurfaceBounds.h:47
Trk::DiscTrapezoidalBounds::insideLoc1
virtual bool insideLoc1(const Amg::Vector2D &locpo, double tol1=0.) const override final
This method checks inside bounds in loc1.
Trk::DiscTrapezoidalBounds::halfPhiSector
double halfPhiSector() const
This method returns the halfPhiSector which is covered by the disc.
Trk::DiscTrapezoidalBounds::type
virtual SurfaceBounds::BoundsType type() const override final
Return the type - mainly for persistency.
Definition: DiscTrapezoidalBounds.h:88
Trk::DiscTrapezoidalBounds::DiscTrapezoidalBounds
DiscTrapezoidalBounds()
Default Constructor.
Definition: DiscTrapezoidalBounds.cxx:17
Trk::DiscTrapezoidalBounds::bv_maxHalfX
@ bv_maxHalfX
Definition: DiscTrapezoidalBounds.h:51
Trk::DiscTrapezoidalBounds::r
virtual double r() const override
This method returns the maximum expansion on the plane (=rMax)
Trk::DiscTrapezoidalBounds::rMin
double rMin() const
This method returns inner radius.
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Trk::DiscTrapezoidalBounds::DiscTrapezoidalBounds
DiscTrapezoidalBounds(DiscTrapezoidalBounds &&disctrbo) noexcept=default
Move constructor.
Trk::DiscTrapezoidalBounds::bv_length
@ bv_length
Definition: DiscTrapezoidalBounds.h:57
ParamDefs.h
TDD_real_t
double TDD_real_t
Definition: DiscTrapezoidalBounds.h:21
Trk::DiscTrapezoidalBounds
Definition: DiscTrapezoidalBounds.h:42
GeoPrimitives.h
SurfaceBounds.h
Trk::DiscTrapezoidalBounds::minDistance
virtual double minDistance(const Amg::Vector2D &pos) const override final
Minimal distance to boundary ( > 0 if outside and <=0 if inside)
Definition: DiscTrapezoidalBounds.cxx:329
vector
Definition: MultiHisto.h:13
Trk::DiscTrapezoidalBounds::bv_rMax
@ bv_rMax
Definition: DiscTrapezoidalBounds.h:49
Trk::DiscTrapezoidalBounds::averagePhi
double averagePhi() const
This method returns the average phi.
Trk::DiscTrapezoidalBounds::rCenter
double rCenter() const
This method returns the center radius.
Trk::DiscTrapezoidalBounds::operator==
virtual bool operator==(const SurfaceBounds &sbo) const override
Equality operator.
Definition: DiscTrapezoidalBounds.cxx:72
Trk::DiscTrapezoidalBounds::m_boundValues
std::vector< TDD_real_t > m_boundValues
Internal members of the bounds (float/double)
Definition: DiscTrapezoidalBounds.h:144
Trk::DiscTrapezoidalBounds::halflengthY
double halflengthY() const
This method returns the halflength in Y (this is Rmax -Rmin)
Trk::DiscTrapezoidalBounds::rMax
double rMax() const
This method returns outer radius.
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::DiscTrapezoidalBounds::insideLoc2
virtual bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const override final
This method checks inside bounds in loc2.
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
Trk::DiscTrapezoidalBounds::bv_minHalfX
@ bv_minHalfX
Definition: DiscTrapezoidalBounds.h:50
Trk::DiscTrapezoidalBounds::inside
virtual bool inside(const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const override final
This method cheks if the radius given in the LocalPosition is inside [rMin,rMax] if only tol1 is give...
Definition: DiscTrapezoidalBounds.cxx:82
Trk::DiscTrapezoidalBounds::bv_halfY
@ bv_halfY
Definition: DiscTrapezoidalBounds.h:52
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::DiscTrapezoidalBounds::dump
virtual MsgStream & dump(MsgStream &sl) const override
Output Method for MsgStream.
Definition: DiscTrapezoidalBounds.cxx:369
Trk::BoundaryCheck
Definition: BoundaryCheck.h:51
Trk::DiscTrapezoidalBounds::bv_averagePhi
@ bv_averagePhi
Definition: DiscTrapezoidalBounds.h:54
Trk::DiscTrapezoidalBounds::minHalflengthX
double minHalflengthX() const
This method returns the minimal halflength in X.
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
Trk::DiscTrapezoidalBounds::stereo
double stereo() const
This method returns the stereo angle.
Trk::DiscTrapezoidalBounds::maxHalflengthX
double maxHalflengthX() const
This method returns the maximal halflength in X.
Trk::DiscTrapezoidalBounds::~DiscTrapezoidalBounds
virtual ~DiscTrapezoidalBounds()=default
Destructor.
Trk::DiscTrapezoidalBounds::bv_halfPhiSector
@ bv_halfPhiSector
Definition: DiscTrapezoidalBounds.h:53
TDD_real_t
double TDD_real_t
Definition: AnnulusBounds.h:20