StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPicoETofPidTraits.h
1 
9 #ifndef StPicoETofPidTraits_h
10 #define StPicoETofPidTraits_h
11 
12 // C++ headers
13 #include <limits>
14 
15 // ROOT headers
16 #include "TObject.h"
17 #include "TVector3.h"
18 
19 //_________________
20 class StPicoETofPidTraits : public TObject {
21 
22  public:
28  virtual ~StPicoETofPidTraits();
30  virtual void Print( const Char_t* option = "" ) const;
31 
32  //
33  // Getters
34  //
35 
37  Int_t trackIndex() const { return mTrackIndex; }
39  Int_t hitIndex() const { return mHitIndex; }
44  Int_t matchFlag() const { return (Int_t)mMatchFlag; }
46  Float_t tof() const { return mTimeOfFlight; }
48  Float_t beta() const { return (Float_t)mBeta / 20000.; }
50  Float_t deltaX() const { return (Float_t)mDeltaX / 800.; }
52  Float_t deltaY() const { return (Float_t)mDeltaY / 800.; }
54  Float_t crossingX() const { return (Float_t)mCrossingX / 100.; }
56  Float_t crossingY() const { return (Float_t)mCrossingY / 100.; }
58  Float_t crossingZ() const { return (Float_t)mCrossingZ / 100.; }
60  TVector3 crossingPos() const { return TVector3( crossingX() , crossingY() , crossingZ() ); }
61 
62  //
63  // Setters
64  //
65 
67  void setTrackIndex( const Int_t index2PicoTrack )
68  { mTrackIndex = (index2PicoTrack > std::numeric_limits<short>::max()) ? -1 : (Short_t)index2PicoTrack; }
70  void setHitIndex( const Int_t index2Hit )
71  { mHitIndex = (index2Hit > std::numeric_limits<short>::max()) ? -1 : (Short_t)index2Hit; }
73  void setMatchFlag( const Char_t flag ) { mMatchFlag = flag; }
75  void setTof( const Float_t& tof ) { mTimeOfFlight = tof; }
77  void setBeta( const Float_t& beta );
79  void setDeltaX( const Float_t& deltaX );
81  void setDeltaY( const Float_t& deltaY );
83  void setCrossingX( const Float_t& x );
85  void setCrossingY( const Float_t& y );
87  void setCrossingZ( const Float_t& z );
89  void setCrossingPos( const Float_t& x, const Float_t& y, const Float_t& z )
90  { setCrossingX( x ); setCrossingY( y ); setCrossingZ( z ); }
91 
92 
93  private:
94 
96  Short_t mTrackIndex;
98  Short_t mHitIndex;
100  Char_t mMatchFlag;
102  Float_t mTimeOfFlight;
104  UShort_t mBeta;
106  Short_t mDeltaX;
108  Short_t mDeltaY;
110  Short_t mCrossingX;
112  Short_t mCrossingY;
114  Short_t mCrossingZ;
115 
116  ClassDef( StPicoETofPidTraits, 1 );
117 };
118 
119 #endif
virtual void Print(const Char_t *option="") const
Print eTOF PID traits information.
Int_t trackIndex() const
Return index of the associated track.
void setTrackIndex(const Int_t index2PicoTrack)
Set associated track index.
void setDeltaX(const Float_t &deltaX)
Set difference between track intersection and eTOF hit in local X coordinate (cm) across strips...
Float_t crossingX() const
Return global X coordinate (cm) of the track intersection with an eTOF volume.
TVector3 crossingPos() const
Return global position (cm) of the track intersection with an eTOF volume.
Definition: tof.h:15
void setHitIndex(const Int_t index2Hit)
Set index of corrsponding eTOF hit.
Int_t hitIndex() const
Return index of corrsponding eTOF hit.
void setDeltaY(const Float_t &deltaY)
Set difference between track intersection and eTOF hit in local Y coordinate (cm) along strips...
Hold information about eTOF-matched tracks.
void setCrossingX(const Float_t &x)
Set global X coordinate (cm) of the track intersection with an eTOF volume.
void setCrossingZ(const Float_t &z)
Set global Z coordinate (cm) of the track intersection with an eTOF volume.
Float_t crossingY() const
Return global Y coordinate (cm) of the track intersection with an eTOF volume.
Float_t deltaY() const
Return difference between track intersection and eTOF hit in local Y coordinate (cm) along strips...
virtual ~StPicoETofPidTraits()
Destructor.
void setCrossingPos(const Float_t &x, const Float_t &y, const Float_t &z)
Set global position (cm) of the track intersection with an eTOF volume.
Float_t tof() const
Return time of flight (ns)
void setCrossingY(const Float_t &y)
Set global Y coordinate (cm) of the track intersection with an eTOF volume.
Float_t crossingZ() const
Return global Z coordinate (cm) of the track intersection with an eTOF volume.
void setTof(const Float_t &tof)
Set time of flight.
Int_t matchFlag() const
StPicoETofPidTraits()
Default constructor.
Float_t deltaX() const
Return difference between track intersection and eTOF hit in local X coordinate (cm) across strips...
void setBeta(const Float_t &beta)
Set beta.
Float_t beta() const
Return beta.
void setMatchFlag(const Char_t flag)
Set match flag.