StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StETofDigi.h
1 /***************************************************************************
2  *
3  * $Id: StETofDigi.h,v 2.3 2019/02/11 18:52:38 ullrich Exp $
4  *
5  * Author: Philipp Weidenkaff, April 2018
6  ***************************************************************************
7  *
8  * Description: Data class for expanded digital eTOF information:
9  * eTOF digis capture the electronic response of each side of the MRPC
10  * counter read-out
11  *
12  ***************************************************************************
13  *
14  * $Log: StETofDigi.h,v $
15  * Revision 2.3 2019/02/11 18:52:38 ullrich
16  * Added an additional access functions to get the associated hit.
17  *
18  * Revision 2.2 2018/07/13 14:55:09 ullrich
19  * Added getter function for the associated hit (Florian)
20  *
21  * Revision 2.1 2018/07/09 14:53:48 ullrich
22  * Initial Revision.
23  *
24  *
25  ***************************************************************************/
26 #ifndef STETOFDIGI_H
27 #define STETOFDIGI_H
28 
29 #include <Stiostream.h>
30 #include "StObject.h"
31 
32 class StETofHit;
33 
34 
35 class StETofDigi : public StObject {
36 public:
40  StETofDigi();
41 
52  StETofDigi( const unsigned int sector, const unsigned int zPlane, const unsigned int counter,
53  const unsigned int strip, const unsigned int side,
54  const double& time, const double& tot );
55 
64  StETofDigi( const unsigned int rocId, const unsigned int get4Id, const unsigned int elChan,
65  const double& time, const double& tot );
66 
70  StETofDigi( const StETofDigi& );
71 
75  ~StETofDigi();
76 
80  double rawTime() const;
81 
85  double calibTime() const;
86 
87 
88 
92  double rawCharge() const;
96  double rawTot() const;
100  double calibCharge() const;
104  double calibTot() const;
105 
106 
107 
111  unsigned int sector() const;
115  unsigned int zPlane() const;
119  unsigned int counter() const;
123  unsigned int strip() const;
127  unsigned int chan() const;
131  unsigned int side() const;
132 
133 
137  unsigned int elChan() const;
141  unsigned int get4Id() const;
145  unsigned int rocId() const;
146 
147 
155  StETofHit* associatedHit() const;
156 
157 
161  bool operator < ( const StETofDigi& rhs ) const; //ordering operator
162 
163  int compare( const StObject* obj ) const;
164  int compare( const StETofDigi* digi ) const;
165 
166 
168  void setGeoAddress( const unsigned int iSector, const unsigned int iZPlane, const unsigned int iCounter,
169  const unsigned int iChannel, const unsigned int iSide );
170  void setHwAddress( const unsigned int iRocId, const unsigned int iGet4Id, const unsigned int iElChan );
171 
172  void setRawTime( const double& time ); //ns
173  void setRawTot( const double& tot ); //ns
174  void setCalibTime( const double& time );
175  void setCalibTot( const double& tot );
176 
177  void setAssociatedHit( StETofHit* hit );
178 
179 
180 private:
181  UInt_t mSector;
182  UInt_t mZPlane;
183  UInt_t mCounter;
184  UInt_t mStrip;
185  UInt_t mSide;
186 
187  UInt_t mRocId;
188  UInt_t mGet4Id;
189  UInt_t mElChan;
190 
191  Double_t mRawTime;
192  Double_t mCalibTime;
193  Double_t mRawTot;
194  Double_t mCalibTot;
195 
196  StETofHit* mAssociatedHit; //$LINK
197 
198 
199  ClassDef( StETofDigi, 1 );
200 };
201 
202 ostream& operator << ( ostream&, const StETofDigi& digi ); // Printing operator
203 
204 
205 inline double StETofDigi::rawTime() const { return mRawTime; };
206 inline double StETofDigi::calibTime() const { return mCalibTime; };
207 inline double StETofDigi::rawCharge() const { return rawTot(); };
208 inline double StETofDigi::rawTot() const { return mRawTot; };
209 inline double StETofDigi::calibCharge() const { return calibTot(); };
210 inline double StETofDigi::calibTot() const { return mCalibTot; };
211 
212 inline unsigned int StETofDigi::sector() const { return mSector; };
213 inline unsigned int StETofDigi::zPlane() const { return mZPlane; };
214 inline unsigned int StETofDigi::counter() const { return mCounter; };
215 inline unsigned int StETofDigi::strip() const { return mStrip; };
216 inline unsigned int StETofDigi::chan() const { return strip(); };
217 inline unsigned int StETofDigi::side() const { return mSide; };
218 inline unsigned int StETofDigi::elChan() const { return mElChan; };
219 inline unsigned int StETofDigi::get4Id() const { return mGet4Id; };
220 inline unsigned int StETofDigi::rocId() const { return mRocId; };
221 
222 inline StETofHit* StETofDigi::associatedHit() { return mAssociatedHit; };
223 inline StETofHit* StETofDigi::associatedHit() const { return mAssociatedHit; };
224 
225 inline void StETofDigi::setRawTime( const double& time ) { mRawTime = time; };
226 inline void StETofDigi::setRawTot( const double& tot ) { mRawTot = tot; };
227 inline void StETofDigi::setCalibTime( const double& time ) { mCalibTime = time; };
228 inline void StETofDigi::setCalibTot( const double& tot ) { mCalibTot = tot; };
229 
230 inline void StETofDigi::setAssociatedHit( StETofHit* hit ) { mAssociatedHit = hit; };
231 
232 
233 #endif // STETOFDIGI_H
double calibTime() const
calibrated time
Definition: StETofDigi.h:206
StETofHit * associatedHit()
pointer to the hit which has been reconstructed from this digi
Definition: StETofDigi.h:222
unsigned int zPlane() const
ZPlane.
Definition: StETofDigi.h:213
unsigned int chan() const
Alias for strip.
Definition: StETofDigi.h:216
unsigned int sector() const
Sector.
Definition: StETofDigi.h:212
double rawCharge() const
Alias for GetRawTot.
Definition: StETofDigi.h:207
double calibCharge() const
Alias for GetRawTot.
Definition: StETofDigi.h:209
bool operator<(const StETofDigi &rhs) const
Sorting using the time, assumes Digis are in same reference frame (e.g. same epoch).
Definition: StETofDigi.cxx:111
unsigned int strip() const
Strip.
Definition: StETofDigi.h:215
double rawTime() const
Raw Time.
Definition: StETofDigi.h:205
~StETofDigi()
Destructor.
Definition: StETofDigi.cxx:103
double rawTot() const
Getter for uncalibrated Tot.
Definition: StETofDigi.h:208
unsigned int elChan() const
electronic Channel.
Definition: StETofDigi.h:218
unsigned int get4Id() const
get4Id.
Definition: StETofDigi.h:219
unsigned int counter() const
Counter.
Definition: StETofDigi.h:214
StETofDigi()
Default constructor.
Definition: StETofDigi.cxx:24
double calibTot() const
Getter for calibrated Tot.
Definition: StETofDigi.h:210
unsigned int rocId() const
RocId.
Definition: StETofDigi.h:220
unsigned int side() const
Side.
Definition: StETofDigi.h:217
void setGeoAddress(const unsigned int iSector, const unsigned int iZPlane, const unsigned int iCounter, const unsigned int iChannel, const unsigned int iSide)
Definition: StETofDigi.cxx:152