LCFIVertex  0.7.2
vertex_lcfi/inc/track.h
1 #ifndef LCFITRACK_H
2 #define LCFITRACK_H
3 
4 #include "../util/inc/helixrep.h"
5 #include "../util/inc/matrix.h"
6 #include "../util/inc/vector3.h"
7 #include "../util/inc/projection.h"
8 #include "jet.h"
9 
10 
12 namespace vertex_lcfi
13 {
14  using namespace vertex_lcfi::util;
15 
16  //Forward Declarations
17  class TrackState;
18  class Event;
19 
21 
26  class Track
27  {
28  public:
29 
31  Track();
32 
34 
41  Track(Event* Event, const HelixRep & HelixRep,const Vector3 & Momentum,const double & Charge, const SymMatrix5x5 & Cov,std::vector<int> hits,void* TrackNum = 0);
42 
44 
47  Event* event() const;
48 
50 
54  TrackState* makeState() const;
55 
57 
60  const HelixRep & helixRep() const;
61  HelixRep & helixRep();
62 
64 
67  double charge() const;
68 
70 
73  const Vector3 & momentum() const;
74 
76 
79  const SymMatrix5x5 & covarianceMatrix() const;
80 
82 
86  double significance(Projection Proj) const;
87 
89 
94  double signedSignificance(Projection Proj, Jet *MyJet) const;
96 
99  inline const std::vector<int> & hitsInSubDetectors() const
100  {return _NumHitsSubDetector;}
101 
102 
104 
107  void* trackingNum() const;
108 
109  private:
110  //Track Parameters
111  Event* _Event;
112  HelixRep _H;
113  Vector3 _PMomentum;
114  double _Charge;
115  SymMatrix5x5 _CovarianceMatrix;
116  std::vector<int> _NumHitsSubDetector;
117  void* _TrackingNum;
118  };
119 
120  template <class charT, class traits> inline
121  std::basic_ostream<charT,traits>& operator<<(std::basic_ostream<charT,traits>&os,const Track& ts)
122  {
123  os << "Track: " << ts.trackingNum() << " @ " << ts.helixRep() << " m:" << ts.momentum() << " q:" << ts.charge() << std::endl;
124  return os;
125  }
126 }
127 
128 
129 #endif //LCFITRACK_H
130 
const std::vector< int > & hitsInSubDetectors() const
Number of hits in each sub detector.