EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmStripHit.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmStripHit.cxx
1 
7 #include "CbmStripHit.h"
8 
9 #include "TVector3.h"
10 
11 #include <sstream>
12 using std::stringstream;
13 using std::endl;
14 
16  CbmBaseHit(),
17  fU(0.),
18  fPhi(0.),
19  fDu(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  fPhi(phi),
37  fDu(du),
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  fPhi(pos.Y()),
55  fDu(err.X()),
56  fDphi(err.Y())
57 {
59  SetAddress(address);
60  SetZ(pos.Z());
61  SetDz(err.Z());
62  SetRefId(refId);
63 }
64 
66 {
67 }
68 
69 string CbmStripHit::ToString() const
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 }
78