17 #include "StFpsSlat.h"
18 #include "StFmsPoint.h"
24 memset(mNPoint, 0,
sizeof(mNPoint));
27 StFpsSlat::StFpsSlat(
int slatid,
float mip) : mSlatId(slatid), mMip(mip)
29 memset(mNPoint,0,
sizeof(mNPoint));
32 StFpsSlat::~StFpsSlat() {}
34 StPtrVecFmsPoint& StFpsSlat::point(
int type) {
49 const StPtrVecFmsPoint& StFpsSlat::point(
int type)
const {
64 void StFpsSlat::addPoint(
StFmsPoint* point, Int_t type){
67 mPoint1.push_back(point);
break;
69 mPoint2.push_back(point);
break;
71 mPoint3.push_back(point);
break;
73 mPoint4.push_back(point);
break;
78 mNPoint[kFpsNCandidate]++;
81 void StFpsSlat::print(
int option)
const {
82 if(option==0 && mNPoint[0]==0 && mNPoint[1]==0)
return;
83 if(option==1 && mMip<0.5 && mNPoint[0]==0 && mNPoint[1]==0)
return;
84 int slat=mSlatId%21+1;
85 int layer=(mSlatId/21)%3+1;
86 int quad=(mSlatId/21/3)+1;
87 cout << Form(
"StFpsSlat Id=%3d Q%1dL%1dS%02d Mip=%6.2f Npoint=%2d/%2d/%2d/%2d=%2d ",
88 mSlatId,quad,layer,slat,mMip,mNPoint[0],mNPoint[1],mNPoint[2],mNPoint[3],mNPoint[4]);
91 for(
unsigned int i=0; i<mNPoint[0]; i++){ cout << Form(
"%d(%4.1f) ",
mPoint1[i]->
id(),
mPoint1[i]->fpsDistance(layer,0));}
95 for(
unsigned int i=0; i<mNPoint[1]; i++){ cout << Form(
"%d(%4.1f) ",
mPoint2[i]->
id(),
mPoint2[i]->fpsDistance(layer,1));}
99 for(
unsigned int i=0; i<mNPoint[2]; i++){ cout << Form(
"%d(%4.1f) ",
mPoint3[i]->
id(),
mPoint3[i]->fpsDistance(layer,2));}
103 for(
unsigned int i=0; i<mNPoint[3]; i++){ cout << Form(
"%d(%4.1f) ",
mPoint4[i]->
id(),
mPoint4[i]->fpsDistance(layer,3));}
StPtrVecFmsPoint mPoint4
3rd closest points
StPtrVecFmsPoint mPoint1
0 for closest, 1/2/3 for 2nd/3rd/4th closest, 5 for either
StPtrVecFmsPoint mPoint3
2nd closest points
StPtrVecFmsPoint mPoint2
closest points