18 #include "StEvent/StFcsCollection.h"
20 #include "StEvent/StFcsHit.h"
21 #include "StEvent/StFcsCluster.h"
22 #include "StEvent/StFcsPoint.h"
24 static const char rcsid[] =
"$Id: StFcsCollection.cxx,v 2.1 2021/01/11 20:25:37 ullrich Exp $";
30 StFcsCollection::~StFcsCollection() {}
32 void StFcsCollection::addHit(
unsigned int det,
StFcsHit*
hit){mHits[det%(kFcsNDet+1)].push_back(hit);}
33 StSPtrVecFcsHit& StFcsCollection::hits(
unsigned int det) {
return mHits[det%(kFcsNDet+1)];}
34 const StSPtrVecFcsHit& StFcsCollection::hits(
unsigned int det)
const {
return mHits[det%(kFcsNDet+1)];}
35 unsigned int StFcsCollection::numberOfHits(
unsigned int det)
const {
return mHits[det%(kFcsNDet+1)].size(); }
37 void StFcsCollection::addCluster(
unsigned int det,
StFcsCluster* cluster){mClusters[det%kFcsNDet].push_back(cluster);}
38 StSPtrVecFcsCluster& StFcsCollection::clusters(
unsigned int det) {
return mClusters[det%kFcsNDet];}
39 const StSPtrVecFcsCluster& StFcsCollection::clusters(
unsigned int det)
const {
return mClusters[det%kFcsNDet];}
40 unsigned int StFcsCollection::numberOfClusters(
unsigned int det)
const {
return mClusters[det%kFcsNDet].size(); }
42 void StFcsCollection::addPoint(
unsigned int det,
StFcsPoint* point){mPoints[det%kFcsNDet].push_back(point);}
43 StSPtrVecFcsPoint& StFcsCollection::points(
unsigned int det) {
return mPoints[det%kFcsNDet];}
44 const StSPtrVecFcsPoint& StFcsCollection::points(
unsigned int det)
const {
return mPoints[det%kFcsNDet];}
45 unsigned int StFcsCollection::numberOfPoints(
unsigned int det)
const {
return mPoints[det%kFcsNDet].size(); }
65 void StFcsCollection::print(
int option) {
66 cout << Form(
" *** Print FCS collection *** RecFlag=%d",mFcsReconstructionFlag) << endl;
67 for(
unsigned int det=0; det<kFcsNDet+1; det++){
68 cout << Form(
" *** FCS Det=%1d *** NHit=%3d NCluster=%3d NPoint=%3d",
69 det,numberOfHits(det),numberOfClusters(det),numberOfPoints(det)) << endl;
70 if(option>=3)
for(
unsigned int i=0; i<numberOfHits(det); i++) {hits(det)[i]->print();}
71 if(det==kFcsNDet)
continue;
72 if(option>=2)
for(
unsigned int i=0; i<numberOfClusters(det); i++) {clusters(det)[i]->print();}
73 if(option>=1)
for(
unsigned int i=0; i<numberOfPoints(det); i++) {points(det)[i]->print();}