StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuETofDigi.h
1 /***************************************************************************
2  *
3  * $Id: StMuETofDigi.h,v 1.1 2019/02/21 13:32:54 jdb Exp $
4  *
5  * Author: Florian Seck, October 2018
6  ***************************************************************************
7  *
8  * Description: Data class for expanded digital eTOF information in MuDsts:
9  * eTOF digis capture the electronic response of each side of the MRPC
10  * counter read-out
11  *
12  ***************************************************************************
13  *
14  * $Log: StMuETofDigi.h,v $
15  * Revision 1.1 2019/02/21 13:32:54 jdb
16  * Inclusion of ETOF MuDst code. This code adds support for the full set of ETOF data which includes EtofDigi, EtofHit, EtofHeader. The code essentially copies similar structures from StEvent and additionally rebuilds the maps between Digis and Hits. Accessor methods are added based on the pattern from BTOF to provide access to data at various levels. The code for accessing the PID traits provided by ETOF is also provided
17  *
18  *
19  ***************************************************************************/
20 #ifndef STMUETOFDIGI_H
21 #define STMUETOFDIGI_H
22 
23 #include "TObject.h"
24 
25 class StETofDigi;
26 
27 
28 class StMuETofDigi : public TObject {
29 public:
33  StMuETofDigi();
34 
45  StMuETofDigi( const unsigned int sector, const unsigned int zPlane, const unsigned int counter,
46  const unsigned int strip, const unsigned int side,
47  const double& time, const double& tot );
48 
57  StMuETofDigi( const unsigned int rocId, const unsigned int get4Id, const unsigned int elChan,
58  const double& time, const double& tot );
59 
63  StMuETofDigi( const StMuETofDigi& );
64 
65 
69  StMuETofDigi( const StETofDigi* );
70 
71 
75  StMuETofDigi( const StETofDigi*, const int assocHitId );
76 
77 
81  ~StMuETofDigi();
82 
86  double rawTime() const;
87 
91  double calibTime() const;
92 
93 
94 
98  double rawCharge() const;
102  double rawTot() const;
106  double calibCharge() const;
110  double calibTot() const;
111 
112 
113 
117  unsigned int sector() const;
121  unsigned int zPlane() const;
125  unsigned int counter() const;
129  unsigned int strip() const;
133  unsigned int chan() const;
137  unsigned int side() const;
138 
139 
143  unsigned int elChan() const;
147  unsigned int get4Id() const;
151  unsigned int rocId() const;
152 
153 
157  int associatedHitId() const;
158 
159 
160 
164  bool operator < ( const StMuETofDigi& rhs ) const; //ordering operator
165 
166  int compare( const TObject* obj ) const;
167  int compare( const StMuETofDigi* digi ) const;
168 
169 
171  void setGeoAddress( const unsigned int iSector, const unsigned int iZPlane, const unsigned int iCounter,
172  const unsigned int iChannel, const unsigned int iSide );
173  void setHwAddress( const unsigned int iRocId, const unsigned int iGet4Id, const unsigned int iElChan );
174 
175  void setRawTime( const double& time ); //ns
176  void setRawTot( const double& tot ); //ns
177  void setCalibTime( const double& time );
178  void setCalibTot( const double& tot );
179 
180  void setAssociatedHitId( const int& id );
181 
182 
183 private:
184  UInt_t mSector;
185  UInt_t mZPlane;
186  UInt_t mCounter;
187  UInt_t mStrip;
188  UInt_t mSide;
189 
190  UInt_t mRocId;
191  UInt_t mGet4Id;
192  UInt_t mElChan;
193 
194  Double_t mRawTime;
195  Double_t mCalibTime;
196  Double_t mRawTot;
197  Double_t mCalibTot;
198 
199  Int_t mAssociatedHitId;
200 
201 
202  ClassDef( StMuETofDigi, 1 );
203 };
204 
205 inline double StMuETofDigi::rawTime() const { return mRawTime; };
206 inline double StMuETofDigi::calibTime() const { return mCalibTime; };
207 inline double StMuETofDigi::rawCharge() const { return rawTot(); };
208 inline double StMuETofDigi::rawTot() const { return mRawTot; };
209 inline double StMuETofDigi::calibCharge() const { return calibTot(); };
210 inline double StMuETofDigi::calibTot() const { return mCalibTot; };
211 
212 inline unsigned int StMuETofDigi::sector() const { return mSector; };
213 inline unsigned int StMuETofDigi::zPlane() const { return mZPlane; };
214 inline unsigned int StMuETofDigi::counter() const { return mCounter; };
215 inline unsigned int StMuETofDigi::strip() const { return mStrip; };
216 inline unsigned int StMuETofDigi::chan() const { return strip(); };
217 inline unsigned int StMuETofDigi::side() const { return mSide; };
218 inline unsigned int StMuETofDigi::elChan() const { return mElChan; };
219 inline unsigned int StMuETofDigi::get4Id() const { return mGet4Id; };
220 inline unsigned int StMuETofDigi::rocId() const { return mRocId; };
221 
222 inline int StMuETofDigi::associatedHitId() const { return mAssociatedHitId; };
223 
224 inline void StMuETofDigi::setRawTime( const double& time ) { mRawTime = time; };
225 inline void StMuETofDigi::setRawTot( const double& tot ) { mRawTot = tot; };
226 inline void StMuETofDigi::setCalibTime( const double& time ) { mCalibTime = time; };
227 inline void StMuETofDigi::setCalibTot( const double& tot ) { mCalibTot = tot; };
228 
229 inline void StMuETofDigi::setAssociatedHitId( const int& id ) { mAssociatedHitId = id; };
230 
231 
232 #endif // STMUETOFDIGI_H
int associatedHitId() const
Definition: StMuETofDigi.h:222
StMuETofDigi()
Default constructor.
unsigned int sector() const
Sector.
Definition: StMuETofDigi.h:212
unsigned int chan() const
Alias for strip.
Definition: StMuETofDigi.h:216
double rawCharge() const
Alias for GetRawTot.
Definition: StMuETofDigi.h:207
unsigned int side() const
Side.
Definition: StMuETofDigi.h:217
unsigned int rocId() const
RocId.
Definition: StMuETofDigi.h:220
unsigned int strip() const
Strip.
Definition: StMuETofDigi.h:215
unsigned int elChan() const
electronic Channel.
Definition: StMuETofDigi.h:218
unsigned int get4Id() const
get4Id.
Definition: StMuETofDigi.h:219
double rawTot() const
Getter for uncalibrated Tot.
Definition: StMuETofDigi.h:208
unsigned int zPlane() const
ZPlane.
Definition: StMuETofDigi.h:213
double calibTime() const
calibrated time
Definition: StMuETofDigi.h:206
double calibCharge() const
Alias for GetRawTot.
Definition: StMuETofDigi.h:209
~StMuETofDigi()
Destructor.
void setGeoAddress(const unsigned int iSector, const unsigned int iZPlane, const unsigned int iCounter, const unsigned int iChannel, const unsigned int iSide)
double calibTot() const
Getter for calibrated Tot.
Definition: StMuETofDigi.h:210
unsigned int counter() const
Counter.
Definition: StMuETofDigi.h:214
bool operator<(const StMuETofDigi &rhs) const
Sorting using the time, assumes Digis are in same reference frame (e.g. same epoch).
double rawTime() const
Raw Time.
Definition: StMuETofDigi.h:205