41 #include "StHbtMaker/Infrastructure/StHbtReactionPlaneAnalysis.h"
42 #include "StHbtMaker/Infrastructure/StHbtParticleCollection.hh"
43 #include "StHbtMaker/Base/StHbtTrackCut.h"
44 #include "StHbtMaker/Base/StHbtV0Cut.h"
45 #include "StHbtMaker/Infrastructure/StHbtPicoEventCollectionVector.hh"
46 #include "StHbtMaker/Infrastructure/StHbtPicoEventCollectionVectorHideAway.hh"
47 #include "PhysicalConstants.h"
55 StHbtParticleCollection* partCollection);
59 StHbtReactionPlaneAnalysis::StHbtReactionPlaneAnalysis(
int PtWgt,
unsigned int binsRP,
double minRP,
double maxRP,
60 unsigned int binsMult,
double minMult,
double maxMult,
61 unsigned int binsVert,
double minVert,
double maxVert){
64 mFirstParticleCut = 0;
65 mSecondParticleCut = 0;
67 mCorrFctnCollection= 0;
68 mCorrFctnCollection =
new StHbtCorrFctnCollection;
69 mReactionPlaneBins = binsRP;
70 mReactionPlane[0] = minRP;
71 mReactionPlane[1] = maxRP;
74 if (mMixingBuffer)
delete mMixingBuffer;
76 ,binsVert,minVert,maxVert);
85 mFirstParticleCut = 0;
86 mSecondParticleCut = 0;
88 mCorrFctnCollection= 0;
89 mCorrFctnCollection =
new StHbtCorrFctnCollection;
90 mReactionPlaneBins = a.mReactionPlaneBins;
91 mReactionPlane[0] = a.mReactionPlane[0];
92 mReactionPlane[1] = a.mReactionPlane[1];
95 if (mMixingBuffer)
delete mMixingBuffer;
99 mEventCut = a.mEventCut->Clone();
101 mFirstParticleCut = a.mFirstParticleCut->Clone();
103 if (a.mFirstParticleCut==a.mSecondParticleCut)
104 SetSecondParticleCut(mFirstParticleCut);
106 mSecondParticleCut = a.mSecondParticleCut->Clone();
108 mPairCut = a.mPairCut->Clone();
111 SetEventCut(mEventCut);
112 cout <<
" StHbtReactionPlaneAnalysis::StHbtReactionPlaneAnalysis(const StHbtReactionPlaneAnalysis& a) - event cut set " << endl;
114 if ( mFirstParticleCut ) {
115 SetFirstParticleCut(mFirstParticleCut);
116 cout <<
" StHbtReactionPlaneAnalysis::StHbtReactionPlaneAnalysis(const StHbtReactionPlaneAnalysis& a) - first particle cut set " << endl;
118 if ( mSecondParticleCut ) {
119 SetSecondParticleCut(mSecondParticleCut);
120 cout <<
" StHbtReactionPlaneAnalysis::StHbtReactionPlaneAnalysis(const StHbtReactionPlaneAnalysis& a) - second particle cut set " << endl;
122 SetPairCut(mPairCut);
123 cout <<
" StHbtReactionPlaneAnalysis::StHbtReactionPlaneAnalysis(const StHbtReactionPlaneAnalysis& a) - pair cut set " << endl;
126 StHbtCorrFctnIterator iter;
127 for (iter=a.mCorrFctnCollection->begin(); iter!=a.mCorrFctnCollection->end();iter++){
128 cout <<
" StHbtReactionPlaneAnalysis::StHbtReactionPlaneAnalysis(const StHbtReactionPlaneAnalysis& a) - looking for correlation functions " << endl;
130 if (fctn) AddCorrFctn(fctn);
131 else cout <<
" StHbtReactionPlaneAnalysis::StHbtReactionPlaneAnalysis(const StHbtReactionPlaneAnalysis& a) - correlation function not found " << endl;
134 mNumEventsToMix = a.mNumEventsToMix;
136 cout <<
" StHbtReactionPlaneAnalysis::StHbtReactionPlaneAnalysis(const StHbtReactionPlaneAnalysis& a) - analysis copied " << endl;
140 StHbtReactionPlaneAnalysis::~StHbtReactionPlaneAnalysis(){
142 delete mPicoEventCollectionVectorHideAway;
146 StHbtString StHbtReactionPlaneAnalysis::Report()
148 cout <<
"StHbtReactionPlaneAnalysis - constructing Report..."<<endl;
150 StHbtString temp =
"-----------\nHbt StHbtReactionPlaneAnalysis Report:\n";
151 sprintf(Ctemp,
"Events are mixed in %d bins in the range %E cm to %E cm.\n",mReactionPlaneBins,mReactionPlane[0],mReactionPlane[1]);
153 sprintf(Ctemp,
"Events underflowing: %d\n",mUnderFlow);
155 sprintf(Ctemp,
"Events overflowing: %d\n",mOverFlow);
157 sprintf(Ctemp,
"Now adding StHbtAnalysis(base) Report\n");
159 temp += StHbtAnalysis::Report();
160 StHbtString returnThis=temp;
166 mVertexZ = hbtEvent->PrimVertPos().z();
167 if (mPtWgt) mReactionPlaneAngle = hbtEvent->ReactionPlane(1);
168 else mReactionPlaneAngle = hbtEvent->ReactionPlane(0);
170 if (mReactionPlaneAngle<-990) {
171 cout <<
"No event plane!" << endl;
174 if ( mReactionPlaneAngle<0.0 ) mReactionPlaneAngle+=2*pi;
175 int multiplicity = hbtEvent->UncorrectedNumberOfPrimaries();
176 mMixingBuffer = mPicoEventCollectionVectorHideAway->PicoEventCollection(mReactionPlaneAngle,(
double)multiplicity, mVertexZ);
177 if (!mMixingBuffer) {
178 if ( mReactionPlaneAngle < mReactionPlane[0] ) mUnderFlow++;
179 if ( mReactionPlaneAngle > mReactionPlane[1] ) mOverFlow++;
virtual void ProcessEvent(const StHbtEvent *)
returns reports of all cuts applied and correlation functions being done
virtual void ProcessEvent(const StHbtEvent *)
returns reports of all cuts applied and correlation functions being done