File indexing completed on 2024-04-06 12:04:14
0001 #ifndef Geom_Cone_H
0002 #define Geom_Cone_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "DataFormats/GeometrySurface/interface/Surface.h"
0016
0017 class Cone final : public Surface {
0018 public:
0019 template <typename... Args>
0020 Cone(const PositionType& vert, Geom::Theta<Scalar> angle, Args&&... args)
0021 : Surface(std::forward<Args>(args)...), theVertex(vert), theAngle(angle) {}
0022
0023 typedef ReferenceCountingPointer<Cone> ConePointer;
0024 typedef ReferenceCountingPointer<Cone> ConstConePointer;
0025
0026
0027
0028
0029 static ConePointer build(const PositionType& pos,
0030 const RotationType& rot,
0031 const PositionType& vert,
0032 Geom::Theta<Scalar> angle) {
0033 return ConePointer(new Cone(vert, angle, pos, rot));
0034 }
0035
0036
0037
0038
0039
0040
0041 Cone(const PositionType& pos, const RotationType& rot, const PositionType& vert, Geom::Theta<Scalar> angle)
0042 : Surface(pos, rot), theVertex(vert), theAngle(angle) {}
0043
0044
0045
0046
0047 GlobalPoint vertex() const { return theVertex; }
0048
0049
0050 Geom::Theta<float> openingAngle() const { return theAngle; }
0051
0052
0053
0054 Side side(const LocalPoint& p, Scalar tolerance) const override { return side(toGlobal(p), tolerance); }
0055 Side side(const GlobalPoint& p, Scalar tolerance) const override;
0056
0057
0058 ConstReferenceCountingPointer<TangentPlane> tangentPlane(const GlobalPoint&) const override;
0059
0060 ConstReferenceCountingPointer<TangentPlane> tangentPlane(const LocalPoint&) const override;
0061
0062 private:
0063 GlobalPoint theVertex;
0064 Geom::Theta<Scalar> theAngle;
0065 };
0066
0067 #endif