FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PndSttGeomPoint Class Reference

#include <PndSttGeomPoint.h>

Inheritance diagram for PndSttGeomPoint:

Public Member Functions

 PndSttGeomPoint ()
 
 PndSttGeomPoint (Double_t x, Double_t y, Double_t z, Double_t dx=0., Double_t dy=0., Double_t dz=0.)
 
 PndSttGeomPoint (PndSttGeomPoint const &other)
 
virtual ~PndSttGeomPoint ()
 
Double_t GetX () const
 
Double_t GetY () const
 
Double_t GetZ () const
 
void SetX (Double_t newX)
 
void SetY (Double_t newY)
 
void SetZ (Double_t newZ)
 
Double_t GetErrorX () const
 
Double_t GetErrorY () const
 
Double_t GetErrorZ () const
 
void SetErrorX (Double_t newErrorX)
 
void SetErrorY (Double_t newErrorY)
 
void SetErrorZ (Double_t newErrorZ)
 
Bool_t Is2D () const
 
Bool_t IsBetween (PndSttGeomPoint thisCenter, PndSttGeomPoint otherCenter) const
 
void Transform (Double_t x, Double_t y, Double_t z)
 
Double_t DistanceTo (PndSttGeomPoint myPoint) const
 
void Draw (Double_t size=0.5, Int_t color=1) const
 
PndSttGeomPointoperator= (const PndSttGeomPoint &)
 

Private Member Functions

void Copy (PndSttGeomPoint const &other)
 
void Destroy ()
 
 ClassDef (PndSttGeomPoint, 1)
 

Private Attributes

Double_t fX
 
Double_t fY
 
Double_t fZ
 
Double_t fErrorX
 
Double_t fErrorY
 
Double_t fErrorZ
 

Detailed Description

Definition at line 18 of file PndSttGeomPoint.h.

Constructor & Destructor Documentation

PndSttGeomPoint::PndSttGeomPoint ( )

Default constructor

Definition at line 37 of file PndSttGeomPoint.cxx.

37  :TObject(),
38  fX(0),
39  fY(0),
40  fZ(0),
41  fErrorX(0),
42  fErrorY(0),
43  fErrorZ(0)
44 {
45 }
PndSttGeomPoint::PndSttGeomPoint ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  dx = 0.,
Double_t  dy = 0.,
Double_t  dz = 0. 
)

Standard constructor

Definition at line 47 of file PndSttGeomPoint.cxx.

47  :
48  fX(x),
49  fY(y),
50  fZ(z),
51  fErrorX(dx),
52  fErrorY(dy),
53  fErrorZ(dz)
54 {
55 }
double dy
Double_t z
double dx
Double_t x
Double_t y
PndSttGeomPoint::PndSttGeomPoint ( PndSttGeomPoint const &  other)

Copy constructor

Definition at line 20 of file PndSttGeomPoint.cxx.

20  :TObject(other),
21  fX(other.fX),
22  fY(other.fY),
23  fZ(other.fZ),
24  fErrorX(other.fErrorX),
25  fErrorY(other.fErrorY),
26  fErrorZ(other.fErrorZ)
27 {
28 }
PndSttGeomPoint::~PndSttGeomPoint ( )
virtual

Destructor

Definition at line 65 of file PndSttGeomPoint.cxx.

66 {
67 }

Member Function Documentation

PndSttGeomPoint::ClassDef ( PndSttGeomPoint  ,
 
)
private
void PndSttGeomPoint::Copy ( PndSttGeomPoint const &  other)
private

Definition at line 5 of file PndSttGeomPoint.cxx.

References fErrorX, fErrorY, fErrorZ, fX, fY, and fZ.

6 {
7  fX = other.fX;
8  fY = other.fY;
9  fZ = other.fZ;
10 
11  fErrorX = other.fErrorX;
12  fErrorY = other.fErrorY;
13  fErrorZ = other.fErrorZ;
14 }
void PndSttGeomPoint::Destroy ( )
private

Definition at line 16 of file PndSttGeomPoint.cxx.

17 {
18 }
Double_t PndSttGeomPoint::DistanceTo ( PndSttGeomPoint  myPoint) const

Definition at line 150 of file PndSttGeomPoint.cxx.

References fX, fY, fZ, GetX(), GetY(), GetZ(), and sqrt().

151 {
152  return sqrt(((myPoint.GetX() - fX) * (myPoint.GetX() - fX)) +
153  ((myPoint.GetY() - fY) * (myPoint.GetY() - fY)) +
154  ((myPoint.GetZ() - fZ) * (myPoint.GetZ() - fZ)));
155 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t GetY() const
Double_t GetX() const
Double_t GetZ() const
void PndSttGeomPoint::Draw ( Double_t  size = 0.5,
Int_t  color = 1 
) const

Definition at line 80 of file PndSttGeomPoint.cxx.

References Double_t, fX, fY, and fZ.

81 {
82  Double_t
83  xstartx[2] = {fX - size, fX + size},
84  ystartx[2] = {fX, fX},
85  zstartx[2] = {fX, fX};
86 
87  Double_t
88  xstarty[2] = {fY, fY},
89  ystarty[2] = {fY - size, fY + size},
90  zstarty[2] = {fY, fY};
91 
92  Double_t
93  xstartz[2] = {fZ, fZ},
94  ystartz[2] = {fZ, fZ},
95  zstartz[2] = {fZ - size, fZ + size};
96 
97 
98  TPolyLine3D
99  *xstart = new TPolyLine3D(2, xstartx, xstarty, xstartz),
100  *ystart = new TPolyLine3D(2, ystartx, ystarty, ystartz),
101  *zstart = new TPolyLine3D(2, zstartx, zstarty, zstartz);
102 
103  xstart->SetLineColor(color);
104  xstart->Draw();
105  ystart->SetLineColor(color);
106  ystart->Draw();
107  zstart->SetLineColor(color);
108  zstart->Draw();
109 }
Double_t
Double_t PndSttGeomPoint::GetErrorX ( ) const
inline

Definition at line 41 of file PndSttGeomPoint.h.

References fErrorX.

41 {return fErrorX;}
Double_t PndSttGeomPoint::GetErrorY ( ) const
inline

Definition at line 42 of file PndSttGeomPoint.h.

References fErrorY.

42 {return fErrorY;}
Double_t PndSttGeomPoint::GetErrorZ ( ) const
inline

Definition at line 43 of file PndSttGeomPoint.h.

References fErrorZ.

43 {return fErrorZ;}
Double_t PndSttGeomPoint::GetX ( ) const
inline

Definition at line 33 of file PndSttGeomPoint.h.

References fX.

Referenced by DistanceTo(), and IsBetween().

33 {return fX;}
Double_t PndSttGeomPoint::GetY ( ) const
inline

Definition at line 34 of file PndSttGeomPoint.h.

References fY.

Referenced by DistanceTo(), and IsBetween().

34 {return fY;}
Double_t PndSttGeomPoint::GetZ ( ) const
inline

Definition at line 35 of file PndSttGeomPoint.h.

References fZ.

Referenced by DistanceTo(), and IsBetween().

35 {return fZ;}
Bool_t PndSttGeomPoint::Is2D ( ) const

Definition at line 69 of file PndSttGeomPoint.cxx.

References Bool_t, fabs(), and fZ.

70 {
71  Bool_t
72  retval = kTRUE;
73 
74  if (fabs(fZ) > 0.)
75  retval = kFALSE;
76 
77  return retval;
78 }
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
Bool_t PndSttGeomPoint::IsBetween ( PndSttGeomPoint  thisCenter,
PndSttGeomPoint  otherCenter 
) const

Definition at line 111 of file PndSttGeomPoint.cxx.

References Bool_t, fX, fY, fZ, GetX(), GetY(), and GetZ().

112 {
113  Bool_t
114  betweenX = kFALSE,
115  betweenY = kFALSE,
116  betweenZ = kFALSE,
117  retval = kFALSE;
118 
119  if (((firstPoint.GetX() < fX) && (fX < secondPoint.GetX())) ||
120  ((firstPoint.GetX() > fX) && (fX > secondPoint.GetX())))
121  {
122  betweenX = kTRUE;
123  }
124 
125  if (((firstPoint.GetY() < fY) && (fY < secondPoint.GetY())) ||
126  ((firstPoint.GetY() > fY) && (fY > secondPoint.GetY())))
127  {
128  betweenY = kTRUE;
129  }
130 
131  if (((firstPoint.GetZ() < fZ) && (fZ < secondPoint.GetZ())) ||
132  ((firstPoint.GetZ() > fZ) && (fZ > secondPoint.GetZ())))
133  {
134  betweenZ = kTRUE;
135  }
136 
137  if (betweenX && betweenY && betweenZ)
138  {
139  retval = kTRUE;
140  }
141 
142  return retval;
143 }
PndSttGeomPoint& PndSttGeomPoint::operator= ( const PndSttGeomPoint )
inline

Definition at line 61 of file PndSttGeomPoint.h.

61 {return *this;};
void PndSttGeomPoint::SetErrorX ( Double_t  newErrorX)
inline

Definition at line 45 of file PndSttGeomPoint.h.

References fErrorX.

45 {fErrorX = newErrorX;}
void PndSttGeomPoint::SetErrorY ( Double_t  newErrorY)
inline

Definition at line 46 of file PndSttGeomPoint.h.

References fErrorY.

46 {fErrorY = newErrorY;}
void PndSttGeomPoint::SetErrorZ ( Double_t  newErrorZ)
inline

Definition at line 47 of file PndSttGeomPoint.h.

References fErrorZ.

47 {fErrorZ = newErrorZ;}
void PndSttGeomPoint::SetX ( Double_t  newX)
inline

Definition at line 37 of file PndSttGeomPoint.h.

References fX.

37 {fX = newX;}
void PndSttGeomPoint::SetY ( Double_t  newY)
inline

Definition at line 38 of file PndSttGeomPoint.h.

References fY.

38 {fY = newY;}
void PndSttGeomPoint::SetZ ( Double_t  newZ)
inline

Definition at line 39 of file PndSttGeomPoint.h.

References fZ.

39 {fZ = newZ;}
void PndSttGeomPoint::Transform ( Double_t  x,
Double_t  y,
Double_t  z 
)

Definition at line 58 of file PndSttGeomPoint.cxx.

References fX, fY, fZ, x, y, and z.

59 {
60  fX += x;
61  fY += y;
62  fZ += z;
63 }
Double_t z
Double_t x
Double_t y

Member Data Documentation

Double_t PndSttGeomPoint::fErrorX
private

Definition at line 68 of file PndSttGeomPoint.h.

Referenced by Copy(), GetErrorX(), and SetErrorX().

Double_t PndSttGeomPoint::fErrorY
private

Definition at line 69 of file PndSttGeomPoint.h.

Referenced by Copy(), GetErrorY(), and SetErrorY().

Double_t PndSttGeomPoint::fErrorZ
private

Definition at line 70 of file PndSttGeomPoint.h.

Referenced by Copy(), GetErrorZ(), and SetErrorZ().

Double_t PndSttGeomPoint::fX
private

Definition at line 61 of file PndSttGeomPoint.h.

Referenced by Copy(), DistanceTo(), Draw(), GetX(), IsBetween(), SetX(), and Transform().

Double_t PndSttGeomPoint::fY
private

Definition at line 65 of file PndSttGeomPoint.h.

Referenced by Copy(), DistanceTo(), Draw(), GetY(), IsBetween(), SetY(), and Transform().

Double_t PndSttGeomPoint::fZ
private

Definition at line 66 of file PndSttGeomPoint.h.

Referenced by Copy(), DistanceTo(), Draw(), GetZ(), Is2D(), IsBetween(), SetZ(), and Transform().


The documentation for this class was generated from the following files: