StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcEmcModuleHitCollection.hh
1 /***************************************************************************
2  *
3  * $Id: StMcEmcModuleHitCollection.hh,v 2.7 2012/03/22 00:35:22 perev Exp $
4  *
5  * Author: Aleksei Pavlinov, May 2000
6  ***************************************************************************
7  *
8  * Description: Monte Carlo Emc Module Hit Collection class
9  *
10  ***************************************************************************
11  *
12  * $Log: StMcEmcModuleHitCollection.hh,v $
13  * Revision 2.7 2012/03/22 00:35:22 perev
14  * private => protected
15  *
16  * Revision 2.6 2012/03/01 16:48:29 perev
17  * method Browse() added
18  *
19  * Revision 2.5 2007/10/05 00:01:21 calderon
20  * Changes to include a EMC hit collection that does not care about
21  * parent tracks, so that now there are two collections. This
22  * new collection will be useful to compare all the deposited energy in a hit tower
23  * in a given event. The information about the track parentage is still
24  * kept in the original collection unchanged.
25  *
26  * Revision 2.4 2005/01/27 23:40:47 calderon
27  * Adding persistency to StMcEvent as a step for Virtual MonteCarlo.
28  *
29  * Revision 2.3 2001/05/31 02:45:55 perev
30  * const(ing)
31  *
32  * Revision 2.2 2000/08/30 14:52:03 calderon
33  * New changes made by Aleksei.
34  *
35  * Revision 2.1 2000/06/06 23:01:09 calderon
36  * Inital revision
37  *
38  *
39  **************************************************************************/
40 #ifndef StMcEmcModuleHitCollection_hh
41 #define StMcEmcModuleHitCollection_hh
42 #include "StMcContainers.hh"
43 #include "TDataSet.h"
44 
45 class StMcCalorimeterHit;
46 
48 public:
50  StMcEmcModuleHitCollection(const unsigned int m);
51  virtual ~StMcEmcModuleHitCollection();
52  void Clear(const char* opt="");
53 virtual bool IsFolder() const { return true;};
54 virtual void Browse(TBrowser *b);
55 
56  void init(const unsigned int m);
57  unsigned long numberOfHits() const;
58  unsigned long numberOfDetectorHits() const;
59  float sum() const;
60 
61  StSPtrVecMcCalorimeterHit& hits();
62  const StSPtrVecMcCalorimeterHit& hits() const;
63 
64  // detector hits are like hits, but there is at most one detector hit per
65  // element (tower, preshower, or strip). If multiple hits occur in a single
66  // element their energy depositions are summed, regardless of the parent track.
67  // Also, detector hits do not preserve information about the parent track of
68  // the hit, since there may be more than one. APK - 09/07
69  StSPtrVecMcCalorimeterHit& detectorHits();
70  const StSPtrVecMcCalorimeterHit& detectorHits() const;
71 
72 
73  void operator()(const unsigned int m) { init(m); }
74 
75 protected:
76  StSPtrVecMcCalorimeterHit mHits;
77  StSPtrVecMcCalorimeterHit mDetectorHits;
78  ClassDef(StMcEmcModuleHitCollection,1)
79 };
80 #endif
virtual void Browse(TBrowser *b)
Browse this dataset (called by TBrowser).