StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHbtEventCut.h
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 
68 #ifndef StHbtEventCut_hh
69 #define StHbtEventCut_hh
70 
71 class StHbtEvent;
72 class StHbtBaseAnalysis;
73 
74 #include "StHbtMaker/Infrastructure/StHbtCutMonitorHandler.h"
75 #include "StHbtMaker/Infrastructure/StHbtString.hh"
76 
78 
79 public:
80 
81  StHbtEventCut(){/* no-op */}; // default constructor. - Users should write their own
82  StHbtEventCut(const StHbtEventCut& c); // copy constructor
83  virtual ~StHbtEventCut(){/* no-op */}; // destructor
84 
85  virtual bool Pass(const StHbtEvent* event) =0; // true if passes, false if not
86 
87  virtual StHbtString Report() =0; // user-written method to return string describing cuts
88  virtual StHbtEventCut* Clone() { return 0;}
89 
90 #ifdef __ROOT__
91  ClassDef(StHbtEventCut, 0)
92 #endif
93  // the following allows "back-pointing" from the CorrFctn to the "parent" Analysis
94  friend class StHbtBaseAnalysis;
95  StHbtBaseAnalysis* HbtAnalysis(){return myAnalysis;};
96  void SetAnalysis(StHbtBaseAnalysis*);
97 
98 protected:
99  StHbtBaseAnalysis* myAnalysis;
100 
101 };
102 
103 inline StHbtEventCut::StHbtEventCut(const StHbtEventCut& c) : StHbtCutMonitorHandler() { myAnalysis=0;}
104 inline void StHbtEventCut::SetAnalysis(StHbtBaseAnalysis* analysis) { myAnalysis = analysis; }
105 #endif