StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPhmdHit.h
1 
5 /********************************************************************
6  *
7  * $Id: StPhmdHit.h,v 2.4 2003/09/02 17:58:05 perev Exp $
8  *
9  * Author: Subhasis Chattopadhyay, Dec 2002
10  ********************************************************************
11  *
12  * Description: This is the class for PMD hit objects
13  *
14  ********************************************************************
15  *
16  * $Log: StPhmdHit.h,v $
17  * Revision 2.4 2003/09/02 17:58:05 perev
18  * gcc 3.2 updates + WarnOff
19  *
20  * Revision 2.3 2003/04/22 00:08:14 ullrich
21  * Removed //! comments
22  *
23  * Revision 2.2 2002/12/21 00:32:33 ullrich
24  * Corrected typo in module().
25  *
26  * Revision 2.1 2002/12/20 22:33:00 ullrich
27  * Initial Revision.
28  *
29  ********************************************************************/
30 #ifndef StPhmdHit_hh
31 #define StPhmdHit_hh
32 
33 #include <math.h>
34 #include <Stiostream.h>
35 #include "StObject.h"
36 
37 class StPhmdHit : public StObject {
38 public:
39  StPhmdHit();
40  ~StPhmdHit();
41 
42  int superModule() const; // function for supermodule no.
43  int module() ; // function for module
44  int subDetector() const; // function for subdetector
45  int row() const; // function for row
46  int column() const; // function for col
47  float energy() const; // function for edep
48  int adc() const; // function for adc
49 
50  void setSuperModule(int);
51  void setSubDetector(int);
52  void setRow(int);
53  void setColumn(int);
54  void setEnergy(float);
55  void setAdc(int);
56 
57 private:
58  Int_t mSuperModuleNumber; // global supermodule no.
59  Int_t mSubDetector; // detector (PMD/CPV)
60  Int_t mRow; // row no. in the supermodule
61  Int_t mCol; // col no. in the supermodule
62  Float_t mEnergy; // energy deposition
63  Int_t mAdc; // adc
64  ClassDef(StPhmdHit,1)
65 };
66 
67 inline int StPhmdHit::superModule() const {return mSuperModuleNumber;}
68 inline int StPhmdHit::module()
69 {
70  // return module in range 0-11
71  if (mSuperModuleNumber < 12)
72  return mSuperModuleNumber;
73  else
74  return -1;
75 }
76 inline int StPhmdHit::subDetector() const {return mSubDetector;}
77 inline int StPhmdHit::row() const {return mRow;}
78 inline int StPhmdHit::column() const {return mCol;}
79 inline float StPhmdHit::energy() const {return mEnergy;}
80 inline int StPhmdHit::adc() const {return mAdc;}
81 inline void StPhmdHit::setSuperModule(int var) {mSuperModuleNumber = var;}
82 inline void StPhmdHit::setSubDetector(int var) {mSubDetector = var;}
83 inline void StPhmdHit::setRow(int var) {mRow = var;}
84 inline void StPhmdHit::setColumn(int var) {mCol = var;}
85 inline void StPhmdHit::setEnergy(float var){mEnergy = var;}
86 inline void StPhmdHit::setAdc(int var) {mAdc = var;}
87 
88 ostream& operator<<(ostream&, const StPhmdHit&);
89 #endif
90 
91 
92