16 #include "StMcPxlHitCollection.hh"
17 #include "StMcPxlHit.hh"
19 static const char rcsid[] =
"$Id: StMcPxlHitCollection.cc,v 2.1 2013/03/25 23:50:36 perev Exp $";
28 StMcPxlHitCollection::~StMcPxlHitCollection()
38 (s = hit->
sector() - 1) < kNumberOfSectors &&
39 (l = hit->
ladder() - 1) < mSectors[s].numberOfLadders() &&
40 (w = hit->
sensor() - 1) < mSectors[s].ladder(l)->numberOfSensors())
42 mSectors[s].ladder(l)->sensor(w)->hits().push_back(hit);
50 StMcPxlHitCollection::numberOfHits()
const
53 for (
int iSec = 0; iSec < kNumberOfSectors; iSec++)
55 for (
unsigned int iLad = 0; iLad < mSectors[iSec].numberOfLadders(); iLad++)
57 for (
unsigned int iSen = 0; iSen < mSectors[iSec].ladder(iLad)->numberOfSensors(); iSen++)
59 sum += mSectors[iSec].ladder(iLad)->sensor(iSen)->hits().size();
67 StMcPxlHitCollection::sector(
unsigned int i)
69 return (i < kNumberOfSectors) ? &(mSectors[i]) : 0;
73 StMcPxlHitCollection::sector(
unsigned int i)
const
75 return (i < kNumberOfSectors) ? &(mSectors[i]) : 0;