]>
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.5 2001/05/25 23:24:00 lisa | |
23 | * Added in AliFemtoKink stuff | |
24 | * | |
25 | * Revision 1.4 2000/08/31 22:31:32 laue | |
26 | * AliFemtoAnalysis: output changed (a little bit less) | |
27 | * AliFemtoEvent: new version, members for reference mult added | |
28 | * AliFemtoIOBinary: new IO for new AliFemtoEvent version | |
29 | * AliFemtoTypes: TTree typedef to AliFemtoTTree added | |
30 | * AliFemtoVertexAnalysis: overflow and underflow added | |
31 | * | |
32 | * Revision 1.1 2000/07/16 21:44:11 laue | |
33 | * Collection and analysis for vertex dependent event mixing | |
34 | * | |
35 | * | |
36 | **************************************************************************/ | |
37 | ||
38 | #include "Analysis/AliFemtoVertexAnalysis.h" | |
39 | #include "Infrastructure/AliFemtoParticleCollection.h" | |
40 | #include "Base/AliFemtoTrackCut.h" | |
41 | #include "Base/AliFemtoV0Cut.h" | |
42 | #include "Base/AliFemtoKinkCut.h" | |
43 | #include "Infrastructure/AliFemtoPicoEventCollectionVector.h" | |
44 | #include "Infrastructure/AliFemtoPicoEventCollectionVectorHideAway.h" | |
45 | ||
46 | ||
47 | #ifdef __ROOT__ | |
48 | ClassImp(AliFemtoVertexAnalysis) | |
49 | #endif | |
50 | ||
51 | extern void FillHbtParticleCollection(AliFemtoParticleCut* partCut, | |
52 | AliFemtoEvent* hbtEvent, | |
53 | AliFemtoParticleCollection* partCollection); | |
54 | ||
55 | ||
56 | //____________________________ | |
0215f606 | 57 | AliFemtoVertexAnalysis::AliFemtoVertexAnalysis(unsigned int bins, double min, double max): |
58 | fVertexBins(0), | |
59 | fOverFlow(0), | |
60 | fUnderFlow(0) | |
61 | { | |
67427ff7 | 62 | // mControlSwitch = 0; |
63 | fEventCut = 0; | |
64 | fFirstParticleCut = 0; | |
65 | fSecondParticleCut = 0; | |
66 | fPairCut = 0; | |
67 | fCorrFctnCollection= 0; | |
68 | fCorrFctnCollection = new AliFemtoCorrFctnCollection; | |
69 | fVertexBins = bins; | |
70 | fVertexZ[0] = min; | |
71 | fVertexZ[1] = max; | |
72 | fUnderFlow = 0; | |
73 | fOverFlow = 0; | |
74 | if (fMixingBuffer) delete fMixingBuffer; | |
75 | fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexBins,fVertexZ[0],fVertexZ[1]); | |
76 | }; | |
77 | //____________________________ | |
78 | ||
0215f606 | 79 | AliFemtoVertexAnalysis::AliFemtoVertexAnalysis(const AliFemtoVertexAnalysis& a) : |
80 | AliFemtoAnalysis(), | |
81 | fVertexBins(0), | |
82 | fOverFlow(0), | |
83 | fUnderFlow(0) | |
84 | { | |
67427ff7 | 85 | //AliFemtoVertexAnalysis(); |
86 | fEventCut = 0; | |
87 | fFirstParticleCut = 0; | |
88 | fSecondParticleCut = 0; | |
89 | fPairCut = 0; | |
90 | fCorrFctnCollection= 0; | |
91 | fCorrFctnCollection = new AliFemtoCorrFctnCollection; | |
92 | fVertexBins = a.fVertexBins; | |
93 | fVertexZ[0] = a.fVertexZ[0]; | |
94 | fVertexZ[1] = a.fVertexZ[1]; | |
95 | fUnderFlow = 0; | |
96 | fOverFlow = 0; | |
97 | if (fMixingBuffer) delete fMixingBuffer; | |
98 | fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexBins,fVertexZ[0],fVertexZ[1]); | |
99 | ||
100 | // find the right event cut | |
101 | fEventCut = a.fEventCut->Clone(); | |
102 | // find the right first particle cut | |
103 | fFirstParticleCut = a.fFirstParticleCut->Clone(); | |
104 | // find the right second particle cut | |
105 | if (a.fFirstParticleCut==a.fSecondParticleCut) | |
106 | SetSecondParticleCut(fFirstParticleCut); // identical particle hbt | |
107 | else | |
108 | fSecondParticleCut = a.fSecondParticleCut->Clone(); | |
109 | ||
110 | fPairCut = a.fPairCut->Clone(); | |
111 | ||
112 | if ( fEventCut ) { | |
113 | SetEventCut(fEventCut); // this will set the myAnalysis pointer inside the cut | |
114 | cout << " AliFemtoVertexAnalysis::AliFemtoVertexAnalysis(const AliFemtoVertexAnalysis& a) - event cut set " << endl; | |
115 | } | |
116 | if ( fFirstParticleCut ) { | |
117 | SetFirstParticleCut(fFirstParticleCut); // this will set the myAnalysis pointer inside the cut | |
118 | cout << " AliFemtoVertexAnalysis::AliFemtoVertexAnalysis(const AliFemtoVertexAnalysis& a) - first particle cut set " << endl; | |
119 | } | |
120 | if ( fSecondParticleCut ) { | |
121 | SetSecondParticleCut(fSecondParticleCut); // this will set the myAnalysis pointer inside the cut | |
122 | cout << " AliFemtoVertexAnalysis::AliFemtoVertexAnalysis(const AliFemtoVertexAnalysis& a) - second particle cut set " << endl; | |
123 | } if ( fPairCut ) { | |
124 | SetPairCut(fPairCut); // this will set the myAnalysis pointer inside the cut | |
125 | cout << " AliFemtoVertexAnalysis::AliFemtoVertexAnalysis(const AliFemtoVertexAnalysis& a) - pair cut set " << endl; | |
126 | } | |
127 | ||
128 | AliFemtoCorrFctnIterator iter; | |
129 | for (iter=a.fCorrFctnCollection->begin(); iter!=a.fCorrFctnCollection->end();iter++){ | |
130 | cout << " AliFemtoVertexAnalysis::AliFemtoVertexAnalysis(const AliFemtoVertexAnalysis& a) - looking for correlation functions " << endl; | |
131 | AliFemtoCorrFctn* fctn = (*iter)->Clone(); | |
132 | if (fctn) AddCorrFctn(fctn); | |
133 | else cout << " AliFemtoVertexAnalysis::AliFemtoVertexAnalysis(const AliFemtoVertexAnalysis& a) - correlation function not found " << endl; | |
134 | } | |
135 | ||
136 | fNumEventsToMix = a.fNumEventsToMix; | |
137 | ||
138 | cout << " AliFemtoVertexAnalysis::AliFemtoVertexAnalysis(const AliFemtoVertexAnalysis& a) - analysis copied " << endl; | |
139 | ||
140 | } | |
141 | //____________________________ | |
142 | AliFemtoVertexAnalysis::~AliFemtoVertexAnalysis(){ | |
143 | // now delete every PicoEvent in the EventMixingBuffer and then the Buffer itself | |
144 | delete fPicoEventCollectionVectorHideAway; | |
145 | } | |
146 | ||
147 | //____________________________ | |
148 | AliFemtoString AliFemtoVertexAnalysis::Report() | |
149 | { | |
150 | cout << "AliFemtoVertexAnalysis - constructing Report..."<<endl; | |
151 | char Ctemp[200]; | |
152 | AliFemtoString temp = "-----------\nHbt AliFemtoVertexAnalysis Report:\n"; | |
153 | sprintf(Ctemp,"Events are mixed in %d bins in the range %E cm to %E cm.\n",fVertexBins,fVertexZ[0],fVertexZ[1]); | |
154 | temp += Ctemp; | |
155 | sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlow); | |
156 | temp += Ctemp; | |
157 | sprintf(Ctemp,"Events overflowing: %d\n",fOverFlow); | |
158 | temp += Ctemp; | |
159 | sprintf(Ctemp,"Now adding AliFemtoAnalysis(base) Report\n"); | |
160 | temp += Ctemp; | |
161 | temp += AliFemtoAnalysis::Report(); | |
162 | AliFemtoString returnThis=temp; | |
163 | return returnThis; | |
164 | } | |
165 | //_________________________ | |
166 | void AliFemtoVertexAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) { | |
167 | cout << " AliFemtoVertexAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) " << endl; | |
168 | // get right mixing buffer | |
169 | double vertexZ = hbtEvent->PrimVertPos().z(); | |
170 | fMixingBuffer = fPicoEventCollectionVectorHideAway->PicoEventCollection(vertexZ); | |
171 | if (!fMixingBuffer) { | |
172 | if ( vertexZ < fVertexZ[0] ) fUnderFlow++; | |
173 | if ( vertexZ > fVertexZ[1] ) fOverFlow++; | |
174 | return; | |
175 | } | |
176 | // call ProcessEvent() from AliFemtoAnalysis-base | |
177 | AliFemtoAnalysis::ProcessEvent(hbtEvent); | |
178 | } |