AverageSepPairCut.cxx 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /***************************************************************************
  2. *
  3. * $Id: AverageSepPairCut.cxx,v 1.1 2000/10/05 23:09:02 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 average Separation of the pair - for dealing with track merging
  10. *
  11. ***************************************************************************
  12. *
  13. * $Log: AverageSepPairCut.cxx,v $
  14. * Revision 1.1 2000/10/05 23:09:02 lisa
  15. * Added kT-dependent radii to mixed-event simulator AND implemented AverageSeparation Cut and CorrFctn
  16. *
  17. *
  18. **************************************************************************/
  19. #include "StHbtMaker/Cut/AverageSepPairCut.h"
  20. #include <string>
  21. #include <cstdio>
  22. #ifdef __ROOT__
  23. ClassImp(AverageSepPairCut)
  24. #endif
  25. //__________________
  26. AverageSepPairCut::AverageSepPairCut(){
  27. mNPairsPassed = mNPairsFailed = 0;
  28. }
  29. //__________________
  30. //AverageSepPairCut::~AverageSepPairCut(){
  31. // /* no-op */
  32. //}
  33. //__________________
  34. bool AverageSepPairCut::Pass(const StHbtPair* pair){
  35. double sep = pair->NominalTpcAverageSeparation();
  36. bool temp = ( (sep>mAveSepLo) &&
  37. (sep<mAveSepHi) );
  38. temp ? mNPairsPassed++ : mNPairsFailed++;
  39. return temp;
  40. }
  41. //__________________
  42. StHbtString AverageSepPairCut::Report(){
  43. string Stemp = "Average Separation Pair Cut\n";
  44. char Ctemp[100];
  45. sprintf(Ctemp,"Range of cut:\t%E ... \t%E\n",mAveSepLo,mAveSepHi);
  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 AverageSepPairCut::SetAveSepRange(const double& Lo, const double& Hi) {
  54. mAveSepLo = Lo;
  55. mAveSepHi = Hi;
  56. }
  57. //__________________