StHbtEventCut.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /***************************************************************************
  2. *
  3. * $Id: StHbtEventCut.h,v 1.9 2001/06/21 19:06:48 laue 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. * base class for Eventwise cuts
  10. * Users inherit from this class and must add their own quantities
  11. *
  12. ***************************************************************************
  13. *
  14. * $Log: StHbtEventCut.h,v $
  15. * Revision 1.9 2001/06/21 19:06:48 laue
  16. * Some minor structural changes (forward declarations, etc)
  17. *
  18. * Revision 1.8 2000/06/15 18:51:32 willson
  19. * Cuts and Correlation function information moved from StBaseAnalysis
  20. * to the derived analysis classes. Global functions installed in
  21. * Cut and CorrFctn base classes to access analysis pointer.
  22. *
  23. * Revision 1.7 2000/04/03 16:21:19 laue
  24. * some include files changed
  25. *
  26. * Revision 1.6 2000/03/23 22:43:27 laue
  27. * Clone() function implemented in cuts.
  28. *
  29. * Revision 1.5 2000/03/17 17:18:25 laue
  30. * Roberts new three particle correlations implemented.
  31. *
  32. * Revision 1.4 2000/03/16 01:54:36 laue
  33. * Copy constructor added to all the cut base classes and to the
  34. * corrfctn base class
  35. *
  36. * Revision 1.3 2000/01/07 23:21:16 laue
  37. * 0.) all 'ClassDef(...)' put inside #ifdef __ROOT__ #endif
  38. * 1.) unnecessary includes of 'StMaker.h' deleted
  39. *
  40. * Revision 1.2 1999/12/03 22:24:34 lisa
  41. * (1) make Cuts and CorrFctns point back to parent Analysis (as well as other way). (2) Accommodate new PidTraits mechanism
  42. *
  43. * Revision 1.1 1999/10/15 01:56:47 lisa
  44. * Important enhancement of StHbtMaker - implement Franks CutMonitors
  45. * ----------------------------------------------------------
  46. * This means 3 new files in Infrastructure area (CutMonitor),
  47. * several specific CutMonitor classes in the Cut area
  48. * and a new base class in the Base area (StHbtCutMonitor).
  49. * This means also changing all Cut Base class header files from .hh to .h
  50. * so we have access to CutMonitor methods from Cint command line.
  51. * This last means
  52. * 1) files which include these header files are slightly modified
  53. * 2) a side benefit: the TrackCuts and V0Cuts no longer need
  54. * a SetMass() implementation in each Cut class, which was stupid.
  55. * Also:
  56. * -----
  57. * Include Franks StHbtAssociationReader
  58. * ** None of these changes should affect any user **
  59. *
  60. * Revision 1.2 1999/07/06 22:33:19 lisa
  61. * Adjusted all to work in pro and new - dev itself is broken
  62. *
  63. * Revision 1.1.1.1 1999/06/29 16:02:56 lisa
  64. * Installation of StHbtMaker
  65. *
  66. **************************************************************************/
  67. #ifndef StHbtEventCut_hh
  68. #define StHbtEventCut_hh
  69. class StHbtEvent;
  70. class StHbtBaseAnalysis;
  71. #include "StHbtMaker/Infrastructure/StHbtCutMonitorHandler.h"
  72. #include "StHbtMaker/Infrastructure/StHbtString.hh"
  73. class StHbtEventCut : public StHbtCutMonitorHandler {
  74. public:
  75. StHbtEventCut(){/* no-op */}; // default constructor. - Users should write their own
  76. StHbtEventCut(const StHbtEventCut& c); // copy constructor
  77. virtual ~StHbtEventCut(){/* no-op */}; // destructor
  78. virtual bool Pass(const StHbtEvent* event) =0; // true if passes, false if not
  79. virtual StHbtString Report() =0; // user-written method to return string describing cuts
  80. virtual StHbtEventCut* Clone() { return 0;}
  81. #ifdef __ROOT__
  82. ClassDef(StHbtEventCut, 0)
  83. #endif
  84. // the following allows "back-pointing" from the CorrFctn to the "parent" Analysis
  85. friend class StHbtBaseAnalysis;
  86. StHbtBaseAnalysis* HbtAnalysis(){return myAnalysis;};
  87. void SetAnalysis(StHbtBaseAnalysis*);
  88. protected:
  89. StHbtBaseAnalysis* myAnalysis;
  90. };
  91. inline StHbtEventCut::StHbtEventCut(const StHbtEventCut& c) : StHbtCutMonitorHandler() { myAnalysis=0;}
  92. inline void StHbtEventCut::SetAnalysis(StHbtBaseAnalysis* analysis) { myAnalysis = analysis; }
  93. #endif