StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFstRawHitCollection.h
1 #ifndef StFstRawHitCollection_hh
2 #define StFstRawHitCollection_hh
3 
4 #include "StObject.h"
5 #include "StFstRawHit.h"
6 #include <algorithm>
7 
8 
17 {
18 public:
19  //constructors
20  StFstRawHitCollection(int wedge = 0);
21  //deconstructor
23 
24  vector<StFstRawHit *> &getRawHitVec();
25  const vector<StFstRawHit *> &getRawHitVec() const;
26 
27  //sort internal vector by raw hit geometry ID
28  void sortByGeoId();
29 
30  //size of internal vector
31  size_t getNumRawHits() const;
32 
33  //modify/access the wedge
34  unsigned char getWedge() const;
35  void setWedge( int wedge );
36 
37  //clear
38  void Clear( Option_t *opt = "" );
39  using StObject::Print;
40  void Print(int nTimeBins) const;
41 
42  //get pointer to a raw hit by channel ID
43  StFstRawHit *getRawHit( int elecId );
44 
47  void addRawHit(StFstRawHit* fstRawHit);
48 
49 protected:
50  //function used for sorting raw hits by geoId
51  static bool rawHitIdLessThan( const StFstRawHit *h1, const StFstRawHit *h2 );
52 
53  //data members
54  unsigned char mWedge;
55  std::vector<StFstRawHit *> mRawHitVec;
56 
57  //temporary copy of the pointers to add raw hit indexed by elec Id.
58  std::vector<StFstRawHit *> mRawHitElecIdVec;
59 
60 private:
61  ClassDef(StFstRawHitCollection, 1);
62 };
63 
64 #endif
void addRawHit(StFstRawHit *fstRawHit)