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