franksV0PairCut.cxx 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /***************************************************************************
  2. *
  3. * $Id: franksV0PairCut.cxx,v 1.2 2001/11/14 21:07:20 lisa Exp $
  4. *
  5. * Author: Frank Laue, Ohio State, laue@mps.ohio-state.edu
  6. ***************************************************************************
  7. *
  8. * Description: part of STAR HBT Framework: StHbtMaker package
  9. *
  10. ***************************************************************************
  11. *
  12. * $Log: franksV0PairCut.cxx,v $
  13. * Revision 1.2 2001/11/14 21:07:20 lisa
  14. * Fixed several small things (mostly discarded const) that caused fatal errors with gcc2.95.3
  15. *
  16. * Revision 1.1 2000/05/03 17:47:24 laue
  17. * new pair cut
  18. *
  19. *
  20. **************************************************************************/
  21. #include "StHbtMaker/Cut/franksV0PairCut.h"
  22. #include <string>
  23. #include <cstdio>
  24. #ifdef __ROOT__
  25. ClassImp(franksV0PairCut)
  26. #endif
  27. //__________________
  28. franksV0PairCut::franksV0PairCut() : mTrackIdCut(0), mNPairsPassed(0), mNPairsFailed(0) {
  29. }
  30. //__________________
  31. //franksV0PairCut::~franksV0PairCut(){
  32. // /* no-op */
  33. //}
  34. //__________________
  35. inline bool franksV0PairCut::Pass(const StHbtPair* pair){
  36. bool temp = true;
  37. if ( mTrackIdCut == 1 ) {
  38. if ( (pair->track1()->NegTrackId() == pair->track2()->NegTrackId()) ||
  39. (pair->track1()->PosTrackId() == pair->track2()->PosTrackId())
  40. )
  41. temp = false;
  42. }
  43. temp ? mNPairsPassed++ : mNPairsFailed++;
  44. mNPairsPassed++;
  45. return temp;
  46. }
  47. //__________________
  48. StHbtString franksV0PairCut::Report(){
  49. string Stemp = " Franks V0 Pair Cut \n";
  50. char Ctemp[100];
  51. sprintf(Ctemp,"mTrackIdCut = %d \n",mTrackIdCut);
  52. Stemp += Ctemp;
  53. sprintf(Ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",mNPairsPassed,mNPairsFailed);
  54. Stemp += Ctemp;
  55. StHbtString returnThis = Stemp;
  56. return returnThis;
  57. }
  58. //__________________