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 2007/05/03 09:39:37 akisiel
17 * Fixing Effective C++ warnings
19 * Revision 1.1.1.1 2007/04/25 15:38:41 panos
20 * Importing the HBT code dir
22 * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
23 * First version on CVS
25 * Revision 1.2 2005/06/28 23:12:24 chajecki
26 * UncorrectedNumberOfNegativePrimaries() -> UncorrectedNumberOfPrimaries()
28 * For data taken in Y2 and later the centrality definition bases
29 * on UncorrectedNumberOfPrimaries() while for Y1(AuAu@130)
30 * it based on UncorrectedNumberOfNegativePrimaries().
31 * But in many places of HBT code the number of negative primaries
32 * was used as a multiplicity for all productions.
33 * This has been fixed.
35 * Revision 1.1 2001/11/11 18:34:14 laue
36 * AliFemtoPicoEventCollectionVectorHideAway: updated for 3d grid
37 * AliFemtoVertexMultAnalysis: new
40 **************************************************************************/
42 #include "AliFemtoVertexMultAnalysis.h"
43 #include "AliFemtoParticleCollection.h"
44 #include "AliFemtoTrackCut.h"
45 #include "AliFemtoV0Cut.h"
46 #include "AliFemtoKinkCut.h"
47 #include "AliFemtoPicoEventCollectionVector.h"
48 #include "AliFemtoPicoEventCollectionVectorHideAway.h"
52 ClassImp(AliFemtoVertexMultAnalysis)
55 extern void FillHbtParticleCollection(AliFemtoParticleCut* partCut,
56 AliFemtoEvent* hbtEvent,
57 AliFemtoParticleCollection* partCollection);
60 //____________________________
61 AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(unsigned int binsVertex, double minVertex, double maxVertex,
62 unsigned int binsMult, double minMult, double maxMult)
64 fVertexZBins(binsVertex),
71 // mControlSwitch = 0;
73 fFirstParticleCut = 0;
74 fSecondParticleCut = 0;
76 fCorrFctnCollection= 0;
77 fCorrFctnCollection = new AliFemtoCorrFctnCollection;
78 fVertexZ[0] = minVertex;
79 fVertexZ[1] = maxVertex;
80 fUnderFlowVertexZ = 0;
86 if (fMixingBuffer) delete fMixingBuffer;
87 fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1],
88 fMultBins,fMult[0],fMult[1]);
90 //____________________________
92 AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) :
94 fVertexZBins(a.fVertexZBins),
97 fMultBins(a.fMultBins) ,
101 //AliFemtoVertexMultAnalysis();
103 fFirstParticleCut = 0;
104 fSecondParticleCut = 0;
106 fCorrFctnCollection= 0;
107 fCorrFctnCollection = new AliFemtoCorrFctnCollection;
108 fVertexZ[0] = a.fVertexZ[0];
109 fVertexZ[1] = a.fVertexZ[1];
110 fUnderFlowVertexZ = 0;
111 fOverFlowVertexZ = 0;
112 fMult[0] = a.fMult[0];
113 fMult[1] = a.fMult[1];
116 if (fMixingBuffer) delete fMixingBuffer;
117 fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1],
118 fMultBins,fMult[0],fMult[1]);
120 // find the right event cut
121 fEventCut = a.fEventCut->Clone();
122 // find the right first particle cut
123 fFirstParticleCut = a.fFirstParticleCut->Clone();
124 // find the right second particle cut
125 if (a.fFirstParticleCut==a.fSecondParticleCut)
126 SetSecondParticleCut(fFirstParticleCut); // identical particle hbt
128 fSecondParticleCut = a.fSecondParticleCut->Clone();
130 fPairCut = a.fPairCut->Clone();
133 SetEventCut(fEventCut); // this will set the myAnalysis pointer inside the cut
134 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - event cut set " << endl;
136 if ( fFirstParticleCut ) {
137 SetFirstParticleCut(fFirstParticleCut); // this will set the myAnalysis pointer inside the cut
138 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - first particle cut set " << endl;
140 if ( fSecondParticleCut ) {
141 SetSecondParticleCut(fSecondParticleCut); // this will set the myAnalysis pointer inside the cut
142 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - second particle cut set " << endl;
144 SetPairCut(fPairCut); // this will set the myAnalysis pointer inside the cut
145 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - pair cut set " << endl;
148 AliFemtoCorrFctnIterator iter;
149 for (iter=a.fCorrFctnCollection->begin(); iter!=a.fCorrFctnCollection->end();iter++){
150 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - looking for correlation functions " << endl;
151 AliFemtoCorrFctn* fctn = (*iter)->Clone();
152 if (fctn) AddCorrFctn(fctn);
153 else cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - correlation function not found " << endl;
156 fNumEventsToMix = a.fNumEventsToMix;
158 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - analysis copied " << endl;
161 //____________________________
162 AliFemtoVertexMultAnalysis::~AliFemtoVertexMultAnalysis(){
163 // now delete every PicoEvent in the EventMixingBuffer and then the Buffer itself
164 delete fPicoEventCollectionVectorHideAway;
167 //____________________________
168 AliFemtoString AliFemtoVertexMultAnalysis::Report()
170 cout << "AliFemtoVertexMultAnalysis - constructing Report..."<<endl;
172 AliFemtoString temp = "-----------\nHbt AliFemtoVertexMultAnalysis Report:\n";
173 sprintf(Ctemp,"Events are mixed in %d VertexZ bins in the range %E cm to %E cm.\n",fVertexZBins,fVertexZ[0],fVertexZ[1]);
175 sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowVertexZ);
177 sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowVertexZ);
179 sprintf(Ctemp,"Events are mixed in %d Mult bins in the range %E cm to %E cm.\n",fMultBins,fMult[0],fMult[1]);
181 sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowMult);
183 sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowMult);
185 sprintf(Ctemp,"Now adding AliFemtoAnalysis(base) Report\n");
187 temp += AliFemtoAnalysis::Report();
188 AliFemtoString returnThis=temp;
191 //_________________________
192 void AliFemtoVertexMultAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
193 cout << " AliFemtoVertexMultAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) " << endl;
194 // get right mixing buffer
195 double vertexZ = hbtEvent->PrimVertPos().z();
196 double mult = hbtEvent->UncorrectedNumberOfPrimaries();
197 fMixingBuffer = fPicoEventCollectionVectorHideAway->PicoEventCollection(vertexZ,mult);
198 if (!fMixingBuffer) {
199 if ( vertexZ < fVertexZ[0] ) fUnderFlowVertexZ++;
200 if ( vertexZ > fVertexZ[1] ) fOverFlowVertexZ++;
201 if ( mult < fMult[0] ) fUnderFlowMult++;
202 if ( mult > fMult[1] ) fOverFlowMult++;
205 // call ProcessEvent() from AliFemtoAnalysis-base
206 AliFemtoAnalysis::ProcessEvent(hbtEvent);