StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHbtSplitEvalAnalysis.h
1 /***************************************************************************
2  *
3  * $Id: StHbtSplitEvalAnalysis.h,v 1.2 2001/11/05 14:11:20 lisa 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  * This is the Class for Analysis objects. Each of the simultaneous
10  * Analyses running should have one of these instantiated. They link
11  * into the Manager in an Analysis Collection.
12  *
13  ***************************************************************************
14  *
15  * $Log: StHbtSplitEvalAnalysis.h,v $
16  * Revision 1.2 2001/11/05 14:11:20 lisa
17  * small modifications to Splitting Analysis class and macro
18  *
19  * Revision 1.1 2000/08/15 22:18:47 lisa
20  * Add a special HbtAnalysis class that estimates amount of splitting and add a macro to use it
21  *
22  * Revision 1.12 2000/06/15 18:54:08 willson
23  * Methods to access cuts and correlation functions moved to derived analysis
24  * classes.
25  *
26  * Revision 1.11 2000/05/11 21:18:56 willson
27  * Removed StHbtThreeParticleCorrFctn's...put methods in StHbtCorrFctn
28  * Some methods in derived analysis classes moved to base analysis class
29  *
30  * Revision 1.10 2000/04/03 16:21:50 laue
31  * some include files changed
32  * Multi track cut added
33  *
34  * Revision 1.9 2000/03/17 17:23:05 laue
35  * Roberts new three particle correlations implemented.
36  *
37  * Revision 1.8 2000/03/16 02:07:04 laue
38  * Copy constructor added to StHbtSplitEvalAnalysis (only known cuts, corrfctn).
39  *
40  * StHbtBinaryReader can now derive filename from StIOMaker and read a list
41  * of files.
42  *
43  * StHbtManager now holds a collection of StHbtEventWriters (multiple writes
44  * possible now)
45  *
46  * Revision 1.7 2000/02/13 17:17:12 laue
47  * Calls to the EventBegin() and EventEnd() functions implemented
48  * The actual analysis is moved from StHbtManager to StHbtSplitEvalAnalysis
49  *
50  * Revision 1.6 2000/01/25 17:35:17 laue
51  * I. In order to run the stand alone version of the StHbtMaker the following
52  * changes have been done:
53  * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements
54  * b) unnecessary includes of StMaker.h have been removed
55  * c) the subdirectory StHbtMaker/doc/Make has been created including everything
56  * needed for the stand alone version
57  *
58  * II. To reduce the amount of compiler warning
59  * a) some variables have been type casted
60  * b) some destructors have been declared as virtual
61  *
62  * Revision 1.5 1999/12/03 22:24:36 lisa
63  * (1) make Cuts and CorrFctns point back to parent Analysis (as well as other way). (2) Accommodate new PidTraits mechanism
64  *
65  * Revision 1.4 1999/10/15 01:57:23 lisa
66  * Important enhancement of StHbtMaker - implement Franks CutMonitors
67  * ----------------------------------------------------------
68  * This means 3 new files in Infrastructure area (CutMonitor),
69  * several specific CutMonitor classes in the Cut area
70  * and a new base class in the Base area (StHbtCutMonitor).
71  * This means also changing all Cut Base class header files from .hh to .h
72  * so we have access to CutMonitor methods from Cint command line.
73  * This last means
74  * 1) files which include these header files are slightly modified
75  * 2) a side benefit: the TrackCuts and V0Cuts no longer need
76  * a SetMass() implementation in each Cut class, which was stupid.
77  * Also:
78  * -----
79  * Include Franks StHbtAssociationReader
80  * ** None of these changes should affect any user **
81  *
82  * Revision 1.3 1999/10/04 15:38:56 lisa
83  * include Franks new accessor methods StHbtSplitEvalAnalysis::CorrFctn and StHbtManager::Analysis as well as McEvent example macro
84  *
85  * Revision 1.2 1999/07/06 22:33:22 lisa
86  * Adjusted all to work in pro and new - dev itself is broken
87  *
88  * Revision 1.1.1.1 1999/06/29 16:02:57 lisa
89  * Installation of StHbtMaker
90  *
91  **************************************************************************/
92 
93 #ifndef StHbtSplitEvalAnalysis_hh
94 #define StHbtSplitEvalAnalysis_hh
95 //#ifndef StMaker_H
96 //#include "StMaker.h"
97 //#endif
98 
99 #include "StHbtMaker/Base/StHbtBaseAnalysis.h" // base analysis class
100 #include "StHbtMaker/Base/StHbtPairCut.h"
101 #include "StHbtMaker/Base/StHbtEventCut.h"
102 #include "StHbtMaker/Base/StHbtParticleCut.h"
103 #include "StHbtMaker/Base/StHbtCorrFctn.hh"
104 #include "StHbtMaker/Infrastructure/StHbtCorrFctnCollection.hh"
105 #include "StHbtMaker/Infrastructure/StHbtPicoEventCollection.hh"
106 
107 //#include <string>
108 
110 
111 public:
112 
114  StHbtSplitEvalAnalysis(const StHbtSplitEvalAnalysis&); // copy constructor
115  virtual ~StHbtSplitEvalAnalysis();
116 
117  // Gets and Sets
118 
119  virtual StHbtPairCut* PairCut();
120  virtual StHbtEventCut* EventCut();
121  virtual StHbtParticleCut* FirstParticleCut();
122  virtual StHbtParticleCut* SecondParticleCut();
123 
124  StHbtCorrFctnCollection* CorrFctnCollection();
125  virtual StHbtCorrFctn* CorrFctn(int n); // Access to CFs within the collection
126  void AddCorrFctn(StHbtCorrFctn*);
127 
128  void SetPairCut(StHbtPairCut*);
129  void SetEventCut(StHbtEventCut*);
130  void SetFirstParticleCut(StHbtParticleCut*);
131  void SetSecondParticleCut(StHbtParticleCut*);
132 
133  unsigned int NumEventsToMix();
134  void SetNumEventsToMix(const unsigned int&);
135  StHbtPicoEventCollection* MixingBuffer();
136  bool MixingBufferFull();
137 
138  bool AnalyzeIdenticalParticles();
139  virtual StHbtString Report();
140 
141  virtual void ProcessEvent(const StHbtEvent*);
142  void EventBegin(const StHbtEvent*); //startup for EbyE
143  void EventEnd(const StHbtEvent*); // cleanup for EbyE
144 
145  virtual void Finish();
146 
147  friend class StHbtLikeSignAnalysis;
148 
149  // just make these public for convenience...
150  StHbt1DHisto* mRealSplits;
151  StHbt1DHisto* mRealAll;
152  StHbt1DHisto* mMixedSplits;
153  StHbt1DHisto* mMixedAll;
154  StHbt1DHisto* mSplitFractionUpperLimit;
155  StHbt1DHisto* mSplitFractionLowerLimit;
156 
157 
158  void SetQinvCut(float qc);
159 
160 private:
161 
162  StHbtPairCut* mPairCut;
163  StHbtCorrFctnCollection* mCorrFctnCollection;
164  StHbtEventCut* mEventCut;
165  StHbtParticleCut* mFirstParticleCut;
166  StHbtParticleCut* mSecondParticleCut;
167  StHbtPicoEventCollection* mMixingBuffer;
168  unsigned int mNumEventsToMix;
169 
170  float mQinvCut; // look at all pairs within this Qinv range. (GeV/c)
171 
172 #ifdef __ROOT__
173  ClassDef(StHbtSplitEvalAnalysis, 0)
174 #endif
175 
176 };
177 
178 inline void StHbtSplitEvalAnalysis::SetQinvCut(float qc){mQinvCut=qc;}
179 
180 // Get's
181 inline StHbtPairCut* StHbtSplitEvalAnalysis::PairCut() {return mPairCut;}
182 inline StHbtEventCut* StHbtSplitEvalAnalysis::EventCut() {return mEventCut;}
183 inline StHbtParticleCut* StHbtSplitEvalAnalysis::FirstParticleCut() {return mFirstParticleCut;}
184 inline StHbtParticleCut* StHbtSplitEvalAnalysis::SecondParticleCut() {return mSecondParticleCut;}
185 inline StHbtCorrFctnCollection* StHbtSplitEvalAnalysis::CorrFctnCollection() {return mCorrFctnCollection;}
186 inline unsigned int StHbtSplitEvalAnalysis::NumEventsToMix(){return mNumEventsToMix;}
187 
188 inline StHbtPicoEventCollection* StHbtSplitEvalAnalysis::MixingBuffer() {return mMixingBuffer;}
189 
190 // Set's
191 inline bool StHbtSplitEvalAnalysis::AnalyzeIdenticalParticles(){return (mFirstParticleCut==mSecondParticleCut);}
192 inline void StHbtSplitEvalAnalysis::SetPairCut(StHbtPairCut* x) { mPairCut = x; x->SetAnalysis((StHbtBaseAnalysis*)this);}
193 inline void StHbtSplitEvalAnalysis::AddCorrFctn(StHbtCorrFctn* cf) {mCorrFctnCollection->push_back(cf); cf->SetAnalysis((StHbtBaseAnalysis*)this);}
194 inline void StHbtSplitEvalAnalysis::SetEventCut(StHbtEventCut* x) {mEventCut = x; x->SetAnalysis((StHbtBaseAnalysis*)this);}
195 inline void StHbtSplitEvalAnalysis::SetFirstParticleCut(StHbtParticleCut* x) {mFirstParticleCut = x; x->SetAnalysis((StHbtBaseAnalysis*)this);}
196 inline void StHbtSplitEvalAnalysis::SetSecondParticleCut(StHbtParticleCut* x) {mSecondParticleCut = x; x->SetAnalysis((StHbtBaseAnalysis*)this);}
197 
198 inline void StHbtSplitEvalAnalysis::SetNumEventsToMix(const unsigned int& nmix){ mNumEventsToMix = nmix;}
199 inline bool StHbtSplitEvalAnalysis::MixingBufferFull(){return (mMixingBuffer->size() >= mNumEventsToMix);}
200 
201 
202 #endif
virtual void ProcessEvent(const StHbtEvent *)
returns reports of all cuts applied and correlation functions being done