24 #include "StMcTpcHitCollection.hh"
25 #include "StMcTpcPadrowHitCollection.hh"
26 #include "StMcTpcHit.hh"
28 static const char rcsid[] =
"$Id: StMcTpcHitCollection.cc,v 2.2 2005/01/27 23:40:49 calderon Exp $";
34 StMcTpcHitCollection::~StMcTpcHitCollection() { }
41 (s = hit->sector()-1) < mNumberOfSectors &&
42 (r = hit->padrow()-1) < mSectors[s].numberOfPadrows()) {
43 mSectors[s].padrow(r)->hits().push_back(hit);
51 StMcTpcHitCollection::numberOfSectors()
const {
return mNumberOfSectors; }
54 StMcTpcHitCollection::numberOfHits()
const
56 unsigned long sum = 0;
57 for (
int i=0; i<mNumberOfSectors; i++) {
58 sum += mSectors[i].numberOfHits();
64 StMcTpcHitCollection::sector(
unsigned int i)
66 if (i < mNumberOfSectors)
67 return &(mSectors[i]);
73 StMcTpcHitCollection::sector(
unsigned int i)
const
75 if (i < mNumberOfSectors)
76 return &(mSectors[i]);