StHbtParticleCut.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /***************************************************************************
  2. *
  3. * $Id: StHbtParticleCut.h,v 1.9 2009/08/25 20:17:51 fine 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 particle-wise cuts
  10. * Note: Users DO NOT inherit from this class!
  11. * The base classes StHbtTrackCut and StHbtV0Cut inherit from this,
  12. * and users inherit from those
  13. *
  14. ***************************************************************************
  15. *
  16. * $Log: StHbtParticleCut.h,v $
  17. * Revision 1.9 2009/08/25 20:17:51 fine
  18. * fix the compilation issues under SL5_64_bits gcc 4.3.2
  19. *
  20. * Revision 1.8 2000/06/15 18:51:33 willson
  21. * Cuts and Correlation function information moved from StBaseAnalysis
  22. * to the derived analysis classes. Global functions installed in
  23. * Cut and CorrFctn base classes to access analysis pointer.
  24. *
  25. * Revision 1.7 2000/03/23 22:43:27 laue
  26. * Clone() function implemented in cuts.
  27. *
  28. * Revision 1.6 2000/03/17 17:18:25 laue
  29. * Roberts new three particle correlations implemented.
  30. *
  31. * Revision 1.5 2000/03/16 01:54:37 laue
  32. * Copy constructor added to all the cut base classes and to the
  33. * corrfctn base class
  34. *
  35. * Revision 1.4 2000/02/13 17:13:15 laue
  36. * EventBegin() and EventEnd() functions implemented
  37. *
  38. * Revision 1.3 2000/01/07 23:21:17 laue
  39. * 0.) all 'ClassDef(...)' put inside #ifdef __ROOT__ #endif
  40. * 1.) unnecessary includes of 'StMaker.h' deleted
  41. *
  42. * Revision 1.2 1999/12/03 22:24:34 lisa
  43. * (1) make Cuts and CorrFctns point back to parent Analysis (as well as other way). (2) Accommodate new PidTraits mechanism
  44. *
  45. * Revision 1.1 1999/10/15 01:56:50 lisa
  46. * Important enhancement of StHbtMaker - implement Franks CutMonitors
  47. * ----------------------------------------------------------
  48. * This means 3 new files in Infrastructure area (CutMonitor),
  49. * several specific CutMonitor classes in the Cut area
  50. * and a new base class in the Base area (StHbtCutMonitor).
  51. * This means also changing all Cut Base class header files from .hh to .h
  52. * so we have access to CutMonitor methods from Cint command line.
  53. * This last means
  54. * 1) files which include these header files are slightly modified
  55. * 2) a side benefit: the TrackCuts and V0Cuts no longer need
  56. * a SetMass() implementation in each Cut class, which was stupid.
  57. * Also:
  58. * -----
  59. * Include Franks StHbtAssociationReader
  60. * ** None of these changes should affect any user **
  61. *
  62. * Revision 1.3 1999/09/17 22:37:59 lisa
  63. * first full integration of V0s into StHbt framework
  64. *
  65. * Revision 1.2 1999/07/06 22:33:19 lisa
  66. * Adjusted all to work in pro and new - dev itself is broken
  67. *
  68. * Revision 1.1.1.1 1999/06/29 16:02:56 lisa
  69. * Installation of StHbtMaker
  70. *
  71. **************************************************************************/
  72. #ifndef StHbtParticleCut_hh
  73. #define StHbtParticleCut_hh
  74. #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
  75. #include "StHbtMaker/Infrastructure/StHbtCutMonitorHandler.h"
  76. class StHbtBaseAnalysis;
  77. class StHbtParticleCut : public StHbtCutMonitorHandler {
  78. public:
  79. StHbtParticleCut(){/* no-op */}; // default constructor. - Users should write their own
  80. StHbtParticleCut(const StHbtParticleCut&); // copy constructor
  81. virtual ~StHbtParticleCut(){/* no-op */}; // destructor
  82. virtual StHbtString Report() =0; // user-written method to return string describing cuts
  83. double Mass(){return mMass;}; // mass of the particle being selected
  84. virtual void SetMass(const double& mass) {mMass = mass;};
  85. virtual void EventBegin(const StHbtEvent*) { /* no-op */ }
  86. virtual void EventEnd(const StHbtEvent*) { /* no-op */ }
  87. virtual StHbtParticleCut* Clone() { return 0;}
  88. virtual StHbtParticleType Type()=0;
  89. // the following allows "back-pointing" from the CorrFctn to the "parent" Analysis
  90. friend class StHbtBaseAnalysis;
  91. StHbtBaseAnalysis* HbtAnalysis(){return myAnalysis;};
  92. void SetAnalysis(StHbtBaseAnalysis*);
  93. protected:
  94. double mMass;
  95. // StHbtParticleType mType; // tells whether cut is on Tracks or V0's
  96. StHbtBaseAnalysis* myAnalysis;
  97. #ifdef __ROOT__
  98. ClassDef(StHbtParticleCut, 0)
  99. #endif
  100. };
  101. inline StHbtParticleCut::StHbtParticleCut(const StHbtParticleCut& c) : StHbtCutMonitorHandler() {
  102. mMass = c.mMass; myAnalysis = 0;
  103. #ifdef STHBTDEBUG
  104. cout << " StHbtParticleCut::StHbtParticleCut(const StHbtParticleCut& c) - mMass: " << mMass << endl;
  105. #endif
  106. }
  107. inline void StHbtParticleCut::SetAnalysis(StHbtBaseAnalysis* analysis) { myAnalysis = analysis; }
  108. #endif