LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
GeoCone.h
Go to the documentation of this file.
1 
14 #ifndef BASICTOOL_GEOCONE_H
15 #define BASICTOOL_GEOCONE_H
16 
19 namespace geoalgo {
27  class Cone : public HalfLine {
28 
29  public:
31  Cone();
32 
34  virtual ~Cone(){};
35 
37  Cone(const double x,
38  const double y,
39  const double z,
40  const double dirx,
41  const double diry,
42  const double dirz,
43  const double length,
44  const double radius);
45 
47  Cone(const Point_t& start, const Vector_t& dir, const double length, const double radius);
48 
49  //
50  // Getters
51  //
52  double Length() const;
53  double Radius() const;
54  double Angle() const;
55 
56  //
57  // Setters
58  //
59  void Length(const double l);
60  void Radius(const double r);
61 
62  protected:
63  double _length;
64  double _radius;
65  double _angle;
66 
67  public:
68  //
69  // Template
70  //
72  template <class T, class U>
73  Cone(const T& start, const U& dir) : Cone(Point_t(start), Vector_t(dir))
74  {}
75  };
76 
77  typedef Cone Cone_t;
78 }
79 #endif
80  // end of doxygen group
Float_t x
Definition: compare.C:6
TRandom r
Definition: spectrum.C:23
double _radius
Radius of the cone at the base.
Definition: GeoCone.h:64
double _angle
Opening Angle.
Definition: GeoCone.h:65
Class def header for a class HalfLine.
double _length
Helight (length) of the cone.
Definition: GeoCone.h:63
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:276
double Length() const
Length getter.
Definition: GeoCone.cxx:51
Cone()
Default constructor.
Definition: GeoCone.cxx:9
Representation of a 3D semi-infinite line. Defines a 3D cone with the following properties: Start po...
Definition: GeoCone.h:27
Class def header for a class Point and Vector.
Float_t radius
Definition: plot.C:23
Cone(const T &start, const U &dir)
Alternative ctor using template (3)
Definition: GeoCone.h:73
Cone Cone_t
Definition: GeoCone.h:77
virtual ~Cone()
Default destructor.
Definition: GeoCone.h:34
Representation of a 3D semi-infinite line. Defines a semi-infinite 3D line by having a start point (P...
Definition: GeoHalfLine.h:30
TDirectory * dir
Definition: macro.C:5
double Angle() const
Angle getter.
Definition: GeoCone.cxx:61
double Radius() const
Length getter.
Definition: GeoCone.cxx:56