StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcTpcSectorHitCollection.cc
1 /***************************************************************************
2  *
3  * $Id: StMcTpcSectorHitCollection.cc,v 2.2 2005/01/27 23:40:49 calderon Exp $
4  *
5  * Author: Manuel Calderon de la Barca Sanchez, Oct 1999
6  ***************************************************************************
7  *
8  * Description: Monte Carlo Tpc Sector Hit Collection class
9  *
10  ***************************************************************************
11  *
12  * $Log: StMcTpcSectorHitCollection.cc,v $
13  * Revision 2.2 2005/01/27 23:40:49 calderon
14  * Adding persistency to StMcEvent as a step for Virtual MonteCarlo.
15  *
16  * Revision 2.1 2000/03/06 18:05:23 calderon
17  * 1) Modified SVT Hits storage scheme from layer-ladder-wafer to
18  * barrel-ladder-wafer.
19  * 2) Added Rich Hit class and collection, and links to them in other
20  * classes.
21  *
22  * Revision 2.0 1999/11/17 02:01:00 calderon
23  * Completely revised for new StEvent
24  *
25  *
26  **************************************************************************/
27 #include "StMcTpcSectorHitCollection.hh"
28 
29 static const char rcsid[] = "$Id: StMcTpcSectorHitCollection.cc,v 2.2 2005/01/27 23:40:49 calderon Exp $";
31 StMcTpcSectorHitCollection::StMcTpcSectorHitCollection() { /* noop */ }
32 
33 StMcTpcSectorHitCollection::~StMcTpcSectorHitCollection() { /* noop */ }
34 
35 unsigned int
36 StMcTpcSectorHitCollection::numberOfPadrows() const { return mNumberOfPadrows; }
37 
38 StMcTpcPadrowHitCollection* StMcTpcSectorHitCollection::padrow(unsigned int i)
39 {
40  if (i < mNumberOfPadrows)
41  return &(mPadrows[i]);
42  else
43  return 0;
44 }
45 
47 StMcTpcSectorHitCollection::padrow(unsigned int i) const
48 {
49  if (i < mNumberOfPadrows)
50  return &(mPadrows[i]);
51  else
52  return 0;
53 }
54 
55 unsigned long StMcTpcSectorHitCollection::numberOfHits() const
56 {
57  unsigned long sum = 0;
58  for (unsigned int i=0; i < mNumberOfPadrows; i++)
59  sum += mPadrows[i].hits().size();
60  return sum;
61 }