44 #ifndef StHbtThreeParticleAnalysis_hh
45 #define StHbtThreeParticleAnalysis_hh
47 #include "StHbtMaker/Base/StHbtBaseAnalysis.h"
48 #include "StHbtMaker/Base/StHbtTripletCut.h"
49 #include "StHbtMaker/Base/StHbtEventCut.h"
50 #include "StHbtMaker/Base/StHbtParticleCut.h"
51 #include "StHbtMaker/Base/StHbtCorrFctn.hh"
52 #include "StHbtMaker/Infrastructure/StHbtCorrFctnCollection.hh"
53 #include "StHbtMaker/Infrastructure/StHbtPicoEventCollection.hh"
54 #include "StHbtMaker/Infrastructure/StHbtSectoredPicoEventCollection.hh"
69 int CreateMixedTriplets(StHbtParticleCollection*, StHbtParticleCollection*, StHbtParticleCollection*);
71 int Index(
int,
int,
int);
88 StHbtCorrFctnCollection* CorrFctnCollection();
91 void AddEventProcessed();
102 void SetCalcCosPhi(
const char*);
103 void SetSectoring(
bool);
104 void SetNormFactor(
const double);
117 void SetPXmax(
float);
118 void SetPXmin(
float);
119 void SetPYmax(
float);
120 void SetPYmin(
float);
121 void SetPZmax(
float);
122 void SetPZmin(
float);
123 void SetDeltaP(
float);
125 unsigned int NumEventsToMix();
126 void SetNumEventsToMix(
const unsigned int&);
127 StHbtPicoEventCollection* MixingBuffer();
128 bool MixingBufferFull();
129 StHbtSectoredPicoEventCollection* SectoredMixingBuffer();
130 bool SectoredMixingBufferFull();
132 bool AnalyzeIdenticalParticles();
133 virtual StHbtString Report();
138 int GetNeventsProcessed();
140 virtual void Finish();
144 unsigned int mNumEventsToMix;
145 unsigned int mNeventsProcessed;
147 StHbtCorrFctnCollection* mCorrFctnCollection;
152 StHbtPicoEventCollection* mMixingBuffer;
153 StHbtSectoredPicoEventCollection* mSectoredMixingBuffer;
184 inline StHbtTripletCut* StHbtThreeParticleAnalysis::TripletCut() {
return mTripletCut;}
185 inline StHbtEventCut* StHbtThreeParticleAnalysis::EventCut() {
return mEventCut;}
186 inline StHbtParticleCut* StHbtThreeParticleAnalysis::FirstParticleCut() {
return mFirstParticleCut;}
187 inline StHbtParticleCut* StHbtThreeParticleAnalysis::SecondParticleCut() {
return mSecondParticleCut;}
188 inline StHbtParticleCut* StHbtThreeParticleAnalysis::ThirdParticleCut() {
return mThirdParticleCut;}
189 inline StHbtCorrFctnCollection* StHbtThreeParticleAnalysis::CorrFctnCollection() {
return mCorrFctnCollection;}
190 inline unsigned int StHbtThreeParticleAnalysis::NumEventsToMix(){
return mNumEventsToMix;}
192 inline StHbt1DHisto* StHbtThreeParticleAnalysis::Q2CF() {
return mQ2CF;}
193 inline StHbt1DHisto* StHbtThreeParticleAnalysis::Q3CF() {
return mQ3CF;}
194 inline StHbt1DHisto* StHbtThreeParticleAnalysis::CosPhi() {
return mCosPhi;}
195 inline StHbt1DHisto* StHbtThreeParticleAnalysis::CosPhiN() {
return mCosPhiN;}
196 inline bool StHbtThreeParticleAnalysis::CalcCosPhi() {
return mCalcCosPhi;}
197 inline bool StHbtThreeParticleAnalysis::IsSectoring() {
return mIsSectoring;}
199 inline StHbtPicoEventCollection* StHbtThreeParticleAnalysis::MixingBuffer() {
return mMixingBuffer;}
200 inline StHbtSectoredPicoEventCollection* StHbtThreeParticleAnalysis::SectoredMixingBuffer() {
return mSectoredMixingBuffer;}
202 inline float StHbtThreeParticleAnalysis::PXmax() {
return mPXmax;}
203 inline float StHbtThreeParticleAnalysis::PXmin() {
return mPXmin;}
204 inline float StHbtThreeParticleAnalysis::PYmax() {
return mPYmax;}
205 inline float StHbtThreeParticleAnalysis::PYmin() {
return mPYmin;}
206 inline float StHbtThreeParticleAnalysis::PZmax() {
return mPZmax;}
207 inline float StHbtThreeParticleAnalysis::PZmin() {
return mPZmin;}
208 inline float StHbtThreeParticleAnalysis::DeltaP() {
return mDeltaP;}
209 inline int StHbtThreeParticleAnalysis::NumBinsX() {
return mNumBinsX;}
210 inline int StHbtThreeParticleAnalysis::NumBinsY() {
return mNumBinsY;}
211 inline int StHbtThreeParticleAnalysis::NumBinsZ() {
return mNumBinsZ;}
214 inline bool StHbtThreeParticleAnalysis::AnalyzeIdenticalParticles(){
return ((mFirstParticleCut==mSecondParticleCut) && (mSecondParticleCut==mThirdParticleCut));}
216 inline void StHbtThreeParticleAnalysis::AddCorrFctn(
StHbtCorrFctn* cf) {mCorrFctnCollection->push_back(cf); cf->SetAnalysis((
StHbtBaseAnalysis*)
this);}
220 inline void StHbtThreeParticleAnalysis::SetThirdParticleCut(
StHbtParticleCut* x) {mThirdParticleCut = x; }
222 inline void StHbtThreeParticleAnalysis::SetQ2CF(
StHbt1DHisto* x) {mQ2CF = x;}
223 inline void StHbtThreeParticleAnalysis::SetQ3CF(
StHbt1DHisto* x) {mQ3CF = x;}
224 inline void StHbtThreeParticleAnalysis::SetCosPhi(
StHbt1DHisto* x) {mCosPhi = x;}
225 inline void StHbtThreeParticleAnalysis::SetCosPhiN(
StHbt1DHisto* x) {mCosPhiN = x;}
226 inline void StHbtThreeParticleAnalysis::SetNormFactor(
const double x) {mNormFactor = x;}
228 inline void StHbtThreeParticleAnalysis::SetCalcCosPhi(
const char* x)
232 sprintf(mSaveFile,
"%s", x);
234 mCosPhiE =
new StHbt1DHisto(
"CosPhiE",
"Error Histo", mCosPhi->GetNbinsX(), mCosPhi->GetXaxis()->GetBinUpEdge(0), mCosPhi->GetXaxis()->GetBinUpEdge(mCosPhi->GetNbinsX()));
237 inline void StHbtThreeParticleAnalysis::SetNumEventsToMix(
const unsigned int& nmix){ mNumEventsToMix = nmix;}
238 inline bool StHbtThreeParticleAnalysis::MixingBufferFull(){
return (mMixingBuffer->size() >= mNumEventsToMix);}
239 inline bool StHbtThreeParticleAnalysis::SectoredMixingBufferFull(){
return (mSectoredMixingBuffer->size() >= NumEventsToMix());}
240 inline int StHbtThreeParticleAnalysis::GetNeventsProcessed() {
return mNeventsProcessed;}
242 inline void StHbtThreeParticleAnalysis::SetSectoring(
bool x) {mIsSectoring = x;}
243 inline void StHbtThreeParticleAnalysis::SetPXmax(
float x) {
245 if (mPXmax<mPXmin) mNumBinsX=0;
246 else mNumBinsX = (int)ceil((mPXmax-mPXmin)/mDeltaP);
248 inline void StHbtThreeParticleAnalysis::SetPXmin(
float x) {
250 if (mPXmax<mPXmin) mNumBinsX=0;
251 else mNumBinsX = (int)ceil((mPXmax-mPXmin)/mDeltaP);
253 inline void StHbtThreeParticleAnalysis::SetPYmax(
float x) {
255 if (mPYmax<mPYmin) mNumBinsY=0;
256 else mNumBinsY = (int)ceil((mPYmax-mPYmin)/mDeltaP);
258 inline void StHbtThreeParticleAnalysis::SetPYmin(
float x) {
260 if (mPYmax<mPYmin) mNumBinsY=0;
261 else mNumBinsY = (int)ceil((mPYmax-mPYmin)/mDeltaP);
263 inline void StHbtThreeParticleAnalysis::SetPZmax(
float x) {
265 if (mPZmax<mPZmin) mNumBinsZ=0;
266 else mNumBinsZ = (int)ceil((mPZmax-mPZmin)/mDeltaP);
268 inline void StHbtThreeParticleAnalysis::SetPZmin(
float x) {
270 if (mPZmax<mPZmin) mNumBinsZ=0;
271 else mNumBinsZ = (int)ceil((mPZmax-mPZmin)/mDeltaP);
273 inline void StHbtThreeParticleAnalysis::SetDeltaP(
float x) {
276 cout <<
"****ERROR**** DeltaP must be greater than zero...setting DeltaP to 1.0" << endl;
280 mNumBinsX = (int)ceil((mPXmax-mPXmin)/mDeltaP);
281 mNumBinsY = (int)ceil((mPYmax-mPYmin)/mDeltaP);
282 mNumBinsZ = (int)ceil((mPZmax-mPZmin)/mDeltaP);
virtual void ProcessEvent(const StHbtEvent *)
returns reports of all cuts applied and correlation functions being done