1 #ifndef __StMuRpsTrack_hh__
2 #define __StMuRpsTrack_hh__
16 enum StMuRpsTrackType { rpsLocal, rpsGlobal, rpsUndefined };
17 enum StMuRpsAngles { rpsAngleThetaX, rpsAngleThetaY, rpsAngleTheta, mNumberOfAngleTypes };
18 enum {mNumberOfStationsInBranch = 2};
21 TRef mTrackPoints[mNumberOfStationsInBranch];
24 StMuRpsTrackType mType;
34 TVector3 pVec()
const;
36 StMuRpsTrackType type()
const;
37 unsigned int planesUsed()
const;
39 double theta(
unsigned int = rpsAngleTheta)
const;
40 double thetaRp(
unsigned int = rpsAngleTheta)
const;
43 double t(
double)
const;
44 double xi(
double)
const;
51 void setP(
const TVector3&);
53 void setType(StMuRpsTrackType type);
58 inline const StMuRpsTrackPoint* StMuRpsTrack::trackPoint(
unsigned int station)
const {
59 return station < mNumberOfStationsInBranch ? static_cast<const StMuRpsTrackPoint*>(mTrackPoints[station].GetObject()) :
nullptr;
61 inline TVector3 StMuRpsTrack::pVec()
const {
return mP; }
62 inline int StMuRpsTrack::branch()
const {
return mBranch; }
63 inline StMuRpsTrack::StMuRpsTrackType StMuRpsTrack::type()
const {
return mType; }
64 inline double StMuRpsTrack::phi()
const {
return mP.Phi(); }
65 inline double StMuRpsTrack::t(
double beamMomentum)
const {
66 return -2*beamMomentum*beamMomentum*(1-xi(beamMomentum))*(1-cos(theta(rpsAngleTheta)));
68 inline double StMuRpsTrack::xi(
double beamMomentum)
const {
69 return (beamMomentum - mP.Mag())/beamMomentum;
71 inline double StMuRpsTrack::p()
const {
return mP.Mag(); }
72 inline double StMuRpsTrack::pt()
const {
return mP.Perp(); }
73 inline double StMuRpsTrack::eta()
const {
return mP.PseudoRapidity(); }
75 inline void StMuRpsTrack::setTrackPoint(
StMuRpsTrackPoint* trackPoint,
unsigned int station) {
76 if (station<mNumberOfStationsInBranch)
77 mTrackPoints[station] = trackPoint;
79 inline void StMuRpsTrack::setP(
const TVector3& P) { mP = P; }
80 inline void StMuRpsTrack::setBranch(
int branch) { mBranch = branch; }
81 inline void StMuRpsTrack::setType(StMuRpsTrackType type) { mType = type; }