StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcPxlSectorHitCollection.cc
1 /***************************************************************************
2  *
3  * $Id: StMcPxlSectorHitCollection.cc,v 2.2 2015/07/22 19:30:02 jwebb Exp $
4  * $Log: StMcPxlSectorHitCollection.cc,v $
5  * Revision 2.2 2015/07/22 19:30:02 jwebb
6  * Fix minor compiler warnings.
7  *
8  * Revision 2.1 2013/03/25 23:50:36 perev
9  * Mustafa.Pxl add
10  *
11  *
12  **************************************************************************/
13 #include "StMcPxlSectorHitCollection.hh"
14 #include "StMcPxlHit.hh"
15 static const char rcsid[] = "$Id: StMcPxlSectorHitCollection.cc,v 2.2 2015/07/22 19:30:02 jwebb Exp $";
16 
18 
19 //_____________________________________________________________________________
21 {
22  /* noop */
23 }
24 //_____________________________________________________________________________
25 StMcPxlSectorHitCollection::~StMcPxlSectorHitCollection()
26 {
27  /* noop */
28 }
29 
31 StMcPxlSectorHitCollection::ladder(unsigned int i)
32 {
33  return (i < kNumberOfLadders) ? &(mLadders[i]) : 0;
34 }
35 
37 StMcPxlSectorHitCollection::ladder(unsigned int i) const
38 {
39  return (i < kNumberOfLadders) ? &(mLadders[i]) : 0;
40 }
41 
42 unsigned int StMcPxlSectorHitCollection::numberOfHits() const
43 {
44  unsigned int sum = 0;
45  for (int iLadder = 0; iLadder < kNumberOfLadders; iLadder++)
46  {
47  for (unsigned int iSensor = 0; iSensor < mLadders[iSensor].numberOfSensors(); iSensor++)
48  {
49  sum += mLadders[iLadder].sensor(iSensor)->hits().size();
50  }
51  }
52  return sum;
53 }