CbmRoot
Loading...
Searching...
No Matches
LitTrack.h
Go to the documentation of this file.
1/* Copyright (C) 2009-2013 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
11#ifndef LITTRACK_H_
12#define LITTRACK_H_
13
14#include "LitPixelHit.h"
15#include "LitTrackParam.h"
16#include "LitTypes.h"
17
18#include <sstream>
19#include <string>
20#include <vector>
21using std::string;
22using std::stringstream;
23using std::vector;
24
25namespace lit
26{
27 namespace parallel
28 {
29
36 template<class T>
37 class LitTrack {
38 public:
42 LitTrack() : paramLast(), chiSq(0.) { hits.reserve(30); }
43
47 virtual ~LitTrack() {}
48
53 void AddHit(LitPixelHit<T>* hit) { hits.push_back(hit); }
54
59 unsigned short GetNofHits() const { return hits.size(); }
60
65 string ToString() const
66 {
67 stringstream ss;
68 ss << "LitTrack: nofHits=" << GetNofHits() << " chiSq=" << chiSq << " paramLast=" << paramLast.ToString()
69 << "\n";
70 return ss.str();
71 }
72
77 friend ostream& operator<<(ostream& strm, const LitTrack& track)
78 {
79 strm << track.ToString();
80 return strm;
81 }
82
83 public:
84 LitTrackParam<T> paramLast; // Last parameter of the track
85 vector<LitPixelHit<T>*> hits; // Array of hits
86 fscal chiSq; // chi-square of the track
88
94
100
101 } // namespace parallel
102} // namespace lit
103#endif /* LITTRACK_H_ */
Base class for pixel hits.
Track parameters data class.
Header files for SSE operations.
Base class for pixel hits.
Definition LitPixelHit.h:35
Track parameters data class.
Base track data class.
Definition LitTrack.h:37
LitTrack()
Constructor.
Definition LitTrack.h:42
unsigned short GetNofHits() const
Return number of hits in track.
Definition LitTrack.h:59
vector< LitPixelHit< T > * > hits
Definition LitTrack.h:85
void AddHit(LitPixelHit< T > *hit)
Adds hit to track.
Definition LitTrack.h:53
virtual ~LitTrack()
Destructor.
Definition LitTrack.h:47
string ToString() const
Returns string representation of the class.
Definition LitTrack.h:65
friend ostream & operator<<(ostream &strm, const LitTrack &track)
Operator << for convenient output to ostream.
Definition LitTrack.h:77
LitTrackParam< T > paramLast
Definition LitTrack.h:84
class lit::parallel::LitDetectorLayout _fvecalignment
LitTrack< fvec > LitTrackVec
Vector version of the LitTrack class.
Definition LitTrack.h:93
LitTrack< fscal > LitTrackScal
Scalar version of the LitTrack class.
Definition LitTrack.h:99