52 #include "StMuDSTMaker/COMMON/StMuFmsCollection.h"
53 #include "StMuDSTMaker/COMMON/StMuFmsCluster.h"
54 #include "StMuDSTMaker/COMMON/StMuFmsHit.h"
55 #include "StMuDSTMaker/COMMON/StMuFmsPoint.h"
56 #include "StMuDSTMaker/COMMON/StMuFmsInfo.h"
58 static const char rcsid[] =
"$Id: StMuFmsCollection.cxx,v 1.6 2017/08/14 16:22:36 smirnovd Exp $";
64 StMuFmsCollection::~StMuFmsCollection() {
77 mHits = mClusters = mPoints = mInfo = NULL;
80 void StMuFmsCollection::init() {
81 mHits =
new TClonesArray(
"StMuFmsHit", 0);
82 mClusters =
new TClonesArray(
"StMuFmsCluster", 0);
83 mPoints =
new TClonesArray(
"StMuFmsPoint", 0);
84 mInfo =
new TClonesArray(
"StMuFmsInfo", 0);
89 int counter = mHits->GetEntriesFast();
94 void StMuFmsCollection::addCluster() {
95 if (!mClusters) init();
96 int counter = mClusters->GetEntriesFast();
101 if (!mPoints) init();
102 int counter = mPoints->GetEntriesFast();
106 void StMuFmsCollection::addInfo() {
108 int counter = mInfo->GetEntriesFast();
113 unsigned int StMuFmsCollection::numberOfHits()
const{
115 return mHits->GetEntriesFast();
118 unsigned int StMuFmsCollection::numberOfClusters()
const {
119 if (!mClusters)
return 0;
120 return mClusters->GetEntriesFast();
123 unsigned int StMuFmsCollection::numberOfPoints()
const {
124 if (!mPoints)
return 0;
125 return mPoints->GetEntriesFast();
128 StMuFmsHit* StMuFmsCollection::getHit(
int hitId){
129 if(!mHits)
return NULL;
134 if (!mClusters)
return NULL;
139 if (!mPoints)
return NULL;
144 if (!mInfo)
return NULL;
149 Int_t StMuFmsCollection::fmsReconstructionFlag() {
150 return getInfo()->fmsReconstructionFlag();
152 void StMuFmsCollection::setFmsReconstructionFlag(Int_t v){
153 getInfo()->setFmsReconstructionFlag(v);