File indexing completed on 2024-04-06 12:04:14
0001 #ifndef Geom_SimpleCylinderBounds_H
0002 #define Geom_SimpleCylinderBounds_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0015 #include "DataFormats/GeometrySurface/interface/Bounds.h"
0016 #include <cmath>
0017 #include <algorithm>
0018
0019 class SimpleCylinderBounds final : public Bounds {
0020 public:
0021 SimpleCylinderBounds(float rmin, float rmax, float zmin, float zmax);
0022
0023
0024 float length() const override { return theZmax - theZmin; }
0025
0026 float width() const override { return 2 * theRmax; }
0027
0028 float thickness() const override { return theRmax - theRmin; }
0029
0030 using Bounds::inside;
0031 bool inside(const Local3DPoint& p) const override;
0032
0033 bool inside(const Local3DPoint& p, const LocalError& err, float scale) const override;
0034
0035 virtual bool inside(const Local2DPoint& p, const LocalError& err) const;
0036
0037 Bounds* clone() const override;
0038
0039 private:
0040 float theRmin;
0041 float theRmax;
0042 float theZmin;
0043 float theZmax;
0044 };
0045
0046 #endif