CbmRoot
Loading...
Searching...
No Matches
CbmLitStripHit.h
Go to the documentation of this file.
1/* Copyright (C) 2008-2013 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
12#ifndef CBMLITSTRIPHIT_H_
13#define CBMLITSTRIPHIT_H_
14
15#include "data/CbmLitHit.h"
16
17#include <sstream>
18#include <string>
19
26class CbmLitStripHit : public CbmLitHit {
27 public:
31 CbmLitStripHit() : fU(0.), fDu(0.), fPhi(0.), fCosPhi(0.), fSinPhi(0.), fSegment(0) { SetHitType(kLITSTRIPHIT); }
32
36 virtual ~CbmLitStripHit(){};
37
38 /* Getters */
39 litfloat GetU() const { return fU; }
40 litfloat GetDu() const { return fDu; }
41 litfloat GetPhi() const { return fPhi; }
42 litfloat GetCosPhi() const { return fCosPhi; }
43 litfloat GetSinPhi() const { return fSinPhi; }
44 int GetSegment() const { return fSegment; }
45
46 /* Setters */
47 void SetU(litfloat u) { fU = u; }
48 void SetDu(litfloat du) { fDu = du; }
49 void SetPhi(litfloat phi) { fPhi = phi; }
50 void SetCosPhi(litfloat cosPhi) { fCosPhi = cosPhi; }
51 void SetSinPhi(litfloat sinPhi) { fSinPhi = sinPhi; }
52 void SetSegment(int segment) { fSegment = segment; }
53
58 virtual std::string ToString() const
59 {
60 std::stringstream ss;
61 ss << "StripHit: pos=(" << GetU() << "," << GetZ() << ") err=(" << GetDu() << "," << GetDz() << ") "
62 << " phi=" << GetPhi() << " cosPhi=" << GetCosPhi() << " 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_*/
@ kLITSTRIPHIT
Definition CbmLitEnums.h:20
double litfloat
Definition CbmLitFloat.h:19
Base data class for hits.
Base data class for hits.
Definition CbmLitHit.h:29
litfloat GetZ() const
Definition CbmLitHit.h:44
void SetHitType(LitHitType hitType)
Definition CbmLitHit.h:53
LitHitType GetType() const
Definition CbmLitHit.h:43
litfloat GetDz() const
Definition CbmLitHit.h:45
Int_t GetStation() const
Definition CbmLitHit.h:49
Int_t GetRefId() const
Definition CbmLitHit.h:42
Base data class for strip hits.
void SetSinPhi(litfloat sinPhi)
void SetCosPhi(litfloat cosPhi)
void SetDu(litfloat du)
CbmLitStripHit()
Constructor.
virtual ~CbmLitStripHit()
Destructor.
virtual std::string ToString() const
Return string representation of class.
litfloat GetPhi() const
litfloat GetU() const
void SetSegment(int segment)
litfloat GetSinPhi() const
litfloat GetCosPhi() const
void SetU(litfloat u)
void SetPhi(litfloat phi)
litfloat GetDu() const
int GetSegment() const