StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPicoBTofPidTraits.h
1 
9 #ifndef StPicoBTofPidTraits_h
10 #define StPicoBTofPidTraits_h
11 
12 // C++ headers
13 #include <limits>
14 
15 // ROOT headers
16 #include "TObject.h"
17 #include "TVector3.h"
18 
19 //_________________
20 class StPicoBTofPidTraits : public TObject {
21 
22  public:
28  virtual ~StPicoBTofPidTraits();
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 btofCellId() const { return (Int_t)mBTofCellId; }
41  Int_t btofMatchFlag() const { return (Int_t)mBTofMatchFlag; }
42 
44  Float_t btof() const { return mBTof; }
46  Float_t btofBeta() const { return (Float_t)mBTofBeta / 20000.f; }
48  Float_t btofYLocal() const { return (Float_t)mBTofYLocal / 1000.; }
50  Float_t btofZLocal() const { return (Float_t)mBTofZLocal / 1000.; }
51 
53  TVector3 btofHitPos() const { return TVector3( btofHitPosX() , btofHitPosY() , btofHitPosZ() ); }
54 
56  Float_t btofHitPosX() const { return (Float_t)mBTofHitPosX / 100.; }
58  Float_t btofHitPosY() const { return (Float_t)mBTofHitPosY / 100.; }
60  Float_t btofHitPosZ() const { return (Float_t)mBTofHitPosZ / 100.; }
61 
63  Float_t nSigmaElectron() const { return (Float_t)mNSigmaElectron / 1000.; }
65  Float_t nSigmaPion() const { return (Float_t)mNSigmaPion / 1000.; }
67  Float_t nSigmaKaon() const { return (Float_t)mNSigmaKaon / 1000.; }
69  Float_t nSigmaProton() const { return (Float_t)mNSigmaProton / 1000.; }
70 
71  //
72  // Setters
73  //
74 
76  void setTrackIndex(Int_t idx2PicoTrack)
77  { mTrackIndex = (idx2PicoTrack > std::numeric_limits<short>::max()) ? -1 : (Short_t)idx2PicoTrack; }
79  void setBTofCellId(Int_t tray, Int_t module, Int_t cell)
80  { mBTofCellId = (Short_t)((tray - 1) * 192 + (module - 1) * 6 + (cell - 1)); }
82  void setBTofMatchFlag(UChar_t flag) { mBTofMatchFlag = flag; }
84  void setTOF(Float_t tof) { mBTof = tof; }
86  void setBeta(Float_t beta);
88  void setHitPositionXYZ(Float_t x, Float_t y, Float_t z);
90  void setHitPositionX(Float_t x);
92  void setHitPositionY(Float_t y);
94  void setHitPositionZ(Float_t z);
96  void setYLocal(Float_t yLocal);
98  void setZLocal(Float_t zLocal);
99 
101  void setNSigmaElectron(Float_t sigma);
103  void setNSigmaPion(Float_t sigma);
105  void setNSigmaKaon(Float_t sigma);
107  void setNSigmaProton(Float_t sigma);
108 
109  private:
110 
112  Short_t mTrackIndex;
114  Short_t mBTofCellId;
116  UChar_t mBTofMatchFlag;
118  Float_t mBTof;
120  UShort_t mBTofBeta;
122  Short_t mBTofYLocal;
124  Short_t mBTofZLocal;
126  Short_t mBTofHitPosX;
128  Short_t mBTofHitPosY;
130  Short_t mBTofHitPosZ;
131 
133  Short_t mNSigmaElectron;
135  Short_t mNSigmaPion;
137  Short_t mNSigmaKaon;
139  Short_t mNSigmaProton;
140 
141  ClassDef(StPicoBTofPidTraits, 4);
142 };
143 
144 #endif
Float_t btofZLocal() const
Return zLocal (compression = zLocal * 1000)
Float_t btofHitPosY() const
Return y comonent of hit position.
Int_t btofCellId() const
Return BTOF cell ID (encoding = (tray-1)*192+(module-1)*6+(cell-1): -1 - no match ) ...
void setZLocal(Float_t zLocal)
Set zLocal.
void setNSigmaProton(Float_t sigma)
Set nsigma(proton)
virtual ~StPicoBTofPidTraits()
Destructor.
Int_t trackIndex() const
Return index of the assiciated track.
void setBTofCellId(Int_t tray, Int_t module, Int_t cell)
Set TOF cell ID which encodes tray, module and cell IDs.
Float_t btofYLocal() const
Return yLocal (compression = yLocal * 1000)
virtual void Print(const Char_t *option="") const
Print TOF PID traits information.
void setHitPositionZ(Float_t z)
Set hit position z (cm)
Definition: tof.h:15
Float_t btofBeta() const
Return beta (compression = beta * 20000)
Float_t btofHitPosZ() const
Return z comonent of hit position.
void setHitPositionXYZ(Float_t x, Float_t y, Float_t z)
Set hit position (x,y,z)
void setTrackIndex(Int_t idx2PicoTrack)
Set assiciated track index.
TVector3 btofHitPos() const
Return hit position.
Float_t btof() const
Return time of flight.
void setNSigmaElectron(Float_t sigma)
Set nsigma(electron)
void setNSigmaKaon(Float_t sigma)
Set nsigma(kaon)
void setTOF(Float_t tof)
Set time of flight.
void setHitPositionY(Float_t y)
Set hit position y (cm)
void setNSigmaPion(Float_t sigma)
Set nsigma(pion)
void setBTofMatchFlag(UChar_t flag)
Set TOF-matching flag.
Float_t nSigmaKaon() const
Return nSigma(kaon)
void setHitPositionX(Float_t x)
Set hit position x (cm)
void setBeta(Float_t beta)
Set beta.
Float_t nSigmaPion() const
Return nSigma(pion)
Float_t nSigmaProton() const
Return nSigma(proton)
StPicoBTofPidTraits()
Default constructor.
Int_t btofMatchFlag() const
Return matching flag (0 - no match, 1 - one-to-one, 2 - one-to-multiple)
Float_t btofHitPosX() const
Return x comonent of hit position.
void setYLocal(Float_t yLocal)
Set yLocal.
Float_t nSigmaElectron() const
Return nSigma(electron)