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.1.1 2007/04/25 15:38:41 panos
17 * Importing the HBT code dir
19 * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
20 * First version on CVS
22 * Revision 1.2 2005/06/28 23:12:24 chajecki
23 * UncorrectedNumberOfNegativePrimaries() -> UncorrectedNumberOfPrimaries()
25 * For data taken in Y2 and later the centrality definition bases
26 * on UncorrectedNumberOfPrimaries() while for Y1(AuAu@130)
27 * it based on UncorrectedNumberOfNegativePrimaries().
28 * But in many places of HBT code the number of negative primaries
29 * was used as a multiplicity for all productions.
30 * This has been fixed.
32 * Revision 1.1 2001/11/11 18:34:14 laue
33 * AliFemtoPicoEventCollectionVectorHideAway: updated for 3d grid
34 * AliFemtoVertexMultAnalysis: new
37 **************************************************************************/
39 #include "Analysis/AliFemtoVertexMultAnalysis.h"
40 #include "Infrastructure/AliFemtoParticleCollection.h"
41 #include "Base/AliFemtoTrackCut.h"
42 #include "Base/AliFemtoV0Cut.h"
43 #include "Base/AliFemtoKinkCut.h"
44 #include "Infrastructure/AliFemtoPicoEventCollectionVector.h"
45 #include "Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.h"
49 ClassImp(AliFemtoVertexMultAnalysis)
52 extern void FillHbtParticleCollection(AliFemtoParticleCut* partCut,
53 AliFemtoEvent* hbtEvent,
54 AliFemtoParticleCollection* partCollection);
57 //____________________________
58 AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(unsigned int binsVertex, double minVertex, double maxVertex,
59 unsigned int binsMult, double minMult, double maxMult)
61 fVertexZBins(binsVertex),
68 // mControlSwitch = 0;
70 fFirstParticleCut = 0;
71 fSecondParticleCut = 0;
73 fCorrFctnCollection= 0;
74 fCorrFctnCollection = new AliFemtoCorrFctnCollection;
75 fVertexZ[0] = minVertex;
76 fVertexZ[1] = maxVertex;
77 fUnderFlowVertexZ = 0;
83 if (fMixingBuffer) delete fMixingBuffer;
84 fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1],
85 fMultBins,fMult[0],fMult[1]);
87 //____________________________
89 AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) :
91 fVertexZBins(a.fVertexZBins),
94 fMultBins(a.fMultBins) ,
98 //AliFemtoVertexMultAnalysis();
100 fFirstParticleCut = 0;
101 fSecondParticleCut = 0;
103 fCorrFctnCollection= 0;
104 fCorrFctnCollection = new AliFemtoCorrFctnCollection;
105 fVertexZ[0] = a.fVertexZ[0];
106 fVertexZ[1] = a.fVertexZ[1];
107 fUnderFlowVertexZ = 0;
108 fOverFlowVertexZ = 0;
109 fMult[0] = a.fMult[0];
110 fMult[1] = a.fMult[1];
113 if (fMixingBuffer) delete fMixingBuffer;
114 fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1],
115 fMultBins,fMult[0],fMult[1]);
117 // find the right event cut
118 fEventCut = a.fEventCut->Clone();
119 // find the right first particle cut
120 fFirstParticleCut = a.fFirstParticleCut->Clone();
121 // find the right second particle cut
122 if (a.fFirstParticleCut==a.fSecondParticleCut)
123 SetSecondParticleCut(fFirstParticleCut); // identical particle hbt
125 fSecondParticleCut = a.fSecondParticleCut->Clone();
127 fPairCut = a.fPairCut->Clone();
130 SetEventCut(fEventCut); // this will set the myAnalysis pointer inside the cut
131 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - event cut set " << endl;
133 if ( fFirstParticleCut ) {
134 SetFirstParticleCut(fFirstParticleCut); // this will set the myAnalysis pointer inside the cut
135 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - first particle cut set " << endl;
137 if ( fSecondParticleCut ) {
138 SetSecondParticleCut(fSecondParticleCut); // this will set the myAnalysis pointer inside the cut
139 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - second particle cut set " << endl;
141 SetPairCut(fPairCut); // this will set the myAnalysis pointer inside the cut
142 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - pair cut set " << endl;
145 AliFemtoCorrFctnIterator iter;
146 for (iter=a.fCorrFctnCollection->begin(); iter!=a.fCorrFctnCollection->end();iter++){
147 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - looking for correlation functions " << endl;
148 AliFemtoCorrFctn* fctn = (*iter)->Clone();
149 if (fctn) AddCorrFctn(fctn);
150 else cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - correlation function not found " << endl;
153 fNumEventsToMix = a.fNumEventsToMix;
155 cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - analysis copied " << endl;
158 //____________________________
159 AliFemtoVertexMultAnalysis::~AliFemtoVertexMultAnalysis(){
160 // now delete every PicoEvent in the EventMixingBuffer and then the Buffer itself
161 delete fPicoEventCollectionVectorHideAway;
164 //____________________________
165 AliFemtoString AliFemtoVertexMultAnalysis::Report()
167 cout << "AliFemtoVertexMultAnalysis - constructing Report..."<<endl;
169 AliFemtoString temp = "-----------\nHbt AliFemtoVertexMultAnalysis Report:\n";
170 sprintf(Ctemp,"Events are mixed in %d VertexZ bins in the range %E cm to %E cm.\n",fVertexZBins,fVertexZ[0],fVertexZ[1]);
172 sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowVertexZ);
174 sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowVertexZ);
176 sprintf(Ctemp,"Events are mixed in %d Mult bins in the range %E cm to %E cm.\n",fMultBins,fMult[0],fMult[1]);
178 sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowMult);
180 sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowMult);
182 sprintf(Ctemp,"Now adding AliFemtoAnalysis(base) Report\n");
184 temp += AliFemtoAnalysis::Report();
185 AliFemtoString returnThis=temp;
188 //_________________________
189 void AliFemtoVertexMultAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
190 cout << " AliFemtoVertexMultAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) " << endl;
191 // get right mixing buffer
192 double vertexZ = hbtEvent->PrimVertPos().z();
193 double mult = hbtEvent->UncorrectedNumberOfPrimaries();
194 fMixingBuffer = fPicoEventCollectionVectorHideAway->PicoEventCollection(vertexZ,mult);
195 if (!fMixingBuffer) {
196 if ( vertexZ < fVertexZ[0] ) fUnderFlowVertexZ++;
197 if ( vertexZ > fVertexZ[1] ) fOverFlowVertexZ++;
198 if ( mult < fMult[0] ) fUnderFlowMult++;
199 if ( mult > fMult[1] ) fOverFlowMult++;
202 // call ProcessEvent() from AliFemtoAnalysis-base
203 AliFemtoAnalysis::ProcessEvent(hbtEvent);