StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcSsdLadderHitCollection.cc
1 /***************************************************************************
2  *
3  * $Id: StMcSsdLadderHitCollection.cc,v 2.1 2005/11/22 21:44:52 fisyak Exp $
4  *
5  * Author: Fabrice Retiere/Kai Schweda, Aug 2003
6  ***************************************************************************
7  *
8  * Description: Monte Carlo Ssd Ladder Hit Collection class
9  *
10  ***************************************************************************
11  *
12  * $Log: StMcSsdLadderHitCollection.cc,v $
13  * Revision 2.1 2005/11/22 21:44:52 fisyak
14  * Add compress Print for McEvent, add Ssd collections
15  *
16  * Revision 2.2 2005/01/27 23:40:48 calderon
17  * Adding persistency to StMcEvent as a step for Virtual MonteCarlo.
18  *
19  * Revision 2.1 2004/09/14 05:00:30 calderon
20  * Added support for Ist, Ssd and changes to Pixel, from "El Kai".
21  *
22  * Revision 2.1 2003/08/20 18:50:21 calderon
23  * Addition of Tof classes and Ssd classes. Modified track, event, and
24  * container code to reflect this.
25  * Fix bug in StMcVertex and in clearing of some hit collections.
26  *
27  *
28  *
29  **************************************************************************/
30 #include "StMcSsdLadderHitCollection.hh"
31 #include "StMcSsdHit.hh"
32 static const char rcsid[] = "$Id: StMcSsdLadderHitCollection.cc,v 2.1 2005/11/22 21:44:52 fisyak Exp $";
33 
35 unsigned long
36 StMcSsdLadderHitCollection::numberOfHits() const
37 {
38  unsigned long sum = 0;
39  for (unsigned int j=0; j<numberOfWafers(); j++) {
40  sum += mWafers[j].hits().size();
41  }
42  return sum;
43 }
44 
46 StMcSsdLadderHitCollection::wafer(unsigned int i)
47 {
48  if (i < numberOfWafers())
49  return &(mWafers[i]);
50  else
51  return 0;
52 }
53 
55 StMcSsdLadderHitCollection::wafer(unsigned int i) const
56 {
57  if (i < numberOfWafers())
58  return &(mWafers[i]);
59  else
60  return 0;
61 }