CbmRoot
LitTrack.h
Go to the documentation of this file.
1 
7 #ifndef LITTRACK_H_
8 #define LITTRACK_H_
9 
10 #include "LitPixelHit.h"
11 #include "LitTrackParam.h"
12 #include "LitTypes.h"
13 
14 #include <sstream>
15 #include <string>
16 #include <vector>
17 using std::string;
18 using std::stringstream;
19 using std::vector;
20 
21 namespace lit {
22  namespace parallel {
23 
30  template<class T>
31  class LitTrack {
32  public:
36  LitTrack() : paramLast(), chiSq(0.) { hits.reserve(30); }
37 
41  virtual ~LitTrack() {}
42 
47  void AddHit(LitPixelHit<T>* hit) { hits.push_back(hit); }
48 
53  unsigned short GetNofHits() const { return hits.size(); }
54 
59  string ToString() const {
60  stringstream ss;
61  ss << "LitTrack: nofHits=" << GetNofHits() << " chiSq=" << chiSq
62  << " paramLast=" << paramLast.ToString() << "\n";
63  return ss.str();
64  }
65 
70  friend ostream& operator<<(ostream& strm, const LitTrack& track) {
71  strm << track.ToString();
72  return strm;
73  }
74 
75  public:
76  LitTrackParam<T> paramLast; // Last parameter of the track
77  vector<LitPixelHit<T>*> hits; // Array of hits
78  fscal chiSq; // chi-square of the track
80 
86 
92 
93  } // namespace parallel
94 } // namespace lit
95 #endif /* LITTRACK_H_ */
fscal
float fscal
Definition: L1/vectors/P4_F32vec4.h:250
lit::parallel::LitTrack::operator<<
friend ostream & operator<<(ostream &strm, const LitTrack &track)
Operator << for convenient output to ostream.
Definition: LitTrack.h:70
LitPixelHit.h
Base class for pixel hits.
lit::parallel::_fvecalignment
class lit::parallel::LitDetectorLayout _fvecalignment
lit::parallel::LitTrack::ToString
string ToString() const
Returns string representation of the class.
Definition: LitTrack.h:59
LitTrackParam.h
Track parameters data class.
lit::parallel::LitTrackScal
LitTrack< fscal > LitTrackScal
Scalar version of the LitTrack class.
Definition: LitTrack.h:91
LitTypes.h
Header files for SSE operations.
lit::parallel::LitTrackParam
Track parameters data class.
Definition: LitTrackParam.h:34
lit::parallel::LitTrack::paramLast
LitTrackParam< T > paramLast
Definition: LitTrack.h:76
lit::parallel::LitTrack
Base track data class.
Definition: LitTrack.h:31
lit::parallel::LitTrack::GetNofHits
unsigned short GetNofHits() const
Return number of hits in track.
Definition: LitTrack.h:53
lit::parallel::LitTrackVec
LitTrack< fvec > LitTrackVec
Vector version of the LitTrack class.
Definition: LitTrack.h:85
lit::parallel::LitTrack::AddHit
void AddHit(LitPixelHit< T > *hit)
Adds hit to track.
Definition: LitTrack.h:47
lit::parallel::LitTrack::~LitTrack
virtual ~LitTrack()
Destructor.
Definition: LitTrack.h:41
lit::parallel::LitTrack::hits
vector< LitPixelHit< T > * > hits
Definition: LitTrack.h:77
lit::parallel::LitTrack::LitTrack
LitTrack()
Constructor.
Definition: LitTrack.h:36
lit::parallel::LitPixelHit
Base class for pixel hits.
Definition: LitPixelHit.h:29
lit::parallel::LitTrack::chiSq
fscal chiSq
Definition: LitTrack.h:78
lit
Definition: LitTrackFinderNNVecElectron.h:19