]>
Commit | Line | Data |
---|---|---|
67427ff7 | 1 | /*************************************************************************** |
2 | * | |
3 | * $Id$ | |
4 | * | |
5 | * Author: Frank Laue, Ohio State, laue@mps.ohio-state.edu | |
6 | *************************************************************************** | |
7 | * | |
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. | |
12 | * | |
13 | *************************************************************************** | |
14 | * | |
15 | * $Log$ | |
0215f606 | 16 | * Revision 1.1.1.1 2007/04/25 15:38:41 panos |
17 | * Importing the HBT code dir | |
18 | * | |
67427ff7 | 19 | * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki |
20 | * First version on CVS | |
21 | * | |
22 | * Revision 1.2 2005/06/28 23:12:24 chajecki | |
23 | * UncorrectedNumberOfNegativePrimaries() -> UncorrectedNumberOfPrimaries() | |
24 | * | |
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. | |
31 | * | |
32 | * Revision 1.1 2001/11/11 18:34:14 laue | |
33 | * AliFemtoPicoEventCollectionVectorHideAway: updated for 3d grid | |
34 | * AliFemtoVertexMultAnalysis: new | |
35 | * | |
36 | * | |
37 | **************************************************************************/ | |
38 | ||
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" | |
46 | ||
47 | ||
48 | #ifdef __ROOT__ | |
49 | ClassImp(AliFemtoVertexMultAnalysis) | |
50 | #endif | |
51 | ||
52 | extern void FillHbtParticleCollection(AliFemtoParticleCut* partCut, | |
53 | AliFemtoEvent* hbtEvent, | |
54 | AliFemtoParticleCollection* partCollection); | |
55 | ||
56 | ||
57 | //____________________________ | |
58 | AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(unsigned int binsVertex, double minVertex, double maxVertex, | |
59 | unsigned int binsMult, double minMult, double maxMult) | |
0215f606 | 60 | : |
61 | fVertexZBins(binsVertex), | |
62 | fOverFlowVertexZ(0), | |
63 | fUnderFlowVertexZ(0), | |
64 | fMultBins(binsMult) , | |
65 | fOverFlowMult(0), | |
66 | fUnderFlowMult(0) | |
67 | { | |
67427ff7 | 68 | // mControlSwitch = 0; |
69 | fEventCut = 0; | |
70 | fFirstParticleCut = 0; | |
71 | fSecondParticleCut = 0; | |
72 | fPairCut = 0; | |
73 | fCorrFctnCollection= 0; | |
74 | fCorrFctnCollection = new AliFemtoCorrFctnCollection; | |
75 | fVertexZ[0] = minVertex; | |
76 | fVertexZ[1] = maxVertex; | |
77 | fUnderFlowVertexZ = 0; | |
78 | fOverFlowVertexZ = 0; | |
79 | fMult[0] = minMult; | |
80 | fMult[1] = maxMult; | |
81 | fUnderFlowMult = 0; | |
82 | fOverFlowMult = 0; | |
83 | if (fMixingBuffer) delete fMixingBuffer; | |
84 | fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1], | |
85 | fMultBins,fMult[0],fMult[1]); | |
86 | }; | |
87 | //____________________________ | |
88 | ||
0215f606 | 89 | AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) : |
90 | AliFemtoAnalysis(), | |
91 | fVertexZBins(a.fVertexZBins), | |
92 | fOverFlowVertexZ(0), | |
93 | fUnderFlowVertexZ(0), | |
94 | fMultBins(a.fMultBins) , | |
95 | fOverFlowMult(0), | |
96 | fUnderFlowMult(0) | |
97 | { | |
67427ff7 | 98 | //AliFemtoVertexMultAnalysis(); |
99 | fEventCut = 0; | |
100 | fFirstParticleCut = 0; | |
101 | fSecondParticleCut = 0; | |
102 | fPairCut = 0; | |
103 | fCorrFctnCollection= 0; | |
104 | fCorrFctnCollection = new AliFemtoCorrFctnCollection; | |
67427ff7 | 105 | fVertexZ[0] = a.fVertexZ[0]; |
106 | fVertexZ[1] = a.fVertexZ[1]; | |
107 | fUnderFlowVertexZ = 0; | |
108 | fOverFlowVertexZ = 0; | |
67427ff7 | 109 | fMult[0] = a.fMult[0]; |
110 | fMult[1] = a.fMult[1]; | |
111 | fUnderFlowMult = 0; | |
112 | fOverFlowMult = 0; | |
113 | if (fMixingBuffer) delete fMixingBuffer; | |
114 | fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1], | |
115 | fMultBins,fMult[0],fMult[1]); | |
116 | ||
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 | |
124 | else | |
125 | fSecondParticleCut = a.fSecondParticleCut->Clone(); | |
126 | ||
127 | fPairCut = a.fPairCut->Clone(); | |
128 | ||
129 | if ( fEventCut ) { | |
130 | SetEventCut(fEventCut); // this will set the myAnalysis pointer inside the cut | |
131 | cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - event cut set " << endl; | |
132 | } | |
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; | |
136 | } | |
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; | |
140 | } if ( fPairCut ) { | |
141 | SetPairCut(fPairCut); // this will set the myAnalysis pointer inside the cut | |
142 | cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - pair cut set " << endl; | |
143 | } | |
144 | ||
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; | |
151 | } | |
152 | ||
153 | fNumEventsToMix = a.fNumEventsToMix; | |
154 | ||
155 | cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - analysis copied " << endl; | |
156 | ||
157 | } | |
158 | //____________________________ | |
159 | AliFemtoVertexMultAnalysis::~AliFemtoVertexMultAnalysis(){ | |
160 | // now delete every PicoEvent in the EventMixingBuffer and then the Buffer itself | |
161 | delete fPicoEventCollectionVectorHideAway; | |
162 | } | |
163 | ||
164 | //____________________________ | |
165 | AliFemtoString AliFemtoVertexMultAnalysis::Report() | |
166 | { | |
167 | cout << "AliFemtoVertexMultAnalysis - constructing Report..."<<endl; | |
168 | char Ctemp[200]; | |
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]); | |
171 | temp += Ctemp; | |
172 | sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowVertexZ); | |
173 | temp += Ctemp; | |
174 | sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowVertexZ); | |
175 | temp += Ctemp; | |
176 | sprintf(Ctemp,"Events are mixed in %d Mult bins in the range %E cm to %E cm.\n",fMultBins,fMult[0],fMult[1]); | |
177 | temp += Ctemp; | |
178 | sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowMult); | |
179 | temp += Ctemp; | |
180 | sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowMult); | |
181 | temp += Ctemp; | |
182 | sprintf(Ctemp,"Now adding AliFemtoAnalysis(base) Report\n"); | |
183 | temp += Ctemp; | |
184 | temp += AliFemtoAnalysis::Report(); | |
185 | AliFemtoString returnThis=temp; | |
186 | return returnThis; | |
187 | } | |
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++; | |
200 | return; | |
201 | } | |
202 | // call ProcessEvent() from AliFemtoAnalysis-base | |
203 | AliFemtoAnalysis::ProcessEvent(hbtEvent); | |
204 | } |