gregsTrackCut.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. #ifndef gregsTrackCut_hh
  2. #define gregsTrackCut_hh
  3. #include <Stsstream.h>
  4. #include "StHbtMaker/Base/StHbtTrackCut.h"
  5. class gregsTrackCut : public StHbtTrackCut
  6. {
  7. public:
  8. gregsTrackCut();
  9. gregsTrackCut(gregsTrackCut& );
  10. ~gregsTrackCut();
  11. virtual bool Pass(const StHbtTrack*);
  12. virtual StHbtString Report();
  13. void SetNSigmaElectron(const float& lo, const float& hi);
  14. void SetNSigmaPion(const float& lo, const float& hi);
  15. void SetNSigmaKaon(const float& lo, const float& hi);
  16. void SetNSigmaProton(const float& lo, const float& hi);
  17. void SetTofTrackTpcNSigmaElectron(const float& lo, const float& hi);
  18. void SetTofTrackTpcNSigmaPion(const float& lo, const float& hi);
  19. void SetTofTrackTpcNSigmaKaon(const float& lo, const float& hi);
  20. void SetTofTrackTpcNSigmaProton(const float& lo, const float& hi);
  21. void SetNHits(const int& lo, const int& hi);
  22. void SetNHitsFit(const int& lo, const int& hi);
  23. void SetNdEdxHits(const int& lo, const int& hi);
  24. void SetP(const float& lo, const float& hi);
  25. void SetPt(const float& lo, const float& hi);
  26. void SetPx(const float& lo, const float& hi);
  27. void SetPy(const float& lo, const float& hi);
  28. void SetPz(const float& lo, const float& hi);
  29. void SetRapidity(const float& lo, const float& hi);
  30. void SetEta(const float& lo, const float& hi);
  31. void SetDCA(const float& lo, const float& hi);
  32. void SetDCAGlobal(const float& lo, const float& hi);
  33. void SetCharge(const int&);
  34. void SetType(const short&);
  35. void SetTofMassSqr(const float& lo, const float& hi);
  36. void SetAntiSplit(const float& lo);
  37. void SetPIDSelection(const int& pidSel); //0-TPC, 1-ToF, 2-TnT, 3-ToT, 4-ToT(ToF+TPC or TPC only)
  38. void SetTpcTrackMom(const float& lo, const float& hi);
  39. void SetTpcTrackPt(const float& lo, const float& hi);
  40. void SetTofTrackMom(const float& lo, const float& hi);
  41. void SetTofTrackPt(const float& lo, const float& hi);
  42. void SetPartIdSelection(const int& val); //1-elec, 2-muon, 3-pion, 4-kaon, 5-proton
  43. void SetInverseBetaDifference(const float& lo, const float& hi);
  44. gregsTrackCut* Clone();
  45. ostrstream* finalReport() const;
  46. //private: // here are the quantities I want to cut on...
  47. protected:
  48. short mType;
  49. int mCharge;
  50. float mNSigmaElectron[2];
  51. float mNSigmaPion[2];
  52. float mNSigmaKaon[2];
  53. float mNSigmaProton[2];
  54. float mTofNSigmaElectron[2];
  55. float mTofNSigmaPion[2];
  56. float mTofNSigmaKaon[2];
  57. float mTofNSigmaProton[2];
  58. int mNHits[2];
  59. int mNHitsFit[2];
  60. int mNdEdxHits[2];
  61. float mP[2];
  62. float mPt[2];
  63. float mPx[2];
  64. float mPy[2];
  65. float mPz[2];
  66. float mRapidity[2];
  67. float mEta[2];
  68. float mDCA[2];
  69. float mDCAGlobal[2];
  70. float mTofMassSqr[2];
  71. float mAntiSplit;
  72. int mPIDSelection; //0-TPC, 1-ToF, 2-TnT, 3-ToT
  73. float mTpcTrackMom[2];
  74. float mTpcTrackPt[2];
  75. float mTofTrackMom[2];
  76. float mTofTrackPt[2];
  77. int mPartId; //1-elec, 2-muon, 3-pion, 4-kaon, 5-proton
  78. float mInverseBetaDifferce[2];
  79. protected:
  80. long mNTracksPassed;
  81. long mNTracksFailed;
  82. #ifdef __ROOT__
  83. ClassDef(gregsTrackCut, 1)
  84. #endif
  85. };
  86. inline void gregsTrackCut::SetPartIdSelection(const int& val) {mPartId = val;}
  87. inline void gregsTrackCut::SetNSigmaElectron(const float& lo, const float& hi) {
  88. mNSigmaElectron[0]=lo; mNSigmaElectron[1]=hi;}
  89. inline void gregsTrackCut::SetNSigmaPion(const float& lo, const float& hi) {
  90. mNSigmaPion[0]=lo; mNSigmaPion[1]=hi;}
  91. inline void gregsTrackCut::SetNSigmaKaon(const float& lo, const float& hi) {
  92. mNSigmaKaon[0]=lo; mNSigmaKaon[1]=hi;}
  93. inline void gregsTrackCut::SetNSigmaProton(const float& lo, const float& hi) {
  94. mNSigmaProton[0]=lo; mNSigmaProton[1]=hi;}
  95. inline void gregsTrackCut::SetPIDSelection(const int& pid) {mPIDSelection = pid;}
  96. inline void gregsTrackCut::SetNHits(const int& lo, const int& hi) {
  97. mNHits[0]=lo; mNHits[1]=hi;}
  98. inline void gregsTrackCut::SetNHitsFit(const int& lo, const int& hi) {
  99. mNHitsFit[0]=lo; mNHitsFit[1]=hi;}
  100. inline void gregsTrackCut::SetNdEdxHits(const int& lo, const int& hi) {
  101. mNdEdxHits[0]=lo; mNdEdxHits[1]=hi;}
  102. inline void gregsTrackCut::SetP(const float& lo, const float& hi) {mP[0]=lo; mP[1]=hi;}
  103. inline void gregsTrackCut::SetPt(const float& lo, const float& hi) {mPt[0]=lo; mPt[1]=hi;}
  104. inline void gregsTrackCut::SetPx(const float& lo, const float& hi) {mPx[0]=lo; mPx[1]=hi;}
  105. inline void gregsTrackCut::SetPy(const float& lo, const float& hi) {mPy[0]=lo; mPy[1]=hi;}
  106. inline void gregsTrackCut::SetPz(const float& lo, const float& hi) {mPz[0]=lo; mPz[1]=hi;}
  107. inline void gregsTrackCut::SetRapidity(const float& lo,const float& hi) {
  108. mRapidity[0]=lo; mRapidity[1]=hi;}
  109. inline void gregsTrackCut::SetEta(const float& lo,const float& hi) {mEta[0]=lo; mEta[1]=hi;}
  110. inline void gregsTrackCut::SetDCA(const float& lo,const float& hi) {mDCA[0]=lo; mDCA[1]=hi;}
  111. inline void gregsTrackCut::SetDCAGlobal(const float& lo,const float& hi) {
  112. mDCAGlobal[0]=lo; mDCAGlobal[1]=hi;}
  113. inline void gregsTrackCut::SetCharge(const int& ch) {mCharge = ch;}
  114. inline void gregsTrackCut::SetType(const short& type) {mType = type;}
  115. inline void gregsTrackCut::SetTofMassSqr(const float& lo, const float& hi) {
  116. mTofMassSqr[0]=lo; mTofMassSqr[1]=hi;}
  117. inline void gregsTrackCut::SetAntiSplit(const float& lo) {mAntiSplit = lo;}
  118. inline void gregsTrackCut::SetTpcTrackMom(const float& lo, const float& hi) {
  119. mTpcTrackMom[0]=lo; mTpcTrackMom[1]=hi;}
  120. inline void gregsTrackCut::SetTpcTrackPt(const float& lo, const float& hi) {
  121. mTpcTrackPt[0]=lo; mTpcTrackPt[1]=hi;}
  122. inline void gregsTrackCut::SetTofTrackMom(const float& lo, const float& hi) {
  123. mTofTrackMom[0]=lo; mTofTrackMom[1]=hi;}
  124. inline void gregsTrackCut::SetTofTrackPt(const float& lo, const float& hi) {
  125. mTofTrackPt[0]=lo; mTofTrackPt[1]=hi;}
  126. inline gregsTrackCut* gregsTrackCut::Clone() {
  127. gregsTrackCut* c = new gregsTrackCut(*this); return c;}
  128. inline void gregsTrackCut::SetInverseBetaDifference(const float& lo, const float& hi) {
  129. mInverseBetaDifferce[0]=lo; mInverseBetaDifferce[1]=hi;
  130. }
  131. inline void gregsTrackCut::SetTofTrackTpcNSigmaElectron(const float& lo, const float& hi) {
  132. mTofNSigmaElectron[0]=lo; mTofNSigmaElectron[1]=hi;
  133. }
  134. inline void gregsTrackCut::SetTofTrackTpcNSigmaPion(const float& lo, const float& hi) {
  135. mTofNSigmaPion[0]=lo; mTofNSigmaPion[1]=hi;
  136. }
  137. inline void gregsTrackCut::SetTofTrackTpcNSigmaKaon(const float& lo, const float& hi) {
  138. mTofNSigmaKaon[0]=lo; mTofNSigmaKaon[1]=hi;
  139. }
  140. inline void gregsTrackCut::SetTofTrackTpcNSigmaProton(const float& lo, const float& hi) {
  141. mTofNSigmaProton[0]=lo; mTofNSigmaProton[1]=hi;
  142. }
  143. #endif