BmnRoot
Loading...
Searching...
No Matches
CbmStripHit.cxx
Go to the documentation of this file.
1
7#include "CbmStripHit.h"
8
9#include "TVector3.h"
10
11#include <sstream>
12using std::stringstream;
13using std::endl;
14
16 CbmBaseHit(),
17 fU(0.),
18 fDu(0.),
19 fPhi(0.),
20 fDphi(0.)
21{
23}
24
26 Int_t address,
27 Double_t u,
28 Double_t phi,
29 Double_t z,
30 Double_t du,
31 Double_t dphi,
32 Double_t dz,
33 Int_t refId):
34 CbmBaseHit(),
35 fU(u),
36 fDu(du),
37 fPhi(phi),
38 fDphi(dphi)
39{
41 SetAddress(address);
42 SetZ(z);
43 SetDz(dz);
44 SetRefId(refId);
45}
46
48 Int_t address,
49 const TVector3& pos,
50 const TVector3& err,
51 Int_t refId):
52 CbmBaseHit(),
53 fU(pos.X()),
54 fDu(err.X()),
55 fPhi(pos.Y()),
56 fDphi(err.Y())
57{
59 SetAddress(address);
60 SetZ(pos.Z());
61 SetDz(err.Z());
62 SetRefId(refId);
63}
64
68
70{
71 stringstream ss;
72 ss << "CbmStripHit: address=" << GetAddress()
73 << " pos=(" << GetU() << "," << GetPhi() << "," << GetZ()
74 << ") err=(" << GetDu() << "," << GetDphi() << "," << GetDz()
75 << ") refId=" << GetRefId() << endl;
76 return ss.str();
77}
@ kSTRIPHIT_o
Definition CbmBaseHit.h:17
Double_t GetZ() const
Definition CbmBaseHit.h:48
Double_t GetDz() const
Definition CbmBaseHit.h:49
Int_t GetAddress() const
Definition CbmBaseHit.h:51
void SetRefId(Int_t refId)
Definition CbmBaseHit.h:57
Int_t GetRefId() const
Definition CbmBaseHit.h:50
void SetDz(Double_t dz)
Definition CbmBaseHit.h:56
void SetZ(Double_t z)
Definition CbmBaseHit.h:55
void SetAddress(Int_t address)
Definition CbmBaseHit.h:58
void SetType(HitType_o type)
Sets hit type.
Definition CbmBaseHit.h:80
CbmStripHit()
Default constructor.
Double_t GetDphi() const
Definition CbmStripHit.h:73
Double_t GetPhi() const
Definition CbmStripHit.h:71
virtual string ToString() const
Inherited from CbmBaseHit.
Double_t GetU() const
Definition CbmStripHit.h:70
Double_t GetDu() const
Definition CbmStripHit.h:72
virtual ~CbmStripHit()
Destructor.