EntranceSepPairCut.cxx 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /***************************************************************************
  2. *
  3. * $Id: EntranceSepPairCut.cxx,v 1.1 2000/07/31 01:19:24 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 Entrance Separation of the pair - for dealing with track merging
  10. *
  11. ***************************************************************************
  12. *
  13. * $Log: EntranceSepPairCut.cxx,v $
  14. * Revision 1.1 2000/07/31 01:19:24 lisa
  15. * add PairCut which contains collection of PairCuts - also 3D bertsch-pratt CorrFctn
  16. *
  17. **************************************************************************/
  18. #include "StHbtMaker/Cut/EntranceSepPairCut.h"
  19. #include <string>
  20. #include <cstdio>
  21. #ifdef __ROOT__
  22. ClassImp(EntranceSepPairCut)
  23. #endif
  24. //__________________
  25. EntranceSepPairCut::EntranceSepPairCut(){
  26. mNPairsPassed = mNPairsFailed = 0;
  27. }
  28. //__________________
  29. //EntranceSepPairCut::~EntranceSepPairCut(){
  30. // /* no-op */
  31. //}
  32. //__________________
  33. bool EntranceSepPairCut::Pass(const StHbtPair* pair){
  34. double sep = pair->NominalTpcEntranceSeparation();
  35. bool temp = ( (sep>mEntSepLo) &&
  36. (sep<mEntSepHi) );
  37. temp ? mNPairsPassed++ : mNPairsFailed++;
  38. return temp;
  39. }
  40. //__________________
  41. StHbtString EntranceSepPairCut::Report(){
  42. string Stemp = "Entrance Separation Pair Cut\n";
  43. char Ctemp[100];
  44. sprintf(Ctemp,"Range of cut:\t%E ... \t%E\n",mEntSepLo,mEntSepHi);
  45. Stemp += Ctemp;
  46. sprintf(Ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",mNPairsPassed,mNPairsFailed);
  47. Stemp += Ctemp;
  48. StHbtString returnThis = Stemp;
  49. return returnThis;
  50. }
  51. //__________________
  52. void EntranceSepPairCut::SetEntranceSepRange(const double& Lo, const double& Hi) {
  53. mEntSepLo = Lo;
  54. mEntSepHi = Hi;
  55. }
  56. //__________________