QinvPairCut.cxx 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /***************************************************************************
  2. *
  3. * $Id: QinvPairCut.cxx,v 1.1 2000/09/14 18:36:59 lisa Exp $
  4. *
  5. * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu
  6. ***************************************************************************
  7. *
  8. * Description: part of STAR HBT Framework: StHbtMaker package
  9. * cut on Qinvariant
  10. *
  11. ***************************************************************************
  12. *
  13. * $Log: QinvPairCut.cxx,v $
  14. * Revision 1.1 2000/09/14 18:36:59 lisa
  15. * Added Qinv and ExitSep pair cuts and BPLCMSFrame3DCorrFctn_SIM CorrFctn
  16. *
  17. *
  18. **************************************************************************/
  19. #include "StHbtMaker/Cut/QinvPairCut.h"
  20. #include <string>
  21. #include <cstdio>
  22. #ifdef __ROOT__
  23. ClassImp(QinvPairCut)
  24. #endif
  25. //__________________
  26. QinvPairCut::QinvPairCut(){
  27. mNPairsPassed = mNPairsFailed = 0;
  28. }
  29. //__________________
  30. //QinvPairCut::~QinvPairCut(){
  31. // /* no-op */
  32. //}
  33. //__________________
  34. bool QinvPairCut::Pass(const StHbtPair* pair){
  35. double Qinv = fabs(pair->qInv());
  36. bool temp = ( (Qinv>mQinvLo) &&
  37. (Qinv<mQinvHi) );
  38. temp ? mNPairsPassed++ : mNPairsFailed++;
  39. return temp;
  40. }
  41. //__________________
  42. StHbtString QinvPairCut::Report(){
  43. string Stemp = "Qinvariant Pair Cut\n";
  44. char Ctemp[100];
  45. sprintf(Ctemp,"Range of cut:\t%E ... \t%E\n",mQinvLo,mQinvHi);
  46. Stemp += Ctemp;
  47. sprintf(Ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",mNPairsPassed,mNPairsFailed);
  48. Stemp += Ctemp;
  49. StHbtString returnThis = Stemp;
  50. return returnThis;
  51. }
  52. //__________________
  53. void QinvPairCut::SetQinvRange(const double& Lo, const double& Hi) {
  54. mQinvLo = Lo;
  55. mQinvHi = Hi;
  56. }
  57. //__________________