StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuRpsTrackPoint.cxx
1 #include "StMuRpsTrackPoint.h"
2 #include "StEvent/StRpsTrackPoint.h"
3 
4 ClassImp(StMuRpsTrackPoint)
5 
7  mRpId = -1;
8  for (unsigned int i=0; i<StRpsTrackPoint::mNumberOfPlanesInRp; ++i) mClusterId[i] = -1;
9  for (unsigned int i=0; i<StRpsTrackPoint::mNumberOfPmtsInRp; ++i) mTime[i] = -1;
10  mQuality = StMuRpsTrackPoint::StMuRpsTrackPointQuality::rpsNotSet;
11 }
12 
13 StMuRpsTrackPoint::StMuRpsTrackPoint(const StMuRpsTrackPoint& trackPoint) {
14  *this = trackPoint;
15 }
16 
17 StMuRpsTrackPoint::~StMuRpsTrackPoint() { /* no op */ }
18 
19 StMuRpsTrackPoint& StMuRpsTrackPoint::operator=(const StMuRpsTrackPoint& trackPoint) {
20  if (this != &trackPoint) {
21  mPosition = trackPoint.positionVec();
22  mRpId = trackPoint.rpId();
23  for (unsigned int i=0; i<StRpsTrackPoint::mNumberOfPlanesInRp; ++i ) mClusterId[i] = trackPoint.clusterId(i);
24  for (unsigned int i=0; i<StRpsTrackPoint::mNumberOfPmtsInRp; ++i ) mTime[i] = trackPoint.time(i);
25  mQuality = (StMuRpsTrackPoint::StMuRpsTrackPointQuality)trackPoint.quality();
26  }
27  return *this;
28 }
29 
30 unsigned int StMuRpsTrackPoint::planesUsed() const {
31  unsigned int nPlanesUsed = 0;
32  for(unsigned int i=0; i<StRpsTrackPoint::mNumberOfPlanesInRp; ++i)
33  if (mClusterId[i]>-1) ++nPlanesUsed;
34  return nPlanesUsed;
35 }