StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPhmdDetector.h
1 
5 /********************************************************************
6  *
7  * $Id: StPhmdDetector.h,v 2.2 2003/04/22 00:08:13 ullrich Exp $
8  *
9  * Author: Subhasis Chattopadhyay, Dec 2002
10  ********************************************************************
11  *
12  * Description: Base class for PMD detector
13  *
14  ********************************************************************
15  *
16  * $Log: StPhmdDetector.h,v $
17  * Revision 2.2 2003/04/22 00:08:13 ullrich
18  * Removed //! comments
19  *
20  * Revision 2.1 2002/12/20 22:33:00 ullrich
21  * Initial Revision.
22  *
23  ********************************************************************/
24 #ifndef StPhmdDetector_hh
25 #define StPhmdDetector_hh
26 
27 #include "StObject.h"
28 #include "StEnumerations.h"
29 
30 class StPhmdHit;
31 class StPhmdModule;
33 
34 class StPhmdDetector : public StObject {
35 public:
37  StPhmdDetector(StDetectorId);
38  ~StPhmdDetector();
39 
40  StDetectorId id() const;
41  unsigned int numberOfModules() const;
42 
43  bool addHit(StPhmdHit*);
44  unsigned int numberOfHits() const;
45 
46  StPhmdModule* module(unsigned int);
47  const StPhmdModule* module(unsigned int) const;
48  int moduleHits(unsigned int);
49 
50  StPhmdClusterCollection* cluster();
51  const StPhmdClusterCollection* cluster() const;
52 
53  void setCluster(StPhmdClusterCollection*);
54  void setModule(StPhmdModule*, unsigned int);
55 
56 
57 private:
58  enum {mMaxModules = 12};
59  StDetectorId mDetectorId;
60 
61  Int_t mModulesNHit[mMaxModules];
62  StPhmdModule* mModules[mMaxModules]; // pointer for hits
63  StPhmdClusterCollection* mClusters; // pointer for clusters
64 
65  ClassDef(StPhmdDetector,1)
66 };
67 
68 inline StDetectorId StPhmdDetector::id() const
69 {return mDetectorId;}
70 
71 #endif