12 #include "StPicoMessMgr.h"
13 #include "StPicoETofHit.h"
20 mLocalX( std::numeric_limits<
short>::min() ),
21 mLocalY( std::numeric_limits<
short>::min() ),
23 mLeadingEdgeTime( 0 ),
24 mTimeOverThreshold( 0 )
34 mGeomId = hit.mGeomId;
35 mLocalX = hit.mLocalX;
36 mLocalY = hit.mLocalY;
37 mClusterSize = hit.mClusterSize;
38 mLeadingEdgeTime = hit.mLeadingEdgeTime;
39 mTimeOverThreshold = hit.mTimeOverThreshold;
52 LOG_INFO <<
" sector = " <<
sector()
53 <<
" zPlane = " <<
zPlane()
55 <<
" localX = " <<
localX()
56 <<
" localY = " <<
localY()
74 mGeomId = ( ( geomId > std::numeric_limits<unsigned char>::max() ) ?
75 std::numeric_limits<unsigned char>::max() :
82 if( sector<13 || sector>24 || plane<1 || plane>3 || counter<1 || counter>3 ) {
86 mGeomId = (UChar_t)( (sector - 13) * 9 + (plane - 1) * 3 + (counter - 1) + 1 );
92 mLocalX = ( fabs(localX * 800.) > std::numeric_limits<short>::max() ?
93 ( (localX>0) ? std::numeric_limits<short>::max() :
94 std::numeric_limits<short>::min() ):
95 (Short_t)( TMath::Nint( localX * 800. ) ) );
100 mLocalY = ( fabs(localY * 800.) > std::numeric_limits<short>::max() ?
101 ( (localY>0) ? std::numeric_limits<short>::max() :
102 std::numeric_limits<short>::min() ):
103 (Short_t)( TMath::Nint( localY * 800. ) ) );
108 if( clusterSize <= 0 ) {
112 mClusterSize = ( ( clusterSize > std::numeric_limits<unsigned char>::max() ) ?
113 std::numeric_limits<unsigned char>::max() :
114 (UChar_t) clusterSize );
120 Float_t cyclicTime =
time;
121 if( cyclicTime < 0. ) {
122 while( cyclicTime < 0. ) {
126 if( cyclicTime > 51200. ) {
127 while( cyclicTime > 51200. ) {
128 cyclicTime -= 51200.;
132 mLeadingEdgeTime = cyclicTime;
143 mTimeOverThreshold = 0;
146 mTimeOverThreshold = ( (tot * 250.) > std::numeric_limits<unsigned short>::max() ?
147 std::numeric_limits<unsigned short>::max() :
148 (UShort_t)( TMath::Nint( tot * 250. ) ) );
Float_t localX() const
Return local X coordinate (cm) across strips w.r.t. center of eTOF counter volume.
void setClusterSize(Int_t clusterSize)
Set cluster size of eTOF hit.
Float_t leadingEdgeTime() const
Return leading edge time (ns) of eTOF hit.
void setLocalY(Float_t localY)
Set local Y coordinate (cm) along strips w.r.t. center of eTOF counter volume.
virtual ~StPicoETofHit()
Destructor.
virtual void Print(const Char_t *option="") const
Print hit information.
Float_t timeOverThreshold() const
Return time over threshold (ns) of eTOF hit.
StPicoETofHit()
Default consturctor.
Int_t clusterSize() const
Return cluster size of eTOF hit (number of "hits" on different strips clustered into one hit) ...
Int_t sector() const
Return eTOF sector number (equal to TPC sector numbering)
void setTime(Float_t time)
Set leading edge time (ns) of eTOF hit.
void setTot(Float_t tot)
Set time over threshold (ns) of eTOF hit.
void setTimeOverThreshold(Float_t tot)
Set time over threshold (ns) of eTOF hit.
Stores eTOF hit information.
void setGeomId(Int_t geomId)
Set geometry ID of the hit.
Float_t time() const
Return leading edge time (ns) of eTOF hit.
Float_t localY() const
Return local Y coordinate (cm) along strips w.r.t. center of eTOF counter volume. ...
void setLocalX(Float_t localX)
Set local X coordinate (cm) across strips w.r.t. center of eTOF counter volume.