franksTrackCut.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /***************************************************************************
  2. *
  3. * $Id:
  4. *
  5. * Author: Frank Laue, Ohio State, laue@mps.ohio-state.edu
  6. ***************************************************************************
  7. *
  8. * Description: part of STAR HBT Framework: StHbtMaker package
  9. * a simple particle cut that selects on phasespace, #hits, DCA, and PID
  10. *
  11. ***************************************************************************
  12. *
  13. * $Log:
  14. *
  15. **************************************************************************/
  16. #ifndef franksTrackCut_hh
  17. #define franksTrackCut_hh
  18. //#ifndef StMaker_H
  19. //#include "StMaker.h"
  20. //#endif
  21. #include <Stsstream.h>
  22. #include "StHbtMaker/Base/StHbtTrackCut.h"
  23. class franksTrackCut : public StHbtTrackCut
  24. {
  25. public:
  26. franksTrackCut();
  27. franksTrackCut(franksTrackCut& );
  28. ~franksTrackCut();
  29. virtual bool Pass(const StHbtTrack*);
  30. virtual StHbtString Report();
  31. void SetPidProbElectron(const float& lo, const float& hi);
  32. void SetPidProbPion(const float& lo, const float& hi);
  33. void SetPidProbKaon(const float& lo, const float& hi);
  34. void SetPidProbProton(const float& lo, const float& hi);
  35. void SetNSigmaElectron(const float& lo, const float& hi);
  36. void SetNSigmaPion(const float& lo, const float& hi);
  37. void SetNSigmaKaon(const float& lo, const float& hi);
  38. void SetNSigmaProton(const float& lo, const float& hi);
  39. void SetNSigmaAntiElectron(const float& lo, const float& hi);
  40. void SetNSigmaAntiPion(const float& lo, const float& hi);
  41. void SetNSigmaAntiKaon(const float& lo, const float& hi);
  42. void SetNSigmaAntiProton(const float& lo, const float& hi);
  43. void SetNHits(const int& lo, const int& hi);
  44. void SetNdEdxHits(const int& lo, const int& hi);
  45. void SetP(const float& lo, const float& hi);
  46. void SetPt(const float& lo, const float& hi);
  47. void SetPx(const float& lo, const float& hi);
  48. void SetPy(const float& lo, const float& hi);
  49. void SetPz(const float& lo, const float& hi);
  50. void SetRapidity(const float& lo, const float& hi);
  51. void SetEta(const float& lo, const float& hi);
  52. void SetDCA(const float& lo, const float& hi);
  53. void SetDCAGlobal(const float& lo, const float& hi);
  54. void SetCharge(const int&);
  55. franksTrackCut* Clone();
  56. ostrstream* finalReport() const;
  57. //private: // here are the quantities I want to cut on...
  58. protected:
  59. int mCharge;
  60. float mPidProbElectron[2];
  61. float mPidProbPion[2];
  62. float mPidProbKaon[2];
  63. float mPidProbProton[2];
  64. float mNSigmaElectron[2];
  65. float mNSigmaPion[2];
  66. float mNSigmaKaon[2];
  67. float mNSigmaProton[2];
  68. float mNSigmaAntiElectron[2];
  69. float mNSigmaAntiPion[2];
  70. float mNSigmaAntiKaon[2];
  71. float mNSigmaAntiProton[2];
  72. int mNHits[2];
  73. int mNdEdxHits[2];
  74. float mP[2];
  75. float mPt[2];
  76. float mPx[2];
  77. float mPy[2];
  78. float mPz[2];
  79. float mRapidity[2];
  80. float mEta[2];
  81. float mDCA[2];
  82. float mDCAGlobal[2];
  83. protected:
  84. long mNTracksPassed;
  85. long mNTracksFailed;
  86. #ifdef __ROOT__
  87. ClassDef(franksTrackCut, 1)
  88. #endif
  89. };
  90. inline void franksTrackCut::SetPidProbElectron(const float& lo, const float& hi){mPidProbElectron[0]=lo; mPidProbElectron[1]=hi;}
  91. inline void franksTrackCut::SetPidProbPion(const float& lo, const float& hi){mPidProbPion[0]=lo; mPidProbPion[1]=hi;}
  92. inline void franksTrackCut::SetPidProbKaon(const float& lo, const float& hi){mPidProbKaon[0]=lo; mPidProbKaon[1]=hi;}
  93. inline void franksTrackCut::SetPidProbProton(const float& lo, const float& hi){mPidProbProton[0]=lo; mPidProbProton[1]=hi;}
  94. inline void franksTrackCut::SetNSigmaElectron(const float& lo, const float& hi){mNSigmaElectron[0]=lo; mNSigmaElectron[1]=hi;}
  95. inline void franksTrackCut::SetNSigmaPion(const float& lo, const float& hi){mNSigmaPion[0]=lo; mNSigmaPion[1]=hi;}
  96. inline void franksTrackCut::SetNSigmaKaon(const float& lo, const float& hi){mNSigmaKaon[0]=lo; mNSigmaKaon[1]=hi;}
  97. inline void franksTrackCut::SetNSigmaProton(const float& lo, const float& hi){mNSigmaProton[0]=lo; mNSigmaProton[1]=hi;}
  98. inline void franksTrackCut::SetNSigmaAntiElectron(const float& lo, const float& hi){
  99. mNSigmaAntiElectron[0]=lo; mNSigmaAntiElectron[1]=hi;}
  100. inline void franksTrackCut::SetNSigmaAntiPion(const float& lo, const float& hi){
  101. mNSigmaAntiPion[0]=lo; mNSigmaAntiPion[1]=hi;}
  102. inline void franksTrackCut::SetNSigmaAntiKaon(const float& lo, const float& hi){
  103. mNSigmaAntiKaon[0]=lo; mNSigmaAntiKaon[1]=hi;}
  104. inline void franksTrackCut::SetNSigmaAntiProton(const float& lo, const float& hi){
  105. mNSigmaAntiProton[0]=lo; mNSigmaAntiProton[1]=hi;}
  106. inline void franksTrackCut::SetNHits(const int& lo, const int& hi){mNHits[0]=lo;mNHits[1]=hi;}
  107. inline void franksTrackCut::SetNdEdxHits(const int& lo, const int& hi){mNdEdxHits[0]=lo;mNdEdxHits[1]=hi;}
  108. inline void franksTrackCut::SetP(const float& lo, const float& hi){mP[0]=lo; mP[1]=hi;}
  109. inline void franksTrackCut::SetPt(const float& lo, const float& hi){mPt[0]=lo; mPt[1]=hi;}
  110. inline void franksTrackCut::SetPx(const float& lo, const float& hi){mPx[0]=lo; mPx[1]=hi;}
  111. inline void franksTrackCut::SetPy(const float& lo, const float& hi){mPy[0]=lo; mPy[1]=hi;}
  112. inline void franksTrackCut::SetPz(const float& lo, const float& hi){mPz[0]=lo; mPz[1]=hi;}
  113. inline void franksTrackCut::SetRapidity(const float& lo,const float& hi){mRapidity[0]=lo; mRapidity[1]=hi;}
  114. inline void franksTrackCut::SetEta(const float& lo,const float& hi){mEta[0]=lo; mEta[1]=hi;}
  115. inline void franksTrackCut::SetDCA(const float& lo,const float& hi){mDCA[0]=lo; mDCA[1]=hi;}
  116. inline void franksTrackCut::SetDCAGlobal(const float& lo,const float& hi){mDCAGlobal[0]=lo; mDCAGlobal[1]=hi;}
  117. inline void franksTrackCut::SetCharge(const int& ch){mCharge = ch;}
  118. inline franksTrackCut* franksTrackCut::Clone() { franksTrackCut* c = new franksTrackCut(*this); return c;}
  119. #endif