]>
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$ | |
a5b23aa6 | 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 | |
18 | * | |
d0e92d9a | 19 | * Revision 1.2 2007/05/03 09:39:37 akisiel |
20 | * Fixing Effective C++ warnings | |
21 | * | |
0215f606 | 22 | * Revision 1.1.1.1 2007/04/25 15:38:41 panos |
23 | * Importing the HBT code dir | |
24 | * | |
67427ff7 | 25 | * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki |
26 | * First version on CVS | |
27 | * | |
28 | * Revision 1.2 2005/06/28 23:12:24 chajecki | |
29 | * UncorrectedNumberOfNegativePrimaries() -> UncorrectedNumberOfPrimaries() | |
30 | * | |
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. | |
37 | * | |
38 | * Revision 1.1 2001/11/11 18:34:14 laue | |
39 | * AliFemtoPicoEventCollectionVectorHideAway: updated for 3d grid | |
40 | * AliFemtoVertexMultAnalysis: new | |
41 | * | |
42 | * | |
43 | **************************************************************************/ | |
44 | ||
d0e92d9a | 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" | |
67427ff7 | 52 | |
53 | ||
54 | #ifdef __ROOT__ | |
55 | ClassImp(AliFemtoVertexMultAnalysis) | |
56 | #endif | |
57 | ||
58 | extern void FillHbtParticleCollection(AliFemtoParticleCut* partCut, | |
59 | AliFemtoEvent* hbtEvent, | |
60 | AliFemtoParticleCollection* partCollection); | |
61 | ||
62 | ||
63 | //____________________________ | |
64 | AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(unsigned int binsVertex, double minVertex, double maxVertex, | |
65 | unsigned int binsMult, double minMult, double maxMult) | |
0215f606 | 66 | : |
67 | fVertexZBins(binsVertex), | |
68 | fOverFlowVertexZ(0), | |
69 | fUnderFlowVertexZ(0), | |
70 | fMultBins(binsMult) , | |
71 | fOverFlowMult(0), | |
72 | fUnderFlowMult(0) | |
73 | { | |
67427ff7 | 74 | // mControlSwitch = 0; |
75 | fEventCut = 0; | |
76 | fFirstParticleCut = 0; | |
77 | fSecondParticleCut = 0; | |
78 | fPairCut = 0; | |
79 | fCorrFctnCollection= 0; | |
80 | fCorrFctnCollection = new AliFemtoCorrFctnCollection; | |
81 | fVertexZ[0] = minVertex; | |
82 | fVertexZ[1] = maxVertex; | |
83 | fUnderFlowVertexZ = 0; | |
84 | fOverFlowVertexZ = 0; | |
85 | fMult[0] = minMult; | |
86 | fMult[1] = maxMult; | |
87 | fUnderFlowMult = 0; | |
88 | fOverFlowMult = 0; | |
89 | if (fMixingBuffer) delete fMixingBuffer; | |
90 | fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1], | |
91 | fMultBins,fMult[0],fMult[1]); | |
92 | }; | |
93 | //____________________________ | |
94 | ||
0215f606 | 95 | AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) : |
a5b23aa6 | 96 | AliFemtoSimpleAnalysis(), |
0215f606 | 97 | fVertexZBins(a.fVertexZBins), |
98 | fOverFlowVertexZ(0), | |
99 | fUnderFlowVertexZ(0), | |
100 | fMultBins(a.fMultBins) , | |
101 | fOverFlowMult(0), | |
102 | fUnderFlowMult(0) | |
103 | { | |
67427ff7 | 104 | //AliFemtoVertexMultAnalysis(); |
105 | fEventCut = 0; | |
106 | fFirstParticleCut = 0; | |
107 | fSecondParticleCut = 0; | |
108 | fPairCut = 0; | |
109 | fCorrFctnCollection= 0; | |
110 | fCorrFctnCollection = new AliFemtoCorrFctnCollection; | |
67427ff7 | 111 | fVertexZ[0] = a.fVertexZ[0]; |
112 | fVertexZ[1] = a.fVertexZ[1]; | |
113 | fUnderFlowVertexZ = 0; | |
114 | fOverFlowVertexZ = 0; | |
67427ff7 | 115 | fMult[0] = a.fMult[0]; |
116 | fMult[1] = a.fMult[1]; | |
117 | fUnderFlowMult = 0; | |
118 | fOverFlowMult = 0; | |
119 | if (fMixingBuffer) delete fMixingBuffer; | |
120 | fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1], | |
121 | fMultBins,fMult[0],fMult[1]); | |
122 | ||
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 | |
130 | else | |
131 | fSecondParticleCut = a.fSecondParticleCut->Clone(); | |
132 | ||
133 | fPairCut = a.fPairCut->Clone(); | |
134 | ||
135 | if ( fEventCut ) { | |
136 | SetEventCut(fEventCut); // this will set the myAnalysis pointer inside the cut | |
137 | cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - event cut set " << endl; | |
138 | } | |
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; | |
142 | } | |
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; | |
146 | } if ( fPairCut ) { | |
147 | SetPairCut(fPairCut); // this will set the myAnalysis pointer inside the cut | |
148 | cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - pair cut set " << endl; | |
149 | } | |
150 | ||
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; | |
157 | } | |
158 | ||
159 | fNumEventsToMix = a.fNumEventsToMix; | |
160 | ||
161 | cout << " AliFemtoVertexMultAnalysis::AliFemtoVertexMultAnalysis(const AliFemtoVertexMultAnalysis& a) - analysis copied " << endl; | |
162 | ||
163 | } | |
164 | //____________________________ | |
165 | AliFemtoVertexMultAnalysis::~AliFemtoVertexMultAnalysis(){ | |
166 | // now delete every PicoEvent in the EventMixingBuffer and then the Buffer itself | |
167 | delete fPicoEventCollectionVectorHideAway; | |
168 | } | |
169 | ||
170 | //____________________________ | |
171 | AliFemtoString AliFemtoVertexMultAnalysis::Report() | |
172 | { | |
173 | cout << "AliFemtoVertexMultAnalysis - constructing Report..."<<endl; | |
174 | char Ctemp[200]; | |
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]); | |
177 | temp += Ctemp; | |
178 | sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowVertexZ); | |
179 | temp += Ctemp; | |
180 | sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowVertexZ); | |
181 | temp += Ctemp; | |
182 | sprintf(Ctemp,"Events are mixed in %d Mult bins in the range %E cm to %E cm.\n",fMultBins,fMult[0],fMult[1]); | |
183 | temp += Ctemp; | |
184 | sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlowMult); | |
185 | temp += Ctemp; | |
186 | sprintf(Ctemp,"Events overflowing: %d\n",fOverFlowMult); | |
187 | temp += Ctemp; | |
a5b23aa6 | 188 | sprintf(Ctemp,"Now adding AliFemtoSimpleAnalysis(base) Report\n"); |
67427ff7 | 189 | temp += Ctemp; |
a5b23aa6 | 190 | temp += AliFemtoSimpleAnalysis::Report(); |
67427ff7 | 191 | AliFemtoString returnThis=temp; |
192 | return returnThis; | |
193 | } | |
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++; | |
206 | return; | |
207 | } | |
a5b23aa6 | 208 | // call ProcessEvent() from AliFemtoSimpleAnalysis-base |
209 | AliFemtoSimpleAnalysis::ProcessEvent(hbtEvent); | |
67427ff7 | 210 | } |