12 #include "StMuDSTMaker/COMMON/StMuFcsCollection.h"
13 #include "StMuDSTMaker/COMMON/StMuFcsCluster.h"
14 #include "StMuDSTMaker/COMMON/StMuFcsHit.h"
15 #include "StMuDSTMaker/COMMON/StMuFcsPoint.h"
16 #include "StMuDSTMaker/COMMON/StMuFcsInfo.h"
18 #include "St_base/StMessMgr.h"
20 static const char rcsid[] =
"$Id: StMuFcsCollection.cxx,v 1.6 2021/09/26 16:22:36 jdb Exp $";
26 StMuFcsCollection::~StMuFcsCollection() {
31 mHits = mClusters = mPoints = mInfo =
nullptr;
34 void StMuFcsCollection::init() {
35 mHits =
new TClonesArray(
"StMuFcsHit", 0);
36 mClusters =
new TClonesArray(
"StMuFcsCluster", 0);
37 mPoints =
new TClonesArray(
"StMuFcsPoint", 0);
38 mInfo =
new TClonesArray(
"StMuFcsInfo", 0);
43 int counter = mHits->GetEntriesFast();
49 if (!mClusters) init();
50 int counter = mClusters->GetEntriesFast();
56 int counter = mPoints->GetEntriesFast();
62 int counter = mInfo->GetEntriesFast();
66 unsigned int StMuFcsCollection::numberOfHits()
const{
68 return mHits->GetEntriesFast();
71 unsigned int StMuFcsCollection::numberOfClusters()
const {
72 if (!mClusters)
return 0;
73 return mClusters->GetEntriesFast();
76 unsigned int StMuFcsCollection::numberOfPoints()
const {
77 if (!mPoints)
return 0;
78 return mPoints->GetEntriesFast();
81 StMuFcsHit* StMuFcsCollection::getHit(
int index){
82 if(!mHits)
return NULL;
87 if (!mClusters)
return NULL;
92 if (!mPoints)
return NULL;
97 if (!mInfo)
return NULL;
101 Int_t StMuFcsCollection::fcsReconstructionFlag() {
102 return getInfo()->fcsReconstructionFlag();
104 void StMuFcsCollection::setFcsReconstructionFlag(Int_t v){
105 getInfo()->setFcsReconstructionFlag(v);
108 unsigned int StMuFcsCollection::indexOfFirstHit(
unsigned int idet ){
109 return getInfo()->hitIndex(idet);
112 unsigned int StMuFcsCollection::indexOfFirstCluster(
unsigned int idet ){
113 return getInfo()->clusterIndex(idet);
116 unsigned int StMuFcsCollection::indexOfFirstPoint(
unsigned int idet ){
117 return getInfo()->pointIndex(idet);
120 unsigned int StMuFcsCollection::numberOfHits(
unsigned int idet ){
121 return (getInfo()->hitIndex(idet+1) - getInfo()->hitIndex(idet));
124 unsigned int StMuFcsCollection::numberOfClusters(
unsigned int idet ){
125 return (getInfo()->clusterIndex(idet+1) - getInfo()->clusterIndex(idet));
128 unsigned int StMuFcsCollection::numberOfPoints(
unsigned int idet ){
129 return (getInfo()->pointIndex(idet+1) - getInfo()->pointIndex(idet));