]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/CaloTrackCorrBase/AliAnaCaloTrackCorrBaseClass.cxx
Update from Prabhat - DptDpt Corr
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / AliAnaCaloTrackCorrBaseClass.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 //_________________________________________________________________________
17 // Base class for CaloTrackCorr analysis algorithms
18 //-- Author: Gustavo Conesa (LNF-INFN, LPSC-Grenoble) 
19 //
20 //
21 //_________________________________________________________________________
22
23
24 // --- ROOT system ---
25 #include <TClonesArray.h>
26 //#include <Riostream.h>
27
28 //---- AliRoot system ----
29 #include "AliAnaCaloTrackCorrBaseClass.h"
30 #include "AliCaloTrackReader.h"
31 #include "AliCalorimeterUtils.h"
32 #include "AliCaloPID.h"
33 #include "AliFiducialCut.h"
34 #include "AliIsolationCut.h"
35 #include "AliMCAnalysisUtils.h"
36 #include "AliNeutralMesonSelection.h"
37 #include "AliVCaloCells.h" 
38 #include "AliAODEvent.h"
39 #include "AliAODHandler.h"
40 #include "AliAnalysisManager.h"
41 #include "AliAODPWG4Particle.h"
42
43 ClassImp(AliAnaCaloTrackCorrBaseClass)
44
45
46 //__________________________________________________________
47 AliAnaCaloTrackCorrBaseClass::AliAnaCaloTrackCorrBaseClass() : 
48 TObject(), 
49 fDataMC(0),                   fDebug(0),                   fCheckFidCut(0),
50 fCheckCaloPID(0),             fRecalculateCaloPID(0), 
51 fMinPt(0),                    fMaxPt(0),                   fPairTimeCut(200), 
52 fMultiBin(0),                 fNZvertBin(0),
53 fNrpBin(0),                   fNCentrBin(0),
54 fNmaxMixEv(0),                fDoOwnMix(0),                   
55 fUseTrackMultBins(0),
56 fMaxMulti(0),                 fMinMulti(0),
57 fUseSelectEvent(kFALSE),      fMakePlots(kFALSE),
58 fInputAODBranch(0x0),         fInputAODName(""),
59 fOutputAODBranch(0x0),        fNewAOD(kFALSE),
60 fOutputAODName(""),           fOutputAODClassName(""),
61 fAODObjArrayName(""),         fAddToHistogramsName(""),
62 fCaloPID(0x0),                fCaloUtils(0x0),
63 fFidCut(0x0),                 fHisto(0x0),
64 fIC(0x0),                     fMCUtils(0x0),                
65 fNMS(0x0),                    fReader(0x0)
66 {
67   //Default Ctor
68   
69   //Initialize parameters
70   InitParameters();
71 }
72
73 //___________________________________________________________
74 AliAnaCaloTrackCorrBaseClass::~AliAnaCaloTrackCorrBaseClass() 
75 {
76   // Remove all pointers except analysis output pointers.
77   
78   //delete fCaloUtils ; //Already deleted in maker
79   //delete fReader ;    //Already deleted in maker
80         
81   delete fCaloPID ; 
82   delete fFidCut  ;  
83   delete fIC      ;      
84   delete fMCUtils ; 
85   delete fNMS     ;     
86   delete fHisto   ;    
87 }
88
89 //______________________________________________________________________
90 void AliAnaCaloTrackCorrBaseClass::AddAODParticle(AliAODPWG4Particle pc)
91 {
92   //Put AOD calo cluster in the AODParticleCorrelation array
93   
94   if(fOutputAODBranch){
95     
96     Int_t i = fOutputAODBranch->GetEntriesFast();
97     //new((*fOutputAODBranch)[i])  AliAODPWG4Particle(pc);
98     if(strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4Particle")==0)
99       new((*fOutputAODBranch)[i])  AliAODPWG4Particle(pc);
100     else   if(strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4ParticleCorrelation")==0)
101       new((*fOutputAODBranch)[i])  AliAODPWG4ParticleCorrelation(pc);
102     else {
103       printf("AliAnaCaloTrackCorrBaseClass::AddAODParticle() - Cannot add an object of type < %s >, to the AOD TClonesArray \n",  
104              fOutputAODBranch->GetClass()->GetName());
105       abort();    
106     }
107   }
108   else {
109     printf(" AliAnaCaloTrackCorrBaseClass::AddAODParticle() - No AOD branch available!!!\n");
110     abort();
111   }
112   
113 }       
114
115 //__________________________________________________________________________________________
116 Int_t AliAnaCaloTrackCorrBaseClass::CheckMixedEventVertex(Int_t caloLabel, Int_t trackLabel)
117 {
118   // Check vertex in mixed events
119   
120   if (!GetMixedEvent()) return 1; // Not mixed event continue normal processing
121   
122   Int_t evt = -1;
123   
124   if     (caloLabel  >= 0 )
125   {
126     evt = GetMixedEvent()->EventIndexForCaloCluster(caloLabel) ;
127   }
128   else if(trackLabel >= 0 )
129   {
130     evt = GetMixedEvent()->EventIndex(trackLabel) ;
131   }
132   else  
133     return 0; // go to next entry in the particle list
134   
135   if(evt == -1) 
136     return 0 ; // to content coverity
137   
138   if (TMath::Abs(GetVertex(evt)[2]) > GetZvertexCut())  return -1; // Vertex out of range process next event
139   
140   return 1 ; // continue processing normally
141   
142 }
143
144 //________________________________________________________________
145 void AliAnaCaloTrackCorrBaseClass::ConnectInputOutputAODBranches() 
146 {
147   //Recover ouput and input AOD pointers for each event in the maker
148         
149   //Delta AODs
150   if(fDebug > 3) printf("AliAnaCaloTrackCorrBaseClass::ConnectInputOutputAODBranches() - Connect Input with name: <%s>; Connect output with name <%s>\n",fInputAODName.Data(),fOutputAODName.Data());
151   
152   //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs
153   AliAODHandler* aodHandler = 0x0;
154   Bool_t outAOD = kFALSE;
155   if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE;
156   if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); 
157   else       aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
158   
159   if(!GetReader()->WriteDeltaAODToFile())
160   {
161     fOutputAODBranch =  (TClonesArray *) (fReader->GetAODBranchList())->FindObject(fOutputAODName);
162     fInputAODBranch  =  (TClonesArray *) (fReader->GetAODBranchList())->FindObject(fInputAODName);      
163   }
164   else if (aodHandler->GetExtensions()) { 
165     
166     AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName()); 
167     if(ext){
168       AliAODEvent *aodEvent = ext->GetAOD(); 
169       if(fNewAOD)fOutputAODBranch = (TClonesArray*) aodEvent->FindListObject(fOutputAODName);
170       fInputAODBranch = (TClonesArray*) aodEvent->FindListObject(fInputAODName);          
171       if(!fOutputAODBranch && fNewAOD) fOutputAODBranch =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName);
172       if(!fInputAODBranch)  fInputAODBranch  =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);
173     }
174     else{//If no Delta AODs, kept in standard branch, to revise. 
175       if(fNewAOD && fReader->GetOutputEvent()) {
176         fOutputAODBranch =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName);
177         fInputAODBranch  =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);  
178       }
179       else {
180         fInputAODBranch  =  (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName);   
181         if(!fInputAODBranch && fReader->GetOutputEvent() ) 
182           fInputAODBranch  =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event.
183       }
184     }
185   }
186   else{ //If no Delta AODs, kept in standard branch
187     if(fNewAOD && fReader->GetOutputEvent()) {
188       fOutputAODBranch =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName);
189       fInputAODBranch  =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);    
190     }
191     else{ 
192       fInputAODBranch  =  (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName);
193       if(!fInputAODBranch && fReader->GetOutputEvent())  
194         fInputAODBranch  =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event.
195     }
196   }
197   
198   if(GetDebug() > 1){
199     if(fNewAOD && !fOutputAODBranch) 
200       printf(" AliAnaCaloTrackCorrBaseClass::ConnectInputOutputAODBranches() - Output Branch <%s>, not found!\n",fOutputAODName.Data());
201     if(!fNewAOD && !fInputAODBranch) 
202       printf(" AliAnaCaloTrackCorrBaseClass::ConnectInputOutputAODBranches() - Input Branch  <%s>, not found!\n",fInputAODName.Data());
203   }
204 }
205
206 //_____________________________________________________________________________________
207 AliVCluster * AliAnaCaloTrackCorrBaseClass::FindCluster(TObjArray* clusters, Int_t id,
208                                                         Int_t & iclus, Int_t first)
209 {
210   // Given the cluster ID stored in AliAODPWG4Particle, get the originator cluster and its index in the array
211   
212   if(!clusters) return 0x0;
213   
214   for(iclus = first; iclus < clusters->GetEntriesFast(); iclus++){
215     AliVCluster *cluster= dynamic_cast<AliVCluster*> (clusters->At(iclus));
216     if(cluster){
217       if     (cluster->GetID()==id) {
218         return cluster;
219       }
220     }      
221   }// calorimeter clusters loop
222   
223   return 0x0;
224   
225 }
226
227 //______________________________________________________________________________
228 TClonesArray * AliAnaCaloTrackCorrBaseClass::GetAODBranch(TString aodName) const 
229 {
230         //Recover ouput and input AOD pointers for each event in the maker
231         
232         //Delta AODs
233         if(fDebug > 3) printf("AliAnaCaloTrackCorrBaseClass::GetAODBranch() - Get Input Branch with name: <%s>; \n",aodName.Data());
234         
235   //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs
236   AliAODHandler* aodHandler = 0x0;
237   Bool_t outAOD = kFALSE;
238   if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE;
239   if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); 
240   else       aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
241   
242   if(!GetReader()->WriteDeltaAODToFile())
243   {
244     return  (TClonesArray *) (fReader->GetAODBranchList())->FindObject(aodName);
245   }
246   else if (aodHandler->GetExtensions())
247   { 
248     AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName()); 
249     if(ext){
250       AliAODEvent *aodEvent = ext->GetAOD(); 
251       TClonesArray * aodbranch =  (TClonesArray*) aodEvent->FindListObject(aodName);
252       if(aodbranch) return aodbranch;
253       else {
254         if(outAOD) return  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName);
255         else       return  (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
256       }
257     }
258     else{//If no Delta AODs, kept in standard branch, to revise. 
259       if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName);
260       else       return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
261     }
262   }
263   else{ //If no Delta AODs, kept in standard branch, to revise. 
264     if(outAOD) return (TClonesArray *)  fReader->GetOutputEvent()->FindListObject(aodName);
265     else       return  (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
266   }
267   
268 }
269
270 //_____________________________________________________________
271 TObjArray *  AliAnaCaloTrackCorrBaseClass::GetCTSTracks() const 
272 {
273   //Get list of referenced tracks from reader
274   
275   return fReader->GetCTSTracks(); 
276   
277 }
278
279 //________________________________________________________________
280 TObjArray *  AliAnaCaloTrackCorrBaseClass::GetPHOSClusters() const 
281 {
282   //Get list of PHOS reference caloclusters from reader
283   
284   return fReader->GetPHOSClusters(); 
285   
286 }
287
288 //_________________________________________________________________
289 TObjArray *  AliAnaCaloTrackCorrBaseClass::GetEMCALClusters() const 
290 {
291   //Get list of emcal referenced caloclusters from reader
292   
293   return fReader->GetEMCALClusters(); 
294   
295 }
296
297 //______________________________________________________________________
298 TClonesArray *  AliAnaCaloTrackCorrBaseClass::GetAODCaloClusters() const 
299 {
300   //Get list of all caloclusters in AOD output file 
301   
302   return fReader->GetOutputEvent()->GetCaloClusters(); 
303   
304 }
305
306 //________________________________________________________________
307 TClonesArray *  AliAnaCaloTrackCorrBaseClass::GetAODTracks() const 
308 {
309   //Get list of all tracks in AOD output file 
310   
311   return fReader->GetOutputEvent()->GetTracks(); 
312   
313 }
314
315 //____________________________________________________________
316 TString  AliAnaCaloTrackCorrBaseClass::GetBaseParametersList()  
317 {
318   //Put data member values in string to keep in output container
319   
320   TString parList ; //this will be list of parameters used for this analysis.
321   const Int_t buffersize = 255;
322   char onePar[buffersize] ;
323   snprintf(onePar,buffersize,"--- AliAnaCaloTrackCorrBaseClass ---\n") ;
324   parList+=onePar ;     
325   snprintf(onePar,buffersize,"Minimal P_t: %2.2f ; Max\n", fMinPt) ;
326   parList+=onePar ;
327   snprintf(onePar,buffersize,"Minimal P_t: %2.2f ; Max\n", fMaxPt) ;
328   parList+=onePar ;
329   snprintf(onePar,buffersize,"|t_{1}-t_{2}| < %2.2f ; Max\n", fPairTimeCut) ;
330   parList+=onePar ;
331   snprintf(onePar,buffersize,"fDataMC =%d (Check MC information, on/off) \n",fDataMC) ;
332   parList+=onePar ;
333   snprintf(onePar,buffersize,"fCheckFidCut=%d (Check Fiducial cut selection on/off) \n",fCheckFidCut) ;
334   parList+=onePar ;
335   snprintf(onePar,buffersize,"fCheckCaloPID =%d (Use Bayesian PID in calorimetes, on/off) \n",fCheckCaloPID) ;
336   parList+=onePar ;
337   snprintf(onePar,buffersize,"fRecalculateCaloPID  =%d (Calculate PID from shower/tof/tracking parameters, on/off) \n",fRecalculateCaloPID) ;
338   parList+=onePar ;
339   snprintf(onePar,buffersize,"fInputAODName  =%s Input AOD name \n",fInputAODName.Data()) ;
340   parList+=onePar ;     
341   if(fNewAOD){
342     snprintf(onePar,buffersize,"fOutputAODName  =%s Output AOD name \n",fOutputAODName.Data()) ;
343     parList+=onePar ;   
344     snprintf(onePar,buffersize,"fOutputAODClassName  =%s Output AOD class name \n",fOutputAODClassName.Data()) ;
345     parList+=onePar ;   
346   }
347   snprintf(onePar,buffersize,"fAODObjArrayName  =%s Reference arrays in AOD name \n",fAODObjArrayName.Data()) ;
348   parList+=onePar ;     
349   snprintf(onePar,buffersize,"fAddToHistogramsName  =%s String added to beginning of histograms name \n",fAddToHistogramsName.Data()) ;
350   parList+=onePar ;     
351         
352   return parList; 
353   
354 }
355
356 //_____________________________________________________________________
357 TClonesArray * AliAnaCaloTrackCorrBaseClass::GetCreateOutputAODBranch() 
358 {
359   //Create AOD branch filled in the analysis
360   
361   printf("Create AOD branch of %s objects and with name < %s >\n",
362          fOutputAODClassName.Data(),fOutputAODName.Data()) ;
363   
364   TClonesArray * aodBranch = new TClonesArray(fOutputAODClassName, 0);
365   aodBranch->SetName(fOutputAODName);
366   return aodBranch ;
367   
368 }
369
370 //________________________________________________________
371 Int_t AliAnaCaloTrackCorrBaseClass::GetEventNumber() const 
372 {
373   //Get current event number
374   
375   return fReader->GetEventNumber() ; 
376   
377 }
378
379
380 //__________________________________________________________
381 AliStack *  AliAnaCaloTrackCorrBaseClass::GetMCStack() const 
382 {
383   //Get stack pointer from reader
384   
385   return fReader->GetStack(); 
386   
387 }
388 //____________________________________________________________
389 AliHeader *  AliAnaCaloTrackCorrBaseClass::GetMCHeader() const
390 {
391   //Get header pointer from reader
392   
393   return fReader->GetHeader(); 
394   
395 }
396
397 //____________________________________________________________________________
398 AliGenEventHeader *  AliAnaCaloTrackCorrBaseClass::GetMCGenEventHeader() const
399 {
400   //Get GenEventHeader pointer from reader
401   
402   return fReader->GetGenEventHeader(); 
403   
404 }
405
406
407 //________________________________________________________________
408 Int_t AliAnaCaloTrackCorrBaseClass::GetEventCentralityBin() const
409 {
410   // Define the centrality bin for mixing
411   // In pp collisions analysis hardcoded track multiplicities
412   
413   Int_t curCentrBin = 0;
414   
415   if(fUseTrackMultBins) // pp collisions
416   { // Track multiplicity bins
417     //curCentrBin = (GetTrackMultiplicity()-1)/5; 
418     //if(curCentrBin > GetNCentrBin()-1) curCentrBin=GetNCentrBin()-1;
419     Int_t trackMult = GetReader()->GetTrackMultiplicity();
420     if(trackMult<=5)
421       curCentrBin=8;
422     else if(trackMult<=10)
423       curCentrBin=7;
424     else if(trackMult<=15)
425       curCentrBin=6;
426     else if(trackMult<=20)
427       curCentrBin=5;
428     else if(trackMult<=30)
429       curCentrBin=4;
430     else if(trackMult<=40)
431       curCentrBin=3;
432     else if(trackMult<=55)
433       curCentrBin=2;
434     else if(trackMult<=70)
435       curCentrBin=1 ;
436     else curCentrBin=0 ;        
437   }
438   else // Set centrality based on centrality task, PbPb collisions
439   {
440     Float_t minCent = GetReader()->GetCentralityBin(0);
441     Float_t maxCent = GetReader()->GetCentralityBin(1);
442     
443     if((minCent< 0 && maxCent< 0) || minCent>=maxCent)
444     {
445       curCentrBin = GetEventCentrality() * GetNCentrBin() / GetReader()->GetCentralityOpt();
446       if(curCentrBin==GetNCentrBin())
447       {
448         curCentrBin = GetNCentrBin()-1;
449         printf("AliAnaCaloTrackCorrBaseClass::GetEventCentralityBin() - Centrality = %d, put it in last bin \n",GetEventCentrality());
450       }
451     }
452     else
453     {
454       curCentrBin = (Int_t)((GetEventCentrality()-minCent) * GetNCentrBin() / (maxCent-minCent)); 
455       if(curCentrBin==GetNCentrBin()) curCentrBin = GetNCentrBin()-1;
456     }  
457     
458     if(GetDebug() > 0 )
459       printf("AliAnaCaloTrackCorrBaseClass::GetEventCentralityBin() - %d, centrality %d, n bins %d, max bin from centrality %d\n",
460              curCentrBin, GetEventCentrality(), GetNCentrBin(), GetReader()->GetCentralityOpt());        
461   }  
462   
463   return curCentrBin;
464   
465 }
466
467 //_______________________________________________________
468 Int_t AliAnaCaloTrackCorrBaseClass::GetEventRPBin() const
469 {
470   //Reaction plane bin
471   
472   Int_t curRPBin  = 0 ;
473   
474   if(GetNRPBin() > 1 && GetEventPlane())
475   {
476     Float_t epAngle = GetEventPlaneAngle();//->GetEventplane(GetEventPlaneMethod(),fReader->GetInputEvent());
477     
478     if(epAngle < 0 || epAngle >TMath::Pi())
479     { 
480       printf("AliAnaCaloTrackCorrBaseClass::GetEventRPBin() - Wrong event plane angle : %f \n",epAngle);
481       return -1;
482     }
483     
484     curRPBin = TMath::Nint(epAngle*(GetNRPBin()-1)/TMath::Pi());
485     if(curRPBin >= GetNRPBin()) printf("RP Bin %d out of range %d\n",curRPBin,GetNRPBin());
486     
487     if(GetDebug() > 0 )
488       printf("AliAnaCaloTrackCorrBaseClass::GetEventRPBin() - %d, bin float %f, angle %f, n bins %d\n", 
489              curRPBin,epAngle*(GetNRPBin()-1)/TMath::Pi(),epAngle,GetNRPBin());
490   }  
491   
492   return curRPBin ;
493   
494 }
495
496 //_______________________________________________________
497 Int_t AliAnaCaloTrackCorrBaseClass::GetEventVzBin() const
498 {
499   // Return Vz bin, divide vertex in GetNZvertBin() bins, 
500   // depending on the vertex cut
501   
502   Double_t v[3] = {0,0,0}; //vertex 
503   GetReader()->GetVertex(v);
504   
505   Int_t curZvertBin = (Int_t)(0.5*GetNZvertBin()*(v[2]+GetZvertexCut())/GetZvertexCut());
506   
507   if(GetDebug() > 0 )
508     printf("AliAnaCaloTrackCorrBaseClass::GetEventVzBin() - %d, vz %2.2f, n bins %d \n",
509            curZvertBin, v[2], GetNZvertBin()); 
510   
511   return curZvertBin;
512 }
513
514 //________________________________________________________________________________________
515 Int_t AliAnaCaloTrackCorrBaseClass::GetEventMixBin(Int_t iCen, Int_t iVz, Int_t iRP) const
516 {
517   // Event mixing bin, combination of vz, centrality and reaction plane bins
518   
519   if(iCen<0 || iVz < 0 || iRP < 0)
520     return -1;
521   else
522     return iCen*GetNZvertBin()*GetNRPBin()+iVz*GetNRPBin()+iRP;
523 }
524
525 //________________________________________________________
526 Int_t AliAnaCaloTrackCorrBaseClass::GetEventMixBin() const
527 {
528   // Event mixing bin, combination of vz, centrality and reaction plane bins
529   
530   //Get vertex z bin
531   Int_t iVz =  GetEventVzBin();
532   
533   // centrality (PbPb) or tracks multiplicity (pp) bin
534   Int_t iCen = GetEventCentralityBin();
535   
536   // reaction plane bin (PbPb)
537   Int_t iRP = GetEventRPBin();  
538   
539   Int_t eventBin = GetEventMixBin(iCen, iVz, iRP);
540   
541   if(GetDebug() > 0)
542     printf("AliAnaCaloTrackCorrBaseClass::GetEventMixBin() - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
543            iCen,iVz, iRP, eventBin, GetNZvertBin()*GetNRPBin()*GetNCentrBin());
544   
545   return eventBin;
546   
547 }
548
549 //_________________________________________________
550 void AliAnaCaloTrackCorrBaseClass::InitParameters()
551
552   //Initialize the parameters of the analysis.
553   fDataMC              = kFALSE;
554   fDebug               = -1;
555   fCheckCaloPID        = kTRUE ;
556   fCheckFidCut         = kFALSE ;
557   fRecalculateCaloPID  = kFALSE ;
558   fMinPt               = 0.1  ; //Min pt in particle analysis
559   fMaxPt               = 300. ; //Max pt in particle analysis
560   fMultiBin            = 1;
561   fNZvertBin           = 1;
562   fNrpBin              = 1;
563   fMaxMulti            = 1000;
564   fMinMulti            = 0;
565   fUseSelectEvent      = kFALSE ;
566   
567   //fReader    = new AliCaloTrackReader(); //Initialized in maker
568   //fCaloUtils = new AliCalorimeterUtils();//Initialized in maker
569   
570   fNewAOD              = kFALSE ;
571   fOutputAODName       = "CaloTrackCorr";
572   fOutputAODClassName  = "AliAODPWG4Particle";
573   fInputAODName        = "CaloTrackCorr";
574   fAddToHistogramsName = "";
575   fAODObjArrayName     = "Ref";
576   
577 }
578
579 //__________________________________________________________________
580 void AliAnaCaloTrackCorrBaseClass::Print(const Option_t * opt) const
581 {
582   //Print some relevant parameters set for the analysis
583   
584   if(! opt)
585     return;
586         
587   printf("New AOD:            =     %d\n",fNewAOD);
588   printf("Input AOD name:     =     %s\n",fInputAODName.Data());
589   printf("Output AOD name:    =     %s\n",fOutputAODName.Data());
590   printf("Output AOD Class name: =  %s\n",fOutputAODClassName.Data());
591   printf("Min Photon pT       =     %2.2f\n",  fMinPt) ;
592   printf("Max Photon pT       =     %3.2f\n",  fMaxPt) ;
593   printf("Check PID           =     %d\n",     fCheckCaloPID) ;
594   printf("Recalculate PID     =     %d\n",     fRecalculateCaloPID) ;
595   printf("Check Fiducial cut  =     %d\n",     fCheckFidCut) ;
596   printf("Check MC labels     =     %d\n",     fDataMC);
597   printf("Make plots?         =     %d \n",    fMakePlots);     
598   printf("Debug Level         =     %d\n",     fDebug);
599   
600   printf("Name of reference array      : %s\n", fAODObjArrayName.Data());       
601   printf("String added histograms name : %s\n", fAddToHistogramsName.Data());
602         
603   printf("    \n") ;
604   
605
606
607
608