StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuPmdCollection.h
1 /*****************************************************************
2  * $Id: StMuPmdCollection.h,v 1.5 2005/10/28 05:18:32 mvl Exp $
3  *
4  * Class : StMuPmdCollection
5  * Author: Supriya Das & Subhasis Chattopadhyay
6  * ****************************************************************
7  *
8  * Description: This class holds the PMD clusters for MuDst
9  * ****************************************************************
10  * $Log: StMuPmdCollection.h,v $
11  * Revision 1.5 2005/10/28 05:18:32 mvl
12  * Added getters for hit and cluster arrays on requets of Subhasis
13  *
14  * Revision 1.4 2004/10/19 01:39:35 mvl
15  * Changed for splitting on file. Added support for hits
16  *
17  * Revision 1.3 2004/05/02 04:10:14 perev
18  * private => protected
19  *
20  * Revision 1.2 2004/04/26 00:11:07 perev
21  * forward declaration of StMuPmdCluster
22  *
23  * Revision 1.1 2004/04/02 03:36:21 jeromel
24  * New files for PMD
25  *
26  * ****************************************************************/
27 
28 #ifndef StMuPmdCollection__h
29 #define StMuPmdCollection__h
30 
31 #include "TObject.h"
32 #include "TClonesArray.h"
33 #include "Stiostream.h"
34 
35 class StMuPmdCluster;
36 class StMuPmdHit;
37 
38 enum {pmd=1, cpv=2};
39 class StMuPmdCollection: public TObject
40 {
41  public:
44  virtual ~StMuPmdCollection();
45  void clear(Option_t *option="");
46  void Clear(Option_t *option=""){clear(option);}
47  void DeleteThis();
48 
49  TClonesArray *getClusterArray(int detector) {return mPmdClusters[detector];}
50  int getNClusters(int detector);
51  StMuPmdCluster* getCluster(int clusterId,int detector);
52 
53  void addCluster(int detector);
54 
55  TClonesArray *getHitArray(int detector) {return mPmdHits[detector];}
56  int getNHits(int detector);
57  StMuPmdHit* getHit(int hitId,int detector);
58 
59  void addHit(int detector);
60 
61  void setPmdHitArray(TClonesArray *array) {mPmdHits[0]=array;}
62  void setCpvHitArray(TClonesArray *array) {mPmdHits[1]=array;}
63  void setPmdClusterArray(TClonesArray *array) {mPmdClusters[0]=array;}
64  void setCpvClusterArray(TClonesArray *array) {mPmdClusters[1]=array;}
65  protected:
66  void init(int detector);
67 
68  TClonesArray* mPmdClusters[2];
69  TClonesArray* mPmdHits[2];
70 
71  ClassDef(StMuPmdCollection,2)
72 };
73 
74 
75 
76 #endif
77