BmnRoot
Loading...
Searching...
No Matches
BmnPixelHit.cxx
Go to the documentation of this file.
1
7#include "BmnPixelHit.h"
8
9#include <sstream>
10using std::stringstream;
11using std::endl;
12
14 : BmnPixelHit(-1, 0., 0., 0.,
15 0., 0., 0., 0., -1)
16{
17}
18
20 Int_t address,
21 const TVector3& pos,
22 const TVector3& err,
23 Double_t dxy,
24 Int_t refId,
25 Double_t time,
26 Double_t timeError)
27 : BmnPixelHit(address, pos.X(), pos.Y(), pos.Z(),
28 err.X(), err.Y(), err.Z(), dxy, refId,
29 time, timeError)
30{
31}
32
34 Int_t address,
35 Double_t x,
36 Double_t y,
37 Double_t z,
38 Double_t dx,
39 Double_t dy,
40 Double_t dz,
41 Double_t dxy,
42 Int_t refId,
43 Double_t time,
44 Double_t timeError)
45 : BmnBaseHit(kPIXELHIT, z, dz, refId, address, time, timeError),
46 fX(x),
47 fY(y),
48 fDx(dx),
49 fDy(dy),
50 fDxy(dxy)
51{
52}
53
57
58std::string BmnPixelHit::ToString() const
59{
60 stringstream ss;
61 ss << "BmnPixelHit: address=" << GetAddress()
62 << " pos=(" << GetX() << "," << GetY() << "," << GetZ()
63 << ") err=(" << GetDx() << "," << GetDy() << "," << GetDz()
64 << ") dxy=" << GetDxy() << " refId=" << GetRefId() << endl;
65 return ss.str();
66}
67
68void BmnPixelHit::Position(TVector3& pos) const
69{
70 pos.SetXYZ(GetX(), GetY(), GetZ());
71}
72
73void BmnPixelHit::PositionError(TVector3& dpos) const
74{
75 dpos.SetXYZ(GetDx(), GetDy(), GetDz());
76}
77
78void BmnPixelHit::SetPosition(const TVector3& pos)
79{
80 SetX(pos.X());
81 SetY(pos.Y());
82 SetZ(pos.Z());
83}
84
85void BmnPixelHit::SetPositionError(const TVector3& dpos)
86{
87 SetDx(dpos.X());
88 SetDy(dpos.Y());
89 SetDz(dpos.Z());
90}
@ kPIXELHIT
Definition BmnBaseHit.h:17
Double_t GetZ() const
Definition BmnBaseHit.h:64
void SetDz(Double_t dz)
Definition BmnBaseHit.h:74
Int_t GetAddress() const
Definition BmnBaseHit.h:67
Int_t GetRefId() const
Definition BmnBaseHit.h:66
void SetZ(Double_t z)
Definition BmnBaseHit.h:73
Double_t GetDz() const
Definition BmnBaseHit.h:65
BmnPixelHit()
Default constructor.
Double_t GetDxy() const
Definition BmnPixelHit.h:89
void SetPositionError(const TVector3 &dpos)
virtual std::string ToString() const
Inherited from BmnBaseHit.
void SetX(Double_t x)
Double_t GetX() const
Definition BmnPixelHit.h:85
Double_t GetDy() const
Definition BmnPixelHit.h:88
void Position(TVector3 &pos) const
Copies hit position to pos.
void SetPosition(const TVector3 &pos)
Sets position of the hit.
virtual ~BmnPixelHit()
void SetDy(Double_t dy)
Double_t GetY() const
Definition BmnPixelHit.h:86
Double_t GetDx() const
Definition BmnPixelHit.h:87
void SetY(Double_t y)
void SetDx(Double_t dx)
void PositionError(TVector3 &dpos) const
Copies hit position error to pos.