StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcMicroCollection.h
1 
13 #ifndef StEmcMicroCollection__h
14 #define StEmcMicroCollection__h
15 
16 #include "TObject.h"
17 #include "TObjArray.h"
18 #include "StEmcMicroHit.h"
19 #include "StEmcMicroCluster.h"
20 #include "StEmcMicroPoint.h"
21 
22 class StEmcMicroCollection: public TObject
23 {
24  public:
26  virtual ~StEmcMicroCollection();
27 
28  StEmcMicroHit* getHit(Int_t EmcDet,Int_t HitId) { return (StEmcMicroHit*) mEmcHits[EmcDet-1]->At(HitId); }
29  Int_t getNHits(Int_t EmcDet) { return mEmcHits[EmcDet-1]->GetEntries(); }
30 
31  StEmcMicroCluster*getCluster(Int_t EmcDet,Int_t ClId) { return (StEmcMicroCluster*) mEmcClusters[EmcDet-1]->At(ClId); }
32  Int_t getNClusters(Int_t EmcDet) { return mEmcClusters[EmcDet-1]->GetEntries(); }
33 
34  StEmcMicroPoint* getPoint(Int_t PtId) { return (StEmcMicroPoint*)mEmcPoints->At(PtId); }
35  Int_t getNPoints() { return mEmcPoints->GetEntries(); }
36 
37  void addHit(Int_t EmcDet,StEmcMicroHit* hit) { mEmcHits[EmcDet-1]->AddLast(hit); }
38  void addCluster(Int_t EmcDet,StEmcMicroCluster* cluster) { mEmcClusters[EmcDet-1]->AddLast(cluster); }
39  void addPoint(StEmcMicroPoint* point) { mEmcPoints->AddLast(point); }
40  void clear(Option_t *option="");
41 
42  private:
43  TObjArray* mEmcHits[4];
44  TObjArray* mEmcClusters[4];
45  TObjArray* mEmcPoints;
46 
47  ClassDef(StEmcMicroCollection,1)
48 };
49 #endif
50 
StEmcMicroHit * getHit(Int_t EmcDet, Int_t HitId)
Return Hit for a given EMC sub detector.
Int_t getNPoints()
Return Number of Points for a given EMC sub detector.
Int_t getNClusters(Int_t EmcDet)
Return Number of Cluster for a given EMC sub detector.
Int_t getNHits(Int_t EmcDet)
Return Number of Hits for a given EMC sub detector.
StEmcMicroPoint * getPoint(Int_t PtId)
Return Point for a given EMC sub detector.
StEmcMicroCluster * getCluster(Int_t EmcDet, Int_t ClId)
Return Cluster for a given EMC sub detector.