30 #include "StSvtHitCollection.h"
33 static const char rcsid[] =
"$Id: StSvtHitCollection.cxx,v 2.5 2001/04/05 04:00:55 ullrich Exp $";
44 for (
int i=0; i<mNumberOfBarrels; i++) {
45 mBarrels[i].setBarrelNumber(i);
46 for (
unsigned int j=0; j<mBarrels[i].numberOfLadders(); j++)
47 mBarrels[i].ladder(j)->setBarrelNumber(i);
51 StSvtHitCollection::~StSvtHitCollection() { }
54 StSvtHitCollection::numberOfBarrels()
const {
return mNumberOfBarrels; }
61 (l = hit->barrel()-1) < mNumberOfBarrels &&
62 (d = hit->ladder()-1) < mBarrels[l].numberOfLadders() &&
63 (w = hit->wafer()-1) < mBarrels[l].ladder(d)->numberOfWafers()) {
64 mBarrels[l].ladder(d)->wafer(w)->hits().push_back(hit);
72 StSvtHitCollection::numberOfHits()
const
75 for (
int i=0; i<mNumberOfBarrels; i++)
76 for (
unsigned int j=0; j<mBarrels[i].numberOfLadders(); j++)
77 for (
unsigned int k=0; k<mBarrels[i].ladder(j)->numberOfWafers(); k++)
78 sum += mBarrels[i].ladder(j)->wafer(k)->hits().size();
83 StSvtHitCollection::barrel(
unsigned int i)
85 if (i < mNumberOfBarrels)
86 return &(mBarrels[i]);
92 StSvtHitCollection::barrel(
unsigned int i)
const
94 if (i < mNumberOfBarrels)
95 return &(mBarrels[i]);