EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CbmPixelHit.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CbmPixelHit.cxx
1
6
#include "
CbmPixelHit.h
"
7
8
#include <sstream>
9
using
std::stringstream;
10
using
std::endl;
11
12
CbmPixelHit::CbmPixelHit
():
13
CbmBaseHit
(),
14
fX
(0.),
15
fY
(0.),
16
fDx(0.),
17
fDy(0.),
18
fDxy(0.)
19
{
20
SetType
(
kPIXELHIT
);
21
}
22
23
CbmPixelHit::CbmPixelHit
(
24
Int_t address,
25
Double_t
x
,
26
Double_t
y
,
27
Double_t
z
,
28
Double_t
dx
,
29
Double_t
dy
,
30
Double_t
dz
,
31
Double_t dxy,
32
Int_t refId):
33
CbmBaseHit
(),
34
fX
(x),
35
fY
(y),
36
fDx(dx),
37
fDy(dy),
38
fDxy(dxy)
39
{
40
SetType
(
kPIXELHIT
);
41
SetAddress
(address);
42
SetZ
(z);
43
SetDz
(dz);
44
SetRefId
(refId);
45
}
46
47
CbmPixelHit::CbmPixelHit
(
48
Int_t address,
49
const
TVector3&
pos
,
50
const
TVector3&
err
,
51
Double_t dxy,
52
Int_t refId):
53
CbmBaseHit
(),
54
fX
(pos.X()),
55
fY
(pos.Y()),
56
fDx(err.X()),
57
fDy(err.Y()),
58
fDxy(dxy)
59
{
60
SetType
(
kPIXELHIT
);
61
SetAddress
(address);
62
SetZ
(pos.Z());
63
SetDz
(err.Z());
64
SetRefId
(refId);
65
}
66
67
CbmPixelHit::~CbmPixelHit
()
68
{
69
}
70
71
string
CbmPixelHit::ToString
()
const
72
{
73
stringstream ss;
74
ss <<
"CbmPixelHit: address="
<<
GetAddress
()
75
<<
" pos=("
<<
GetX
() <<
","
<<
GetY
() <<
","
<<
GetZ
()
76
<<
") err=("
<<
GetDx
() <<
","
<<
GetDy
() <<
","
<<
GetDz
()
77
<<
") dxy="
<<
GetDxy
() <<
" refId="
<<
GetRefId
() << endl;
78
return
ss.str();
79
}
80
81
void
CbmPixelHit::Position
(TVector3&
pos
)
const
82
{
83
pos.SetXYZ(
GetX
(),
GetY
(),
GetZ
());
84
}
85
86
void
CbmPixelHit::PositionError
(TVector3& dpos)
const
87
{
88
dpos.SetXYZ(
GetDx
(),
GetDy
(),
GetDz
());
89
}
90
91
void
CbmPixelHit::SetPosition
(
const
TVector3&
pos
)
92
{
93
SetX
(pos.X());
94
SetY
(pos.Y());
95
SetZ
(pos.Z());
96
}
97
98
void
CbmPixelHit::SetPositionError
(
const
TVector3& dpos)
99
{
100
SetDx
(dpos.X());
101
SetDy
(dpos.Y());
102
SetDz
(dpos.Z());
103
}
104
105
ClassImp
(
CbmPixelHit
);
EicRoot
blob
master
cbmdata
CbmPixelHit.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:33
using
1.8.2 with
EIC GitHub integration