1 /***************************************************************************
5 * Author: Frank Laue, Ohio State, laue@mps.ohio-state.edu
6 ***************************************************************************
8 * Description: part of STAR HBT Framework: AliFemtoMaker 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.
13 ***************************************************************************
16 * Revision 1.1 2007/05/16 10:22:12 akisiel
17 * Making the directory structure of AliFemto flat. All files go into one common directory
19 * Revision 1.2 2007/05/03 09:39:37 akisiel
20 * Fixing Effective C++ warnings
22 * Revision 1.1.1.1 2007/04/25 15:38:41 panos
23 * Importing the HBT code dir
25 * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
26 * First version on CVS
28 * Revision 1.2 2005/06/28 23:12:24 chajecki
29 * UncorrectedNumberOfNegativePrimaries() -> UncorrectedNumberOfPrimaries()
31 * For data taken in Y2 and later the centrality definition bases
32 * on UncorrectedNumberOfPrimaries() while for Y1(AuAu@130)
33 * it based on UncorrectedNumberOfNegativePrimaries().
34 * But in many places of HBT code the number of negative primaries
35 * was used as a multiplicity for all productions.
36 * This has been fixed.
38 * Revision 1.1 2001/11/11 18:34:14 laue
39 * AliFemtoPicoEventCollectionVectorHideAway: updated for 3d grid
40 * AliFemtoVertexMultAnalysis: new
43 **************************************************************************/
45 #include "AliFemtoVertexMultAnalysis.h"
46 #include "AliFemtoParticleCollection.h"
47 #include "AliFemtoTrackCut.h"
48 #include "AliFemtoV0Cut.h"
49 #include "AliFemtoKinkCut.h"
50 #include "AliFemtoPicoEventCollectionVector.h"
51 #include "AliFemtoPicoEventCollectionVectorHideAway.h"
55 ClassImp(AliFemtoVertexMultAnalysis)
58 extern void FillHbtParticleCollection(AliFemtoParticleCut* partCut,
59 AliFemtoEvent* hbtEvent,
60 AliFemtoParticleCollection* partCollection);
63 //____________________________
64 AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(unsigned int binsVertex, double minVertex, double maxVertex,
65 unsigned int binsMult, double minMult, double maxMult)
67 fVertexZBins(binsVertex),
74 // mControlSwitch = 0;
76 fFirstParticleCut = 0;
77 fSecondParticleCut = 0;
79 fCorrFctnCollection= 0;
80 fCorrFctnCollection = new AliFemtoCorrFctnCollection;
81 fVertexZ[0] = minVertex;
82 fVertexZ[1] = maxVertex;
83 fUnderFlowVertexZ = 0;
89 if (fMixingBuffer) delete fMixingBuffer;
90 fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1],
91 fMultBins,fMult[0],fMult[1]);
93 //____________________________
95 AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) :
96 AliFemtoSimpleAnalysis(),
97 fVertexZBins(a.fVertexZBins),
100 fMultBins(a.fMultBins) ,
104 //AliFemtoVertexMultAnalysis();
106 fFirstParticleCut = 0;
107 fSecondParticleCut = 0;
109 fCorrFctnCollection= 0;
110 fCorrFctnCollection = new AliFemtoCorrFctnCollection;
111 fVertexZ[0] = a.fVertexZ[0];
112 fVertexZ[1] = a.fVertexZ[1];
113 fUnderFlowVertexZ = 0;
114 fOverFlowVertexZ = 0;
115 fMult[0] = a.fMult[0];
116 fMult[1] = a.fMult[1];
119 if (fMixingBuffer) delete fMixingBuffer;
120 fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1],
121 fMultBins,fMult[0],fMult[1]);
123 // find the right event cut
124 fEventCut = a.fEventCut->Clone();
125 // find the right first particle cut
126 fFirstParticleCut = a.fFirstParticleCut->Clone();
127 // find the right second particle cut
128 if (a.fFirstParticleCut==a.fSecondParticleCut)
129 SetSecondParticleCut(fFirstParticleCut); // identical particle hbt
131 fSecondParticleCut = a.fSecondParticleCut->Clone();
133 fPairCut = a.fPairCut->Clone();
136 SetEventCut(fEventCut); // this will set the myAnalysis pointer inside the cut
137 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - event cut set " << endl;
139 if ( fFirstParticleCut ) {
140 SetFirstParticleCut(fFirstParticleCut); // this will set the myAnalysis pointer inside the cut
141 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - first particle cut set " << endl;
143 if ( fSecondParticleCut ) {
144 SetSecondParticleCut(fSecondParticleCut); // this will set the myAnalysis pointer inside the cut
145 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - second particle cut set " << endl;
147 SetPairCut(fPairCut); // this will set the myAnalysis pointer inside the cut
148 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - pair cut set " << endl;
151 AliFemtoCorrFctnIterator iter;
152 for (iter=a.fCorrFctnCollection->begin(); iter!=a.fCorrFctnCollection->end();iter++){
153 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - looking for correlation functions " << endl;
154 AliFemtoCorrFctn* fctn = (*iter)->Clone();
155 if (fctn) AddCorrFctn(fctn);
156 else cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - correlation function not found " << endl;
159 fNumEventsToMix = a.fNumEventsToMix;
161 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - analysis copied " << endl;
164 //____________________________
165 AliFemtoVertexMultAnalysis::~AliFemtoVertexMultAnalysis(){
166 // now delete every PicoEvent in the EventMixingBuffer and then the Buffer itself
167 delete fPicoEventCollectionVectorHideAway;
170 //____________________________
171 AliFemtoString AliFemtoVertexMultAnalysis::Report()
173 cout << "AliFemtoVertexMultAnalysis - constructing Report..."<<endl;
175 AliFemtoString temp = "-----------\nHbt AliFemtoVertexMultAnalysis Report:\n";
176 sprintf(Ctemp,"Events are mixed in %d VertexZ bins in the range %E cm to %E cm.\n",fVertexZBins,fVertexZ[0],fVertexZ[1]);
178 sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowVertexZ);
180 sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowVertexZ);
182 sprintf(Ctemp,"Events are mixed in %d Mult bins in the range %E cm to %E cm.\n",fMultBins,fMult[0],fMult[1]);
184 sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowMult);
186 sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowMult);
188 sprintf(Ctemp,"Now adding AliFemtoSimpleAnalysis(base) Report\n");
190 temp += AliFemtoSimpleAnalysis::Report();
191 AliFemtoString returnThis=temp;
194 //_________________________
195 void AliFemtoVertexMultAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
196 cout << " AliFemtoVertexMultAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) " << endl;
197 // get right mixing buffer
198 double vertexZ = hbtEvent->PrimVertPos().z();
199 double mult = hbtEvent->UncorrectedNumberOfPrimaries();
200 fMixingBuffer = fPicoEventCollectionVectorHideAway->PicoEventCollection(vertexZ,mult);
201 if (!fMixingBuffer) {
202 if ( vertexZ < fVertexZ[0] ) fUnderFlowVertexZ++;
203 if ( vertexZ > fVertexZ[1] ) fOverFlowVertexZ++;
204 if ( mult < fMult[0] ) fUnderFlowMult++;
205 if ( mult > fMult[1] ) fOverFlowMult++;
208 // call ProcessEvent() from AliFemtoSimpleAnalysis-base
209 AliFemtoSimpleAnalysis::ProcessEvent(hbtEvent);