CbmRoot
Loading...
Searching...
No Matches
LitPixelHit.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
12#ifndef LITPIXELHIT_H_
13#define LITPIXELHIT_H_
14
15#include <sstream>
16#include <string>
17using std::ostream;
18using std::string;
19using std::stringstream;
20
21namespace lit
22{
23 namespace parallel
24 {
34 template<class T>
36 public:
40 LitPixelHit() : X(0.), Y(0.), Z(0.), Dx(0.), Dy(0.), Dxy(0.) {}
41
45 virtual ~LitPixelHit() {}
46
51 string ToString() const
52 {
53 stringstream ss;
54 ss << "LitPixelHit: XYZ=(" << X << "," << Y << "," << Z << ") "
55 << " Dx=" << Dx << " Dy=" << Dy << " Dxy=" << Dxy << "\n";
56 return ss.str();
57 }
58
63 friend ostream& operator<<(ostream& strm, const LitPixelHit& hit)
64 {
65 strm << hit.ToString();
66 return strm;
67 }
68
69 public:
70 T X, Y, Z; // X, Y, Z position measurements [cm]
71 T Dx, Dy; // X and Y position error [cm]
72 T Dxy; // Covariance between X and Y [cm]
74
80
86
87 } // namespace parallel
88} // namespace lit
89#endif /* LITPIXELHIT_H_ */
Base class for pixel hits.
Definition LitPixelHit.h:35
friend ostream & operator<<(ostream &strm, const LitPixelHit &hit)
Operator << for convenient output to ostream.
Definition LitPixelHit.h:63
string ToString() const
Returns string representation of the class.
Definition LitPixelHit.h:51
class lit::parallel::LitDetectorLayout _fvecalignment
LitPixelHit< fscal > LitPixelHitScal
Scalar version of LitPixelHit.
Definition LitPixelHit.h:79
LitPixelHit< fvec > LitPixelHitVec
Vector version of LitPixelHit.
Definition LitPixelHit.h:85