StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StGmtHit.h
1 
12 #ifndef StGmtHit_hh
13 #define StGmtHit_hh
14 
15 // C++ headers
16 #include <map>
17 
18 // StEvent headers
19 #include "StHit.h"
20 #include "StGmtStrip.h"
21 
22 //________________
23 class StGmtHit : public StHit {
24  public:
26  StGmtHit( Int_t key = -1, Int_t module = -1, Float_t adcX = 0,
27  Float_t adcY = 0, Float_t dadcX = 0, Float_t dadcY = 0,
28  Float_t localX = 0, Float_t localY = 0,
29  Float_t localXErr = 10000, Float_t localYErr = 10000,
30  Float_t sigmaX = 0, Float_t sigmaY = 0,
31  Float_t sigmaXErr = 10000, Float_t sigmaYErr = 10000);
33  ~StGmtHit();
34 
36  void Print(Option_t *option="") const;
37 
38  //
39  // Getters
40  //
41 
43  virtual StDetectorId detector() const { return kGmtId; }
44 
46  Int_t getKey() const { return mKey; }
48  Int_t getModule() const { return hardwarePosition() - 1; }
50  Float_t getAdcX() const { return mAdcX; }
52  Float_t getErrorAdcX() const { return mdAdcX; }
54  Float_t getAdcY() const { return mAdcY; }
56  Float_t getErrorAdcY() const { return mdAdcY; }
58  Float_t getLocalX() const { return position().x(); }
60  Float_t getErrorLocalX() const { return positionError().x(); }
62  Float_t getLocalY() const { return position().y(); }
64  Float_t getErrorLocalY() const { return positionError().y(); }
66  Float_t getSigmaX() const { return mSigmaX; }
68  Float_t getErrorSigmaX() const { return mErrSigmaX; }
70  Float_t getSigmaY() const { return mSigmaY; }
72  Float_t getErrorSigmaY() const { return mErrSigmaY; }
74  Int_t volumeID() const { return 0; }
75 
76  //
77  // Setters
78  //
79 
81  void setAdcX( Float_t adc ) { mAdcX = adc; }
83  void setErrorAdcX( Float_t error ) { mdAdcX = error; }
85  void setAdcY( Float_t adc ) { mAdcY = adc; }
87  void setErrorAdcY( Float_t error ) { mdAdcY = error; }
89  void setLocalX( Float_t position ) { mPosition.setX(position); }
91  void setErrorLocalX( Float_t error ) { mPositionError.setX(error); }
93  void setLocalY( Float_t position ) { mPosition.setY(position); }
95  void setErrorLocalY( Float_t error ) { mPositionError.setY(error); }
97  void setSigmaX( Float_t sigma ) { mSigmaX = sigma; }
99  void setErrorSigmaX( Float_t error ) { mErrSigmaX = error; }
101  void setSigmaY( Float_t sigma ) { mSigmaY = sigma; }
103  void setErrorSigmaY( Float_t error ) { mErrSigmaY = error; }
105  void setModule( Short_t module ) { setHardwarePosition(module+1); }
106 
107  protected:
109  Int_t mKey;
111  Float_t mAdcX;
113  Float_t mAdcY;
115  Float_t mdAdcX;
117  Float_t mdAdcY;
119  Float_t mSigmaX;
121  Float_t mErrSigmaX;
123  Float_t mSigmaY;
125  Float_t mErrSigmaY;
128  Float_t mChargeUncert;
129 
130  private:
131  ClassDef(StGmtHit,1)
132 };
133 
134 ostream& operator<<(ostream& os, StGmtHit const & v);
135 
136 #endif // #define StGmtHit_hh
Float_t getErrorLocalX() const
Local X coordinate error.
Definition: StGmtHit.h:60
Float_t getErrorSigmaX() const
Position error in X.
Definition: StGmtHit.h:68
void setSigmaY(Float_t sigma)
Set local Y.
Definition: StGmtHit.h:101
Float_t getErrorAdcY() const
ADC error in Y.
Definition: StGmtHit.h:56
Float_t getSigmaY() const
Position in Y.
Definition: StGmtHit.h:70
void setErrorLocalY(Float_t error)
Set local Y error.
Definition: StGmtHit.h:95
Float_t mAdcX
ADC counts in X.
Definition: StGmtHit.h:111
void setErrorSigmaY(Float_t error)
Set local Y error.
Definition: StGmtHit.h:103
Definition: StHit.h:125
Float_t mSigmaX
Position in local X.
Definition: StGmtHit.h:119
void setAdcX(Float_t adc)
Set ADC in X.
Definition: StGmtHit.h:81
Float_t getAdcX() const
ADC in X.
Definition: StGmtHit.h:50
Int_t volumeID() const
Volume ID.
Definition: StGmtHit.h:74
Float_t getLocalX() const
Local X coordinate.
Definition: StGmtHit.h:58
Float_t mErrSigmaX
Position error in local X.
Definition: StGmtHit.h:121
Float_t getLocalY() const
Local Y coordinate.
Definition: StGmtHit.h:62
Float_t mErrSigmaY
Position error in local Y.
Definition: StGmtHit.h:125
Int_t getModule() const
Module.
Definition: StGmtHit.h:48
Float_t mSigmaY
Position in local Y.
Definition: StGmtHit.h:123
void setSigmaX(Float_t sigma)
Set local X.
Definition: StGmtHit.h:97
Float_t mAdcY
ADC counts in Y.
Definition: StGmtHit.h:113
void setErrorSigmaX(Float_t error)
Set local X error.
Definition: StGmtHit.h:99
Float_t mdAdcX
ADC counts in X.
Definition: StGmtHit.h:115
Holds data for the hit in GMT.
Definition: StGmtHit.h:23
Float_t mdAdcY
ADC counts in Y.
Definition: StGmtHit.h:117
~StGmtHit()
Destructor.
Definition: StGmtHit.cxx:33
void setErrorAdcY(Float_t error)
Set ADC error in Y.
Definition: StGmtHit.h:87
void Print(Option_t *option="") const
Print hit information (parameters)
Definition: StGmtHit.cxx:47
void setAdcY(Float_t adc)
Set ADC in Y.
Definition: StGmtHit.h:85
Float_t getSigmaX() const
Position in X.
Definition: StGmtHit.h:66
Float_t mChargeUncert
Definition: StGmtHit.h:128
virtual StDetectorId detector() const
Unique detector ID.
Definition: StGmtHit.h:43
void setErrorAdcX(Float_t error)
Set ADC error in X.
Definition: StGmtHit.h:83
StGmtHit(Int_t key=-1, Int_t module=-1, Float_t adcX=0, Float_t adcY=0, Float_t dadcX=0, Float_t dadcY=0, Float_t localX=0, Float_t localY=0, Float_t localXErr=10000, Float_t localYErr=10000, Float_t sigmaX=0, Float_t sigmaY=0, Float_t sigmaXErr=10000, Float_t sigmaYErr=10000)
Constructor.
Definition: StGmtHit.cxx:19
Float_t getErrorLocalY() const
Local Y coordinate error.
Definition: StGmtHit.h:64
Int_t mKey
Unique label.
Definition: StGmtHit.h:109
Int_t getKey() const
Key.
Definition: StGmtHit.h:46
void setLocalY(Float_t position)
Set local Y.
Definition: StGmtHit.h:93
void setErrorLocalX(Float_t error)
Set local X error.
Definition: StGmtHit.h:91
Float_t getAdcY() const
ADC in Y.
Definition: StGmtHit.h:54
void setModule(Short_t module)
Set module ID.
Definition: StGmtHit.h:105
Float_t getErrorAdcX() const
ADC error in X.
Definition: StGmtHit.h:52
void setLocalX(Float_t position)
Set local X.
Definition: StGmtHit.h:89
Float_t getErrorSigmaY() const
Position error in X.
Definition: StGmtHit.h:72