StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHbtPairCut.h
1 /***************************************************************************
2  *
3  * $Id: StHbtPairCut.h,v 1.10 2001/06/21 19:06:49 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 pair-wise cuts
10  * Users inherit from this class and must add their own quantities
11  *
12  ***************************************************************************
13  *
14  * $Log: StHbtPairCut.h,v $
15  * Revision 1.10 2001/06/21 19:06:49 laue
16  * Some minor structural changes (forward declarations, etc)
17  *
18  * Revision 1.9 2000/06/29 23:01:10 finch
19  * added an extra base class for Parity Computations
20  *
21  * Revision 1.8 2000/06/15 18:51:32 willson
22  * Cuts and Correlation function information moved from StBaseAnalysis
23  * to the derived analysis classes. Global functions installed in
24  * Cut and CorrFctn base classes to access analysis pointer.
25  *
26  * Revision 1.7 2000/05/11 21:16:40 willson
27  * myAnalysis pointer changed to type StHbtBaseAnalysis - moved
28  * some methods into StHbtBaseAnalysis class
29  *
30  * Revision 1.6 2000/04/03 16:21:19 laue
31  * some include files changed
32  *
33  * Revision 1.5 2000/03/23 22:43:27 laue
34  * Clone() function implemented in cuts.
35  *
36  * Revision 1.4 2000/03/16 01:54:37 laue
37  * Copy constructor added to all the cut base classes and to the
38  * corrfctn base class
39  *
40  * Revision 1.3 2000/01/07 23:21:17 laue
41  * 0.) all 'ClassDef(...)' put inside #ifdef __ROOT__ #endif
42  * 1.) unnecessary includes of 'StMaker.h' deleted
43  *
44  * Revision 1.2 1999/12/03 22:24:34 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.1 1999/10/15 01:56:48 lisa
48  * Important enhancement of StHbtMaker - implement Franks CutMonitors
49  * ----------------------------------------------------------
50  * This means 3 new files in Infrastructure area (CutMonitor),
51  * several specific CutMonitor classes in the Cut area
52  * and a new base class in the Base area (StHbtCutMonitor).
53  * This means also changing all Cut Base class header files from .hh to .h
54  * so we have access to CutMonitor methods from Cint command line.
55  * This last means
56  * 1) files which include these header files are slightly modified
57  * 2) a side benefit: the TrackCuts and V0Cuts no longer need
58  * a SetMass() implementation in each Cut class, which was stupid.
59  * Also:
60  * -----
61  * Include Franks StHbtAssociationReader
62  * ** None of these changes should affect any user **
63  *
64  * Revision 1.2 1999/07/06 22:33:19 lisa
65  * Adjusted all to work in pro and new - dev itself is broken
66  *
67  * Revision 1.1.1.1 1999/06/29 16:02:56 lisa
68  * Installation of StHbtMaker
69  *
70  **************************************************************************/
71 
72 #ifndef StHbtPairCut_hh
73 #define StHbtPairCut_hh
74 
75 #include <string>
76 
77 class StHbtBaseAnalysis;
78 
79 //#include "StHbtMaker/Base/StHbtBaseAnalysis.h"
80 #include "StHbtMaker/Infrastructure/StParityTypes.hh" // can not forward declare typedefs
81 #include "StHbtMaker/Infrastructure/StHbtString.hh"
82 #include "StHbtMaker/Infrastructure/StHbtEvent.hh"
83 #include "StHbtMaker/Infrastructure/StHbtPair.hh"
84 #include "StHbtMaker/Infrastructure/StHbtHisto.hh"
85 #include "StHbtMaker/Infrastructure/StHbtCutMonitorHandler.h"
86 
88 
89 public:
90 
91  StHbtPairCut(){/* no-op */}; // default constructor. - Users should write their own
92  StHbtPairCut(const StHbtPairCut& c); // copy constructor
93  virtual ~StHbtPairCut(){/* no-op */}; // destructor
94 
95  virtual void ParityPairCuts(ParityBuff*, ParityBuff*) { /* no-op */ }
96  virtual bool Pass(const StHbtPair* pair) =0; // true if passes, false if not
97 
98  virtual StHbtString Report() =0; // user-written method to return string describing cuts
99  virtual void EventBegin(const StHbtEvent*) { /* no-op */ }
100  virtual void EventEnd(const StHbtEvent*) { /* no-op */ }
101  virtual StHbtPairCut* Clone() { return 0;}
102 
103 #ifdef __ROOT__
104  ClassDef(StHbtPairCut, 0)
105 #endif
106  // the following allows "back-pointing" from the CorrFctn to the "parent" Analysis
107  friend class StHbtBaseAnalysis;
108  StHbtBaseAnalysis* HbtAnalysis(){return myAnalysis;};
109  void SetAnalysis(StHbtBaseAnalysis*); // Set Back pointer to Analysis
110 
111 protected:
112  StHbtBaseAnalysis* myAnalysis;
113 
114 };
115 
116 
117 inline StHbtPairCut::StHbtPairCut(const StHbtPairCut& c) : StHbtCutMonitorHandler() { myAnalysis = 0; }
118 inline void StHbtPairCut::SetAnalysis(StHbtBaseAnalysis* analysis) { myAnalysis = analysis; }
119 #endif