File indexing completed on 2024-04-06 12:04:14
0001 #ifndef Geom_TrapezoidalPlaneBounds_H
0002 #define Geom_TrapezoidalPlaneBounds_H
0003
0004 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0005 #include "DataFormats/GeometrySurface/interface/Bounds.h"
0006 #include <array>
0007
0008
0009
0010
0011
0012
0013
0014
0015 class TrapezoidalPlaneBounds : public Bounds {
0016 public:
0017
0018
0019
0020
0021
0022
0023
0024 TrapezoidalPlaneBounds(float be, float te, float a, float t);
0025
0026
0027 float length() const override { return 2 * hapothem; }
0028
0029
0030 float width() const override { return 2 * std::max(hbotedge, htopedge); }
0031
0032
0033 float thickness() const override { return 2 * hthickness; }
0034
0035
0036
0037 float widthAtHalfLength() const override { return hbotedge + htopedge; }
0038
0039 virtual int yAxisOrientation() const;
0040
0041 using Bounds::inside;
0042
0043 bool inside(const Local2DPoint& p) const override;
0044
0045 bool inside(const Local3DPoint& p) const override;
0046
0047 bool inside(const Local3DPoint& p, const LocalError& err, float scale) const override;
0048
0049 bool inside(const Local2DPoint& p, const LocalError& err, float scale) const override;
0050
0051 float significanceInside(const Local3DPoint&, const LocalError&) const override;
0052
0053
0054
0055
0056
0057 virtual const std::array<const float, 4> parameters() const;
0058
0059 Bounds* clone() const override;
0060
0061 private:
0062
0063 float hbotedge;
0064 float htopedge;
0065 float hapothem;
0066 float hthickness;
0067
0068
0069 float offset;
0070 float tan_a;
0071 };
0072
0073 #endif