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