d820823a55999c5daa833e1c7c7ef39de1d2791c
[u/mrichter/AliRoot.git] / HLT / global / physics / AliHLTMultiplicityCorrelations.cxx
1 //-*- Mode: C++ -*-
2 // $Id: AliHLTMultiplicityCorrelations.cxx  $
3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project        * 
5 //* ALICE Experiment at CERN, All rights reserved.                         *
6 //*                                                                        *
7 //* Primary Authors: Jochen Thaeder <jochen@thaeder.de>                    *
8 //*                  for The ALICE HLT Project.                            *
9 //*                                                                        *
10 //* Permission to use, copy, modify and distribute this software and its   *
11 //* documentation strictly for non-commercial purposes is hereby granted   *
12 //* without fee, provided that the above copyright notice appears in all   *
13 //* copies and that both the copyright notice and this permission notice   *
14 //* appear in the supporting documentation. The authors make no claims     *
15 //* about the suitability of this software for any purpose. It is          *
16 //* provided "as is" without express or implied warranty.                  *
17 //**************************************************************************
18
19 /** @file   AliHLTMultiplicityCorrelations.cxx
20     @author Jochen Thaeder <jochen@thaeder.de>
21     @brief  Correlation plots for multiplicity studies
22 */
23
24 // see header file for class documentation
25 // or
26 // refer to README to build package
27 // or
28 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
29
30 #if __GNUC__>= 3
31    using namespace std;
32 #endif
33
34 #include "TH1F.h"
35 #include "TH2F.h"
36 #include "TList.h"
37
38 #include "AliHLTMultiplicityCorrelations.h"
39
40 /** ROOT macro for the implementation of ROOT specific class methods */
41 ClassImp(AliHLTMultiplicityCorrelations)
42
43 /*
44  * ---------------------------------------------------------------------------------
45  *                            Constructor / Destructor
46  * ---------------------------------------------------------------------------------
47  */
48
49 //##################################################################################
50 AliHLTMultiplicityCorrelations::AliHLTMultiplicityCorrelations() :
51   fHistList(NULL),
52   fESDEvent(NULL),
53   fESDZDC(NULL),
54   fESDVZERO(NULL),
55   fESDTrackCuts(NULL),
56   fEsdTracks(0), fEsdTracksA(0),
57   fTpcTracks(0), fTpcTracksA(0),
58   fVzeroMult(0.), fVzeroMultA(0.), fVzeroMultC(0.),
59   fVzeroMultFlagged(0.), fVzeroMultFlaggedA(0.), fVzeroMultFlaggedC(0.),
60   fVzeroBinning(350), fVzeroBinningMin(0.), fVzeroBinningMax(35000.),
61   fTpcBinning(200),fTpcBinningMin(0.),fTpcBinningMax(8000.),
62   fZdcBinning(280),fZdcBinningMin(0.),fZdcBinningMax(140.),
63   fZemBinning(100),fZemBinningMin(0.),fZemBinningMax(5.),
64   fZnpBinning(200),fZnpBinningMin(0.),fZnpBinningMax(100.) {
65   // see header file for class documentation
66   // or
67   // refer to README to build package
68   // or
69   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
70   
71 }
72
73 //##################################################################################
74 AliHLTMultiplicityCorrelations::~AliHLTMultiplicityCorrelations() {
75   // see header file for class documentation
76
77   if ( fHistList ) {
78     fHistList->Clear();
79     delete fHistList;
80   }
81   fHistList = NULL;
82 }
83
84 /*
85  * ---------------------------------------------------------------------------------
86  *                                   Initialize / Reset
87  * ---------------------------------------------------------------------------------
88  */
89
90 //##################################################################################
91 Int_t AliHLTMultiplicityCorrelations::Initialize() {
92   // see header file for class documentation  
93
94   Int_t iResult = 0;
95
96   fHistList = new TList();
97   fHistList->SetOwner(kTRUE);
98
99   iResult = SetupHistograms();
100
101   return iResult;
102 }
103
104 /*
105  * ---------------------------------------------------------------------------------
106  *                             Output - public
107  * ---------------------------------------------------------------------------------
108  */
109
110 //##################################################################################
111 Int_t AliHLTMultiplicityCorrelations::ProcessEvent( AliESDEvent *esd ) {
112   // see header file for class documentation  
113
114   Int_t iResult = 0;
115
116   if ( ! AddESDEvent(esd) ) {
117     HLTWarning("No ESD event.");
118     return -1;
119   }
120
121   // -- TPC .. To be done before the others
122   if (fESDEvent->GetNumberOfTracks() > 0)
123     iResult = ProcessTPC();
124
125   // -- VZERO
126   if (fESDVZERO)
127     iResult = ProcessVZERO();
128
129   // -- ZDC and Correlations
130   if (fESDZDC)
131     iResult = ProcessZDC();
132
133
134   return iResult;
135 }
136
137 ////////////////////////////////////////////////////////////////////////////////////
138 ////////////////////////////////////////////////////////////////////////////////////
139 ///                                                                              ///
140 //////                             PRIVATE                                    //////
141 ///                                                                              ///
142 ////////////////////////////////////////////////////////////////////////////////////
143 ////////////////////////////////////////////////////////////////////////////////////
144
145 /*
146  * ---------------------------------------------------------------------------------
147  *                          Setup / Initialize - private
148  * ---------------------------------------------------------------------------------
149  */
150
151 //##################################################################################
152 Bool_t AliHLTMultiplicityCorrelations::AddESDEvent( AliESDEvent* esd ) {
153   // see header file for class documentation  
154
155   fESDEvent = esd;
156   
157   // -- Check for ESD
158   if ( !fESDEvent ) {
159     HLTWarning("No ESD event present.");
160     return kFALSE;
161   }
162   
163   // -- Check for PrimaryVertex
164   if ( !esd->GetPrimaryVertexTracks() ){
165     HLTError("No Vertex present.");
166     return kFALSE;
167   }
168   
169   fESDZDC = esd->GetESDZDC();
170   if ( !fESDZDC ) {
171     HLTInfo("No ZDC information !");
172   }
173   
174   fESDVZERO = esd->GetVZEROData();
175   if ( !fESDVZERO ) {
176     HLTInfo("No VZERO information !");
177   }
178   
179   return kTRUE;
180 }
181
182 //##################################################################################
183 Int_t AliHLTMultiplicityCorrelations::SetupHistograms() {
184   // see header file for class documentation  
185
186   Int_t iResult = 0;
187   
188   iResult = SetupVZERO();
189   iResult = SetupZDC();
190   iResult = SetupTPC();
191   iResult = SetupCorrelations();
192
193   return iResult;
194 }
195
196 //##################################################################################
197 Int_t AliHLTMultiplicityCorrelations::SetupVZERO() {
198   // see header file for class documentation  
199
200   // VzeroMult
201   fHistList->Add(new TH1F("fVzeroMult",  "Multiplicity^{VZERO};Multiplicity^{VZERO};N_{Events}",   
202                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
203   fHistList->Add(new TH1F("fVzeroMultA", "Multiplicity^{VZERO} A;Multiplicity^{VZERO};N_{Events}", 
204                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
205   fHistList->Add(new TH1F("fVzeroMultC", "Multiplicity^{VZERO} C;Multiplicity^{VZERO};N_{Events}", 
206                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
207
208   // Flagged VzeroMult
209   fHistList->Add(new TH1F("fVzeroFlaggedMult",  "Multiplicity_{flagged}^{VZERO};Multiplicity^{VZERO};N_{Events}",   
210                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
211   fHistList->Add(new TH1F("fVzeroFlaggedMultA", "Multiplicity_{flagged}^{VZERO} A;Multiplicity^{VZERO};N_{Events}", 
212                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
213   fHistList->Add(new TH1F("fVzeroFlaggedMultC", "Multiplicity_{flagged}^{VZERO} C;Multiplicity^{VZERO};N_{Events}", 
214                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
215   
216   fHistList->Add(new TH1F("fVzeroTime",  "Time;Time;N_{Events}",   500, 0, 1000));
217   fHistList->Add(new TH1F("fVzeroTimeA", "Time A;Time;N_{Events}", 500, 0, 1000));
218   fHistList->Add(new TH1F("fVzeroTimeC", "Time B;Time;N_{Events}", 500, 0, 1000));
219
220   fHistList->Add(new TH1F("fVzeroADC",  "ADC;ADC;N_{Events}",   500, 0, 150000));
221   fHistList->Add(new TH1F("fVzeroADCA", "ADC A;ADC;N_{Events}", 500, 0, 100000));
222   fHistList->Add(new TH1F("fVzeroADCC", "ADC B;ADC;N_{Events}", 500, 0, 100000));
223
224   return 0;
225 }
226
227 //##################################################################################
228 Int_t AliHLTMultiplicityCorrelations::SetupZDC() {
229   // see header file for class documentation  
230   
231   // E_{ZN}
232   fHistList->Add(new TH1F("fZdcEzn",  "E_{ZN};E_{ZN} (TeV);N_{Events}",   
233                           fZnpBinning,fZnpBinningMin,fZnpBinningMax));
234   fHistList->Add(new TH1F("fZdcEznA", "E_{ZN} A;E_{ZN} (TeV);N_{Events}", 
235                           fZnpBinning,fZnpBinningMin,fZnpBinningMax));
236   fHistList->Add(new TH1F("fZdcEznC", "E_{ZN} C;E_{ZN} (TeV);N_{Events}", 
237                           fZnpBinning,fZnpBinningMin,fZnpBinningMax));
238   
239   // E_{ZP}
240   fHistList->Add(new TH1F("fZdcEzp",  "E_{ZP};E_{ZP} (TeV);N_{Events}",   
241                           fZnpBinning,fZnpBinningMin,fZnpBinningMax));
242   fHistList->Add(new TH1F("fZdcEzpA", "E_{ZP} A;E_{ZP} (TeV);N_{Events}", 
243                           fZnpBinning,fZnpBinningMin,fZnpBinningMax));
244   fHistList->Add(new TH1F("fZdcEzpC", "E_{ZP} C;E_{ZP} (TeV);N_{Events}", 
245                           fZnpBinning,fZnpBinningMin,fZnpBinningMax));
246   
247   // E_{ZDC}
248   fHistList->Add(new TH1F("fZdcEzdc",  "E_{ZDC};E_{ZDC} (TeV);N_{Events}",   
249                           fZdcBinning,fZdcBinningMin,fZdcBinningMax));
250   fHistList->Add(new TH1F("fZdcEzdcA", "E_{ZDC} A;E_{ZDC} (TeV);N_{Events}", 
251                           fZdcBinning,fZdcBinningMin,fZdcBinningMax));
252   fHistList->Add(new TH1F("fZdcEzdcC", "E_{ZDC} C;E_{ZDC} (TeV);N_{Events}", 
253                           fZdcBinning,fZdcBinningMin,fZdcBinningMax));
254
255   // E_{ZEM}
256   fHistList->Add(new TH1F("fZdcEzem",  "E_{ZEM};E_{ZEM} (TeV);N_{Events}",   
257                           fZemBinning,fZemBinningMin,fZemBinningMax));
258   fHistList->Add(new TH1F("fZdcEzemA", "E_{ZEM} A;E_{ZEM} (TeV);N_{Events}", 
259                           fZemBinning,fZemBinningMin,fZemBinningMax));
260   fHistList->Add(new TH1F("fZdcEzemC", "E_{ZEM} C;E_{ZEM} (TeV);N_{Events}", 
261                           fZemBinning,fZemBinningMin,fZemBinningMax));
262   
263   // N_{Part}
264   fHistList->Add(new TH1F("fZdcNpart",  "N_{Part} ;N_{Part};N_{Events}",  50,0,499));
265   fHistList->Add(new TH1F("fZdcNpartA", "N_{Part} A;N_{Part};N_{Events}", 50,0,499));
266   fHistList->Add(new TH1F("fZdcNpartC", "N_{Part} C;N_{Part};N_{Events}", 50,0,499));
267   
268   // b
269   fHistList->Add(new TH1F("fZdcB",  "b;b {fm);N_{Events}",   31,0,30));
270   fHistList->Add(new TH1F("fZdcBA", "b A;b (fm);N_{Events}", 31,0,30));
271   fHistList->Add(new TH1F("fZdcBC", "b C;b (fm);N_{Events}", 31,0,30));
272
273   // E_{ZEM} vs E_{ZDC} 
274   fHistList->Add(new TH2F("fZdcEzemEzdc", "E_{ZEM} vs E_{ZDC};E_{ZEM} (TeV); E_{ZDC} (TeV)",   
275                           fZemBinning,fZemBinningMin,fZemBinningMax, fZdcBinning,fZdcBinningMin,fZdcBinningMax));
276   fHistList->Add(new TH2F("fZdcEzemEzdcA","E_{ZEM} vs E_{ZDC} A;E_{ZEM} (TeV); E_{ZDC} (TeV)", 
277                           fZemBinning,fZemBinningMin,fZemBinningMax, fZdcBinning,fZdcBinningMin,fZdcBinningMax));
278   fHistList->Add(new TH2F("fZdcEzemEzdcC","E_{ZEM} vs E_{ZDC} C;E_{ZEM} (TeV); E_{ZDC} (TeV)", 
279                           fZemBinning,fZemBinningMin,fZemBinningMax, fZdcBinning,fZdcBinningMin,fZdcBinningMax));
280
281   return 0;
282 }
283
284 //##################################################################################
285 Int_t AliHLTMultiplicityCorrelations::SetupTPC() {
286   // see header file for class documentation  
287
288   Int_t    n = 50;
289   Double_t s = 0.1;
290   Double_t e = 50.;
291   
292   // -- Create LogPtBinning
293   // ------------------------
294   Double_t logMin = TMath::Log10(s);
295   Double_t logMax = TMath::Log10(e);
296   Double_t binwidth = (logMax-logMin)/n;
297   
298   Double_t *logBinning = new Double_t[n+1];
299
300   logBinning[0] = s;
301   for (Int_t ii = 1; ii <= n; ii++)
302     logBinning[ii] = s + TMath::Power(10, logMin + ii*binwidth);
303   // - - - - - - - - - - - - - - - - - - - - - - - - - - - 
304
305   // dN_{ch} / dP_{T}
306   fHistList->Add(new TH1F("fTpcPt0", "dN_{ch} / dP_{T} esdTracks; P_{T} (GeV/c);dN/dP_{T} (c/GeV)", n, logBinning));  
307   fHistList->Add(new TH1F("fTpcPt1", "dN_{ch} / dP_{T} accepted esdTracks; P_{T} (GeV/c);dN/dP_{T} (c/GeV)", n, logBinning));  
308   fHistList->Add(new TH1F("fTpcPt2", "dN_{ch} / dP_{T} tpcTracks; P_{T} (GeV/c);dN/dP_{T} (c/GeV)", n, logBinning));  
309   fHistList->Add(new TH1F("fTpcPt3", "dN_{ch} / dP_{T} accepted tpcTracks; P_{T} (GeV/c);dN/dP_{T} (c/GeV)", n, logBinning));  
310
311   // Multiplicty
312   fHistList->Add(new TH1F("fTpcNch0", "N_{ch} esdTracks; N_{ch};N_{Events}", 
313                           fTpcBinning,fTpcBinningMin,fTpcBinningMax));
314   fHistList->Add(new TH1F("fTpcNch1", "N_{ch} accepted esdTracks; N_{ch};N_{Events}", 
315                           fTpcBinning,fTpcBinningMin,fTpcBinningMax));
316   fHistList->Add(new TH1F("fTpcNch2", "N_{ch} tpcTracks; N_{ch};N_{Events}", 
317                           fTpcBinning,fTpcBinningMin,fTpcBinningMax));
318   fHistList->Add(new TH1F("fTpcNch3", "N_{ch} accepted tpcTracks; N_{ch};N_{Events}", 
319                           fTpcBinning,fTpcBinningMin,fTpcBinningMax));
320
321   return 0;
322 }
323
324 //##################################################################################
325 Int_t AliHLTMultiplicityCorrelations::SetupCorrelations() {
326   // see header file for class documentation  
327
328   // ----------------------------------------------------
329   //   ZDC vs TPC
330   // ----------------------------------------------------
331
332   // E_{ZDC} vs N_{ch}
333   fHistList->Add(new TH2F("fCorrEzdcNch", "E_{ZDC} vs N_{ch}^{TPC};E_{ZDC} (TeV);N_{ch}^{TPC}",   
334                           fZdcBinning,fZdcBinningMin,fZdcBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
335   fHistList->Add(new TH2F("fCorrEzdcANch","E_{ZDC} vs N_{ch}^{TPC} A;E_{ZDC} (TeV);N_{ch}^{TPC}", 
336                           fZdcBinning,fZdcBinningMin,fZdcBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
337   fHistList->Add(new TH2F("fCorrEzdcCNch","E_{ZDC} vs N_{ch}^{TPC} C;E_{ZDC} (TeV);N_{ch}^{TPC}", 
338                           fZdcBinning,fZdcBinningMin,fZdcBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
339   
340   // E_{ZEM} vs N_{ch}
341   fHistList->Add(new TH2F("fCorrEzemNch", "E_{ZEM} vs N_{ch}^{TPC};E_{ZEM} (TeV);N_{ch}^{TPC}",   
342                           fZemBinning,fZemBinningMin,fZemBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
343   fHistList->Add(new TH2F("fCorrEzemANch","E_{ZEM} vs N_{ch}^{TPC} A;E_{ZEM} (TeV);N_{ch}^{TPC}", 
344                           fZemBinning,fZemBinningMin,fZemBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
345   fHistList->Add(new TH2F("fCorrEzemCNch","E_{ZEM} vs N_{ch}^{TPC} C;E_{ZEM} (TeV);N_{ch}^{TPC}", 
346                           fZemBinning,fZemBinningMin,fZemBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
347   
348   // E_{ZP} vs N_{ch}
349   fHistList->Add(new TH2F("fCorrEzpNch", "E_{ZP} vs N_{ch}^{TPC};E_{ZP} (TeV);N_{ch}^{TPC}",   
350                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
351   fHistList->Add(new TH2F("fCorrEzpANch","E_{ZP} vs N_{ch}^{TPC} A;E_{ZP} (TeV);N_{ch}^{TPC}", 
352                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
353   fHistList->Add(new TH2F("fCorrEzpCNch","E_{ZP} vs N_{ch}^{TPC} C;E_{ZP} (TeV);N_{ch}^{TPC}", 
354                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
355   
356   // E_{ZN} vs N_{ch}
357   fHistList->Add(new TH2F("fCorrEznNch", "E_{ZN} vs N_{ch}^{TPC};E_{ZN} (TeV);N_{ch}^{TPC}",   
358                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
359   fHistList->Add(new TH2F("fCorrEznANch","E_{ZN} vs N_{ch}^{TPC} A;E_{ZN} (TeV);N_{ch}^{TPC}", 
360                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
361   fHistList->Add(new TH2F("fCorrEznCNch","E_{ZN} vs N_{ch}^{TPC} C;E_{ZN} (TeV);N_{ch}^{TPC}", 
362                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
363   
364   // N_{Part} vs N_{ch}
365   fHistList->Add(new TH2F("fCorrZdcNpartNch", "N_{part} vs N_{ch}^{TPC};N_{Events};N_{ch}^{TPC}",   
366                           50,0,499, fTpcBinning,fTpcBinningMin,fTpcBinningMax)); 
367   fHistList->Add(new TH2F("fCorrZdcNpartANch","N_{part} vs N_{ch}^{TPC} A;N_{Events};N_{ch}^{TPC}", 
368                           50,0,499, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
369   fHistList->Add(new TH2F("fCorrZdcNpartCNch","N_{part} vs N_{ch}^{TPC} C;N_{Events};N_{ch}^{TPC}", 
370                           50,0,499, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
371
372   // b vs N_{ch}
373   fHistList->Add(new TH2F("fCorrZdcbNch", "b_{ZDC} vs N_{ch}^{TPC};b (fm);N_{ch}^{TPC}",  
374                           31,0,30, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
375   fHistList->Add(new TH2F("fCorrZdcbANch","b_{ZDC} vs N_{ch}^{TPC} A;b (fm);N_{ch}^{TPC}", 
376                           31,0,30, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
377   fHistList->Add(new TH2F("fCorrZdcbCNch","b_{ZDC} vs N_{ch}^{TPC} C;b (fm);N_{ch}^{TPC}", 
378                           31,0,30, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
379
380   // ----------------------------------------------------
381   //   ZDC vs VZERO
382   // ----------------------------------------------------
383
384   // E_{ZDC} vs Multiplicty VZERO
385   fHistList->Add(new TH2F("fCorrEzdcVzero", 
386                           "E_{ZDC} vs Multiplicity^{VZERO};E_{ZDC} (TeV);Multiplicity^{VZERO}",  
387                           fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
388   fHistList->Add(new TH2F("fCorrEzdcVzeroA",
389                           "E_{ZDC} vs Multiplicity^{VZERO} A;E_{ZDC} (TeV);Multiplicity^{VZERO}",
390                           fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
391   fHistList->Add(new TH2F("fCorrEzdcVzeroC",
392                           "E_{ZDC} vs Multiplicity^{VZERO} C;E_{ZDC} (TeV);Multiplicity^{VZERO}",
393                           fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
394   
395   // E_{ZEM} vs Multiplicty VZERO
396   fHistList->Add(new TH2F("fCorrEzemVzero", 
397                           "E_{ZEM} vs Multiplicity^{VZERO};E_{ZEM} (TeV);Multiplicity^{VZERO}",  
398                           fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
399   fHistList->Add(new TH2F("fCorrEzemVzeroA",
400                           "E_{ZEM} vs Multiplicity^{VZERO} A;E_{ZEM} (TeV);Multiplicity^{VZERO}",
401                           fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
402   fHistList->Add(new TH2F("fCorrEzemVzeroC",
403                           "E_{ZEM} vs Multiplicity^{VZERO} C;E_{ZEM} (TeV);Multiplicity^{VZERO}",
404                           fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
405   
406   // E_{ZP} vs Multiplicty VZERO
407   fHistList->Add(new TH2F("fCorrEzpVzero", 
408                           "E_{ZP} vs Multiplicity^{VZERO};E_{ZP} (TeV);Multiplicity^{VZERO}",  
409                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
410   fHistList->Add(new TH2F("fCorrEzpVzeroA",
411                           "E_{ZP} vs Multiplicity^{VZERO} A;E_{ZP} (TeV);Multiplicity^{VZERO}",
412                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
413   fHistList->Add(new TH2F("fCorrEzpVzeroC",
414                           "E_{ZP} vs Multiplicity^{VZERO} C;E_{ZP} (TeV);Multiplicity^{VZERO}",
415                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
416   
417   // E_{ZN} vs Multiplicty VZERO
418   fHistList->Add(new TH2F("fCorrEznVzero", 
419                           "E_{ZN} vs Multiplicity^{VZERO};E_{ZN} (TeV);Multiplicity^{VZERO}",   
420                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
421   fHistList->Add(new TH2F("fCorrEznVzeroA",
422                           "E_{ZN} vs Multiplicity^{VZERO} A;E_{ZN} (TeV);Multiplicity^{VZERO}",
423                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
424   fHistList->Add(new TH2F("fCorrEznVzeroC",
425                           "E_{ZN} vs Multiplicity^{VZERO} C;E_{ZN} (TeV);Multiplicity^{VZERO}",
426                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
427   
428   // N_{Part} vs Multiplicty VZERO
429   fHistList->Add(new TH2F("fCorrZdcNpartVzero", 
430                           "N_{part} vs Multiplicity^{VZERO};N_{Events};Multiplicity^{VZERO}",   
431                           50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
432   fHistList->Add(new TH2F("fCorrZdcNpartVzeroA",
433                           "N_{part} vs Multiplicity^{VZERO} A;N_{Events};Multiplicity^{VZERO}", 
434                           50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
435   fHistList->Add(new TH2F("fCorrZdcNpartVzeroC",
436                           "N_{part} vs Multiplicity^{VZERO} C;N_{Events};Multiplicity^{VZERO}",
437                           50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
438
439   // b vs Multiplicty VZERO
440   fHistList->Add(new TH2F("fCorrZdcbVzero", "b_{ZDC} vs Multiplicity^{VZERO};b (fm);Multiplicity^{VZERO}",    
441                           31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
442   fHistList->Add(new TH2F("fCorrZdcbVzeroA","b_{ZDC} vs Multiplicity^{VZERO} A;b (fm);Multiplicity^{VZERO}",  
443                           31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
444   fHistList->Add(new TH2F("fCorrZdcbVzeroC","b_{ZDC} vs Multiplicity^{VZERO} C;b (fm);Multiplicity^{VZERO}",  
445                           31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
446
447   // -- -- -- -- -- -- -- 
448
449   // E_{ZDC} vs Multiplicty VZERO flagged
450   fHistList->Add(new TH2F("fCorrEzdcVzeroF", 
451                           "E_{ZDC} vs Multiplicity_{flagged}^{VZERO};E_{ZDC} (TeV);Multiplicity^{VZERO}",   
452                           fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
453   fHistList->Add(new TH2F("fCorrEzdcVzeroFA",
454                           "E_{ZDC} vs Multiplicity_{flagged}^{VZERO} A;E_{ZDC} (TeV);Multiplicity^{VZERO}", 
455                           fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
456   fHistList->Add(new TH2F("fCorrEzdcVzeroFC",
457                           "E_{ZDC} vs Multiplicity_{flagged}^{VZERO} C;E_{ZDC} (TeV);Multiplicity^{VZERO}", 
458                           fZdcBinning,fZdcBinningMin,fZdcBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
459   
460   // E_{ZEM} vs Multiplicty VZERO flagged
461   fHistList->Add(new TH2F("fCorrEzemVzeroF", 
462                           "E_{ZEM} vs Multiplicity_{flagged}^{VZERO};E_{ZEM} (TeV);Multiplicity^{VZERO}",   
463                           fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
464   fHistList->Add(new TH2F("fCorrEzemVzeroFA",
465                           "E_{ZEM} vs Multiplicity_{flagged}^{VZERO} A;E_{ZEM} (TeV);Multiplicity^{VZERO}", 
466                           fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
467   fHistList->Add(new TH2F("fCorrEzemVzeroFC",
468                           "E_{ZEM} vs Multiplicity_{flagged}^{VZERO} C;E_{ZEM} (TeV);Multiplicity^{VZERO}", 
469                           fZemBinning,fZemBinningMin,fZemBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
470   
471   // E_{ZP} vs Multiplicty VZERO flagged
472   fHistList->Add(new TH2F("fCorrEzpVzeroF", 
473                           "E_{ZP} vs Multiplicity_{flagged}^{VZERO};E_{ZP} (TeV);Multiplicity^{VZERO}",   
474                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
475   fHistList->Add(new TH2F("fCorrEzpVzeroFA",
476                           "E_{ZP} vs Multiplicity_{flagged}^{VZERO} A;E_{ZP} (TeV);Multiplicity^{VZERO}", 
477                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
478   fHistList->Add(new TH2F("fCorrEzpVzeroFC",
479                           "E_{ZP} vs Multiplicity_{flagged}^{VZERO} C;E_{ZP} (TeV);Multiplicity^{VZERO}",
480                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
481   
482   // E_{ZN} vs Multiplicty VZERO flagged
483   fHistList->Add(new TH2F("fCorrEznVzeroF", 
484                           "E_{ZN} vs Multiplicity_{flagged}^{VZERO};E_{ZN} (TeV);Multiplicity^{VZERO}",  
485                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
486   fHistList->Add(new TH2F("fCorrEznVzeroFA",
487                           "E_{ZN} vs Multiplicity_{flagged}^{VZERO} A;E_{ZN} (TeV);Multiplicity^{VZERO}", 
488                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
489   fHistList->Add(new TH2F("fCorrEznVzeroFC",
490                           "E_{ZN} vs Multiplicity_{flagged}^{VZERO} C;E_{ZN} (TeV);Multiplicity^{VZERO}", 
491                           fZnpBinning,fZnpBinningMin,fZnpBinningMax, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
492   
493   // N_{Part} vs Multiplicty VZERO flagged
494   fHistList->Add(new TH2F("fCorrZdcNpartVzeroF", 
495                           "N_{part} vs Multiplicity_{flagged}^{VZERO};N_{Events};Multiplicity^{VZERO}",   
496                           50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax)); 
497   fHistList->Add(new TH2F("fCorrZdcNpartVzeroFA",
498                           "N_{part} vs Multiplicity_{flagged}^{VZERO} A;N_{Events};Multiplicity^{VZERO}", 
499                           50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
500   fHistList->Add(new TH2F("fCorrZdcNpartVzeroFC",
501                           "N_{part} vs Multiplicity_{flagged}^{VZERO} C;N_{Events};Multiplicity^{VZERO}", 
502                           50,0,499, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
503
504   // b vs Multiplicty VZERO flagged
505   fHistList->Add(new TH2F("fCorrZdcbVzeroF", 
506                           "b_{ZDC} vs Multiplicity_{flagged}^{VZERO};b (fm);Multiplicity^{VZERO}",    
507                           31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
508   fHistList->Add(new TH2F("fCorrZdcbVzeroFA",
509                           "b_{ZDC} vs Multiplicity_{flagged}^{VZERO} A;b (fm);Multiplicity^{VZERO}",  
510                           31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
511   fHistList->Add(new TH2F("fCorrZdcbVzeroFC",
512                           "b_{ZDC} vs Multiplicity_{flagged}^{VZERO} C;b (fm);Multiplicity^{VZERO}",  
513                           31,0,30, fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax));
514
515   // ----------------------------------------------------
516   //   VZERO vs TPC
517   // ----------------------------------------------------
518
519   fHistList->Add(new TH2F("fCorrVzeroNch", 
520                           "Multiplicity^{VZERO} vs N_{ch}^{TPC};Multiplicity^{VZERO};N_{ch}^{TPC}", 
521                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
522   fHistList->Add(new TH2F("fCorrVzeroANch", 
523                           "Multiplicity^{VZERO} vs N_{ch}^{TPC} A;Multiplicity^{VZERO};N_{ch}^{TPC}", 
524                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
525   fHistList->Add(new TH2F("fCorrVzeroCNch", 
526                           "Multiplicity^{VZERO} vs N_{ch}^{TPC} C;Multiplicity^{VZERO};N_{ch}^{TPC}", 
527                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
528
529   fHistList->Add(new TH2F("fCorrVzeroFNch", 
530                           "Multiplicity^{VZERO} vs N_{ch}^{TPC};Multiplicity_{flagged}^{VZERO};N_{ch}^{TPC}", 
531                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
532   fHistList->Add(new TH2F("fCorrVzeroFANch", 
533                           "Multiplicity^{VZERO} vs N_{ch}^{TPC} A;Multiplicity_{flagged}^{VZERO};N_{ch}^{TPC}", 
534                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
535   fHistList->Add(new TH2F("fCorrVzeroFCNch", 
536                           "Multiplicity^{VZERO} vs N_{ch}^{TPC} C;Multiplicity_{flagged}^{VZERO};N_{ch}^{TPC}", 
537                           fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
538
539   // ----------------------------------------------------
540   //  
541   // ----------------------------------------------------
542
543   return 0;
544 }
545
546 /*
547  * ---------------------------------------------------------------------------------
548  *                               Process - private
549  * ---------------------------------------------------------------------------------
550  */
551
552 //##################################################################################
553 Int_t AliHLTMultiplicityCorrelations::ProcessTPC() {
554
555   Int_t iResult = 0 ;
556
557   TH1F* hPt0 = static_cast<TH1F*>(fHistList->FindObject("fTpcPt0")); // all
558   TH1F* hPt1 = static_cast<TH1F*>(fHistList->FindObject("fTpcPt1")); // all accepted
559
560   TH1F* hPt2 = static_cast<TH1F*>(fHistList->FindObject("fTpcPt2")); // GetTPCInnerParam
561   TH1F* hPt3 = static_cast<TH1F*>(fHistList->FindObject("fTpcPt3")); // GetTPCInnerParam A
562
563   fEsdTracks = 0;  
564   fEsdTracksA = 0;  
565   fTpcTracks = 0;  
566   fTpcTracksA = 0;  
567   
568   // -----------------------------------------------------------------
569   for (Int_t idx = 0; idx < fESDEvent->GetNumberOfTracks(); idx++) {
570
571     // -- check  track
572     AliESDtrack* esdTrack = fESDEvent->GetTrack(idx);
573     if (!esdTrack) continue;
574
575     ++fEsdTracks;
576     hPt0->Fill(esdTrack->Pt());
577     
578     //______________________________________________
579     if (!fESDTrackCuts->AcceptTrack(esdTrack)) continue;
580     ++fEsdTracksA;
581
582     hPt1->Fill(esdTrack->Pt());
583   }
584   // -----------------------------------------------------------------
585   for (Int_t idx = 0; idx < fESDEvent->GetNumberOfTracks(); idx++) {
586
587     // -- check  track
588     AliESDtrack* esdTrack = fESDEvent->GetTrack(idx);
589     if (!esdTrack) continue;
590
591     // -- TPC only
592     const AliExternalTrackParam *tpcTrack = esdTrack->GetTPCInnerParam();
593     if (!tpcTrack) continue;
594     ++fTpcTracks;
595     hPt2->Fill(tpcTrack->Pt());
596     
597     //______________________________________________
598     if (!fESDTrackCuts->AcceptTrack(esdTrack)) continue;
599     ++fTpcTracksA;
600
601     hPt3->Fill(tpcTrack->Pt());
602   }
603   // -----------------------------------------------------------------
604
605   (static_cast<TH1F*>(fHistList->FindObject("fTpcNch0")))->Fill(fEsdTracks);
606   (static_cast<TH1F*>(fHistList->FindObject("fTpcNch1")))->Fill(fEsdTracksA);
607   (static_cast<TH1F*>(fHistList->FindObject("fTpcNch2")))->Fill(fTpcTracks);
608   (static_cast<TH1F*>(fHistList->FindObject("fTpcNch3")))->Fill(fTpcTracksA);
609
610   return iResult;
611 }
612
613 //##################################################################################
614 Int_t AliHLTMultiplicityCorrelations::ProcessVZERO() {
615
616   Int_t iResult = 0 ;
617
618   fVzeroMultA = fESDVZERO->GetMTotV0A();
619   fVzeroMultC = fESDVZERO->GetMTotV0C();
620   fVzeroMult  = fVzeroMultA + fVzeroMultC;
621
622   (static_cast<TH1F*>(fHistList->FindObject("fVzeroMult")))->Fill(fVzeroMult);
623   (static_cast<TH1F*>(fHistList->FindObject("fVzeroMultA")))->Fill(fVzeroMultA);
624   (static_cast<TH1F*>(fHistList->FindObject("fVzeroMultC")))->Fill(fVzeroMultC);
625   
626   fVzeroMultFlaggedA = 0.;
627   fVzeroMultFlaggedC = 0.;
628   
629   Double_t vzeroTimeA = 0.;
630   Double_t vzeroTimeC = 0.;
631   
632   Double_t vzeroAdcA = 0.;
633   Double_t vzeroAdcC = 0.;
634   
635   for (Int_t idx = 0; idx < 32; idx++) {
636     
637     if ( fESDVZERO->GetBBFlag(idx) )
638       fVzeroMultFlaggedC += fESDVZERO->GetMultiplicityV0C(idx);
639     if ( fESDVZERO->GetBBFlag(idx+32) )
640       fVzeroMultFlaggedA += fESDVZERO->GetMultiplicityV0A(idx);
641     
642     vzeroTimeA += fESDVZERO->GetTimeV0A(idx);
643     vzeroTimeC += fESDVZERO->GetTimeV0C(idx);
644     
645     vzeroAdcA += fESDVZERO->GetAdcV0A(idx);
646     vzeroAdcC += fESDVZERO->GetAdcV0C(idx);
647   }
648
649   fVzeroMultFlagged = fVzeroMultFlaggedA + fVzeroMultFlaggedC;
650
651   Double_t vzeroTime     = vzeroTimeA + vzeroTimeC;
652   Double_t vzeroAdc      = vzeroAdcA + vzeroAdcC;
653   
654   (static_cast<TH1F*>(fHistList->FindObject("fVzeroFlaggedMult")))->Fill(fVzeroMultFlagged);
655   (static_cast<TH1F*>(fHistList->FindObject("fVzeroFlaggedMultA")))->Fill(fVzeroMultFlaggedA);
656   (static_cast<TH1F*>(fHistList->FindObject("fVzeroFlaggedMultC")))->Fill(fVzeroMultFlaggedC);
657   
658   (static_cast<TH1F*>(fHistList->FindObject("fVzeroTime")))->Fill(vzeroTime);
659   (static_cast<TH1F*>(fHistList->FindObject("fVzeroTimeA")))->Fill(vzeroTimeA);
660   (static_cast<TH1F*>(fHistList->FindObject("fVzeroTimeC")))->Fill(vzeroTimeC);
661   
662   (static_cast<TH1F*>(fHistList->FindObject("fVzeroADC")))->Fill(vzeroAdc);
663   (static_cast<TH1F*>(fHistList->FindObject("fVzeroADCA")))->Fill(vzeroAdcA);
664   (static_cast<TH1F*>(fHistList->FindObject("fVzeroADCC")))->Fill(vzeroAdcC);
665
666   // -- VZERO - TPC correlations
667   if (fESDEvent->GetNumberOfTracks() > 0) {
668     (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroNch")))->Fill(fVzeroMult, fTpcTracksA);
669     (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroANch")))->Fill(fVzeroMultA, fTpcTracksA);
670     (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroCNch")))->Fill(fVzeroMultC, fTpcTracksA);
671     
672     (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroFNch")))->Fill(fVzeroMultFlagged, fTpcTracksA);
673     (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroFANch")))->Fill(fVzeroMultFlaggedA, fTpcTracksA);
674     (static_cast<TH2F*>(fHistList->FindObject("fCorrVzeroFCNch")))->Fill(fVzeroMultFlaggedC, fTpcTracksA);
675   }
676
677   return iResult;
678 }
679
680 //##################################################################################
681 Int_t AliHLTMultiplicityCorrelations::ProcessZDC() {
682
683   Int_t iResult = 0 ;
684
685   Double_t zdcEznA = fESDZDC->GetZDCN2Energy() / 1000.;
686   Double_t zdcEznC = fESDZDC->GetZDCN1Energy() / 1000.;
687   Double_t zdcEzn  = zdcEznA + zdcEznC;
688   
689   (static_cast<TH1F*>(fHistList->FindObject("fZdcEzn")))->Fill(zdcEzn);
690   (static_cast<TH1F*>(fHistList->FindObject("fZdcEznA")))->Fill(zdcEznA);
691   (static_cast<TH1F*>(fHistList->FindObject("fZdcEznC")))->Fill(zdcEznC);
692   
693   Double_t zdcEzpA = fESDZDC->GetZDCP2Energy() / 1000.;
694   Double_t zdcEzpC = fESDZDC->GetZDCP1Energy() / 1000.;
695   Double_t zdcEzp  = zdcEzpA + zdcEzpC;
696   
697   (static_cast<TH1F*>(fHistList->FindObject("fZdcEzp")))->Fill(zdcEzp);
698   (static_cast<TH1F*>(fHistList->FindObject("fZdcEzpA")))->Fill(zdcEzpA);
699   (static_cast<TH1F*>(fHistList->FindObject("fZdcEzpC")))->Fill(zdcEzpC);
700   
701   Double_t zdcEA = (zdcEznA + zdcEzpA);
702   Double_t zdcEC = (zdcEznC + zdcEzpC);
703   Double_t zdcE = zdcEA + zdcEC;
704   
705   (static_cast<TH1F*>(fHistList->FindObject("fZdcEzdc")))->Fill(zdcE);
706   (static_cast<TH1F*>(fHistList->FindObject("fZdcEzdcA")))->Fill(zdcEA);
707   (static_cast<TH1F*>(fHistList->FindObject("fZdcEzdcC")))->Fill(zdcEC);
708   
709   Double_t zdcEzemA = fESDZDC->GetZDCEMEnergy(1) / 1000.;
710   Double_t zdcEzemC = fESDZDC->GetZDCEMEnergy(0) / 1000.;
711   Double_t zdcEzem  = zdcEzemA + zdcEzemC;
712   
713   (static_cast<TH1F*>(fHistList->FindObject("fZdcEzem")))->Fill(zdcEzem);
714   (static_cast<TH1F*>(fHistList->FindObject("fZdcEzemA")))->Fill(zdcEzemA);
715   (static_cast<TH1F*>(fHistList->FindObject("fZdcEzemC")))->Fill(zdcEzemC);
716  
717   (static_cast<TH2F*>(fHistList->FindObject("fZdcEzemEzdc")))->Fill(zdcEzem, zdcE);
718   (static_cast<TH2F*>(fHistList->FindObject("fZdcEzemEzdcA")))->Fill(zdcEzemA, zdcEA);
719   (static_cast<TH2F*>(fHistList->FindObject("fZdcEzemEzdcC")))->Fill(zdcEzemC, zdcEC);
720  
721   (static_cast<TH1F*>(fHistList->FindObject("fZdcNpart")))->Fill(fESDZDC->GetZDCParticipants());
722   (static_cast<TH1F*>(fHistList->FindObject("fZdcNpartA")))->Fill(fESDZDC->GetZDCPartSideA());
723   (static_cast<TH1F*>(fHistList->FindObject("fZdcNpartC")))->Fill(fESDZDC->GetZDCPartSideC());
724   
725   (static_cast<TH1F*>(fHistList->FindObject("fZdcB")))->Fill(fESDZDC->GetImpactParameter());
726   (static_cast<TH1F*>(fHistList->FindObject("fZdcBA")))->Fill(fESDZDC->GetImpactParamSideA());
727   (static_cast<TH1F*>(fHistList->FindObject("fZdcBC")))->Fill(fESDZDC->GetImpactParamSideC());
728  
729   // -- ZDC - TPC correlations
730   if (fESDEvent->GetNumberOfTracks() > 0) {
731     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcNch")))->Fill(zdcE, fTpcTracksA);
732     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcANch")))->Fill(zdcEA, fTpcTracksA);
733     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcCNch")))->Fill(zdcEC, fTpcTracksA);
734     
735     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemNch")))->Fill(zdcEzem, fTpcTracksA);
736     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemANch")))->Fill(zdcEzemA, fTpcTracksA);
737     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemCNch")))->Fill(zdcEzemC, fTpcTracksA);
738     
739     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpNch")))->Fill(zdcEzp, fTpcTracksA);
740     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpANch")))->Fill(zdcEzpA, fTpcTracksA);
741     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpCNch")))->Fill(zdcEzpC, fTpcTracksA);
742     
743     (static_cast<TH2F*>(fHistList->FindObject("fCorrEznNch")))->Fill(zdcEzn, fTpcTracksA);
744     (static_cast<TH2F*>(fHistList->FindObject("fCorrEznANch")))->Fill(zdcEznA, fTpcTracksA);
745     (static_cast<TH2F*>(fHistList->FindObject("fCorrEznCNch")))->Fill(zdcEznC, fTpcTracksA);
746     
747     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartNch")))->Fill(fESDZDC->GetZDCParticipants(), fTpcTracksA);
748     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartANch")))->Fill(fESDZDC->GetZDCPartSideA(),   fTpcTracksA);
749     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartCNch")))->Fill(fESDZDC->GetZDCPartSideC(),   fTpcTracksA);
750     
751     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbNch")))->Fill(fESDZDC->GetImpactParameter(),   fTpcTracksA);
752     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbANch")))->Fill(fESDZDC->GetImpactParamSideA(), fTpcTracksA);
753     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbCNch")))->Fill(fESDZDC->GetImpactParamSideC(), fTpcTracksA);
754   }
755
756   // -- VZERO - TPC correlations
757   if (fESDVZERO) {
758     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzero")))->Fill(zdcE, fVzeroMult);
759     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzeroA")))->Fill(zdcEA, fVzeroMultA);
760     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzeroC")))->Fill(zdcEC, fVzeroMultC);
761     
762     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzero")))->Fill(zdcEzem, fVzeroMult);
763     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzeroA")))->Fill(zdcEzemA, fVzeroMultA);
764     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzeroC")))->Fill(zdcEzemC, fVzeroMultC);
765     
766     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzero")))->Fill(zdcEzp, fVzeroMult);
767     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzeroA")))->Fill(zdcEzpA, fVzeroMultA);
768     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzeroC")))->Fill(zdcEzpC, fVzeroMultC);
769     
770     (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzero")))->Fill(zdcEzn, fVzeroMult);
771     (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzeroA")))->Fill(zdcEznA, fVzeroMultA);
772     (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzeroC")))->Fill(zdcEznC, fVzeroMultC);
773     
774     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzero")))->Fill(fESDZDC->GetZDCParticipants(), fVzeroMult);
775     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzeroA")))->Fill(fESDZDC->GetZDCPartSideA(),   fVzeroMultA);
776     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzeroC")))->Fill(fESDZDC->GetZDCPartSideC(),   fVzeroMultC);
777     
778     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzero")))->Fill(fESDZDC->GetImpactParameter(),   fVzeroMult);
779     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzeroA")))->Fill(fESDZDC->GetImpactParamSideA(), fVzeroMultA);
780     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzeroC")))->Fill(fESDZDC->GetImpactParamSideC(), fVzeroMultC);
781
782     // -- -- -- -- 
783
784     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzeroF")))->Fill(zdcE, fVzeroMultFlagged);
785     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzeroFA")))->Fill(zdcEA, fVzeroMultFlaggedA);
786     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzdcVzeroFC")))->Fill(zdcEC, fVzeroMultFlaggedC);
787     
788     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzeroF")))->Fill(zdcEzem, fVzeroMultFlagged);
789     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzeroFA")))->Fill(zdcEzemA, fVzeroMultFlaggedA);
790     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzemVzeroFC")))->Fill(zdcEzemC, fVzeroMultFlaggedC);
791     
792     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzeroF")))->Fill(zdcEzp, fVzeroMultFlagged);
793     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzeroFA")))->Fill(zdcEzpA, fVzeroMultFlaggedA);
794     (static_cast<TH2F*>(fHistList->FindObject("fCorrEzpVzeroFC")))->Fill(zdcEzpC, fVzeroMultFlaggedC);
795     
796     (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzeroF")))->Fill(zdcEzn, fVzeroMultFlagged);
797     (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzeroFA")))->Fill(zdcEznA, fVzeroMultFlaggedA);
798     (static_cast<TH2F*>(fHistList->FindObject("fCorrEznVzeroFC")))->Fill(zdcEznC, fVzeroMultFlaggedC);
799     
800     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzero")))->Fill(fESDZDC->GetZDCParticipants(), fVzeroMultFlagged);
801     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzeroFA")))->Fill(fESDZDC->GetZDCPartSideA(),   fVzeroMultFlaggedA);
802     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcNpartVzeroFC")))->Fill(fESDZDC->GetZDCPartSideC(),   fVzeroMultFlaggedC);
803     
804     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzeroF")))->Fill(fESDZDC->GetImpactParameter(),   fVzeroMultFlagged);
805     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzeroFA")))->Fill(fESDZDC->GetImpactParamSideA(), fVzeroMultFlaggedA);
806     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzeroFC")))->Fill(fESDZDC->GetImpactParamSideC(), fVzeroMultFlaggedC);
807   }
808
809   return iResult;
810 }