StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StETofHit.h
1 /***************************************************************************
2  *
3  * $Id: StETofHit.h,v 2.3 2019/02/11 18:53:09 ullrich Exp $
4  *
5  * Author: Philipp Weidenkaff, April 2018
6  ***************************************************************************
7  *
8  * Description: Data class for expanded digital eTOF information:
9  * eTOF hits created out of 2 or more eTOF digis from different sides of the
10  * MRPC counters
11  *
12  ***************************************************************************
13  *
14  * $Log: StETofHit.h,v $
15  * Revision 2.3 2019/02/11 18:53:09 ullrich
16  * Added additional access functions to get the associated track & idTruth and qaTruth variables for simulated Hits.
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 STETOFHIT_H
27 #define STETOFHIT_H
28 
29 #include <Stiostream.h>
30 #include "StObject.h"
31 
32 class StTrack;
33 
34 
35 class StETofHit : public StObject {
36 public:
40  StETofHit();
41 
42 
54  StETofHit( const unsigned int sector, const unsigned int zPlane, const unsigned int counter,
55  const double& time, const double& tot, const unsigned int clusterSize,
56  const double& localX, const double& localY );
57 
58 
62  StETofHit( const StETofHit& );
63 
64 
68  ~StETofHit();
69 
70 
74  unsigned int sector() const;
78  unsigned int zPlane() const;
82  unsigned int counter() const;
83 
84 
88  double time() const;
89 
93  double totalTot() const;
94 
95 
99  unsigned int clusterSize() const;
100 
101 
105  double localX() const;
109  double localY() const;
110 
111 
116 
120  StTrack* associatedTrack() const;
121 
122 
126  unsigned int idTruth() const;
130  unsigned int qaTruth() const;
131 
132 
136  bool operator<( const StETofHit& rhs ) const;
137 
138  int compare( const StObject* obj ) const;
139  int compare( const StETofHit* hit ) const;
140 
141 
143  void setHwAddress( const unsigned int iSector, const unsigned int iZPlane, const unsigned int iCounter);
144 
145  void setSector( const unsigned int sector );
146  void setZPlane( const unsigned int zPlane );
147  void setCounter( const unsigned int counter );
148 
149  void setTotalTot ( const double& tot );
150  void setTime ( const double& time );
151 
152  void setClusterSize( const unsigned int clustSize );
153 
154  void setLocalX ( const double& X );
155  void setLocalY ( const double& Y );
156 
157 
158  void setAssociatedTrack( StTrack* trk );
159 
160  void setIdTruth( unsigned short idtruth, unsigned short qatruth=0 );
161 
162 
163 private:
164  UInt_t mSector;
165  UInt_t mZPlane;
166  UInt_t mCounter;
167 
168  Double_t mTime;
169  Double_t mTotalTot;
170 
171  UInt_t mClusterSize;
172 
173  Double_t mLocalX;
174  Double_t mLocalY;
175 
176  StTrack* mAssociatedTrack; //$LINK
177 
178  UShort_t mIdTruth;
179  UShort_t mQuality;
180 
181 
182 
183  ClassDef( StETofHit, 1 );
184 };
185 
186 ostream& operator << ( ostream&, const StETofHit& hit ); // Printing operator
187 
188 
189 inline unsigned int StETofHit::sector() const { return mSector; };
190 inline unsigned int StETofHit::zPlane() const { return mZPlane; };
191 inline unsigned int StETofHit::counter() const { return mCounter; };
192 
193 inline double StETofHit::time() const { return mTime; }
194 inline double StETofHit::totalTot() const { return mTotalTot; };
195 
196 inline unsigned int StETofHit::clusterSize() const { return mClusterSize; };
197 
198 inline double StETofHit::localX() const { return mLocalX; };
199 inline double StETofHit::localY() const { return mLocalY; };
200 
201 inline StTrack* StETofHit::associatedTrack() { return mAssociatedTrack; };
202 inline StTrack* StETofHit::associatedTrack() const { return mAssociatedTrack; };
203 
204 inline unsigned int StETofHit::idTruth() const { return mIdTruth; }
205 inline unsigned int StETofHit::qaTruth() const { return mQuality; }
206 
207 inline void StETofHit::setSector( const unsigned int sector ) { mSector = sector; }
208 inline void StETofHit::setZPlane( const unsigned int zPlane ) { mZPlane = zPlane; }
209 inline void StETofHit::setCounter( const unsigned int counter ) { mCounter = counter; }
210 
211 inline void StETofHit::setTotalTot ( const double& tot ) { mTotalTot = tot; }
212 inline void StETofHit::setTime ( const double& time ) { mTime = time; }
213 
214 inline void StETofHit::setClusterSize( const unsigned int clustSize ) { mClusterSize = clustSize; }
215 
216 inline void StETofHit::setLocalX ( const double& X ) { mLocalX = X; }
217 inline void StETofHit::setLocalY ( const double& Y ) { mLocalY = Y; }
218 
219 inline void StETofHit::setAssociatedTrack( StTrack* trk ) { mAssociatedTrack = trk; }
220 
221 
222 #endif // STETOFHIT_H
unsigned int qaTruth() const
quality of this information (percentage of charge produced by mIdTruth)
Definition: StETofHit.h:205
~StETofHit()
Destructor.
Definition: StETofHit.cxx:78
double time() const
Time.
Definition: StETofHit.h:193
unsigned int clusterSize() const
Cluster size.
Definition: StETofHit.h:196
void setHwAddress(const unsigned int iSector, const unsigned int iZPlane, const unsigned int iCounter)
Definition: StETofHit.cxx:118
unsigned int counter() const
Counter.
Definition: StETofHit.h:191
StETofHit()
Default constructor.
Definition: StETofHit.cxx:25
StTrack * associatedTrack()
pointer to the track which has been matched to this hit
Definition: StETofHit.h:201
bool operator<(const StETofHit &rhs) const
Sorting using the time, assumes Digis are in same reference frame (e.g. same epoch).
Definition: StETofHit.cxx:86
unsigned int zPlane() const
ZPlane.
Definition: StETofHit.h:190
double localX() const
X-position.
Definition: StETofHit.h:198
unsigned int idTruth() const
mc-true associated track id in simulation
Definition: StETofHit.h:204
double totalTot() const
Total Tot.
Definition: StETofHit.h:194
double localY() const
Y-position.
Definition: StETofHit.h:199
unsigned int sector() const
Sector.
Definition: StETofHit.h:189