gregsKaonTrackCut.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #ifndef gregsKaonTrackCut_h
  2. #define gregsKaonTrackCut_h
  3. #include "StHbtMaker/Base/StHbtTrackCut.h"
  4. //_________________
  5. class gregsKaonTrackCut : public StHbtTrackCut {
  6. public:
  7. gregsKaonTrackCut();
  8. gregsKaonTrackCut(const gregsKaonTrackCut &copy);
  9. gregsKaonTrackCut *Clone();
  10. ~gregsKaonTrackCut();
  11. virtual bool Pass(const StHbtTrack *trk); //0-tpc,1-tof,2-tpc+tof,3-TOF(m^2+3nsigma)orTPC(nsK<v1&&nsO>v2&&p<v3)
  12. virtual StHbtString Report();
  13. //Set identification type
  14. void SetDetectorSelection(const short &type) {mSelType = type;}
  15. //Set track cuts
  16. void SetType(const short &type) {mType = type;}
  17. void SetCharge(const short &charge) {mCharge = charge;}
  18. void SetNHits(const short &lo, const short &hi) {mNHits[0]=lo; mNHits[1]=hi;}
  19. void SetNHitsFit(const short &lo, const short &hi) {mNHitsFit[0]=lo; mNHitsFit[1]=hi;}
  20. void SetP(const float &lo, const float &hi) {mP[0]=lo; mP[1]=hi;}
  21. void SetPt(const float &lo, const float &hi) {mPt[0]=lo; mPt[1]=hi;}
  22. void SetPx(const float &lo, const float &hi) {mPx[0]=lo; mPx[1]=hi;}
  23. void SetPy(const float &lo, const float &hi) {mPy[0]=lo; mPy[1]=hi;}
  24. void SetPz(const float &lo, const float &hi) {mPz[0]=lo; mPz[1]=hi;}
  25. void SetRapidity(const float &lo, const float &hi) {mRapidity[0]=lo; mRapidity[1]=hi;}
  26. void SetEta(const float &lo, const float &hi) {mEta[0]=lo; mEta[1]=hi;}
  27. void SetDCA(const float &lo, const float &hi) {mDCA[0]=lo; mDCA[1]=hi;}
  28. void SetDCAGlobal(const float &lo, const float &hi) {mDCAGlobal[0]=lo; mDCAGlobal[1]=hi;}
  29. void SetAntiSplit(const float &lo) {mAntiSplit = lo;}
  30. //Set TPC identification parameters
  31. void SetTpcNSigmaElectron(const float& lo, const float& hi) {mTpcNSigmaElectron[0]=lo; mTpcNSigmaElectron[1]=hi;}
  32. void SetTpcNSigmaPion(const float& lo, const float& hi) {mTpcNSigmaPion[0]=lo; mTpcNSigmaPion[1]=hi;}
  33. void SetTpcNSigmaKaon(const float& lo, const float& hi) {mTpcNSigmaKaon[0]=lo; mTpcNSigmaKaon[1]=hi;}
  34. void SetTpcNSigmaProton(const float& lo, const float& hi) {mTpcNSigmaProton[0]=lo; mTpcNSigmaProton[1]=hi;}
  35. void SetTpcMomentum(const float& lo, const float& hi) {mTpcMomentum[0]=lo; mTpcMomentum[1]=hi;}
  36. //Set TOF identification parameters
  37. void SetTofMassSqr(const float& lo, const float& hi) {mTofMassSqr[0]=lo; mTofMassSqr[1]=hi;}
  38. void SetTofMomentum(const float &lo, const float &hi) {mTofMomentum[0]=lo; mTofMomentum[1]=hi;}
  39. void SetTofInvBetaDiff(const float &lo, const float &hi) {mTofInvBetaDiff[0]=lo; mTofInvBetaDiff[1]=hi;}
  40. //Set TOF && TPC identification parameters
  41. void SetTnTMomentum(const float &lo, const float &hi) {mTnTMomentum[0]=lo; mTnTMomentum[1]=hi;}
  42. void SetTnTNSigmaKaon(const float &lo, const float &hi) {mTnTNSigmaKaon[0]=lo; mTnTNSigmaKaon[1]=hi;}
  43. private:
  44. //Selection type
  45. short mSelType; //0-tpc,1-tof,2-tpc+tof,3-TOF(m^2+3nsigma)orTPC(nsK<v1&&nsO>v2&&p<v3)
  46. //Track parameters
  47. short mType; // 0-global, 1-primary
  48. short mCharge;
  49. short mFlag[2];
  50. short mNHits[2];
  51. short mNHitsFit[2];
  52. float mP[2];
  53. float mPt[2];
  54. float mPx[2];
  55. float mPy[2];
  56. float mPz[2];
  57. float mRapidity[2];
  58. float mEta[2];
  59. float mDCA[2];
  60. float mDCAGlobal[2];
  61. float mAntiSplit; // nHitsFit/nHitsPossible
  62. //TPC identification
  63. float mTpcMomentum[2];
  64. float mTpcNSigmaElectron[2];
  65. float mTpcNSigmaPion[2];
  66. float mTpcNSigmaKaon[2];
  67. float mTpcNSigmaProton[2];
  68. //TOF identification
  69. float mTofMomentum[2];
  70. float mTofMassSqr[2];
  71. float mTofInvBetaDiff[2];
  72. //TPC&&TOF
  73. float mTnTMomentum[2];
  74. float mTnTNSigmaKaon[2];
  75. //Counters
  76. long mNTracksPassed;
  77. long mNTracksFailed;
  78. #ifdef __ROOT__
  79. ClassDef(gregsKaonTrackCut, 1)
  80. #endif
  81. };
  82. inline gregsKaonTrackCut *gregsKaonTrackCut::Clone() {
  83. gregsKaonTrackCut *c = new gregsKaonTrackCut(*this); return c;
  84. }
  85. #endif