OpenAngPairCut.cxx 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /***************************************************************************
  2. *
  3. * $Id: OpenAngPairCut.cxx,v 1.1 2000/10/26 16:09:11 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 nominal Opening angle of the pair - for dealing with track merging
  10. *
  11. ***************************************************************************
  12. *
  13. * $Log: OpenAngPairCut.cxx,v $
  14. * Revision 1.1 2000/10/26 16:09:11 lisa
  15. * Added OpeningAngle PairCut class and method to StHbtPair
  16. *
  17. *
  18. **************************************************************************/
  19. #include "StHbtMaker/Cut/OpenAngPairCut.h"
  20. #include <string>
  21. #include <cstdio>
  22. #ifdef __ROOT__
  23. ClassImp(OpenAngPairCut)
  24. #endif
  25. //__________________
  26. OpenAngPairCut::OpenAngPairCut(){
  27. mNPairsPassed = mNPairsFailed = 0;
  28. }
  29. //__________________
  30. //OpenAngPairCut::~OpenAngPairCut(){
  31. // /* no-op */
  32. //}
  33. //__________________
  34. bool OpenAngPairCut::Pass(const StHbtPair* pair){
  35. double openAng = pair->OpeningAngle();
  36. bool temp = ( (openAng>mLo) &&
  37. (openAng<mHi) );
  38. temp ? mNPairsPassed++ : mNPairsFailed++;
  39. return temp;
  40. }
  41. //__________________
  42. StHbtString OpenAngPairCut::Report(){
  43. string Stemp = "Opening Angle Pair Cut\n";
  44. char Ctemp[100];
  45. sprintf(Ctemp,"Range of cut:\t%E ... \t%E\n",mLo,mHi);
  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 OpenAngPairCut::SetOpenAngRange(const double& Lo, const double& Hi) {
  54. mLo = Lo;
  55. mHi = Hi;
  56. }
  57. //__________________