46 #include "StiDetector.h"
47 #include "StiPlacement.h"
48 #include "StMeasuredPoint.h"
49 #include "StThreeVectorF.hh"
50 #include "StMatrixF.hh"
55 enum StiHitProperty { kR,
67 const Float_t &
x()
const {
return mx;}
68 const Float_t &y()
const {
return my;}
69 const Float_t &z()
const {
return mz;}
70 const Float_t y(Float_t time)
const {
return my + _vy*time;}
71 const Float_t z(Float_t time)
const {
return mz + _vz*time;}
73 Float_t
x_g()
const {
return _xg;}
74 Float_t y_g()
const {
return _yg;}
75 Float_t z_g()
const {
return _zg;}
77 float rxy()
const {
return sqrt(_xg*_xg+_yg*_yg);}
81 Float_t
sxx()
const {
return msxx;}
82 Float_t syy()
const {
return msyy;}
83 Float_t szz()
const {
return mszz;}
84 Float_t sxy()
const {
return msxy;}
85 Float_t sxz()
const {
return msxz;}
86 Float_t syz()
const {
return msyz;}
87 const Float_t *errMtx()
const {
return &msxx;}
115 void set(Float_t
position, Float_t angle, Float_t y, Float_t z);
121 Float_t
x, Float_t y, Float_t z,
122 Float_t
sxx=1, Float_t sxy=1, Float_t sxz=1, Float_t syy=1, Float_t syz=1, Float_t szz=1);
128 Float_t
x, Float_t y, Float_t z,
136 void setError(
const Float_t errMx[6]);
143 void setTimesUsed(
int set){mTimesUsed=set;}
148 int isUsed()
const {
return mTimesUsed>=mMaxTimes;}
149 void setVz(Float_t vz) {_vz = vz;}
150 void setVy(Float_t vy) {_vy = vy;}
153 void rotate(
double angle);
154 double getValue(Int_t key)
const;
155 double getPseudoRapidity()
const;
156 Float_t vz()
const {
return _vz;}
157 Float_t vy()
const {
return _vy;}
192 bool operator() (
const StiHit*h1,
const StiHit*h2)
const
194 double x1 = h1->
x_g();
195 double y1 = h1->y_g();
196 double r1 = sqrt(x1*x1+y1*y1);
197 double x2 = h2->
x_g();
198 double y2 = h2->y_g();
199 double r2 = sqrt(x2*x2+y2*y2);
206 bool operator() (
const StiHit*lhs,
const StiHit*rhs)
const
208 return (lhs->y() < rhs->y()) ?
true :
false;
214 bool operator() (
const StiHit*lhs,
const StiHit*rhs)
const
216 return (lhs->z() < rhs->z()) ?
true :
false;
224 return (hit->
isUsed()==0);
StiHit()
Default constructor.
void setError(const StMatrixF &)
void makeDca()
Make fake hit for dca calculation.
friend ostream & operator<<(ostream &os, const StiHit &h)
void setGlobal(const StiDetector *detector, const StMeasuredPoint *stHit, Float_t x, Float_t y, Float_t z, Float_t energy)
void setStHit(const StMeasuredPoint *hit)
Set the pointer to the corresponding StHit object.
const Float_t & x() const
Return the local x, y, z values.
void rotate(double angle)
~StiHit()
Default destructor.
const StiDetector * detector() const
Float_t x_g() const
Return the global x, y, z values.
Float_t refangle() const
Return the refAngle of the detector plane from which the hit arose.
UInt_t timesUsed() const
Return the number of times this hit was assigned to a track.
Int_t isDca() const
Test for DCA. Fake hit for dca calculation.
Float_t getEloss()
Return the energy deposition associated with this point.
float rxy() const
Return the rxy.
Float_t sxx() const
Return components of the error matrix.
void setMaxTimes(int set)
Set the number of times used.
void setDetector(const StiDetector *det)
Set the pointer to the StiDetector from which the hit arose.
Float_t position() const
Return the position of the detector plane from which the hit arose.
const StMeasuredPoint * stHit() const
const StThreeVectorF globalPosition() const