9 #include "StPicoMessMgr.h"
10 #include "StPicoMtdPidTraits.h"
19 mTrackIndex(-1), mMtdHitIndex(-1), mMatchFlag(-1),
20 mDeltaY(-999.), mDeltaZ(-999.), mDeltaTimeOfFlight(-999.),
21 mBeta( 0 ), mMtdHitChan(-1) {
27 mTrackIndex = traits.mTrackIndex;
28 mMtdHitIndex = traits.mMtdHitIndex;
29 mMatchFlag = traits.mMatchFlag;
30 mDeltaY = traits.mDeltaY;
31 mDeltaZ = traits.mDeltaZ;
32 mDeltaTimeOfFlight = traits.mDeltaTimeOfFlight;
34 mMtdHitChan = traits.mMtdHitChan;
45 LOG_INFO <<
"Matched hit: backleg = " <<
backleg()
46 <<
", module = " <<
module()
47 <<
", cell = " <<
cell()
49 LOG_INFO <<
"Matched track index = " << mTrackIndex << endm;
50 LOG_INFO <<
"(DeltaY, DeltaZ, DeltaTOF, beta) = ("
53 << mDeltaTimeOfFlight <<
", "
54 << mBeta <<
")" << endm;
59 Int_t gchan = (backleg - 1) * 60 + (module - 1) * 12 +
cell;
60 mMtdHitChan = (gchan > std::numeric_limits<short>::max()) ? -1 : (Short_t) gchan;
69 mBeta = ( (beta * 20000.) > std::numeric_limits<unsigned short>::max() ?
70 std::numeric_limits<unsigned short>::max() :
71 (UShort_t)( TMath::Nint( beta * 20000. ) ) );
77 mDeltaY = ( TMath::Abs(dy * 200.) > std::numeric_limits<short>::max() ?
78 ( (dy > 0) ? std::numeric_limits<short>::max() :
79 std::numeric_limits<short>::min() ) :
80 (Short_t)( TMath::Nint( dy * 200.) ) );
86 mDeltaZ = ( TMath::Abs(dz * 200.) > std::numeric_limits<short>::max() ?
87 ( (dz > 0) ? std::numeric_limits<short>::max() :
88 std::numeric_limits<short>::min() ) :
89 (Short_t)( TMath::Nint( dz * 200. ) ) );
Holds information about MTD-matched track.
virtual void Print(const Char_t *option="") const
Print MTD PID traits information.
Int_t cell() const
Return cell number.
Int_t backleg() const
Return backleg number.
void setDeltaZ(Float_t dz)
Set delta Z.
StPicoMtdPidTraits()
Default constructor.
void setHitChannel(Int_t backleg, Int_t module, Int_t cell)
Set hit channel: (backleg-1) * 60 + (module-1) * 12 + cell.
void setDeltaY(Float_t dy)
Set delta Y.
void setBeta(Float_t beta)
Set beta.
virtual ~StPicoMtdPidTraits()
Destructor.
Int_t module() const
Return module number.