AliPhysics  v5-06-11-01 (156c7f3)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliAnaCaloTrackCorrBaseClass.cxx
Go to the documentation of this file.
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 // --- ROOT system ---
17 #include <TClonesArray.h>
18 //#include <Riostream.h>
19 
20 //---- AliRoot system ----
22 #include "AliCaloTrackReader.h"
23 #include "AliCalorimeterUtils.h"
24 #include "AliCaloPID.h"
25 #include "AliFiducialCut.h"
26 #include "AliIsolationCut.h"
27 #include "AliMCAnalysisUtils.h"
29 #include "AliVCaloCells.h"
30 #include "AliAODEvent.h"
31 #include "AliAODHandler.h"
32 #include "AliAODPWG4Particle.h"
33 
37 
38 //__________________________________________________________
41 //__________________________________________________________
43 TObject(),
44 fDataMC(0), fDebug(0),
45 fCalorimeter(-1), fCalorimeterString(""),
46 fCheckFidCut(0), fCheckRealCaloAcc(0),
47 fCheckCaloPID(0), fRecalculateCaloPID(0),
48 fMinPt(0), fMaxPt(0),
49 fPairTimeCut(200), fTRDSMCovered(-1),
50 fNZvertBin(0), fNrpBin(0),
51 fNCentrBin(0), fNmaxMixEv(0),
52 fDoOwnMix(0), fUseTrackMultBins(0),
53 fFillPileUpHistograms(0), fFillHighMultHistograms(0),
54 fMakePlots(kFALSE),
55 fInputAODBranch(0x0), fInputAODName(""),
56 fOutputAODBranch(0x0), fNewAOD(kFALSE),
57 fOutputAODName(""), fOutputAODClassName(""),
58 fAODObjArrayName(""), fAddToHistogramsName(""),
59 fCaloPID(0x0), fCaloUtils(0x0),
60 fFidCut(0x0), fHisto(0x0),
61 fIC(0x0), fMCUtils(0x0),
62 fNMS(0x0), fReader(0x0)
63 {
65 }
66 
67 //___________________________________________________________
69 //___________________________________________________________
71 {
72  //delete fCaloUtils ; //Already deleted in maker
73  //delete fReader ; //Already deleted in maker
74 
75  delete fCaloPID ;
76  delete fFidCut ;
77  delete fIC ;
78  delete fMCUtils ;
79  delete fNMS ;
80  delete fHisto ;
81 }
82 
83 //______________________________________________________________________
86 //______________________________________________________________________
88 {
89  if(!fOutputAODBranch)
90  {
91  AliFatal("No AOD branch available!!!\n");
92  return; // coverity
93  }
94 
95  Int_t i = fOutputAODBranch->GetEntriesFast();
96  //new((*fOutputAODBranch)[i]) AliAODPWG4Particle(pc);
97  if (strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4Particle")==0)
98  {
99  new((*fOutputAODBranch)[i]) AliAODPWG4Particle(pc);
100  }
101  else if(strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4ParticleCorrelation")==0)
102  {
103  new((*fOutputAODBranch)[i]) AliAODPWG4ParticleCorrelation(pc);
104  }
105  else
106  {
107  AliFatal(Form("Cannot add an object of type < %s >, to the AOD TClonesArray \n", fOutputAODBranch->GetClass()->GetName()));
108  }
109 }
110 
111 //__________________________________________________________________________________________
116 //__________________________________________________________________________________________
117 Int_t AliAnaCaloTrackCorrBaseClass::CheckMixedEventVertex(Int_t caloLabel, Int_t trackLabel)
118 {
119  if (!GetMixedEvent()) return 1; // Not mixed event continue normal processing
120 
121  Int_t evt = -1;
122 
123  if (caloLabel >= 0 )
124  {
125  evt = GetMixedEvent()->EventIndexForCaloCluster(caloLabel) ;
126  }
127  else if(trackLabel >= 0 )
128  {
129  evt = GetMixedEvent()->EventIndex(trackLabel) ;
130  }
131  else
132  return 0; // go to next entry in the particle list
133 
134  if(evt == -1)
135  return 0 ; // to content coverity
136 
137  if (TMath::Abs(GetVertex(evt)[2]) > GetZvertexCut()) return -1; // Vertex out of range process next event
138 
139  return 1 ; // continue processing normally
140 }
141 
142 //________________________________________________________________
145 //________________________________________________________________
147 {
148  AliDebug(3,Form("AliAnaCaloTrackCorrBaseClass::ConnectInputOutputAODBranches() - Connect Input with name: <%s>; Connect output with name <%s>\n",fInputAODName.Data(),fOutputAODName.Data()));
149 
150  //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs
151  AliAODHandler* aodHandler = 0x0;
152  Bool_t outAOD = kFALSE;
153  if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE;
154  if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
155  else aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
156 
158  {
159  fOutputAODBranch = (TClonesArray *) (fReader->GetAODBranchList())->FindObject(fOutputAODName);
160  fInputAODBranch = (TClonesArray *) (fReader->GetAODBranchList())->FindObject(fInputAODName);
161  }
162  else if (aodHandler->GetExtensions())
163  {
164  AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName());
165  if(ext)
166  {
167  AliAODEvent *aodEvent = ext->GetAOD();
168  if(fNewAOD)fOutputAODBranch = (TClonesArray*) aodEvent->FindListObject(fOutputAODName);
169  fInputAODBranch = (TClonesArray*) aodEvent->FindListObject(fInputAODName);
170  if(!fOutputAODBranch && fNewAOD) fOutputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName);
171  if(!fInputAODBranch) fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);
172  }
173  else
174  { // If no Delta AODs, kept in standard branch, to revise.
175  if(fNewAOD && fReader->GetOutputEvent())
176  {
177  fOutputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName);
178  fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);
179  }
180  else
181  {
182  fInputAODBranch = (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName);
184  fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event.
185  }
186  }
187  }
188  else
189  { // If no Delta AODs, kept in standard branch
190  if(fNewAOD && fReader->GetOutputEvent())
191  {
192  fOutputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName);
193  fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);
194  }
195  else
196  {
197  fInputAODBranch = (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName);
199  fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event.
200  }
201  }
202 
203 // if(GetDebug() > 1)
204 // {
205 // if(fNewAOD && !fOutputAODBranch)
206 // AliInfo(Form("Output Branch <%s>, not found!\n",fOutputAODName.Data()));
207 // if(!fNewAOD && !fInputAODBranch)
208 // AliInfo(Form("Input Branch <%s>, not found!\n",fInputAODName.Data()));
209 // }
210 }
211 
212 //_____________________________________________________________________________________
220 //_____________________________________________________________________________________
221 AliVCluster * AliAnaCaloTrackCorrBaseClass::FindCluster(TObjArray* clusters, Int_t id,
222  Int_t & iclus, Int_t first)
223 {
224  if(!clusters) return 0x0;
225 
226  for(iclus = first; iclus < clusters->GetEntriesFast(); iclus++)
227  {
228  AliVCluster *cluster= dynamic_cast<AliVCluster*> (clusters->At(iclus));
229  if(cluster)
230  {
231  if(cluster->GetID()==id)
232  {
233  return cluster;
234  }
235  }
236  }// calorimeter clusters loop
237 
238  return 0x0;
239 }
240 
241 //______________________________________________________________________________________
243 //______________________________________________________________________________________
244 TClonesArray * AliAnaCaloTrackCorrBaseClass::GetAODBranch(const TString & aodName) const
245 {
246  AliDebug(3,Form("AliAnaCaloTrackCorrBaseClass::GetAODBranch() - Get Input Branch with name: <%s>; \n",aodName.Data()));
247 
248  //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs
249  AliAODHandler* aodHandler = 0x0;
250  Bool_t outAOD = kFALSE;
251  if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE;
252  if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
253  else aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
254 
256  {
257  return (TClonesArray *) (fReader->GetAODBranchList())->FindObject(aodName);
258  }
259  else if (aodHandler->GetExtensions())
260  {
261  AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName());
262  if(ext){
263  AliAODEvent *aodEvent = ext->GetAOD();
264  TClonesArray * aodbranch = (TClonesArray*) aodEvent->FindListObject(aodName);
265  if(aodbranch) return aodbranch;
266  else {
267  if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName);
268  else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
269  }
270  }
271  else{//If no Delta AODs, kept in standard branch, to revise.
272  if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName);
273  else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
274  }
275  }
276  else{ //If no Delta AODs, kept in standard branch, to revise.
277  if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName);
278  else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
279  }
280 }
281 
282 //_____________________________________________________________
284 //_____________________________________________________________
286 {
287  return fReader->GetCTSTracks();
288 }
289 
290 //________________________________________________________________
292 //________________________________________________________________
294 {
295  return fReader->GetPHOSClusters();
296 }
297 
298 //_________________________________________________________________
300 //_________________________________________________________________
302 {
303  return fReader->GetEMCALClusters();
304 }
305 
306 //______________________________________________________________________
308 //______________________________________________________________________
310 {
311  return fReader->GetOutputEvent()->GetCaloClusters();
312 }
313 
314 //________________________________________________________________
316 //________________________________________________________________
318 {
319  return fReader->GetOutputEvent()->GetTracks();
320 }
321 
322 //____________________________________________________________
325 //____________________________________________________________
327 {
328  TString parList ; //this will be list of parameters used for this analysis.
329  const Int_t buffersize = 255;
330  char onePar[buffersize] ;
331  snprintf(onePar,buffersize,"--- AliAnaCaloTrackCorrBaseClass ---\n") ;
332  parList+=onePar ;
333  snprintf(onePar,buffersize,"Minimal P_t: %2.2f ; Max\n", fMinPt) ;
334  parList+=onePar ;
335  snprintf(onePar,buffersize,"Minimal P_t: %2.2f ; Max\n", fMaxPt) ;
336  parList+=onePar ;
337  snprintf(onePar,buffersize,"|t_{1}-t_{2}| < %2.2f ; Max\n", fPairTimeCut) ;
338  parList+=onePar ;
339  snprintf(onePar,buffersize,"fDataMC =%d (Check MC information, on/off) \n",fDataMC) ;
340  parList+=onePar ;
341  snprintf(onePar,buffersize,"fCheckFidCut=%d (Check Fiducial cut selection on/off) \n",fCheckFidCut) ;
342  parList+=onePar ;
343  snprintf(onePar,buffersize,"fCheckRealCaloAcc=%d (Check Real Calo Acceptance on/off) \n",fCheckRealCaloAcc) ;
344  parList+=onePar ;
345  snprintf(onePar,buffersize,"fCheckCaloPID =%d (Use Bayesian PID in calorimetes, on/off) \n",fCheckCaloPID) ;
346  parList+=onePar ;
347  snprintf(onePar,buffersize,"fRecalculateCaloPID =%d (Calculate PID from shower/tof/tracking parameters, on/off) \n",fRecalculateCaloPID) ;
348  parList+=onePar ;
349  snprintf(onePar,buffersize,"fInputAODName =%s Input AOD name \n",fInputAODName.Data()) ;
350  parList+=onePar ;
351  if(fNewAOD)
352  {
353  snprintf(onePar,buffersize,"fOutputAODName =%s Output AOD name \n",fOutputAODName.Data()) ;
354  parList+=onePar ;
355  snprintf(onePar,buffersize,"fOutputAODClassName =%s Output AOD class name \n",fOutputAODClassName.Data()) ;
356  parList+=onePar ;
357  }
358  snprintf(onePar,buffersize,"fAODObjArrayName =%s Reference arrays in AOD name \n",fAODObjArrayName.Data()) ;
359  parList+=onePar ;
360  snprintf(onePar,buffersize,"fAddToHistogramsName =%s String added to beginning of histograms name \n",fAddToHistogramsName.Data()) ;
361  parList+=onePar ;
362 
363  return parList;
364 }
365 
366 //_____________________________________________________________________
368 //_____________________________________________________________________
370 {
371  AliInfo(Form("Create AOD branch of %s objects and with name < %s >\n",
372  fOutputAODClassName.Data(),fOutputAODName.Data())) ;
373 
374  TClonesArray * aodBranch = new TClonesArray(fOutputAODClassName, 0);
375 
376  aodBranch->SetName(fOutputAODName);
377 
378  return aodBranch ;
379 }
380 
381 //________________________________________________________
383 //________________________________________________________
385 {
386  return fReader->GetEventNumber() ;
387 }
388 
389 //__________________________________________________________
391 //__________________________________________________________
393 {
394  return fReader->GetStack();
395 }
396 
397 //____________________________________________________________
399 //____________________________________________________________
401 {
402  return fReader->GetHeader();
403 }
404 
405 //____________________________________________________________________________
407 //____________________________________________________________________________
409 {
410  return fReader->GetGenEventHeader();
411 }
412 
413 //_________________________________________________________________
418 //_________________________________________________________________
420 {
421  //curCentrBin = (GetTrackMultiplicity()-1)/5;
422  //if(curCentrBin > GetNCentrBin()-1) curCentrBin=GetNCentrBin()-1;
423  Int_t trackMult = GetReader()->GetTrackMultiplicity();
424 
425  for(Int_t ibin = 0; ibin < GetNTrackMultBin()-1; ibin++)
426  {
427  if(trackMult >= fTrackMultBins[ibin] && trackMult < fTrackMultBins[ibin+1]) return ibin;
428  }
429 
430  AliWarning(Form("Bin not found for track multiplicity %d",trackMult));
431 
432  return -1;
433 }
434 
435 //________________________________________________________________
439 //________________________________________________________________
441 {
442  Int_t curCentrBin = 0;
443 
444  if(fUseTrackMultBins) // pp collisions
445  {
446  return GetTrackMultiplicityBin();
447  }
448  else // Set centrality based on centrality task, PbPb collisions
449  {
450  Float_t minCent = GetReader()->GetCentralityBin(0);
451  Float_t maxCent = GetReader()->GetCentralityBin(1);
452 
453  if((minCent< 0 && maxCent< 0) || minCent>=maxCent)
454  {
455  curCentrBin = GetEventCentrality() * GetNCentrBin() / GetReader()->GetCentralityOpt();
456  if(curCentrBin==GetNCentrBin())
457  {
458  curCentrBin = GetNCentrBin()-1;
459  AliDebug(1,Form("Centrality = %d, put it in last bin \n",GetEventCentrality()));
460  }
461  }
462  else
463  {
464  curCentrBin = (Int_t)((GetEventCentrality()-minCent) * GetNCentrBin() / (maxCent-minCent));
465  if(curCentrBin==GetNCentrBin()) curCentrBin = GetNCentrBin()-1;
466  }
467 
468  AliDebug(1,Form("Current CentrBin %d, centrality %d, n bins %d, max bin from centrality %d",
469  curCentrBin, GetEventCentrality(), GetNCentrBin(), GetReader()->GetCentralityOpt()));
470  }
471 
472  return curCentrBin;
473 }
474 
475 //_______________________________________________________
477 //_______________________________________________________
479 {
480  Int_t curRPBin = 0 ;
481 
482  if(GetNRPBin() > 1 && GetEventPlane())
483  {
484  Float_t epAngle = GetEventPlaneAngle();//->GetEventplane(GetEventPlaneMethod(),fReader->GetInputEvent());
485 
486  if(epAngle < 0 || epAngle >TMath::Pi())
487  {
488  AliWarning(Form("Wrong event plane angle : %f \n",epAngle));
489  return -1;
490  }
491 
492  curRPBin = TMath::Nint(epAngle*(GetNRPBin()-1)/TMath::Pi());
493  if(curRPBin >= GetNRPBin()) printf("RP Bin %d out of range %d",curRPBin,GetNRPBin());
494 
495  AliDebug(1,Form("Current RP bin %d, bin float %f, angle %f, n bins %d",
496  curRPBin,epAngle*(GetNRPBin()-1)/TMath::Pi(),epAngle,GetNRPBin()));
497  }
498 
499  return curRPBin ;
500 }
501 
502 //_______________________________________________________
505 //_______________________________________________________
507 {
508  Double_t v[3] = {0,0,0}; //vertex
509  GetReader()->GetVertex(v);
510 
511  Int_t curZvertBin = (Int_t)(0.5*GetNZvertBin()*(v[2]+GetZvertexCut())/GetZvertexCut());
512 
513  AliDebug(1,Form("AliAnaCaloTrackCorrBaseClass::GetEventVzBin() - %d, vz %2.2f, n bins %d",
514  curZvertBin, v[2], GetNZvertBin()));
515 
516  return curZvertBin;
517 }
518 
519 //________________________________________________________________________________________
521 //________________________________________________________________________________________
522 Int_t AliAnaCaloTrackCorrBaseClass::GetEventMixBin(Int_t iCen, Int_t iVz, Int_t iRP) const
523 {
524  if(iCen<0 || iVz < 0 || iRP < 0)
525  return -1;
526  else
527  return iCen*GetNZvertBin()*GetNRPBin()+iVz*GetNRPBin()+iRP;
528 }
529 
530 //________________________________________________________
532 //________________________________________________________
534 {
535  //Get vertex z bin
536  Int_t iVz = GetEventVzBin();
537 
538  // centrality (PbPb) or tracks multiplicity (pp) bin
539  Int_t iCen = GetEventCentralityBin();
540 
541  // reaction plane bin (PbPb)
542  Int_t iRP = GetEventRPBin();
543 
544  Int_t eventBin = GetEventMixBin(iCen, iVz, iRP);
545 
546  AliDebug(1,Form("Bins : cent %d, vz %d, RP %d, event %d/%d",
547  iCen,iVz, iRP, eventBin, GetNZvertBin()*GetNRPBin()*GetNCentrBin()));
548 
549  return eventBin;
550 }
551 
552 //____________________________________________
555 //____________________________________________
557 {
558  if( fDebug >= 0 )
559  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(this->ClassName(),fDebug);
560 
561  if( GetMCAnalysisUtils()->GetDebug() >= 0 )
562  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(GetMCAnalysisUtils()->ClassName(),GetMCAnalysisUtils()->GetDebug());
563 
564  if( GetIsolationCut()->GetDebug() >= 0 )
565  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(GetIsolationCut() ->ClassName(),GetIsolationCut()->GetDebug());
566 
567  //printf("Debug levels: Ana %d, MC %d, Iso %d\n",fDebug,GetMCAnalysisUtils()->GetDebug(),GetIsolationCut()->GetDebug());
568 }
569 
570 //_________________________________________________
572 //_________________________________________________
574 {
575  fDataMC = kFALSE;
576  fDebug = 0;
577  fCheckCaloPID = kTRUE ;
578  fCheckFidCut = kFALSE ;
579  fCheckRealCaloAcc = kFALSE ;
580  fRecalculateCaloPID = kFALSE ;
581  fMinPt = 0.2 ; //Min pt in particle analysis
582  fMaxPt = 300. ; //Max pt in particle analysis
583  fNZvertBin = 1;
584  fNrpBin = 1;
585 
586  fCalorimeterString = "EMCAL";
587  fCalorimeter = kEMCAL ;
588 
589  fTrackMultBins[0] = 0; fTrackMultBins[1] = 5; fTrackMultBins[2] = 10;
590  fTrackMultBins[3] = 15; fTrackMultBins[4] = 20; fTrackMultBins[5] = 30;
591  fTrackMultBins[6] = 40; fTrackMultBins[7] = 55; fTrackMultBins[8] = 70;
592  for(Int_t ibin=9; ibin < 20; ibin++) fTrackMultBins[ibin] = 10000;
593 
594  //fReader = new AliCaloTrackReader(); //Initialized in maker
595  //fCaloUtils = new AliCalorimeterUtils();//Initialized in maker
596 
597  fNewAOD = kFALSE ;
598  fOutputAODName = "CaloTrackCorr";
599  fOutputAODClassName = "AliAODPWG4Particle";
600  fInputAODName = "CaloTrackCorr";
602  fAODObjArrayName = "Ref";
603 }
604 
605 //__________________________________________________________________
607 //__________________________________________________________________
608 void AliAnaCaloTrackCorrBaseClass::Print(const Option_t * opt) const
609 {
610  if(! opt)
611  return;
612 
613  printf("New AOD: = %d\n", fNewAOD);
614  printf("Input AOD name: = %s\n", fInputAODName.Data());
615  printf("Output AOD name: = %s\n", fOutputAODName.Data());
616  printf("Output AOD Class name: = %s\n", fOutputAODClassName.Data());
617  printf("Name of reference array : %s\n", fAODObjArrayName.Data());
618  printf("String added histograms name : %s\n", fAddToHistogramsName.Data());
619 
620  printf("Min Photon pT = %2.2f\n", fMinPt) ;
621  printf("Max Photon pT = %3.2f\n", fMaxPt) ;
622  printf("Check PID = %d\n", fCheckCaloPID) ;
623  printf("Recalculate PID = %d\n", fRecalculateCaloPID) ;
624  printf("Check Fiducial cut = %d\n", fCheckFidCut) ;
625  printf("Check Real Calo Acc = %d\n", fCheckRealCaloAcc) ;
626  printf("Check MC labels = %d\n", fDataMC);
627  printf("Make plots? = %d\n", fMakePlots);
628  printf("Debug Level = %d\n", fDebug);
629 
630  printf(" \n") ;
631 }
632 
633 //_______________________________________________________________
635 //_______________________________________________________________
637 {
638  fCalorimeterString = calo;
639 
640  if (calo=="EMCAL") fCalorimeter = kEMCAL;
641  else if(calo=="PHOS" ) fCalorimeter = kPHOS;
642  else if(calo=="CTS") fCalorimeter = kCTS;
643  else if(calo=="DCAL") fCalorimeter = kDCAL;
644  else if(calo.Contains("DCAL") && calo.Contains("PHOS")) fCalorimeter = kDCALPHOS;
645  else AliFatal(Form("Detector < %s > not known!", calo.Data()));
646 
647 }
648 
649 //_______________________________________________________________
651 //_______________________________________________________________
653 {
654  fCalorimeter = calo;
655 
656  if (calo==kEMCAL) fCalorimeterString = "EMCAL";
657  else if(calo==kPHOS ) fCalorimeterString = "PHOS";
658  else if(calo==kCTS) fCalorimeterString = "CTS";
659  else if(calo==kDCAL) fCalorimeterString = "DCAL";
660  else if(calo==kDCALPHOS) fCalorimeterString = "DCAL_PHOS";
661  else AliFatal(Form("Detector < %d > not known!", calo));
662 }
663 
664 
AliFiducialCut * fFidCut
Acceptance cuts detector dependent.
TString fOutputAODName
Name of output AOD branch.
virtual AliHeader * GetMCHeader() const
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
virtual ~AliAnaCaloTrackCorrBaseClass()
Destructor.
Int_t GetDebug() const
virtual TObjArray * GetCTSTracks() const
virtual void InitParameters()
Initialize the parameters of the analysis.
virtual AliHeader * GetHeader() const
Int_t fTrackMultBins[20]
Multiplicity bins limits. Number of bins set with SetNTrackMult() that calls SetNCentrBin().
Bool_t fCheckFidCut
Do analysis for clusters in defined region.
virtual void GetVertex(Double_t vertex[3]) const
virtual TObjArray * GetEMCALClusters() const
Bool_t WriteDeltaAODToFile() const
virtual AliVEvent * GetInputEvent() const
virtual void SetCalorimeter(TString &calo)
Set the calorimeter for the analysis. A string.
virtual AliIsolationCut * GetIsolationCut()
virtual Double_t GetEventPlaneAngle() const
Bool_t fRecalculateCaloPID
Recalculate PID or use PID weights in calorimeters.
Float_t fPairTimeCut
Maximum difference between time of cluster pairs (ns).
AliHistogramRanges * fHisto
Histogram ranges container.
virtual AliGenEventHeader * GetGenEventHeader() const
virtual AliGenEventHeader * GetMCGenEventHeader() const
TString fInputAODName
Name of input AOD branch.
virtual AliVCluster * FindCluster(TObjArray *clusters, const Int_t id, Int_t &iclus, const Int_t first=0)
virtual void GetVertex(Double_t v[3]) const
AliCaloTrackReader * fReader
Access to ESD/AOD/MC data and other utilities.
TString fCalorimeterString
Calorimeter selection.
virtual Float_t GetCentralityBin(Int_t i) const
virtual Int_t GetEventNumber() const
Base class for CaloTrackCorr analysis algorithms.
virtual TList * GetAODBranchList() const
TClonesArray * fInputAODBranch
! Selected input particles branch.
Float_t fMinPt
Maximum pt of (trigger) particles in the analysis.
Bool_t fUseTrackMultBins
Use track multiplicity and not centrality bins in mixing.
virtual TClonesArray * GetAODBranch(const TString &aodBranchName) const
Recover ouput and input AOD pointers for each event in AliCaloTrackMaker.
virtual Int_t GetCentralityOpt() const
virtual AliAODEvent * GetOutputEvent() const
AliIsolationCut * fIC
Isolation cut utils.
Float_t fMaxPt
Minimum pt of (trigger) particles in the analysis.
Int_t GetDebug() const
virtual AliEventplane * GetEventPlane() const
Bool_t fCheckRealCaloAcc
When analysis of MC particle kinematics, check their hit in Calorimeter in Real Geometry or use AliFi...
TString fOutputAODClassName
Type of aod objects to be stored in the TClonesArray (AliAODPWG4Particle, AliAODPWG4ParticleCorrelati...
virtual TObjArray * GetPHOSClusters() const
virtual TObjArray * GetPHOSClusters() const
virtual TClonesArray * GetAODCaloClusters() const
virtual void AddAODParticle(AliAODPWG4Particle part)
virtual AliStack * GetStack() const
Bool_t fNewAOD
Flag, new aod branch added to the analysis or not.
AliMCAnalysisUtils * fMCUtils
MonteCarlo Analysis utils.
virtual TClonesArray * GetCreateOutputAODBranch()
Create AOD branch filled in the analysis.
virtual AliMCAnalysisUtils * GetMCAnalysisUtils()
AliCaloPID * fCaloPID
PID calculation utils.
Int_t fNrpBin
Number of bins in event container for reaction plain.
AliNeutralMesonSelection * fNMS
Neutral Meson Selection utities.
virtual void Print(const Option_t *) const
Print some relevant parameters set for the analysis.
Bool_t fDataMC
Flag to access MC data when using ESD or AOD.
TClonesArray * fOutputAODBranch
! Selected output particles branch.
virtual TClonesArray * GetAODTracks() const
virtual AliCaloTrackReader * GetReader() const
Int_t fNZvertBin
Number of bins in event container for vertex position.
Bool_t fCheckCaloPID
Do analysis for calorimeters.
Int_t fCalorimeter
Calorimeter selection.
TString fAddToHistogramsName
Add this string to histograms name.
Int_t GetTrackMultiplicity() const
virtual TObjArray * GetEMCALClusters() const
virtual Int_t CheckMixedEventVertex(Int_t caloLabel, Int_t trackLabel)
TString fAODObjArrayName
Name of ref array kept in a TList in AliAODParticleCorrelation with clusters or track. references.
virtual AliMixedEvent * GetMixedEvent() const
virtual TObjArray * GetCTSTracks() const