35 #ifndef StHbtSectoredAnalysis_hh
36 #define StHbtSectoredAnalysis_hh
38 #include "StHbtMaker/Base/StHbtBaseAnalysis.h"
39 #include "StHbtMaker/Base/StHbtPairCut.h"
40 #include "StHbtMaker/Base/StHbtEventCut.h"
41 #include "StHbtMaker/Base/StHbtParticleCut.h"
42 #include "StHbtMaker/Base/StHbtCorrFctn.hh"
43 #include "StHbtMaker/Infrastructure/StHbtCorrFctnCollection.hh"
44 #include "StHbtMaker/Infrastructure/StHbtSectoredPicoEventCollection.hh"
54 void CreateRealPairs(StHbtParticleCollection*);
55 void CreateRealPairs(StHbtParticleCollection*, StHbtParticleCollection*);
56 void CreateMixedPairs(StHbtParticleCollection*, StHbtParticleCollection*);
58 int Index(
int,
int,
int);
66 StHbtCorrFctnCollection* CorrFctnCollection();
94 void SetDeltaP(
float);
96 unsigned int NumEventsToMix();
97 void SetNumEventsToMix(
const unsigned int&);
98 StHbtSectoredPicoEventCollection* SectoredMixingBuffer();
99 bool SectoredMixingBufferFull();
101 bool AnalyzeIdenticalParticles();
102 virtual StHbtString Report();
107 int GetNeventsProcessed();
109 virtual void Finish();
114 void AddEventProcessed();
117 StHbtCorrFctnCollection* mCorrFctnCollection;
131 StHbtSectoredPicoEventCollection* mSectoredMixingBuffer;
132 unsigned int mNumEventsToMix;
133 unsigned int mNeventsProcessed;
143 inline StHbtPairCut* StHbtSectoredAnalysis::PairCut() {
return mPairCut;}
144 inline StHbtEventCut* StHbtSectoredAnalysis::EventCut() {
return mEventCut;}
145 inline StHbtParticleCut* StHbtSectoredAnalysis::FirstParticleCut() {
return mFirstParticleCut;}
146 inline StHbtParticleCut* StHbtSectoredAnalysis::SecondParticleCut() {
return mSecondParticleCut;}
147 inline StHbtCorrFctnCollection* StHbtSectoredAnalysis::CorrFctnCollection() {
return mCorrFctnCollection;}
148 inline unsigned int StHbtSectoredAnalysis::NumEventsToMix(){
return mNumEventsToMix;}
149 inline StHbtSectoredPicoEventCollection* StHbtSectoredAnalysis::SectoredMixingBuffer() {
return mSectoredMixingBuffer;}
151 inline float StHbtSectoredAnalysis::PXmax() {
return mPXmax;}
152 inline float StHbtSectoredAnalysis::PXmin() {
return mPXmin;}
153 inline float StHbtSectoredAnalysis::PYmax() {
return mPYmax;}
154 inline float StHbtSectoredAnalysis::PYmin() {
return mPYmin;}
155 inline float StHbtSectoredAnalysis::PZmax() {
return mPZmax;}
156 inline float StHbtSectoredAnalysis::PZmin() {
return mPZmin;}
157 inline float StHbtSectoredAnalysis::DeltaP() {
return mDeltaP;}
158 inline int StHbtSectoredAnalysis::NumBinsX() {
return mNumBinsX;}
159 inline int StHbtSectoredAnalysis::NumBinsY() {
return mNumBinsY;}
160 inline int StHbtSectoredAnalysis::NumBinsZ() {
return mNumBinsZ;}
164 inline bool StHbtSectoredAnalysis::AnalyzeIdenticalParticles() {
return (mFirstParticleCut==mSecondParticleCut);}
166 inline void StHbtSectoredAnalysis::AddCorrFctn(
StHbtCorrFctn* cf) {mCorrFctnCollection->push_back(cf); cf->SetAnalysis((
StHbtBaseAnalysis*)
this);}
171 inline void StHbtSectoredAnalysis::SetNumEventsToMix(
const unsigned int& nmix){ mNumEventsToMix = nmix;}
172 inline bool StHbtSectoredAnalysis::SectoredMixingBufferFull(){
return (mSectoredMixingBuffer->size() >= NumEventsToMix());}
174 inline void StHbtSectoredAnalysis::SetPXmax(
float x) {
176 if (mPXmax<mPXmin) mNumBinsX=1;
177 else mNumBinsX = (int)ceil((mPXmax-mPXmin)/mDeltaP);
178 if (mNumBinsX==0) mNumBinsX=1;
180 inline void StHbtSectoredAnalysis::SetPXmin(
float x) {
182 if (mPXmax<mPXmin) mNumBinsX=1;
183 else mNumBinsX = (int)ceil((mPXmax-mPXmin)/mDeltaP);
184 if (mNumBinsX==0) mNumBinsX=1;
186 inline void StHbtSectoredAnalysis::SetPYmax(
float x) {
188 if (mPYmax<mPYmin) mNumBinsY=1;
189 else mNumBinsY = (int)ceil((mPYmax-mPYmin)/mDeltaP);
190 if (mNumBinsY==0) mNumBinsY=1;
192 inline void StHbtSectoredAnalysis::SetPYmin(
float x) {
194 if (mPYmax<mPYmin) mNumBinsY=1;
195 else mNumBinsY = (int)ceil((mPYmax-mPYmin)/mDeltaP);
196 if (mNumBinsY==0) mNumBinsY=1;
198 inline void StHbtSectoredAnalysis::SetPZmax(
float x) {
200 if (mPZmax<mPZmin) mNumBinsZ=1;
201 else mNumBinsZ = (int)ceil((mPZmax-mPZmin)/mDeltaP);
202 if (mNumBinsZ==0) mNumBinsZ=1;
204 inline void StHbtSectoredAnalysis::SetPZmin(
float x) {
206 if (mPZmax<mPZmin) mNumBinsZ=1;
207 else mNumBinsZ = (int)ceil((mPZmax-mPZmin)/mDeltaP);
208 if (mNumBinsZ==0) mNumBinsZ=1;
210 inline void StHbtSectoredAnalysis::SetDeltaP(
float x) {
213 cout <<
"****ERROR**** DeltaP must be greater than zero...setting DeltaP to 1.0" << endl;
217 mNumBinsX = (int)ceil((mPXmax-mPXmin)/mDeltaP);
218 if (mNumBinsX==0) mNumBinsX=1;
219 mNumBinsY = (int)ceil((mPYmax-mPYmin)/mDeltaP);
220 if (mNumBinsY==0) mNumBinsY=1;
221 mNumBinsZ = (int)ceil((mPZmax-mPZmin)/mDeltaP);
222 if (mNumBinsZ==0) mNumBinsZ=1;
228 inline int StHbtSectoredAnalysis::GetNeventsProcessed() {
return mNeventsProcessed;}
virtual void ProcessEvent(const StHbtEvent *)
returns reports of all cuts applied and correlation functions being done