CMS 3D CMS Logo

RectangularPlaneBounds.h
Go to the documentation of this file.
1 #ifndef Geom_RectangularPlaneBounds_H
2 #define Geom_RectangularPlaneBounds_H
3 
6 
12 class RectangularPlaneBounds final : public Bounds {
13 public:
16  RectangularPlaneBounds(float w, float h, float t);
17  ~RectangularPlaneBounds() override;
18 
20  float length() const override { return 2 * halfLength; }
22  float width() const override { return 2 * halfWidth; }
24  float thickness() const override { return 2 * halfThickness; }
25 
26  // basic bounds function
27  using Bounds::inside;
28 
29  bool inside(const Local2DPoint& p) const override {
30  return (std::abs(p.x()) < halfWidth) & (std::abs(p.y()) < halfLength);
31  }
32 
33  bool inside(const Local3DPoint& p) const override {
34  return (std::abs(p.x()) < halfWidth) & (std::abs(p.y()) < halfLength) & (std::abs(p.z()) < halfThickness);
35  }
36 
37  bool inside(const Local2DPoint& p, float tollerance) const override {
38  return (std::abs(p.x()) < (halfWidth + tollerance)) & (std::abs(p.y()) < (halfLength + tollerance));
39  }
40 
41  bool inside(const Local3DPoint& p, const LocalError& err, float scale = 1.f) const override;
42 
43  bool inside(const Local2DPoint& p, const LocalError& err, float scale = 1.f) const override;
44 
45  float significanceInside(const Local3DPoint&, const LocalError&) const override;
46 
47  // compatible of being inside or outside...
48  std::pair<bool, bool> inout(const Local3DPoint& p, const LocalError& err, float scale = 1.f) const;
49 
50  Bounds* clone() const override;
51 
52 private:
53  float halfWidth;
54  float halfLength;
56 };
57 
58 #endif
Point2DBase< float, LocalTag >
RectangularPlaneBounds::RectangularPlaneBounds
RectangularPlaneBounds(float w, float h, float t)
Definition: RectangularPlaneBounds.cc:5
RectangularPlaneBounds::~RectangularPlaneBounds
~RectangularPlaneBounds() override
Definition: RectangularPlaneBounds.cc:8
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
RectangularPlaneBounds::halfWidth
float halfWidth
Definition: RectangularPlaneBounds.h:53
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
RectangularPlaneBounds::halfLength
float halfLength
Definition: RectangularPlaneBounds.h:54
Bounds
Definition: Bounds.h:18
RectangularPlaneBounds::width
float width() const override
Width along local X.
Definition: RectangularPlaneBounds.h:22
RectangularPlaneBounds::clone
Bounds * clone() const override
Definition: RectangularPlaneBounds.cc:43
Bounds::inside
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
w
const double w
Definition: UKUtility.cc:23
RectangularPlaneBounds::inside
bool inside(const Local2DPoint &p) const override
Definition: RectangularPlaneBounds.h:29
h
Bounds.h
Point3DBase< float, LocalTag >
RectangularPlaneBounds::length
float length() const override
Lenght along local Y.
Definition: RectangularPlaneBounds.h:20
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
RectangularPlaneBounds::inside
bool inside(const Local2DPoint &p, float tollerance) const override
Determine if a point is inside the bounds, taking a tollerance into account.
Definition: RectangularPlaneBounds.h:37
LocalError
Definition: LocalError.h:12
RectangularPlaneBounds::halfThickness
float halfThickness
Definition: RectangularPlaneBounds.h:55
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
RectangularPlaneBounds::significanceInside
float significanceInside(const Local3DPoint &, const LocalError &) const override
Definition: RectangularPlaneBounds.cc:24
RectangularPlaneBounds
Definition: RectangularPlaneBounds.h:12
LocalPoint.h
RectangularPlaneBounds::inside
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
Definition: RectangularPlaneBounds.h:33
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
RectangularPlaneBounds::thickness
float thickness() const override
Thickness of the volume in local Z.
Definition: RectangularPlaneBounds.h:24
RectangularPlaneBounds::inout
std::pair< bool, bool > inout(const Local3DPoint &p, const LocalError &err, float scale=1.f) const
Definition: RectangularPlaneBounds.cc:29