StHbtCorrFctn.hh 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /***************************************************************************
  2. *
  3. * $Id: StHbtCorrFctn.hh,v 1.11 2013/01/18 16:13:04 yyang 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 a STAR correlation function. Users should inherit
  10. * from this and must implement constructor, destructor, Report(),
  11. * AddMixedPair(), AddRealPair(), Finish()
  12. *
  13. ***************************************************************************
  14. *
  15. * $Log: StHbtCorrFctn.hh,v $
  16. * Revision 1.11 2013/01/18 16:13:04 yyang
  17. * Add PairCut for CFs that share same cuts, but pair cuts
  18. *
  19. * Revision 1.10 2001/06/21 19:06:48 laue
  20. * Some minor structural changes (forward declarations, etc)
  21. *
  22. * Revision 1.9 2000/06/29 23:01:10 finch
  23. * added an extra base class for Parity Computations
  24. *
  25. * Revision 1.8 2000/06/15 18:51:32 willson
  26. * Cuts and Correlation function information moved from StBaseAnalysis
  27. * to the derived analysis classes. Global functions installed in
  28. * Cut and CorrFctn base classes to access analysis pointer.
  29. *
  30. * Revision 1.7 2000/05/11 21:16:40 willson
  31. * myAnalysis pointer changed to type StHbtBaseAnalysis - moved
  32. * some methods into StHbtBaseAnalysis class
  33. *
  34. * Revision 1.6 2000/03/23 22:43:27 laue
  35. * Clone() function implemented in cuts.
  36. *
  37. * Revision 1.5 2000/03/16 01:54:36 laue
  38. * Copy constructor added to all the cut base classes and to the
  39. * corrfctn base class
  40. *
  41. * Revision 1.4 2000/02/13 17:13:09 laue
  42. * EventBegin() and EventEnd() functions implemented
  43. *
  44. * Revision 1.3 1999/12/03 22:24:33 lisa
  45. * (1) make Cuts and CorrFctns point back to parent Analysis (as well as other way). (2) Accommodate new PidTraits mechanism
  46. *
  47. * Revision 1.2 1999/07/06 22:33:18 lisa
  48. * Adjusted all to work in pro and new - dev itself is broken
  49. *
  50. * Revision 1.1.1.1 1999/06/29 16:02:56 lisa
  51. * Installation of StHbtMaker
  52. *
  53. **************************************************************************/
  54. #ifndef StHbtCorrFctn_hh
  55. #define StHbtCorrFctn_hh
  56. #include "StHbtMaker/Base/StHbtBaseAnalysis.h"
  57. #include "StHbtMaker/Base/StHbtPairCut.h"
  58. #include "StHbtMaker/Infrastructure/StParityTypes.hh" // can not forward declare typedefs
  59. #include "StHbtMaker/Infrastructure/StHbtEvent.hh"
  60. #include "StHbtMaker/Infrastructure/StHbtPair.hh"
  61. #include "StHbtMaker/Infrastructure/StHbtTriplet.hh"
  62. #include "StHbtMaker/Infrastructure/StHbtHisto.hh"
  63. class StHbtCorrFctn{
  64. public:
  65. StHbtCorrFctn() { mPairCut = 0; mPairCutFlag = false; }
  66. StHbtCorrFctn(const StHbtCorrFctn& );
  67. virtual ~StHbtCorrFctn(){/* no-op */}
  68. virtual StHbtString Report() = 0;
  69. virtual void ParityCompute(ParityBuff*, ParityBuff*, int);
  70. virtual void AddRealPair(const StHbtPair*);
  71. virtual void AddMixedPair(const StHbtPair*);
  72. virtual void AddRealTriplet(const StHbtTriplet*);
  73. virtual void AddMixedTriplet(const StHbtTriplet*);
  74. virtual void EventBegin(const StHbtEvent*) { /* no-op */ }
  75. virtual void EventEnd(const StHbtEvent*) { /* no-op */ }
  76. virtual void Finish() = 0;
  77. virtual StHbtCorrFctn* Clone() { return 0;}
  78. virtual StHbtPairCut* GetPairCut() { return mPairCut; }
  79. // the following allows "back-pointing" from the CorrFctn to the "parent" Analysis
  80. friend class StHbtBaseAnalysis;
  81. StHbtBaseAnalysis* HbtAnalysis(){return myAnalysis;};
  82. void SetAnalysis(StHbtBaseAnalysis*);
  83. bool GetPairCutFlag();
  84. protected:
  85. StHbtBaseAnalysis* myAnalysis;
  86. StHbtPairCut* mPairCut;
  87. bool mPairCutFlag; // Characteristics of the CF itself. So we have
  88. // only Get methods in the base class
  89. // By default this flag equals false.
  90. // This flag indicates that CF tests pair cuts by self.
  91. private:
  92. };
  93. inline void StHbtCorrFctn::ParityCompute(ParityBuff*, ParityBuff*, int) { cout << "Not implemented" << endl; }
  94. inline void StHbtCorrFctn::AddRealPair(const StHbtPair*) { cout << "Not implemented" << endl; }
  95. inline void StHbtCorrFctn::AddMixedPair(const StHbtPair*) { cout << "Not implemented" << endl; }
  96. inline void StHbtCorrFctn::AddRealTriplet(const StHbtTriplet*) { cout << "Not implemented" << endl; }
  97. inline void StHbtCorrFctn::AddMixedTriplet(const StHbtTriplet*) { cout << "Not implemented" << endl; }
  98. inline StHbtCorrFctn::StHbtCorrFctn(const StHbtCorrFctn& c) { myAnalysis =0; mPairCut = c.mPairCut; }
  99. inline void StHbtCorrFctn::SetAnalysis(StHbtBaseAnalysis* analysis) { myAnalysis = analysis; }
  100. inline bool StHbtCorrFctn::GetPairCutFlag() { return mPairCutFlag; }
  101. #endif