CbmRoot
CbmLitStripHit.h
Go to the documentation of this file.
1 
8 #ifndef CBMLITSTRIPHIT_H_
9 #define CBMLITSTRIPHIT_H_
10 
11 #include "data/CbmLitHit.h"
12 
13 #include <sstream>
14 #include <string>
15 
22 class CbmLitStripHit : public CbmLitHit {
23 public:
28  : fU(0.), fDu(0.), fPhi(0.), fCosPhi(0.), fSinPhi(0.), fSegment(0) {
30  }
31 
35  virtual ~CbmLitStripHit() {};
36 
37  /* Getters */
38  litfloat GetU() const { return fU; }
39  litfloat GetDu() const { return fDu; }
40  litfloat GetPhi() const { return fPhi; }
41  litfloat GetCosPhi() const { return fCosPhi; }
42  litfloat GetSinPhi() const { return fSinPhi; }
43  int GetSegment() const { return fSegment; }
44 
45  /* Setters */
46  void SetU(litfloat u) { fU = u; }
47  void SetDu(litfloat du) { fDu = du; }
48  void SetPhi(litfloat phi) { fPhi = phi; }
49  void SetCosPhi(litfloat cosPhi) { fCosPhi = cosPhi; }
50  void SetSinPhi(litfloat sinPhi) { fSinPhi = sinPhi; }
51  void SetSegment(int segment) { fSegment = segment; }
52 
57  virtual std::string ToString() const {
58  std::stringstream ss;
59  ss << "StripHit: pos=(" << GetU() << "," << GetZ() << ") err=(" << GetDu()
60  << "," << GetDz() << ") "
61  << " phi=" << GetPhi() << " cosPhi=" << GetCosPhi()
62  << " sinPhi=" << GetSinPhi() << " refId=" << GetRefId()
63  << " hitType=" << GetType() << " station=" << GetStation() << std::endl;
64  return ss.str();
65  }
66 
67 protected:
68  litfloat fU; // U measurement of the hit in [cm].
69  litfloat fDu; // U measurement error in [cm].
70  litfloat fPhi; // Strip rotation angle in [rad].
71  litfloat fCosPhi; // Cosine of strip rotation angle.
72  litfloat fSinPhi; // Sine of strip rotation angle.
73  int fSegment; // Up or down segment of straw tube.
74 };
75 
76 #endif /*CBMLITSTRIPHIT_H_*/
litfloat
double litfloat
Definition: CbmLitFloat.h:15
CbmLitStripHit::SetSinPhi
void SetSinPhi(litfloat sinPhi)
Definition: CbmLitStripHit.h:50
CbmLitStripHit::GetCosPhi
litfloat GetCosPhi() const
Definition: CbmLitStripHit.h:41
CbmLitStripHit::SetSegment
void SetSegment(int segment)
Definition: CbmLitStripHit.h:51
CbmLitStripHit::fPhi
litfloat fPhi
Definition: CbmLitStripHit.h:70
CbmLitHit::GetZ
litfloat GetZ() const
Definition: CbmLitHit.h:48
CbmLitStripHit::SetDu
void SetDu(litfloat du)
Definition: CbmLitStripHit.h:47
CbmLitHit::GetDz
litfloat GetDz() const
Definition: CbmLitHit.h:49
CbmLitHit::GetRefId
Int_t GetRefId() const
Definition: CbmLitHit.h:46
CbmLitStripHit::~CbmLitStripHit
virtual ~CbmLitStripHit()
Destructor.
Definition: CbmLitStripHit.h:35
CbmLitStripHit::GetU
litfloat GetU() const
Definition: CbmLitStripHit.h:38
CbmLitStripHit::SetCosPhi
void SetCosPhi(litfloat cosPhi)
Definition: CbmLitStripHit.h:49
CbmLitStripHit::CbmLitStripHit
CbmLitStripHit()
Constructor.
Definition: CbmLitStripHit.h:27
CbmLitStripHit::GetSegment
int GetSegment() const
Definition: CbmLitStripHit.h:43
CbmLitStripHit::fSinPhi
litfloat fSinPhi
Definition: CbmLitStripHit.h:72
CbmLitHit
Base data class for hits.
Definition: CbmLitHit.h:26
kLITSTRIPHIT
@ kLITSTRIPHIT
Definition: CbmLitEnums.h:15
CbmLitStripHit::fU
litfloat fU
Definition: CbmLitStripHit.h:68
CbmLitStripHit::GetDu
litfloat GetDu() const
Definition: CbmLitStripHit.h:39
CbmLitStripHit::GetSinPhi
litfloat GetSinPhi() const
Definition: CbmLitStripHit.h:42
CbmLitStripHit::fDu
litfloat fDu
Definition: CbmLitStripHit.h:69
CbmLitHit::SetHitType
void SetHitType(LitHitType hitType)
Definition: CbmLitHit.h:61
CbmLitHit::GetStation
Int_t GetStation() const
Definition: CbmLitHit.h:55
CbmLitStripHit::fSegment
int fSegment
Definition: CbmLitStripHit.h:73
CbmLitStripHit::GetPhi
litfloat GetPhi() const
Definition: CbmLitStripHit.h:40
CbmLitStripHit::ToString
virtual std::string ToString() const
Return string representation of class.
Definition: CbmLitStripHit.h:57
CbmLitStripHit::fCosPhi
litfloat fCosPhi
Definition: CbmLitStripHit.h:71
CbmLitStripHit::SetU
void SetU(litfloat u)
Definition: CbmLitStripHit.h:46
CbmLitStripHit
Base data class for strip hits.
Definition: CbmLitStripHit.h:22
CbmLitHit::GetType
LitHitType GetType() const
Definition: CbmLitHit.h:47
CbmLitHit.h
Base data class for hits.
CbmLitStripHit::SetPhi
void SetPhi(litfloat phi)
Definition: CbmLitStripHit.h:48