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.2.2.2 2007/10/12 14:28:37 akisiel
17 * New wave of cleanup and rule conformance
19 * Revision 1.2.2.1 2007/10/05 09:38:17 akisiel
22 * Revision 1.2 2007/07/09 16:17:11 mlisa
23 * several files changed to change name of AliFemtoAnalysis to AliFemtoSimpleAnalysis and AliFemtoBaseAnalysis to AliFemtoAnalysis. Also removed some hard-coded cuts of Marek
25 * Revision 1.1 2007/05/16 10:22:12 akisiel
26 * Making the directory structure of AliFemto flat. All files go into one common directory
28 * Revision 1.2 2007/05/03 09:39:37 akisiel
29 * Fixing Effective C++ warnings
31 * Revision 1.1.1.1 2007/04/25 15:38:41 panos
32 * Importing the HBT code dir
34 * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
35 * First version on CVS
37 * Revision 1.2 2005/06/28 23:12:24 chajecki
38 * UncorrectedNumberOfNegativePrimaries() -> UncorrectedNumberOfPrimaries()
40 * For data taken in Y2 and later the centrality definition bases
41 * on UncorrectedNumberOfPrimaries() while for Y1(AuAu@130)
42 * it based on UncorrectedNumberOfNegativePrimaries().
43 * But in many places of HBT code the number of negative primaries
44 * was used as a multiplicity for all productions.
45 * This has been fixed.
47 * Revision 1.1 2001/11/11 18:34:14 laue
48 * AliFemtoPicoEventCollectionVectorHideAway: updated for 3d grid
49 * AliFemtoVertexMultAnalysis: new
52 **************************************************************************/
53 ////////////////////////////////////////////////////////////////////////////
55 // AliFemtoVertexMultAnalysis - Femtoscopic analysis which mixes event //
56 // with respect to the z position of the primary vertex and event total //
58 // You need to provide the number of z-vertex and multiplicity bins //
59 // as well as ranges for the variables //
61 ////////////////////////////////////////////////////////////////////////////
63 #include "AliFemtoVertexMultAnalysis.h"
64 #include "AliFemtoParticleCollection.h"
65 #include "AliFemtoTrackCut.h"
66 #include "AliFemtoV0Cut.h"
67 #include "AliFemtoKinkCut.h"
68 #include "AliFemtoPicoEventCollectionVector.h"
69 #include "AliFemtoPicoEventCollectionVectorHideAway.h"
73 ClassImp(AliFemtoVertexMultAnalysis)
76 extern void FillHbtParticleCollection(AliFemtoParticleCut* partCut,
77 AliFemtoEvent* hbtEvent,
78 AliFemtoParticleCollection* partCollection);
81 //____________________________
82 AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(unsigned int binsVertex, double minVertex, double maxVertex,
83 unsigned int binsMult, double minMult, double maxMult)
85 fVertexZBins(binsVertex),
92 // mControlSwitch = 0;
94 fFirstParticleCut = 0;
95 fSecondParticleCut = 0;
97 fCorrFctnCollection= 0;
98 fCorrFctnCollection = new AliFemtoCorrFctnCollection;
99 fVertexZ[0] = minVertex;
100 fVertexZ[1] = maxVertex;
101 fUnderFlowVertexZ = 0;
102 fOverFlowVertexZ = 0;
107 if (fMixingBuffer) delete fMixingBuffer;
108 fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1],
109 fMultBins,fMult[0],fMult[1]);
111 //____________________________
113 AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) :
114 AliFemtoSimpleAnalysis(),
115 fVertexZBins(a.fVertexZBins),
117 fUnderFlowVertexZ(0),
118 fMultBins(a.fMultBins) ,
122 //AliFemtoVertexMultAnalysis();
124 fFirstParticleCut = 0;
125 fSecondParticleCut = 0;
127 fCorrFctnCollection= 0;
128 fCorrFctnCollection = new AliFemtoCorrFctnCollection;
129 fVertexZ[0] = a.fVertexZ[0];
130 fVertexZ[1] = a.fVertexZ[1];
131 fUnderFlowVertexZ = 0;
132 fOverFlowVertexZ = 0;
133 fMult[0] = a.fMult[0];
134 fMult[1] = a.fMult[1];
137 if (fMixingBuffer) delete fMixingBuffer;
138 fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1],
139 fMultBins,fMult[0],fMult[1]);
141 // find the right event cut
142 fEventCut = a.fEventCut->Clone();
143 // find the right first particle cut
144 fFirstParticleCut = a.fFirstParticleCut->Clone();
145 // find the right second particle cut
146 if (a.fFirstParticleCut==a.fSecondParticleCut)
147 SetSecondParticleCut(fFirstParticleCut); // identical particle hbt
149 fSecondParticleCut = a.fSecondParticleCut->Clone();
151 fPairCut = a.fPairCut->Clone();
154 SetEventCut(fEventCut); // this will set the myAnalysis pointer inside the cut
155 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - event cut set " << endl;
157 if ( fFirstParticleCut ) {
158 SetFirstParticleCut(fFirstParticleCut); // this will set the myAnalysis pointer inside the cut
159 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - first particle cut set " << endl;
161 if ( fSecondParticleCut ) {
162 SetSecondParticleCut(fSecondParticleCut); // this will set the myAnalysis pointer inside the cut
163 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - second particle cut set " << endl;
165 SetPairCut(fPairCut); // this will set the myAnalysis pointer inside the cut
166 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - pair cut set " << endl;
169 AliFemtoCorrFctnIterator iter;
170 for (iter=a.fCorrFctnCollection->begin(); iter!=a.fCorrFctnCollection->end();iter++){
171 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - looking for correlation functions " << endl;
172 AliFemtoCorrFctn* fctn = (*iter)->Clone();
173 if (fctn) AddCorrFctn(fctn);
174 else cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - correlation function not found " << endl;
177 fNumEventsToMix = a.fNumEventsToMix;
179 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - analysis copied " << endl;
182 //____________________________
183 AliFemtoVertexMultAnalysis::~AliFemtoVertexMultAnalysis(){
184 // now delete every PicoEvent in the EventMixingBuffer and then the Buffer itself
185 delete fPicoEventCollectionVectorHideAway;
188 //____________________________
189 AliFemtoString AliFemtoVertexMultAnalysis::Report()
191 // Prepare a report of the execution
192 cout << "AliFemtoVertexMultAnalysis - constructing Report..."<<endl;
194 AliFemtoString temp = "-----------\nHbt AliFemtoVertexMultAnalysis Report:\n";
195 snprintf(ctemp , 200, "Events are mixed in %d VertexZ bins in the range %E cm to %E cm.\n",fVertexZBins,fVertexZ[0],fVertexZ[1]);
197 snprintf(ctemp , 200, "Events underflowing: %d\n",fUnderFlowVertexZ);
199 snprintf(ctemp , 200, "Events overflowing: %d\n",fOverFlowVertexZ);
201 snprintf(ctemp , 200, "Events are mixed in %d Mult bins in the range %E cm to %E cm.\n",fMultBins,fMult[0],fMult[1]);
203 snprintf(ctemp , 200, "Events underflowing: %d\n",fUnderFlowMult);
205 snprintf(ctemp , 200, "Events overflowing: %d\n",fOverFlowMult);
207 snprintf(ctemp , 200, "Now adding AliFemtoSimpleAnalysis(base) Report\n");
209 temp += AliFemtoSimpleAnalysis::Report();
210 AliFemtoString returnThis=temp;
213 //_________________________
214 void AliFemtoVertexMultAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
215 // Perform event processing
216 // in bins of z vertex and multiplicity
218 // cout << " AliFemtoVertexMultAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) " << endl;
219 // get right mixing buffer
220 double vertexZ = hbtEvent->PrimVertPos().z();
221 double mult = hbtEvent->UncorrectedNumberOfPrimaries();
222 fMixingBuffer = fPicoEventCollectionVectorHideAway->PicoEventCollection(vertexZ,mult);
223 if (!fMixingBuffer) {
224 if ( vertexZ < fVertexZ[0] ) fUnderFlowVertexZ++;
225 if ( vertexZ > fVertexZ[1] ) fOverFlowVertexZ++;
226 if ( mult < fMult[0] ) fUnderFlowMult++;
227 if ( mult > fMult[1] ) fOverFlowMult++;
230 // call ProcessEvent() from AliFemtoSimpleAnalysis-base
231 AliFemtoSimpleAnalysis::ProcessEvent(hbtEvent);