AliPhysics  cdeda5a (cdeda5a)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 #include "AliMCEvent.h"
34 
38 
39 //__________________________________________________________
42 //__________________________________________________________
44 TObject(),
45 fDataMC(0), fDebug(0),
46 fCalorimeter(-1), fCalorimeterString(""),
47 fCheckFidCut(0), fCheckRealCaloAcc(0),
48 fCheckCaloPID(0), fRecalculateCaloPID(0),
49 fMinPt(0), fMaxPt(0),
50 fPairTimeCut(200), fTRDSMCovered(-1),
51 fNZvertBin(0), fNrpBin(0),
52 fNCentrBin(0), fNmaxMixEv(0),
53 fDoOwnMix(0), fUseTrackMultBins(0),
54 fFillPileUpHistograms(0), fFillHighMultHistograms(0),
55 fMakePlots(kFALSE),
56 fInputAODBranch(0x0), fInputAODName(""),
57 fOutputAODBranch(0x0), fNewAOD(kFALSE),
58 fOutputAODName(""), fOutputAODClassName(""),
59 fAODObjArrayName(""), fAddToHistogramsName(""),
60 fCaloPID(0x0), fCaloUtils(0x0),
61 fFidCut(0x0), fHisto(0x0),
62 fIC(0x0), fMCUtils(0x0),
63 fNMS(0x0), fReader(0x0),
64 fStudyClusterOverlapsPerGenerator(0),
65 fNCocktailGenNames(0)
66 {
68 }
69 
70 //___________________________________________________________
72 //___________________________________________________________
74 {
75  //delete fCaloUtils ; //Already deleted in maker
76  //delete fReader ; //Already deleted in maker
77 
78  delete fCaloPID ;
79  delete fFidCut ;
80  delete fIC ;
81  delete fMCUtils ;
82  delete fNMS ;
83  delete fHisto ;
84 }
85 
86 //______________________________________________________________________
89 //______________________________________________________________________
91 {
92  if(!fOutputAODBranch)
93  {
94  AliFatal("No AOD branch available!!!\n");
95  return; // coverity
96  }
97 
98  Int_t i = fOutputAODBranch->GetEntriesFast();
99  //new((*fOutputAODBranch)[i]) AliAODPWG4Particle(pc);
100  if (strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4Particle")==0)
101  {
102  new((*fOutputAODBranch)[i]) AliAODPWG4Particle(pc);
103  }
104  else if(strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4ParticleCorrelation")==0)
105  {
106  new((*fOutputAODBranch)[i]) AliAODPWG4ParticleCorrelation(pc);
107  }
108  else
109  {
110  AliFatal(Form("Cannot add an object of type < %s >, to the AOD TClonesArray \n", fOutputAODBranch->GetClass()->GetName()));
111  }
112 }
113 
114 //__________________________________________________________________________________________
119 //__________________________________________________________________________________________
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 
145 //________________________________________________________________
148 //________________________________________________________________
150 {
151  AliDebug(3,Form("AliAnaCaloTrackCorrBaseClass::ConnectInputOutputAODBranches() - Connect Input with name: <%s>; Connect output with name <%s>\n",fInputAODName.Data(),fOutputAODName.Data()));
152 
153  //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs
154  AliAODHandler* aodHandler = 0x0;
155  Bool_t outAOD = kFALSE;
156  if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE;
157  if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
158  else aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
159 
161  {
164  }
165  else if (aodHandler->GetExtensions())
166  {
167  AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName());
168  if(ext)
169  {
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
177  { // If no Delta AODs, kept in standard branch, to revise.
178  if(fNewAOD && fReader->GetOutputEvent())
179  {
180  fOutputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName);
181  fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);
182  }
183  else
184  {
185  fInputAODBranch = (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName);
187  fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event.
188  }
189  }
190  }
191  else
192  { // If no Delta AODs, kept in standard branch
193  if(fNewAOD && fReader->GetOutputEvent())
194  {
195  fOutputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName);
196  fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);
197  }
198  else
199  {
200  fInputAODBranch = (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName);
202  fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event.
203  }
204  }
205 
206 // if(GetDebug() > 1)
207 // {
208 // if(fNewAOD && !fOutputAODBranch)
209 // AliInfo(Form("Output Branch <%s>, not found!\n",fOutputAODName.Data()));
210 // if(!fNewAOD && !fInputAODBranch)
211 // AliInfo(Form("Input Branch <%s>, not found!\n",fInputAODName.Data()));
212 // }
213 }
214 
215 //_____________________________________________________________________________________
223 //_____________________________________________________________________________________
225  Int_t & iclus, Int_t first)
226 {
227  if ( !clusters ) return 0x0;
228 
229  for(iclus = first; iclus < clusters->GetEntriesFast(); iclus++)
230  {
231  AliVCluster *cluster= dynamic_cast<AliVCluster*> (clusters->At(iclus));
232  if ( cluster )
233  {
234  if ( cluster->GetID() == clId )
235  {
236  return cluster;
237  }
238  }
239  }// calorimeter clusters loop
240 
241  return 0x0;
242 }
243 
244 //______________________________________________________________________________________
246 //______________________________________________________________________________________
247 TClonesArray * AliAnaCaloTrackCorrBaseClass::GetAODBranch(const TString & aodName) const
248 {
249  AliDebug(3,Form("AliAnaCaloTrackCorrBaseClass::GetAODBranch() - Get Input Branch with name: <%s>; \n",aodName.Data()));
250 
251  //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs
252  AliAODHandler* aodHandler = 0x0;
253  Bool_t outAOD = kFALSE;
254  if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE;
255  if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
256  else aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
257 
259  {
260  return (TClonesArray *) (fReader->GetAODBranchList())->FindObject(aodName);
261  }
262  else if (aodHandler->GetExtensions())
263  {
264  AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName());
265  if(ext){
266  AliAODEvent *aodEvent = ext->GetAOD();
267  TClonesArray * aodbranch = (TClonesArray*) aodEvent->FindListObject(aodName);
268  if(aodbranch) return aodbranch;
269  else {
270  if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName);
271  else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
272  }
273  }
274  else{//If no Delta AODs, kept in standard branch, to revise.
275  if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName);
276  else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
277  }
278  }
279  else{ //If no Delta AODs, kept in standard branch, to revise.
280  if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName);
281  else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName);
282  }
283 }
284 
285 //_____________________________________________________________
287 //_____________________________________________________________
289 {
290  return fReader->GetCTSTracks();
291 }
292 
293 //________________________________________________________________
295 //________________________________________________________________
297 {
298  return fReader->GetPHOSClusters();
299 }
300 
301 //_________________________________________________________________
303 //_________________________________________________________________
305 {
306  return fReader->GetEMCALClusters();
307 }
308 
309 //______________________________________________________________________
311 //______________________________________________________________________
313 {
314  return fReader->GetOutputEvent()->GetCaloClusters();
315 }
316 
317 //________________________________________________________________
319 //________________________________________________________________
321 {
322  return fReader->GetOutputEvent()->GetTracks();
323 }
324 
325 //____________________________________________________________
328 //____________________________________________________________
330 {
331  TString parList ; //this will be list of parameters used for this analysis.
332  const Int_t buffersize = 255;
333  char onePar[buffersize] ;
334  snprintf(onePar,buffersize,"--- AliAnaCaloTrackCorrBaseClass ---\n") ;
335  parList+=onePar ;
336  snprintf(onePar,buffersize,"Minimal P_t: %2.2f ; Max\n", fMinPt) ;
337  parList+=onePar ;
338  snprintf(onePar,buffersize,"Minimal P_t: %2.2f ; Max\n", fMaxPt) ;
339  parList+=onePar ;
340  snprintf(onePar,buffersize,"|t_{1}-t_{2}| < %2.2f ; Max\n", fPairTimeCut) ;
341  parList+=onePar ;
342  snprintf(onePar,buffersize,"fDataMC =%d (Check MC information, on/off) \n",fDataMC) ;
343  parList+=onePar ;
344  snprintf(onePar,buffersize,"fCheckFidCut=%d (Check Fiducial cut selection on/off) \n",fCheckFidCut) ;
345  parList+=onePar ;
346  snprintf(onePar,buffersize,"fCheckRealCaloAcc=%d (Check Real Calo Acceptance on/off) \n",fCheckRealCaloAcc) ;
347  parList+=onePar ;
348  snprintf(onePar,buffersize,"fCheckCaloPID =%d (Use Bayesian PID in calorimetes, on/off) \n",fCheckCaloPID) ;
349  parList+=onePar ;
350  snprintf(onePar,buffersize,"fRecalculateCaloPID =%d (Calculate PID from shower/tof/tracking parameters, on/off) \n",fRecalculateCaloPID) ;
351  parList+=onePar ;
352  snprintf(onePar,buffersize,"fInputAODName =%s Input AOD name \n",fInputAODName.Data()) ;
353  parList+=onePar ;
354  if(fNewAOD)
355  {
356  snprintf(onePar,buffersize,"fOutputAODName =%s Output AOD name \n",fOutputAODName.Data()) ;
357  parList+=onePar ;
358  snprintf(onePar,buffersize,"fOutputAODClassName =%s Output AOD class name \n",fOutputAODClassName.Data()) ;
359  parList+=onePar ;
360  }
361  snprintf(onePar,buffersize,"fAODObjArrayName =%s Reference arrays in AOD name \n",fAODObjArrayName.Data()) ;
362  parList+=onePar ;
363  snprintf(onePar,buffersize,"fAddToHistogramsName =%s String added to beginning of histograms name \n",fAddToHistogramsName.Data()) ;
364  parList+=onePar ;
365 
366  return parList;
367 }
368 
369 //_____________________________________________________________________
377 //_____________________________________________________________________
379  TString & genName, TString & genNameBkg)
380 {
381  if(cluster->GetNLabels() == 0 || cluster->GetLabel() < 0 ) return -1;
382 
383  (GetReader()->GetMC())->GetCocktailGenerator(cluster->GetLabel(), genName);
384 
385  //printf("Generator?: %s\n",genName.Data());
386 
387  Bool_t overlapGener = kFALSE;
388  Bool_t overlapGenerHIJING = kFALSE;
389  Bool_t overlapGenerOther = kFALSE;
390 
391  genNameBkg = "";
392 
393  const UInt_t nlabels = cluster->GetNLabels();
394  //Int_t noverlapsGen = 0;
395  //TString genName2Prev = genName;
396  for(UInt_t ilabel = 1; ilabel < nlabels; ilabel++)
397  {
398  Int_t label2 = cluster->GetLabels()[ilabel];
399  TString genName2;
400  (GetReader()->GetMC())->GetCocktailGenerator(label2,genName2);
401 
402  //if(genName2 != genName2Prev) noverlapsGen++;
403 
404  if(genName2 != genName)
405  {
406  //genName2Prev = genName2;
407 
408  if(!genNameBkg.Contains(genName2))
409  genNameBkg = Form("%s_%s",genNameBkg.Data(), genName2.Data());
410 
411  overlapGener = kTRUE;
412 
413  if( genName2.Contains("ijing") && !genName.Contains("ijing"))
414  overlapGenerHIJING = kTRUE;
415 
416  if(!genName2.Contains("ijing"))
417  overlapGenerOther = kTRUE;
418  }
419  }
420 
421  if ( !overlapGener ) return 0;
422  else if ( overlapGenerHIJING && !overlapGenerOther) return 1;
423  else if ( !overlapGenerHIJING && overlapGenerOther) return 2;
424  else if ( overlapGenerHIJING && overlapGenerOther) return 3;
425  else return 4;
426 }
427 
428 //_____________________________________________________________________
430 //_____________________________________________________________________
432 {
433  AliInfo(Form("Create AOD branch of %s objects and with name < %s >\n",
434  fOutputAODClassName.Data(),fOutputAODName.Data())) ;
435 
436  TClonesArray * aodBranch = new TClonesArray(fOutputAODClassName, 0);
437 
438  aodBranch->SetName(fOutputAODName);
439 
440  return aodBranch ;
441 }
442 
443 //________________________________________________________
445 //________________________________________________________
447 {
448  return fReader->GetEventNumber() ;
449 }
450 
451 //__________________________________________________________
453 //__________________________________________________________
455 {
456  return fReader->GetStack();
457 }
458 
459 //____________________________________________________________
461 //____________________________________________________________
463 {
464  return fReader->GetHeader();
465 }
466 
467 //____________________________________________________________________________
469 //____________________________________________________________________________
471 {
472  return fReader->GetGenEventHeader();
473 }
474 
475 //_________________________________________________________________
480 //_________________________________________________________________
482 {
483  //curCentrBin = (GetTrackMultiplicity()-1)/5;
484  //if(curCentrBin > GetNCentrBin()-1) curCentrBin=GetNCentrBin()-1;
485  Int_t trackMult = GetReader()->GetTrackMultiplicity();
486 
487  for(Int_t ibin = 0; ibin < GetNTrackMultBin()-1; ibin++)
488  {
489  if(trackMult >= fTrackMultBins[ibin] && trackMult < fTrackMultBins[ibin+1]) return ibin;
490  }
491 
492  AliWarning(Form("Bin not found for track multiplicity %d",trackMult));
493 
494  return -1;
495 }
496 
497 //________________________________________________________________
501 //________________________________________________________________
503 {
504  Int_t curCentrBin = 0;
505 
506  if(fUseTrackMultBins) // pp collisions
507  {
508  return GetTrackMultiplicityBin();
509  }
510  else // Set centrality based on centrality task, PbPb collisions
511  {
512  Float_t minCent = GetReader()->GetCentralityBin(0);
513  Float_t maxCent = GetReader()->GetCentralityBin(1);
514 
515  if((minCent< 0 && maxCent< 0) || minCent>=maxCent)
516  {
517  curCentrBin = GetEventCentrality() * GetNCentrBin() / GetReader()->GetCentralityOpt();
518  if(curCentrBin==GetNCentrBin())
519  {
520  curCentrBin = GetNCentrBin()-1;
521  AliDebug(1,Form("Centrality = %d, put it in last bin \n",GetEventCentrality()));
522  }
523  }
524  else
525  {
526  curCentrBin = (Int_t)((GetEventCentrality()-minCent) * GetNCentrBin() / (maxCent-minCent));
527  if(curCentrBin==GetNCentrBin()) curCentrBin = GetNCentrBin()-1;
528  }
529 
530  AliDebug(1,Form("Current CentrBin %d, centrality %d, n bins %d, max bin from centrality %d",
531  curCentrBin, GetEventCentrality(), GetNCentrBin(), GetReader()->GetCentralityOpt()));
532  }
533 
534  return curCentrBin;
535 }
536 
537 //_______________________________________________________
539 //_______________________________________________________
541 {
542  Int_t curRPBin = 0 ;
543 
544  if(GetNRPBin() > 1 && GetEventPlane())
545  {
546  Float_t epAngle = GetEventPlaneAngle();//->GetEventplane(GetEventPlaneMethod(),fReader->GetInputEvent());
547 
548  if(epAngle < 0 || epAngle >TMath::Pi())
549  {
550  AliWarning(Form("Wrong event plane angle : %f \n",epAngle));
551  return -1;
552  }
553 
554  curRPBin = TMath::Nint(epAngle*(GetNRPBin()-1)/TMath::Pi());
555  if(curRPBin >= GetNRPBin()) printf("RP Bin %d out of range %d",curRPBin,GetNRPBin());
556 
557  AliDebug(1,Form("Current RP bin %d, bin float %f, angle %f, n bins %d",
558  curRPBin,epAngle*(GetNRPBin()-1)/TMath::Pi(),epAngle,GetNRPBin()));
559  }
560 
561  return curRPBin ;
562 }
563 
564 //_______________________________________________________
567 //_______________________________________________________
569 {
570  Double_t v[3] = {0,0,0}; //vertex
571  GetReader()->GetVertex(v);
572 
573  Int_t curZvertBin = (Int_t)(0.5*GetNZvertBin()*(v[2]+GetZvertexCut())/GetZvertexCut());
574 
575  AliDebug(1,Form("AliAnaCaloTrackCorrBaseClass::GetEventVzBin() - %d, vz %2.2f, n bins %d",
576  curZvertBin, v[2], GetNZvertBin()));
577 
578  return curZvertBin;
579 }
580 
581 //________________________________________________________________________________________
583 //________________________________________________________________________________________
585 {
586  if(iCen<0 || iVz < 0 || iRP < 0)
587  return -1;
588  else
589  return iCen*GetNZvertBin()*GetNRPBin()+iVz*GetNRPBin()+iRP;
590 }
591 
592 //________________________________________________________
594 //________________________________________________________
596 {
597  //Get vertex z bin
598  Int_t iVz = GetEventVzBin();
599 
600  // centrality (PbPb) or tracks multiplicity (pp) bin
601  Int_t iCen = GetEventCentralityBin();
602 
603  // reaction plane bin (PbPb)
604  Int_t iRP = GetEventRPBin();
605 
606  Int_t eventBin = GetEventMixBin(iCen, iVz, iRP);
607 
608  AliDebug(1,Form("Bins : cent %d, vz %d, RP %d, event %d/%d",
609  iCen,iVz, iRP, eventBin, GetNZvertBin()*GetNRPBin()*GetNCentrBin()));
610 
611  return eventBin;
612 }
613 
614 //____________________________________________
617 //____________________________________________
619 {
620  if( fDebug >= 0 )
621  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(this->ClassName(),fDebug);
622 
623  if( GetMCAnalysisUtils()->GetDebug() >= 0 )
624  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(GetMCAnalysisUtils()->ClassName(),GetMCAnalysisUtils()->GetDebug());
625 
626  if( GetIsolationCut()->GetDebug() >= 0 )
627  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(GetIsolationCut()->ClassName(),GetIsolationCut()->GetDebug());
628 
629  if( GetNeutralMesonSelection()->GetDebug() >= 0 )
630  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(GetNeutralMesonSelection()->ClassName(),GetNeutralMesonSelection()->GetDebug());
631 
632  //printf("Debug levels: Ana %d, MC %d, Iso %d\n",fDebug,GetMCAnalysisUtils()->GetDebug(),GetIsolationCut()->GetDebug());
633 }
634 
635 //_________________________________________________
637 //_________________________________________________
639 {
640  fDataMC = kFALSE;
641  fDebug = 0;
642  fCheckCaloPID = kTRUE ;
643  fCheckFidCut = kFALSE ;
644  fCheckRealCaloAcc = kFALSE ;
645  fRecalculateCaloPID = kFALSE ;
646  fMinPt = 0.2 ; //Min pt in particle analysis
647  fMaxPt = 300. ; //Max pt in particle analysis
648  fNZvertBin = 1;
649  fNrpBin = 1;
650 
651  fCalorimeterString = "EMCAL";
652  fCalorimeter = kEMCAL ;
653 
654  fTrackMultBins[0] = 0; fTrackMultBins[1] = 5; fTrackMultBins[2] = 10;
655  fTrackMultBins[3] = 15; fTrackMultBins[4] = 20; fTrackMultBins[5] = 30;
656  fTrackMultBins[6] = 40; fTrackMultBins[7] = 55; fTrackMultBins[8] = 70;
657  for(Int_t ibin=9; ibin < 20; ibin++) fTrackMultBins[ibin] = 10000;
658 
659  //fReader = new AliCaloTrackReader(); //Initialized in maker
660  //fCaloUtils = new AliCalorimeterUtils();//Initialized in maker
661 
662  fNewAOD = kFALSE ;
663  fOutputAODName = "CaloTrackCorr";
664  fOutputAODClassName = "AliAODPWG4Particle";
665  fInputAODName = "CaloTrackCorr";
667  fAODObjArrayName = "Ref";
668 
669  fNCocktailGenNames = 7;
670  // Order matters, here cocktail of MC LHC14a1a
671  fCocktailGenNames[0] = ""; // First must be always empty
672  fCocktailGenNames[1] = "pi0EMC";
673  fCocktailGenNames[2] = "pi0";
674  fCocktailGenNames[3] = "etaEMC";
675  fCocktailGenNames[4] = "eta";
676  fCocktailGenNames[5] = "hijing";
677  fCocktailGenNames[6] = "other";
678 
679  for(Int_t igen = 7; igen < 10; igen++)
680  fCocktailGenNames[igen] = "";
681 }
682 
683 //__________________________________________________________________
685 //__________________________________________________________________
687 {
688  if(! opt)
689  return;
690 
691  printf("New AOD: = %d\n", fNewAOD);
692  printf("Input AOD name: = %s\n", fInputAODName.Data());
693  printf("Output AOD name: = %s\n", fOutputAODName.Data());
694  printf("Output AOD Class name: = %s\n", fOutputAODClassName.Data());
695  printf("Name of reference array : %s\n", fAODObjArrayName.Data());
696  printf("String added histograms name : %s\n", fAddToHistogramsName.Data());
697 
698  printf("Min Photon pT = %2.2f\n", fMinPt) ;
699  printf("Max Photon pT = %3.2f\n", fMaxPt) ;
700  printf("Check PID = %d\n", fCheckCaloPID) ;
701  printf("Recalculate PID = %d\n", fRecalculateCaloPID) ;
702  printf("Check Fiducial cut = %d\n", fCheckFidCut) ;
703  printf("Check Real Calo Acc = %d\n", fCheckRealCaloAcc) ;
704  printf("Check MC labels = %d\n", fDataMC);
705  printf("Make plots? = %d\n", fMakePlots);
706  printf("Debug Level = %d\n", fDebug);
707 
708  printf(" \n") ;
709 }
710 
711 //_______________________________________________________________
713 //_______________________________________________________________
715 {
716  fCalorimeterString = calo;
717 
718  if (calo=="EMCAL") fCalorimeter = kEMCAL;
719  else if(calo=="PHOS" ) fCalorimeter = kPHOS;
720  else if(calo=="CTS") fCalorimeter = kCTS;
721  else if(calo=="DCAL") fCalorimeter = kDCAL;
722  else if(calo.Contains("DCAL") && calo.Contains("PHOS")) fCalorimeter = kDCALPHOS;
723  else AliFatal(Form("Detector < %s > not known!", calo.Data()));
724 
725 }
726 
727 //_______________________________________________________________
729 //_______________________________________________________________
731 {
732  fCalorimeter = calo;
733 
734  if (calo==kEMCAL) fCalorimeterString = "EMCAL";
735  else if(calo==kPHOS ) fCalorimeterString = "PHOS";
736  else if(calo==kCTS) fCalorimeterString = "CTS";
737  else if(calo==kDCAL) fCalorimeterString = "DCAL";
738  else if(calo==kDCALPHOS) fCalorimeterString = "DCAL_PHOS";
739  else AliFatal(Form("Detector < %d > not known!", calo));
740 }
741 
742 
AliFiducialCut * fFidCut
Acceptance cuts detector dependent.
TString fOutputAODName
Name of output AOD branch.
virtual AliHeader * GetMCHeader() const
virtual AliMCEvent * GetMC() const
virtual ~AliAnaCaloTrackCorrBaseClass()
Destructor.
Int_t GetDebug() const
virtual TObjArray * GetCTSTracks() const
virtual void InitParameters()
Initialize the parameters of the analysis.
double Double_t
Definition: External.C:58
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 Int_t GetNTrackMultBin() const
Number of bins in centrality.
virtual AliIsolationCut * GetIsolationCut()
virtual Float_t GetZvertexCut() const
Maximal number of events for mixin.
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 AliNeutralMesonSelection * GetNeutralMesonSelection()
Int_t GetCocktailGeneratorBackgroundTag(AliVCluster *clus, TString &genName, TString &genNameBkg)
virtual AliGenEventHeader * GetGenEventHeader() const
virtual AliGenEventHeader * GetMCGenEventHeader() const
TString fInputAODName
Name of input AOD branch.
virtual void GetVertex(Double_t v[3]) const
TString fCocktailGenNames[10]
Array with name of generators to study, first must be always empty.
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.
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
virtual TList * GetAODBranchList() const
float Float_t
Definition: External.C:68
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...
Bool_t outAOD
Definition: ana.C:66
TString fOutputAODClassName
Type of aod objects to be stored in the TClonesArray (AliAODPWG4Particle, AliAODPWG4ParticleCorrelati...
virtual Int_t GetNCentrBin() const
Number of bins in reaction plain.
virtual TObjArray * GetPHOSClusters() const
virtual TObjArray * GetPHOSClusters() const
TObject * FindObject(int bin, const char *nameH, const TList *lst, Bool_t normPerEvent=kTRUE)
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.
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
virtual Int_t GetNRPBin() const
Number of bins in vertex.
virtual TClonesArray * GetCreateOutputAODBranch()
Create AOD branch filled in the analysis.
virtual AliMCAnalysisUtils * GetMCAnalysisUtils()
AliCaloPID * fCaloPID
PID calculation utils.
Int_t fNCocktailGenNames
Number of generators to study.
virtual Int_t GetTrackMultiplicityBin() const
Cut on vertex position.
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.
const char Option_t
Definition: External.C:48
virtual TClonesArray * GetAODTracks() const
virtual AliVCluster * FindCluster(TObjArray *clusters, Int_t clId, Int_t &iclus, Int_t first=0)
virtual AliCaloTrackReader * GetReader() const
bool Bool_t
Definition: External.C:53
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
DCal, not used so far, just in case.
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