StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHbtCorrFctn.hh
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 
55 #ifndef StHbtCorrFctn_hh
56 #define StHbtCorrFctn_hh
57 
58 #include "StHbtMaker/Base/StHbtBaseAnalysis.h"
59 #include "StHbtMaker/Base/StHbtPairCut.h"
60 #include "StHbtMaker/Infrastructure/StParityTypes.hh" // can not forward declare typedefs
61 #include "StHbtMaker/Infrastructure/StHbtEvent.hh"
62 #include "StHbtMaker/Infrastructure/StHbtPair.hh"
63 #include "StHbtMaker/Infrastructure/StHbtTriplet.hh"
64 #include "StHbtMaker/Infrastructure/StHbtHisto.hh"
65 
67 
68 public:
69  StHbtCorrFctn() { mPairCut = 0; }
71  virtual ~StHbtCorrFctn(){/* no-op */}
72 
73  virtual StHbtString Report() = 0;
74 
75  virtual void ParityCompute(ParityBuff*, ParityBuff*, int);
76 
77  virtual void AddRealPair(const StHbtPair*);
78  virtual void AddMixedPair(const StHbtPair*);
79 
80  virtual void AddRealTriplet(const StHbtTriplet*);
81  virtual void AddMixedTriplet(const StHbtTriplet*);
82 
83  virtual void EventBegin(const StHbtEvent*) { /* no-op */ }
84  virtual void EventEnd(const StHbtEvent*) { /* no-op */ }
85  virtual void Finish() = 0;
86 
87  virtual StHbtCorrFctn* Clone() { return 0;}
88 
89  virtual StHbtPairCut* GetPairCut() { return mPairCut; }
90 
91  // the following allows "back-pointing" from the CorrFctn to the "parent" Analysis
92  friend class StHbtBaseAnalysis;
93  StHbtBaseAnalysis* HbtAnalysis(){return myAnalysis;};
94  void SetAnalysis(StHbtBaseAnalysis*);
95 
96 protected:
97  StHbtBaseAnalysis* myAnalysis;
98  StHbtPairCut* mPairCut;
99 
100 private:
101 
102 };
103 
104 inline void StHbtCorrFctn::ParityCompute(ParityBuff*, ParityBuff*, int) { cout << "Not implemented" << endl; }
105 inline void StHbtCorrFctn::AddRealPair(const StHbtPair*) { cout << "Not implemented" << endl; }
106 inline void StHbtCorrFctn::AddMixedPair(const StHbtPair*) { cout << "Not implemented" << endl; }
107 inline void StHbtCorrFctn::AddRealTriplet(const StHbtTriplet*) { cout << "Not implemented" << endl; }
108 inline void StHbtCorrFctn::AddMixedTriplet(const StHbtTriplet*) { cout << "Not implemented" << endl; }
109 
110 inline StHbtCorrFctn::StHbtCorrFctn(const StHbtCorrFctn& c) { myAnalysis =0; mPairCut = c.mPairCut; }
111 inline void StHbtCorrFctn::SetAnalysis(StHbtBaseAnalysis* analysis) { myAnalysis = analysis; }
112 
113 #endif