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