Imperial Analysis
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Track.hh
Go to the documentation of this file.
1 #ifndef ICHiggsTauTau_Track_hh
2 #define ICHiggsTauTau_Track_hh
3 #include <stdint.h>
4 #include <vector>
5 #include "Math/Point3D.h"
6 #include "Math/Point3Dfwd.h"
7 #include "Math/Vector3D.h"
8 #include "Math/Vector3Dfwd.h"
9 #include "Math/Vector4D.h"
10 #include "Math/Vector4Dfwd.h"
11 #include "Rtypes.h"
12 
13 namespace ic {
14 
18 class Track {
19  private:
20  typedef ROOT::Math::RhoEtaPhiVector ThreeVector;
21  typedef ROOT::Math::PtEtaPhiEVector Vector;
22  typedef ROOT::Math::XYZPoint Point;
23 
24  public:
25  Track();
26  virtual ~Track();
27  virtual void Print() const;
28 
30 
31  inline ThreeVector const& momentum() const { return momentum_; }
33 
35  inline Vector vector() const {
36  return Vector(ROOT::Math::PtEtaPhiMVector(pt(), eta(), phi(), 0.13957018));
37  }
38 
40  inline Point const& ref_point() const { return ref_point_; }
41 
43  inline std::size_t id() const { return id_; }
44 
46  inline double pt() const { return momentum_.Rho(); }
47 
50  inline double energy() const { return momentum_.r(); }
51 
53  inline double eta() const { return momentum_.Eta(); }
54 
56  inline double phi() const { return momentum_.Phi(); }
57 
59  inline double vx() const { return ref_point_.x(); }
60 
62  inline double vy() const { return ref_point_.y(); }
63 
65  inline double vz() const { return ref_point_.z(); }
66 
68  inline double normalized_chi2() const { return normalized_chi2_; }
69 
71  inline int hits() const { return hits_; }
72 
74  inline int pixel_hits() const { return pixel_hits_; }
75 
78  inline double dxy(Point const& point) const {
79  return (-(vx() - point.x()) * momentum().y() +
80  (vy() - point.y()) * momentum().z()) /
81  pt();
82  }
83 
86  inline double dz(Point const& point) const {
87  return (vz() - point.z()) -
88  ((vx() - point.x()) * momentum().x() +
89  (vy() - point.y()) * momentum().y()) /
90  pt() * momentum().z() / pt();
91  }
92 
94  inline int charge() const { return charge_; }
95 
98  inline int16_t algorithm() const { return algorithm_; }
99 
101  inline double pt_err() const { return pt_err_; }
102 
104  inline int quality() const { return quality_; }
105 
107  inline int hits_miss_inner() const { return hits_miss_inner_; }
110 
112  inline void set_momentum(ThreeVector const& momentum) {
114  momentum_ = momentum;
115  }
116 
118  inline void set_ref_point(Point const& ref_point) { ref_point_ = ref_point; }
119 
121  inline void set_id(std::size_t const& id) { id_ = id; }
122 
124  inline void set_pt(double const& pt) { momentum_.SetRho(pt); }
125 
127  inline void set_eta(double const& eta) { momentum_.SetEta(eta); }
128 
130  inline void set_phi(double const& phi) { momentum_.SetPhi(phi); }
131 
133  inline void set_vx(double const& x) { ref_point_.SetX(x); }
134 
136  inline void set_vy(double const& y) { ref_point_.SetY(y); }
137 
139  inline void set_vz(double const& z) { ref_point_.SetZ(z); }
140 
142  inline void set_normalized_chi2(double const& normalized_chi2) {
143  normalized_chi2_ = normalized_chi2;
144  }
145 
147  inline void set_hits(int const& hits) {
148  hits_ = hits;
149  }
150 
152  inline void set_pixel_hits(int const& pixel_hits) {
153  pixel_hits_ = pixel_hits;
154  }
155 
157  inline void set_charge(int const& charge) { charge_ = charge; }
158 
160  inline void set_algorithm(int16_t const& algorithm) {
161  algorithm_ = algorithm;
162  }
163 
165  inline void set_pt_err(double const& pt_err) { pt_err_ = pt_err; }
166 
168  inline void set_quality(int const& quality) { quality_ = quality; }
169 
171  inline void set_hits_miss_inner(int const& hits_miss_inner) {
172  hits_miss_inner_ = hits_miss_inner;
173  }
176  private:
177  ThreeVector momentum_;
178  Point ref_point_;
179  std::size_t id_;
180  int charge_;
181 
182  double normalized_chi2_;
183  int hits_;
184  int pixel_hits_;
185 
186  int16_t algorithm_;
187  double pt_err_;
188 
189  int quality_;
190 
191  int hits_miss_inner_;
192 
193  #ifndef SKIP_CINT_DICT
194  public:
195  ClassDef(Track, 8);
196  #endif
197 };
198 
199 typedef std::vector<ic::Track> TrackCollection;
200 }
202 #endif
void set_hits_miss_inner(int const &hits_miss_inner)
hitPattern().numberOfHits(reco::HitPattern::MISSING_INNER_HITS)
Definition: Track.hh:171
double pt() const
The track transverse momentum.
Definition: Track.hh:46
void set_quality(int const &quality)
The track quality flags.
Definition: Track.hh:168
Track()
Definition: Track.cc:5
void set_phi(double const &phi)
Track azimuthal angle.
Definition: Track.hh:130
double vy() const
The y-coordinate of the PCA.
Definition: Track.hh:62
double pt_err() const
The track error.
Definition: Track.hh:101
void set_hits(int const &hits)
Number of tracker hits.
Definition: Track.hh:147
double eta() const
Track pseudorapidity.
Definition: Track.hh:53
Point const & ref_point() const
The point-of-closest-approach (PCA) of the track to the beamspot.
Definition: Track.hh:40
virtual ~Track()
Definition: Track.cc:16
double dxy(Point const &point) const
Approximate dxy Copied from DataFormats/TrackReco/interface/TrackBase.h.
Definition: Track.hh:78
double dz(Point const &point) const
Approximate dz Copied from DataFormats/TrackReco/interface/TrackBase.h.
Definition: Track.hh:86
std::size_t id() const
The unique identifier.
Definition: Track.hh:43
ClassDef(Track, 8)
int hits() const
Number of tracker hits.
Definition: Track.hh:71
std::vector< ic::Track > TrackCollection
Definition: Track.hh:199
ThreeVector const & momentum() const
The track momentum.
Definition: Track.hh:32
void set_vy(double const &y)
The y-coordinate of the PCA.
Definition: Track.hh:136
Definition: CaloJet.hh:9
int16_t algorithm() const
The tracking algorithm used to produce this track See: DataFormats/TrackReco/interface/TrackBase.h.
Definition: Track.hh:98
void set_algorithm(int16_t const &algorithm)
The tracking algorithm used to produce this track See: DataFormats/TrackReco/interface/TrackBase.h.
Definition: Track.hh:160
Vector vector() const
Create a four-vector using the pion mass hypothesis.
Definition: Track.hh:35
double energy() const
Energy under the assumption of a massless particle, e.g. .
Definition: Track.hh:50
void set_eta(double const &eta)
Track pseudorapidity.
Definition: Track.hh:127
void set_pt_err(double const &pt_err)
The track error.
Definition: Track.hh:165
void set_momentum(ThreeVector const &momentum)
The track momentum.
Definition: Track.hh:113
int charge() const
The track charge.
Definition: Track.hh:94
virtual void Print() const
Definition: Track.cc:18
int quality() const
The track quality flags.
Definition: Track.hh:104
void set_charge(int const &charge)
The track charge.
Definition: Track.hh:157
Stores limited information about the track kinematics and trajectory.
Definition: Track.hh:18
int hits_miss_inner() const
hitPattern().numberOfHits(reco::HitPattern::MISSING_INNER_HITS)
Definition: Track.hh:107
void set_vx(double const &x)
The z-coordinate of the PCA.
Definition: Track.hh:133
int pixel_hits() const
Number of pixel hits.
Definition: Track.hh:74
void set_vz(double const &z)
The z-coordinate of the PCA.
Definition: Track.hh:139
void set_id(std::size_t const &id)
The unique identifier.
Definition: Track.hh:121
void set_pt(double const &pt)
The track transverse momentum.
Definition: Track.hh:124
void set_ref_point(Point const &ref_point)
The point-of-closest-approach (PCA) of the track to the beamspot.
Definition: Track.hh:118
double phi() const
Track azimuthal angle.
Definition: Track.hh:56
void set_normalized_chi2(double const &normalized_chi2)
The normalised chi2 of the track fit.
Definition: Track.hh:142
double vz() const
The z-coordinate of the PCA.
Definition: Track.hh:65
double vx() const
The z-coordinate of the PCA.
Definition: Track.hh:59
void set_pixel_hits(int const &pixel_hits)
Number of pixel hits.
Definition: Track.hh:152
double normalized_chi2() const
The normalised chi2 of the track fit.
Definition: Track.hh:68