Imperial Analysis
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Vertex.hh
Go to the documentation of this file.
1 #ifndef ICHiggsTauTau_Vertex_hh
2 #define ICHiggsTauTau_Vertex_hh
3 #include <utility>
4 #include <vector>
5 #include "Math/Point3D.h"
6 #include "Math/Point3Dfwd.h"
7 #include "Rtypes.h"
8 
9 namespace ic {
10 
15 class Vertex {
16  private:
17  typedef ROOT::Math::XYZPoint Point;
18  typedef std::pair<std::size_t, float> TrkPair;
19 
20  public:
21  Vertex();
22  virtual ~Vertex();
23  virtual void Print() const;
24 
26 
27  inline Point const& point() const { return point_; }
29 
31  inline std::size_t id() const { return id_; }
32 
34  inline float vx() const { return point_.x(); }
35 
37  inline float vy() const { return point_.y(); }
38 
40  inline float vz() const { return point_.z(); }
41 
43  inline float chi2() const { return chi2_; }
44 
46  inline float ndof() const { return ndof_; }
47 
50  inline std::vector<std::pair<std::size_t, float> > const& tracks() const {
51  return tracks_;
52  }
55 
58  inline void set_point(Point const& point) { point_ = point; }
60 
62  inline void set_id(std::size_t const& id) { id_ = id; }
63 
65  inline void set_vx(float const& x) { point_.SetX(x); }
66 
68  inline void set_vy(float const& y) { point_.SetY(y); }
69 
71  inline void set_vz(float const& z) { point_.SetZ(z); }
72 
74  inline void set_chi2(float const& chi2) { chi2_ = chi2; }
75 
77  inline void set_ndof(float const& ndof) { ndof_ = ndof; }
78 
80  inline void set_tracks(
81  std::vector<std::pair<std::size_t, float> > const& tracks) {
82  tracks_ = tracks;
83  }
84 
86  inline void AddTrack(std::size_t id, float weight) {
87  tracks_.push_back(std::make_pair(id, weight));
88  }
91  private:
92  Point point_;
93  float chi2_;
94  float ndof_;
95  std::vector<TrkPair> tracks_;
96  std::size_t id_;
97 
98  #ifndef SKIP_CINT_DICT
99  public:
100  ClassDef(Vertex, 2);
101  #endif
102 };
103 
104 typedef std::vector<ic::Vertex> VertexCollection;
105 }
107 #endif
std::size_t id() const
Unique identifier.
Definition: Vertex.hh:31
void set_vz(float const &z)
Vertex z-coordinate.
Definition: Vertex.hh:71
void set_vx(float const &x)
Vertex x-coordinate.
Definition: Vertex.hh:65
float vz() const
Vertex z-coordinate.
Definition: Vertex.hh:40
std::vector< std::pair< std::size_t, float > > const & tracks() const
A vector of track information pairs, where each contains an ic::Track::id() and the weight of that tr...
Definition: Vertex.hh:50
std::vector< ic::Vertex > VertexCollection
Definition: Vertex.hh:104
float ndof() const
The number-of-degrees-of-freedom in the vertex fit.
Definition: Vertex.hh:46
void set_ndof(float const &ndof)
The number-of-degrees-of-freedom in the vertex fit.
Definition: Vertex.hh:77
float vx() const
Vertex x-coordinate.
Definition: Vertex.hh:34
virtual ~Vertex()
Definition: Vertex.cc:7
virtual void Print() const
Definition: Vertex.cc:9
void set_tracks(std::vector< std::pair< std::size_t, float > > const &tracks)
A vector of track information pairs, where each contains an ic::Track::id() and the weight of that tr...
Definition: Vertex.hh:80
Definition: CaloJet.hh:9
Vertex()
Definition: Vertex.cc:5
void set_id(std::size_t const &id)
Unique identifier.
Definition: Vertex.hh:62
void set_chi2(float const &chi2)
The of the vertex fit.
Definition: Vertex.hh:74
void AddTrack(std::size_t id, float weight)
Add an ic::Track::id with a vertex fit weight.
Definition: Vertex.hh:86
float chi2() const
The of the vertex fit.
Definition: Vertex.hh:43
Point const & point() const
The vertex position co-ordinates.
Definition: Vertex.hh:28
void set_point(Point const &point)
The vertex position co-ordinates.
Definition: Vertex.hh:59
ClassDef(Vertex, 2)
float vy() const
Vertex y-coordinate.
Definition: Vertex.hh:37
void set_vy(float const &y)
Vertex y-coordinate.
Definition: Vertex.hh:68
Stores information about the position of an event vertex and the quality of the track fit...
Definition: Vertex.hh:15