CbmRoot
LitStripHit.h
Go to the documentation of this file.
1 
8 #ifndef LITSTRIPHIT_H_
9 #define LITSTRIPHIT_H_
10 
11 #include <sstream>
12 #include <string>
13 
14 using std::ostream;
15 using std::string;
16 using std::stringstream;
17 
27 template<class T>
28 class LitStripHit {
29 public:
33  LitStripHit() : phiCos(0.), phiSin(0.), U(0.), Du(0.), Z(0.) {}
34 
38  virtual ~LitStripHit() {}
39 
44  string ToString() const {
45  stringstream ss;
46  ss << "LitStripHit: phiCos=" << phiCos << " phiSin=" << phiSin << " U=" << U
47  << " Du=" << Du << " Z=" << Z << "\n";
48  return ss.str();
49  }
50 
55  friend ostream& operator<<(ostream& strm, const LitStripHit& hit) {
56  strm << hit.ToString();
57  return strm;
58  }
59 
60 public:
61  T phiCos; // Cosine of strip rotation angle
62  T phiSin; // Sine of strip rotation angle
63  T U; // U measurement [cm]
64  T Du; // U measurement error [cm]
65  T Z; // Z position of the hit
67 
73 
79 
80 #endif /* LITSTRIPHIT_H_ */
LitStripHit::ToString
string ToString() const
Returns string representation of the class.
Definition: LitStripHit.h:44
LitStripHit::LitStripHit
LitStripHit()
Constructor.
Definition: LitStripHit.h:33
_fvecalignment
class LitStripHit _fvecalignment
LitStripHit::Du
T Du
Definition: LitStripHit.h:64
LitStripHitScal
LitStripHit< fscal > LitStripHitScal
Scalar version of LitStripHit.
Definition: LitStripHit.h:72
LitStripHitVec
LitStripHit< fvec > LitStripHitVec
Vector version of LitStripHit.
Definition: LitStripHit.h:78
LitStripHit
Base class for strip hits.
Definition: LitStripHit.h:28
LitStripHit::phiSin
T phiSin
Definition: LitStripHit.h:62
LitStripHit::phiCos
T phiCos
Definition: LitStripHit.h:61
LitStripHit::U
T U
Definition: LitStripHit.h:63
LitStripHit::~LitStripHit
virtual ~LitStripHit()
Destructor.
Definition: LitStripHit.h:38
LitStripHit::Z
T Z
Definition: LitStripHit.h:65
LitStripHit::operator<<
friend ostream & operator<<(ostream &strm, const LitStripHit &hit)
Operator << for convenient output to ostream.
Definition: LitStripHit.h:55