CbmRoot
LitPixelHit.h
Go to the documentation of this file.
1 
8 #ifndef LITPIXELHIT_H_
9 #define LITPIXELHIT_H_
10 
11 #include <sstream>
12 #include <string>
13 using std::ostream;
14 using std::string;
15 using std::stringstream;
16 
17 namespace lit {
18  namespace parallel {
28  template<class T>
29  class LitPixelHit {
30  public:
34  LitPixelHit() : X(0.), Y(0.), Z(0.), Dx(0.), Dy(0.), Dxy(0.) {}
35 
39  virtual ~LitPixelHit() {}
40 
45  string ToString() const {
46  stringstream ss;
47  ss << "LitPixelHit: XYZ=(" << X << "," << Y << "," << Z << ") "
48  << " Dx=" << Dx << " Dy=" << Dy << " Dxy=" << Dxy << "\n";
49  return ss.str();
50  }
51 
56  friend ostream& operator<<(ostream& strm, const LitPixelHit& hit) {
57  strm << hit.ToString();
58  return strm;
59  }
60 
61  public:
62  T X, Y, Z; // X, Y, Z position measurements [cm]
63  T Dx, Dy; // X and Y position error [cm]
64  T Dxy; // Covariance between X and Y [cm]
66 
72 
78 
79  } // namespace parallel
80 } // namespace lit
81 #endif /* LITPIXELHIT_H_ */
lit::parallel::LitPixelHitScal
LitPixelHit< fscal > LitPixelHitScal
Scalar version of LitPixelHit.
Definition: LitPixelHit.h:71
lit::parallel::LitPixelHit::X
T X
Definition: LitPixelHit.h:62
lit::parallel::LitPixelHitVec
LitPixelHit< fvec > LitPixelHitVec
Vector version of LitPixelHit.
Definition: LitPixelHit.h:77
lit::parallel::_fvecalignment
class lit::parallel::LitDetectorLayout _fvecalignment
lit::parallel::LitPixelHit::operator<<
friend ostream & operator<<(ostream &strm, const LitPixelHit &hit)
Operator << for convenient output to ostream.
Definition: LitPixelHit.h:56
lit::parallel::LitPixelHit::Dx
T Dx
Definition: LitPixelHit.h:63
lit::parallel::LitPixelHit::ToString
string ToString() const
Returns string representation of the class.
Definition: LitPixelHit.h:45
lit::parallel::LitPixelHit::Dy
T Dy
Definition: LitPixelHit.h:63
lit::parallel::LitPixelHit::Y
T Y
Definition: LitPixelHit.h:62
lit::parallel::LitPixelHit::Dxy
T Dxy
Definition: LitPixelHit.h:64
lit::parallel::LitPixelHit::Z
T Z
Definition: LitPixelHit.h:62
lit::parallel::LitPixelHit
Base class for pixel hits.
Definition: LitPixelHit.h:29
lit::parallel::LitPixelHit::LitPixelHit
LitPixelHit()
Constructor.
Definition: LitPixelHit.h:34
lit::parallel::LitPixelHit::~LitPixelHit
virtual ~LitPixelHit()
Definition: LitPixelHit.h:39
lit
Definition: LitTrackFinderNNVecElectron.h:19