]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/PartCorrBase/AliAnaPartCorrBaseClass.cxx
correct the way of the correlated array with tracks or clusters is set
[u/mrichter/AliRoot.git] / PWG4 / PartCorrBase / AliAnaPartCorrBaseClass.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 /* $Id: $ */
16
17 //_________________________________________________________________________
18 // Base class for analysis algorithms
19 //-- Author: Gustavo Conesa (LNF-INFN) 
20 //_________________________________________________________________________
21 // --Yaxian Mao: Add the possibality for event selection analysis based on vertex and multiplicity bins (10/10/2010)
22   
23
24 // --- ROOT system ---
25 #include <TClonesArray.h>
26 //#include <Riostream.h>
27
28 //---- AliRoot system ----
29 #include "AliAnaPartCorrBaseClass.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(AliAnaPartCorrBaseClass)
44   
45   
46 //_______________________________________________
47   AliAnaPartCorrBaseClass::AliAnaPartCorrBaseClass() : 
48     TObject(), fDataMC(0), fDebug(0), fCheckFidCut(0),
49     fCheckCaloPID(0), fRecalculateCaloPID(0), fMinPt(0), fMaxPt(0),
50     fMultiBin(0),fNZvertBin(0),fNrpBin(0),fZvtxCut(0.), fMaxMulti(0),fMinMulti(0),
51     fUseSelectEvent(kFALSE), fMakePlots(kFALSE),
52     fReader(0x0), fInputAODBranch(0x0), fInputAODName(""),
53     fOutputAODBranch(0x0), fNewAOD(kFALSE),
54     fOutputAODName(""), fOutputAODClassName(""),
55     fAODObjArrayName(""), fAddToHistogramsName(""),
56     fCaloPID(0x0), fFidCut(0x0), fIC(0x0),fMCUtils(0x0), fNMS(0x0),
57     fCaloUtils(0x0),
58     fHistoPtBins(0),   fHistoPtMax(0.),   fHistoPtMin(0.),
59     fHistoPhiBins(0),  fHistoPhiMax(0.),  fHistoPhiMin(0.),
60     fHistoEtaBins(0),  fHistoEtaMax(0.),  fHistoEtaMin(0.),
61     fHistoMassBins(0), fHistoMassMax(0.), fHistoMassMin(0.),
62     fHistoAsymBins(0), fHistoAsymMax(0.), fHistoAsymMin(0.)
63 {
64   //Default Ctor
65     
66   //Initialize parameters
67   InitParameters();
68 }
69 /*
70 //___________________________________________________________
71 AliAnaPartCorrBaseClass::AliAnaPartCorrBaseClass(const AliAnaPartCorrBaseClass & abc) :   
72   TObject(), fDataMC(abc.fDataMC), fDebug(abc.fDebug),
73   fCheckFidCut(abc.fCheckFidCut),  fCheckCaloPID(abc. fCheckCaloPID),
74   fRecalculateCaloPID(abc.fRecalculateCaloPID),
75   fMinPt(abc.fMinPt), fMaxPt(abc.fMaxPt), fReader(new AliCaloTrackReader(*abc.fReader)),  
76   fInputAODBranch(new TClonesArray(*abc.fInputAODBranch)), fInputAODName(abc.fInputAODName),
77   fOutputAODBranch(new TClonesArray(*abc.fOutputAODBranch)),fNewAOD(abc.fNewAOD), 
78   fOutputAODName(abc.fOutputAODName), fOutputAODClassName(abc.fOutputAODClassName),
79   fAODObjArrayName(abc.fAODObjArrayName),
80   fAddToHistogramsName(abc.fAddToHistogramsName),
81   fCaloPID(new AliCaloPID(*abc.fCaloPID)), fFidCut(new AliFiducialCut(*abc.fFidCut)), fIC(new AliIsolationCut(*abc.fIC)),
82   fMCUtils(new AliMCAnalysisUtils(*abc.fMCUtils)), fNMS(new AliNeutralMesonSelection(*abc.fNMS)),
83   fCaloUtils(new AliCalorimeterUtils(*abc.fCaloUtils)),
84   fHistoPtBins(abc.fHistoPtBins),     fHistoPtMax(abc.fHistoPtMax),     fHistoPtMin(abc.fHistoPtMin),
85   fHistoPhiBins(abc.fHistoPhiBins),   fHistoPhiMax(abc.fHistoPhiMax),   fHistoPhiMin(abc.fHistoPhiMin),
86   fHistoEtaBins(abc.fHistoEtaBins),   fHistoEtaMax(abc.fHistoEtaMax),   fHistoEtaMin(abc.fHistoEtaMin),
87   fHistoMassBins(abc.fHistoMassBins), fHistoMassMax(abc.fHistoMassMax), fHistoMassMin(abc.fHistoMassMin),
88   fHistoAsymBins(abc.fHistoAsymBins), fHistoAsymMax(abc.fHistoAsymMax), fHistoAsymMin(abc.fHistoAsymMin)
89 {
90   // cpy ctor
91
92 }
93 */
94   /*
95 //_________________________________________________________________________
96 AliAnaPartCorrBaseClass & AliAnaPartCorrBaseClass::operator = (const AliAnaPartCorrBaseClass & abc)
97 {
98   // assignment operator
99   
100   if(this == &abc) return *this;
101   ((TObject *)this)->operator=(abc);
102   
103   fDataMC             = abc.fDataMC;
104   fDebug              = abc.fDebug ;
105   fRecalculateCaloPID = abc.fRecalculateCaloPID ;
106   fCheckCaloPID       = abc.fCheckCaloPID ;
107   fCheckFidCut        = abc.fCheckFidCut ; 
108         
109   fMinPt   = abc.fMinPt;
110   fMaxPt   = abc.fMaxPt;
111         
112   delete fCaloPID;   fCaloPID   = new AliCaloPID        (*abc.fCaloPID);
113   delete fFidCut;    fFidCut    = new AliFiducialCut    (*abc.fFidCut);
114   delete fMCUtils;   fMCUtils   = new AliMCAnalysisUtils(*abc.fMCUtils);
115   delete fIC;        fIC        = new AliIsolationCut   (*abc.fIC);
116   delete fNMS;       fNMS       = new AliNeutralMesonSelection(*abc.fNMS);
117   delete fCaloUtils; fCaloUtils = new AliCalorimeterUtils(*abc.fCaloUtils);
118   delete fReader;    fReader    = new AliCaloTrackReader(*abc.fReader) ;
119         
120   delete fInputAODBranch;  fInputAODBranch      = new TClonesArray(*abc.fInputAODBranch) ;
121   fInputAODName        = abc.fInputAODName;
122   delete fOutputAODBranch; fOutputAODBranch     = new TClonesArray(*abc.fOutputAODBranch) ;
123   fNewAOD              = abc.fNewAOD ; 
124   fOutputAODName       = abc.fOutputAODName; 
125   fOutputAODClassName  = abc.fOutputAODClassName;
126   fAddToHistogramsName = abc.fAddToHistogramsName;
127   fAODObjArrayName     = abc.fAODObjArrayName;
128
129   fHistoPtBins  = abc.fHistoPtBins;  fHistoPtMax  = abc.fHistoPtMax;  fHistoPtMin  = abc.fHistoPtMin;
130   fHistoPhiBins = abc.fHistoPhiBins; fHistoPhiMax = abc.fHistoPhiMax; fHistoPhiMin = abc.fHistoPhiMin;
131   fHistoEtaBins = abc.fHistoEtaBins; fHistoEtaMax = abc.fHistoEtaMax; fHistoEtaMin = abc.fHistoEtaMin;
132   
133   return *this;
134   
135 }
136   */
137 //____________________________________________________________________________
138 AliAnaPartCorrBaseClass::~AliAnaPartCorrBaseClass() 
139 {
140   // Remove all pointers except analysis output pointers.
141 //printf("---Delete analysis %s\n", fAODObjArrayName.Data());
142   // Not sure if it should be me who deletes the delta AOD branches.
143 //  if(fOutputAODBranch){
144 //    fOutputAODBranch->Clear() ; 
145 //    delete fOutputAODBranch ;
146 //  }
147 //  
148 //  if(fInputAODBranch){
149 //    fInputAODBranch->Clear() ; 
150 //    delete fInputAODBranch ;
151 //  }
152   
153   //if(fCaloUtils)    delete fCaloUtils ; //Already deleted in maker
154   //if(fReader)       delete fReader ;    //Already deleted in maker
155         
156   if(fCaloPID)   delete fCaloPID ;
157   if(fFidCut)    delete fFidCut ;
158   if(fIC)        delete fIC ;
159   if(fMCUtils)   delete fMCUtils ;
160   if(fNMS)       delete fNMS ;
161
162   //   printf("--- analysis deleted \n");
163 }
164
165 //____________________________________________________________________________
166 void AliAnaPartCorrBaseClass::AddAODParticle(AliAODPWG4Particle pc) {
167   //Put AOD calo cluster in the AODParticleCorrelation array
168   
169   if(fOutputAODBranch){
170     
171     Int_t i = fOutputAODBranch->GetEntriesFast();
172     //new((*fOutputAODBranch)[i])  AliAODPWG4Particle(pc);
173     if(strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4Particle")==0)
174       new((*fOutputAODBranch)[i])  AliAODPWG4Particle(pc);
175     else   if(strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4ParticleCorrelation")==0)
176       new((*fOutputAODBranch)[i])  AliAODPWG4ParticleCorrelation(pc);
177     else {
178       printf("AliAnaPartCorrBaseClass::AddAODParticle() - Cannot add an object of type < %s >, to the AOD TClonesArray \n",  
179              fOutputAODBranch->GetClass()->GetName());
180       abort();    
181     }
182   }
183   else {
184     printf(" AliAnaPartCorrBaseClass::AddAODParticle() - No AOD branch available!!!\n");
185     abort();
186   }
187
188 }       
189
190 //___________________________________________________________________________
191 TClonesArray * AliAnaPartCorrBaseClass::GetAODBranch(TString aodName) const {
192         //Recover ouput and input AOD pointers for each event in the maker
193         
194         //Delta AODs
195         if(fDebug > 3) printf("AliAnaPartCorrBaseClass::GetAODBranch() - Get Input Branch with name: <%s>; \n",aodName.Data());
196         
197   //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs
198   AliAODHandler* aodHandler = 0x0;
199   Bool_t outAOD = kFALSE;
200   if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE;
201   if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); 
202   else       aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
203   
204   if(!GetReader()->WriteDeltaAODToFile())
205   {
206     return  (TClonesArray *) (fReader->GetAODBranchList())->FindObject(aodName);
207   }
208   else if (aodHandler->GetExtensions())
209   { 
210     AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName()); 
211     if(ext){
212       AliAODEvent *aodEvent = ext->GetAOD(); 
213       TClonesArray * aodbranch =  (TClonesArray*) aodEvent->FindListObject(aodName);
214       if(aodbranch) return aodbranch;
215       else {
216         if(outAOD) return  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName);
217         else       return  (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
218       }
219     }
220     else{//If no Delta AODs, kept in standard branch, to revise. 
221       if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName);
222       else       return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
223     }
224   }
225   else{ //If no Delta AODs, kept in standard branch, to revise. 
226     if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName);
227     else       return  (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
228   }
229   
230 }
231
232
233
234 //___________________________________________________
235 void AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() {
236   //Recover ouput and input AOD pointers for each event in the maker
237         
238   //Delta AODs
239   if(fDebug > 3) printf("AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() - Connect Input with name: <%s>; Connect output with name <%s>\n",fInputAODName.Data(),fOutputAODName.Data());
240   
241         //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs
242         AliAODHandler* aodHandler = 0x0;
243         Bool_t outAOD = kFALSE;
244         if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE;
245         if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); 
246         else         aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
247         
248   if(!GetReader()->WriteDeltaAODToFile())
249   {
250     fOutputAODBranch =  (TClonesArray *) (fReader->GetAODBranchList())->FindObject(fOutputAODName);
251     fInputAODBranch  =  (TClonesArray *) (fReader->GetAODBranchList())->FindObject(fInputAODName);      
252   }
253   else if (aodHandler->GetExtensions()) { 
254     
255           AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName()); 
256           if(ext){
257       AliAODEvent *aodEvent = ext->GetAOD(); 
258       if(fNewAOD)fOutputAODBranch = (TClonesArray*) aodEvent->FindListObject(fOutputAODName);
259       fInputAODBranch = (TClonesArray*) aodEvent->FindListObject(fInputAODName);          
260       if(!fOutputAODBranch && fNewAOD) fOutputAODBranch =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName);
261       if(!fInputAODBranch)  fInputAODBranch  =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);
262           }
263           else{//If no Delta AODs, kept in standard branch, to revise. 
264                   if(fNewAOD && fReader->GetOutputEvent()) {
265                           fOutputAODBranch =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName);
266                           fInputAODBranch  =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);        
267                   }
268                   else {
269                           fInputAODBranch  =  (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName); 
270                           if(!fInputAODBranch && fReader->GetOutputEvent() ) 
271                                   fInputAODBranch  =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event.
272                   }
273           }
274   }
275   else{ //If no Delta AODs, kept in standard branch
276           if(fNewAOD && fReader->GetOutputEvent()) {
277                   fOutputAODBranch =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName);
278                   fInputAODBranch  =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);        
279           }
280           else{ 
281                   fInputAODBranch  =  (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName);
282                   if(!fInputAODBranch && fReader->GetOutputEvent())  
283                           fInputAODBranch  =  (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event.
284           }
285   }
286         
287   if(GetDebug() > 1){
288     if(fNewAOD && !fOutputAODBranch) 
289       printf(" AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() - Output Branch <%s>, not found!\n",fOutputAODName.Data());
290     if(!fNewAOD && !fInputAODBranch) 
291       printf(" AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() - Input Branch  <%s>, not found!\n",fInputAODName.Data());
292   }
293 }
294 //
295 ////__________________________________________________________________________
296 //Bool_t AliAnaPartCorrBaseClass::IsTrackMatched(AliVCluster* cluster) const {
297 //  //Check if there is any track attached to this cluster
298 //  
299 //  Int_t nMatches = cluster->GetNTracksMatched();
300 ////  printf("N matches %d, first match %d\n",nMatches,cluster->GetTrackMatchedIndex());
301 ////  if     (cluster->GetTrackMatched(0))        printf("\t matched track id %d\n",((AliVTrack*)cluster->GetTrackMatched(0))->GetID()) ;
302 ////  else if(cluster->GetTrackMatchedIndex()>=0) printf("\t matched track id %d\n",((AliVTrack*) GetReader()->GetInputEvent()->GetTrack(cluster->GetTrackMatchedIndex()))->GetID()) ;
303 //
304 //  if(fReader->GetDataType()==AliCaloTrackReader::kESD)
305 //  {
306 //    
307 //    if (nMatches > 0) {
308 //      if (nMatches == 1 ) {
309 //        Int_t iESDtrack = cluster->GetTrackMatchedIndex();
310 //        //printf("Track Matched index %d\n",iESDtrack);
311 //        if(iESDtrack==-1) return kFALSE ;// Default value of array, there is no match
312 //        else              return kTRUE;
313 //      }//Just one, check
314 //      else return kTRUE ;//More than one, there is a match.
315 //    }// > 0
316 //    else return kFALSE; //It does not happen, but in case
317 //      
318 //  }//ESDs
319 //  else
320 //  {
321 //    //AODs
322 //    if(nMatches > 0) return kTRUE; //There is at least one match.
323 //    else             return kFALSE;
324 //    
325 //  }//AODs or MC (copy into AOD)
326 //  
327 //  return kFALSE;
328 //  
329 //}
330 //
331 //__________________________________________________
332 TObjArray *  AliAnaPartCorrBaseClass::GetAODCTS() const {
333   //Get list of referenced tracks from reader
334
335   return fReader->GetAODCTS(); 
336
337 }
338
339 //__________________________________________________
340 TObjArray *  AliAnaPartCorrBaseClass::GetAODPHOS() const {
341   //Get list of PHOS reference caloclusters from reader
342
343   return fReader->GetAODPHOS(); 
344
345 }
346
347 //__________________________________________________
348 TObjArray *  AliAnaPartCorrBaseClass::GetAODEMCAL() const {
349   //Get list of emcal referenced caloclusters from reader
350
351   return fReader->GetAODEMCAL(); 
352
353 }
354
355 //__________________________________________________
356 TClonesArray *  AliAnaPartCorrBaseClass::GetAODCaloClusters() const {
357   //Get list of all caloclusters in AOD output file 
358
359   return fReader->GetOutputEvent()->GetCaloClusters(); 
360
361 }
362
363 //__________________________________________________
364 TClonesArray *  AliAnaPartCorrBaseClass::GetAODTracks() const {
365   //Get list of all tracks in AOD output file 
366
367   return fReader->GetOutputEvent()->GetTracks(); 
368
369 }
370
371 //__________________________________________________
372 TString  AliAnaPartCorrBaseClass::GetBaseParametersList()  {
373   //Put data member values in string to keep in output container
374
375   TString parList ; //this will be list of parameters used for this analysis.
376   const Int_t buffersize = 255;
377   char onePar[buffersize] ;
378   snprintf(onePar,buffersize,"--- AliAnaPartCorrBaseClass ---\n") ;
379   parList+=onePar ;     
380   snprintf(onePar,buffersize,"Minimal P_t: %2.2f ; Max\n", fMinPt) ;
381   parList+=onePar ;
382   snprintf(onePar,buffersize,"Minimal P_t: %2.2f ; Max\n", fMaxPt) ;
383   parList+=onePar ;
384   snprintf(onePar,buffersize,"fDataMC =%d (Check MC information, on/off) \n",fDataMC) ;
385   parList+=onePar ;
386   snprintf(onePar,buffersize,"fCheckFidCut=%d (Check Fiducial cut selection on/off) \n",fCheckFidCut) ;
387   parList+=onePar ;
388   snprintf(onePar,buffersize,"fCheckCaloPID =%d (Use Bayesian PID in calorimetes, on/off) \n",fCheckCaloPID) ;
389   parList+=onePar ;
390   snprintf(onePar,buffersize,"fRecalculateCaloPID  =%d (Calculate PID from shower/tof/tracking parameters, on/off) \n",fRecalculateCaloPID) ;
391   parList+=onePar ;
392   snprintf(onePar,buffersize,"fInputAODName  =%s Input AOD name \n",fInputAODName.Data()) ;
393   parList+=onePar ;     
394   if(fNewAOD){
395      snprintf(onePar,buffersize,"fOutputAODName  =%s Output AOD name \n",fOutputAODName.Data()) ;
396      parList+=onePar ;  
397      snprintf(onePar,buffersize,"fOutputAODClassName  =%s Output AOD class name \n",fOutputAODClassName.Data()) ;
398      parList+=onePar ;  
399   }
400   snprintf(onePar,buffersize,"fAODObjArrayName  =%s Reference arrays in AOD name \n",fAODObjArrayName.Data()) ;
401   parList+=onePar ;     
402   snprintf(onePar,buffersize,"fAddToHistogramsName  =%s String added to beginning of histograms name \n",fAddToHistogramsName.Data()) ;
403   parList+=onePar ;     
404         
405   return parList; 
406
407 }
408
409 //__________________________________________________
410  TClonesArray * AliAnaPartCorrBaseClass::GetCreateOutputAODBranch() {
411    //Create AOD branch filled in the analysis
412    
413    printf("Create AOD branch of %s objects and with name < %s >\n",
414           fOutputAODClassName.Data(),fOutputAODName.Data()) ;
415    
416    TClonesArray * aodBranch = new TClonesArray(fOutputAODClassName, 0);
417    aodBranch->SetName(fOutputAODName);
418    return aodBranch ;
419    
420  }
421
422 //__________________________________________________
423 Int_t AliAnaPartCorrBaseClass::GetEventNumber() const {
424         //Get current event number
425         
426         return fReader->GetEventNumber() ; 
427 }
428         
429 //__________________________________________________
430 AliStack *  AliAnaPartCorrBaseClass::GetMCStack() const {
431   //Get stack pointer from reader
432
433   return fReader->GetStack(); 
434
435 }
436 //__________________________________________________
437 AliHeader *  AliAnaPartCorrBaseClass::GetMCHeader() const {
438   //Get header pointer from reader
439
440   return fReader->GetHeader(); 
441
442 }
443
444 //__________________________________________________
445 AliGenEventHeader *  AliAnaPartCorrBaseClass::GetMCGenEventHeader() const {
446   //Get GenEventHeader pointer from reader
447
448   return fReader->GetGenEventHeader(); 
449
450 }
451
452 //__________________________________________________
453 void AliAnaPartCorrBaseClass::InitParameters()
454
455   //Initialize the parameters of the analysis.
456   fDataMC = kFALSE;
457   fDebug = -1;
458   fCheckCaloPID = kTRUE ;
459   fCheckFidCut = kFALSE ;
460   fRecalculateCaloPID = kFALSE ;
461   fMinPt = 0.1  ; //Min pt in particle analysis
462   fMaxPt = 300. ; //Max pt in particle analysis
463   fMultiBin = 1;
464   fNZvertBin = 1;
465   fNrpBin    = 1;
466   fZvtxCut   = 40;
467   fMaxMulti   = 1000;
468   fMinMulti   = 0;
469   fUseSelectEvent = kFALSE ;
470   
471   //fReader    = new AliCaloTrackReader(); //Initialized in maker
472   //fCaloUtils = new AliCalorimeterUtils();//Initialized in maker
473         
474   fNewAOD              = kFALSE ;
475   fOutputAODName       = "PartCorr";
476   fOutputAODClassName  = "AliAODPWG4Particle";
477   fInputAODName        = "PartCorr";
478   fAddToHistogramsName = "";
479   fAODObjArrayName     = "Ref";
480           
481   //Histogram settings
482   fHistoPtBins    = 240 ;
483   fHistoPtMax     = 120 ;
484   fHistoPtMin     = 0.  ;
485
486   fHistoPhiBins   = 120 ;
487   fHistoPhiMax    = TMath::TwoPi();
488   fHistoPhiMin    = 0.  ;
489
490   fHistoEtaBins   = 100 ;
491   fHistoEtaMax    =  1  ;
492   fHistoEtaMin    = -1  ;
493
494   fHistoMassBins  = 200;
495   fHistoMassMax   = 1. ;
496   fHistoMassMin   = 0. ;
497         
498   fHistoAsymBins  = 10 ;
499   fHistoAsymMax   = 1. ;
500   fHistoAsymMin   = 0. ;
501         
502 }
503
504 //__________________________________________________________________
505 void AliAnaPartCorrBaseClass::Print(const Option_t * opt) const
506 {
507   //Print some relevant parameters set for the analysis
508   
509   if(! opt)
510     return;
511         
512   printf("New AOD:            =     %d\n",fNewAOD);
513   printf("Input AOD name:     =     %s\n",fInputAODName.Data());
514   printf("Output AOD name:    =     %s\n",fOutputAODName.Data());
515   printf("Output AOD Class name: =  %s\n",fOutputAODClassName.Data());
516   printf("Min Photon pT       =     %2.2f\n",  fMinPt) ;
517   printf("Max Photon pT       =     %3.2f\n",  fMaxPt) ;
518   printf("Check PID           =     %d\n",     fCheckCaloPID) ;
519   printf("Recalculate PID     =     %d\n",     fRecalculateCaloPID) ;
520   printf("Check Fiducial cut  =     %d\n",     fCheckFidCut) ;
521   printf("Check MC labels     =     %d\n",     fDataMC);
522   printf("Make plots?         =     %d \n",    fMakePlots);     
523   printf("Debug Level         =     %d\n",     fDebug);
524   printf("Histograms: %3.1f < pT  < %3.1f,  Nbin = %d\n", fHistoPtMin,  fHistoPtMax,  fHistoPtBins);
525   printf("Histograms: %3.1f < phi < %3.1f, Nbin = %d\n", fHistoPhiMin, fHistoPhiMax, fHistoPhiBins);
526   printf("Histograms: %3.1f < eta < %3.1f, Nbin = %d\n", fHistoEtaMin, fHistoEtaMax, fHistoEtaBins);
527   printf("Histograms: %3.1f < mass < %3.1f, Nbin = %d\n", fHistoMassMin, fHistoMassMax, fHistoMassBins);
528   printf("Histograms: %3.1f < asymmetry < %3.1f, Nbin = %d\n", fHistoAsymMin, fHistoAsymMax, fHistoAsymBins);
529   printf("Name of reference array      : %s\n", fAODObjArrayName.Data());       
530   printf("String added histograms name : %s\n",fAddToHistogramsName.Data());
531         
532   printf("    \n") ;
533   
534
535
536
537