34 #include "StMcSvtHitCollection.hh"
35 #include "StMcSvtHit.hh"
37 static const char rcsid[] =
"$Id: StMcSvtHitCollection.cc,v 2.4 2005/01/27 23:40:48 calderon Exp $";
39 StMcSvtHitCollection::StMcSvtHitCollection()
46 for (
int i=0; i<mNumberOfBarrels; i++) {
47 mBarrels[i].setBarrelNumber(i);
48 for (
unsigned int j=0; j<mBarrels[i].numberOfLadders(); j++)
49 mBarrels[i].ladder(j)->setBarrelNumber(i);
53 StMcSvtHitCollection::~StMcSvtHitCollection() { }
56 StMcSvtHitCollection::numberOfBarrels()
const {
return mNumberOfBarrels; }
64 (l = hit->barrel()-1) < mNumberOfBarrels &&
65 (d = hit->ladder()-1) < mBarrels[l].numberOfLadders() &&
66 (w = hit->wafer()-1) < mBarrels[l].ladder(d)->numberOfWafers()) {
67 mBarrels[l].ladder(d)->wafer(w)->hits().push_back(hit);
77 StMcSvtHitCollection::numberOfHits()
const
79 unsigned long sum = 0;
80 for (
int i=0; i<mNumberOfBarrels; i++)
81 for (
unsigned int j=0; j<mBarrels[i].numberOfLadders(); j++)
82 for (
unsigned int k=0; k<mBarrels[i].ladder(j)->numberOfWafers(); k++)
83 sum += mBarrels[i].ladder(j)->wafer(k)->hits().size();
88 StMcSvtHitCollection::barrel(
unsigned int i)
90 if (i < mNumberOfBarrels)
91 return &(mBarrels[i]);
97 StMcSvtHitCollection::barrel(
unsigned int i)
const
99 if (i < mNumberOfBarrels)
100 return &(mBarrels[i]);