CbmRoot
Loading...
Searching...
No Matches
LitStripHit.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 LITSTRIPHIT_H_
13#define LITSTRIPHIT_H_
14
15#include <sstream>
16#include <string>
17
18using std::ostream;
19using std::string;
20using std::stringstream;
21
31template<class T>
33 public:
37 LitStripHit() : phiCos(0.), phiSin(0.), U(0.), Du(0.), Z(0.) {}
38
42 virtual ~LitStripHit() {}
43
48 string ToString() const
49 {
50 stringstream ss;
51 ss << "LitStripHit: phiCos=" << phiCos << " phiSin=" << phiSin << " U=" << U << " Du=" << Du << " Z=" << Z << "\n";
52 return ss.str();
53 }
54
59 friend ostream& operator<<(ostream& strm, const LitStripHit& hit)
60 {
61 strm << hit.ToString();
62 return strm;
63 }
64
65 public:
66 T phiCos; // Cosine of strip rotation angle
67 T phiSin; // Sine of strip rotation angle
68 T U; // U measurement [cm]
69 T Du; // U measurement error [cm]
70 T Z; // Z position of the hit
72
78
84
85#endif /* LITSTRIPHIT_H_ */
class LitStripHit _fvecalignment
LitStripHit< fscal > LitStripHitScal
Scalar version of LitStripHit.
Definition LitStripHit.h:77
LitStripHit< fvec > LitStripHitVec
Vector version of LitStripHit.
Definition LitStripHit.h:83
Base class for strip hits.
Definition LitStripHit.h:32
friend ostream & operator<<(ostream &strm, const LitStripHit &hit)
Operator << for convenient output to ostream.
Definition LitStripHit.h:59
virtual ~LitStripHit()
Destructor.
Definition LitStripHit.h:42
string ToString() const
Returns string representation of the class.
Definition LitStripHit.h:48
LitStripHit()
Constructor.
Definition LitStripHit.h:37