AliPhysics  32e057f (32e057f)
AliAnaCaloTrackCorrMaker.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 #include <cstdlib>
17 
18 // --- ROOT system ---
19 #include <TClonesArray.h>
20 #include <TList.h>
21 #include <TH1F.h>
22 //#include <TObjectTable.h>
23 #include <TGeoGlobalMagField.h>
24 
25 //---- AliRoot system ----
26 #include "AliAnalysisManager.h"
27 #include "AliInputEventHandler.h"
28 #include "AliESDEvent.h"
29 #include "AliAODEvent.h"
32 #include "AliLog.h"
33 #include "AliGenPythiaEventHeader.h"
34 
36 ClassImp(AliAnaCaloTrackCorrMaker) ;
38 
39 //__________________________________________________
42 //__________________________________________________
44 TObject(),
45 fReader(0), fCaloUtils(0),
46 fOutputContainer(new TList ), fAnalysisContainer(new TList ),
47 fProcessEvent(1),
48 fMakeHisto(kFALSE), fMakeAOD(kFALSE),
49 fAnaDebug(0), fCuts(new TList),
50 fScaleFactor(-1),
51 fFillDataControlHisto(1), fSumw2(0),
52 fCheckPtHard(0),
53 // Control histograms
54 fhNEventsIn(0), fhNEvents(0),
55 fhNExoticEvents(0), fhNEventsNoTriggerFound(0),
56 fhNPileUpEvents(0), fhNPileUpEventsTriggerBC0(0),
57 fhXVertex(0), fhYVertex(0), fhZVertex(0),
58 fhXVertexExotic(0), fhYVertexExotic(0), fhZVertexExotic(0),
59 fhPtHard(0), fhPtHardWeighted(0),
60 fhPileUpClusterMult(0), fhPileUpClusterMultAndSPDPileUp(0),
61 fhTrackMult(0),
62 fhCentrality(0), fhEventPlaneAngle(0),
63 fhNEventsWeighted(0), fhTrackMultWeighted(0),
64 fhCentralityWeighted(0), fhEventPlaneAngleWeighted(0),
65 fhNMergedFiles(0), fhScaleFactor(0),
66 fhEMCalBCEvent(0), fhEMCalBCEventCut(0),
67 fhTrackBCEvent(0), fhTrackBCEventCut(0),
68 fhPrimaryVertexBC(0), fhTimeStampFraction(0),
69 fhNPileUpVertSPD(0), fhNPileUpVertTracks(0),
70 // EMCal trigger control histograms
71 fhClusterTriggerBC(0), fhClusterTriggerBCExotic(0),
72 fhClusterTriggerBCBadCell(0), fhClusterTriggerBCBadCellExotic(0),
73 fhClusterTriggerBCBadCluster(0), fhClusterTriggerBCBadClusterExotic(0),
74 fhClusterTriggerBCUnMatch(0), fhClusterTriggerBCExoticUnMatch(0),
75 fhClusterTriggerBCBadCellUnMatch(0), fhClusterTriggerBCBadCellExoticUnMatch(0),
76 fhClusterTriggerBCBadClusterUnMatch(0), fhClusterTriggerBCBadClusterExoticUnMatch(0),
77 fhClusterTriggerBCEventBC(0), fhClusterTriggerBCEventBCUnMatch(0),
78 fhClusterTriggerBCExoticEventBC(0), fhClusterTriggerBCExoticEventBCUnMatch(0)
79 {
80  AliDebug(1,"*** Analysis Maker Constructor ***");
81 
82  for(Int_t i = 0; i < 3; i++)
83  {
86  }
87 
89 }
90 
91 //________________________________________________________________________________________
93 //________________________________________________________________________________________
95 TObject(),
96 fReader(), //(new AliCaloTrackReader(*maker.fReader)),
97 fCaloUtils(),//(new AliCalorimeterUtils(*maker.fCaloUtils)),
100 fMakeHisto(maker.fMakeHisto), fMakeAOD(maker.fMakeAOD),
101 fAnaDebug(maker.fAnaDebug), fCuts(new TList()),
104 fSumw2(maker.fSumw2),
106 fhNEventsIn(maker.fhNEventsIn),
107 fhNEvents(maker.fhNEvents),
112 fhXVertex(maker.fhXVertex),
113 fhYVertex(maker.fhYVertex),
114 fhZVertex(maker.fhZVertex),
118 fhPtHard(maker.fhPtHard),
122 fhTrackMult(maker.fhTrackMult),
155 {
156  for(Int_t i = 0; i < 3; i++)
157  {
160  }
161 }
162 
163 //___________________________________________________
165 //___________________________________________________
167 {
168  // Do not delete it here, already done somewhere else, need to understand where.
169  // if (fOutputContainer) {
170  // fOutputContainer->Clear();
171  // delete fOutputContainer ;
172  // }
173 
174  if (fAnalysisContainer)
175  {
176  fAnalysisContainer->Delete();
177  delete fAnalysisContainer ;
178  }
179 
180  if (fReader) delete fReader ;
181  if (fCaloUtils) delete fCaloUtils ;
182 
183  if(fCuts)
184  {
185  fCuts->Delete();
186  delete fCuts;
187  }
188 }
189 
190 //__________________________________________________________________
192 //__________________________________________________________________
194 {
195  if ( fAnalysisContainer)
196  {
197  fAnalysisContainer->AddAt(ana,n);
198  }
199  else
200  {
201  AliFatal("AnalysisContainer not initialized");
202  }
203 }
204 
205 //_________________________________________________________
209 //_________________________________________________________
211 {
212  TList *aodBranchList = fReader->GetAODBranchList() ;
213 
214  for(Int_t iana = 0; iana < fAnalysisContainer->GetEntries(); iana++)
215  {
217  if(ana->NewOutputAOD()) aodBranchList->Add(ana->GetCreateOutputAODBranch());
218  }
219 
220  return aodBranchList ;
221 }
222 
223 //____________________________________________________
225 //____________________________________________________
227 {
228  AliVEvent* event = fReader->GetInputEvent();
229  AliESDEvent* esdevent = dynamic_cast<AliESDEvent*> (event);
230  AliAODEvent* aodevent = dynamic_cast<AliAODEvent*> (event);
231 
232  fhNEvents ->Fill(0); // Number of events analyzed
233 
234  Double_t v[3];
235  event->GetPrimaryVertex()->GetXYZ(v) ;
236  fhXVertex->Fill(v[0]);
237  fhYVertex->Fill(v[1]);
238  fhZVertex->Fill(v[2]);
239 
243 
245  {
246  Float_t eventWeight = fReader->GetEventWeight();
247 
248  fhNEventsWeighted ->Fill(0., eventWeight);
249  fhTrackMultWeighted ->Fill(fReader->GetTrackMultiplicity(),eventWeight);
250  fhCentralityWeighted ->Fill(fReader->GetEventCentrality (),eventWeight);
252  }
253 
254  // Check the pT hard in MC
256  {
257  if(!strcmp(fReader->GetGenEventHeader()->ClassName(), "AliGenPythiaEventHeader"))
258  {
259  AliGenPythiaEventHeader* pygeh= (AliGenPythiaEventHeader*) fReader->GetGenEventHeader();
260 
261  Float_t pTHard = pygeh->GetPtHard();
262 
263  //printf("pT hard %f, event weight %e\n",pTHard,fReader->GetEventWeight());
264 
265  fhPtHard->Fill(pTHard);
266 
269  fhPtHardWeighted->Fill(pTHard,fReader->GetEventWeight());
270  }
271  }
272 
274  {
275  if( fReader->IsPileUpFromSPD())
276  fhNPileUpEvents->Fill(0.5);
277  //if( event->IsPileupFromSPDInMultBins())
278  // fhNPileUpEvents->Fill(1.5);
279  if( fReader->IsPileUpFromEMCal())
280  fhNPileUpEvents->Fill(2.5);
282  fhNPileUpEvents->Fill(3.5);
284  fhNPileUpEvents->Fill(4.5);
286  fhNPileUpEvents->Fill(5.5);
288  fhNPileUpEvents->Fill(6.5);
290  fhNPileUpEvents->Fill(7.5);
291 
292  Int_t triggerBC = fReader->GetTriggerClusterBC() ;
293  if( triggerBC == 0 &&
294  !fReader->IsExoticEvent() &&
296  {
297  if( fReader->IsPileUpFromSPD())
298  fhNPileUpEventsTriggerBC0->Fill(0.5);
299  //if( event->IsPileupFromSPDInMultBins())
300  // fhNPileUpEventsTriggerBC0->Fill(1.5);
301  if( fReader->IsPileUpFromEMCal())
302  fhNPileUpEventsTriggerBC0->Fill(2.5);
304  fhNPileUpEventsTriggerBC0->Fill(3.5);
306  fhNPileUpEventsTriggerBC0->Fill(4.5);
308  fhNPileUpEventsTriggerBC0->Fill(5.5);
310  fhNPileUpEventsTriggerBC0->Fill(6.5);
312  fhNPileUpEventsTriggerBC0->Fill(7.5);
313  }
314 
315  if(fReader->IsPileUpFromSPD())
317 
319 
320  for(Int_t i = 0; i < 19; i++)
321  {
323  {
324  if(fReader->GetTrackEventBC(i)) fhTrackBCEvent ->Fill(i);
326  }
327  if(fReader->GetEMCalEventBC(i)) fhEMCalBCEvent ->Fill(i);
329  }
330 
331  Int_t bc = fReader->GetVertexBC();
332  if(bc!=AliVTrack::kTOFBCNA) fhPrimaryVertexBC->Fill(bc);
333 
334  // N pile up vertices
335  Int_t nVerticesSPD = -1;
336  Int_t nVerticesTracks = -1;
337 
338  if (esdevent)
339  {
340  nVerticesSPD = esdevent->GetNumberOfPileupVerticesSPD();
341  nVerticesTracks = esdevent->GetNumberOfPileupVerticesTracks();
342 
343  }//ESD
344  else if (aodevent)
345  {
346  nVerticesSPD = aodevent->GetNumberOfPileupVerticesSPD();
347  nVerticesTracks = aodevent->GetNumberOfPileupVerticesTracks();
348  }//AOD
349 
350  fhNPileUpVertSPD ->Fill(nVerticesSPD);
351  fhNPileUpVertTracks->Fill(nVerticesTracks);
352 
353  // Time stamp
354  if(fReader->IsSelectEventTimeStampOn() && esdevent)
355  {
356  Int_t timeStamp = esdevent->GetTimeStamp();
357  Float_t timeStampFrac = 1.*(timeStamp-fReader->GetRunTimeStampMin()) /
359 
360  //printf("stamp %d, min %d, max %d, frac %f\n", timeStamp, fReader->GetRunTimeStampMin(), fReader->GetRunTimeStampMax(), timeStampFrac);
361 
362  fhTimeStampFraction->Fill(timeStampFrac);
363  }
364  }
365 }
366 
367 //___________________________________________________________
369 //___________________________________________________________
371 {
372  if ( fFillDataControlHisto < 2 ) return;
373 
374  Int_t triggerBC = fReader->GetTriggerClusterBC() ;
375  Bool_t exotic = fReader->IsExoticEvent();
376  Bool_t badCluster = fReader->IsBadCellTriggerEvent();
378  Bool_t triggerMatch= fReader->IsTriggerMatched();
379  Bool_t triggerBCOK = kTRUE;
380  Int_t triggerId = fReader->GetTriggerClusterId() ;
381 
382  Bool_t reMatchOpenTime = fReader->IsTriggerMatchedOpenCuts(0);
383  Bool_t reMatchNeigbour = fReader->IsTriggerMatchedOpenCuts(1);
384  Bool_t reMatchBoth = fReader->IsTriggerMatchedOpenCuts(2);
385 
386  if(triggerId < 0)
387  {
388  //printf("Trigger id %d\n",triggerId);
389  if(triggerId == -2) fhNEventsNoTriggerFound->Fill(0);
390  triggerBCOK = kFALSE;
391  }
392 
393  if(exotic)
394  {
395  fhNExoticEvents->Fill(0) ;
396  Double_t v[3];
397  fReader->GetInputEvent()->GetPrimaryVertex()->GetXYZ(v) ;
398  fhXVertexExotic->Fill(v[0]);
399  fhYVertexExotic->Fill(v[1]);
400  fhZVertexExotic->Fill(v[2]);
401  }
402  //if(fReader->IsExoticEvent()) printf("Maker: EXOTIC Cluster trigger\n");
403 
404  if(!triggerBCOK) return;
405 
406  Int_t eventBC = fReader->GetInputEvent()->GetBunchCrossNumber();
407  if(eventBC%4 < 0 || eventBC%4 > 3 )
408  AliWarning(Form("STRANGE: Trigger BC %d - Event BC %d, modulo4 %d",triggerBC,eventBC,eventBC%4));
409 
410  if(triggerMatch)
411  {
412  if (!exotic && !badCluster) fhClusterTriggerBC->Fill(triggerBC);
413  else if( exotic && badCluster)
414  {
415  fhClusterTriggerBCBadClusterExotic->Fill(triggerBC);
416  if(badCell) fhClusterTriggerBCBadCellExotic->Fill(triggerBC);
417  }
418  else if( exotic && !badCluster) fhClusterTriggerBCExotic->Fill(triggerBC);
419  else if( badCluster && !exotic )
420  {
421  fhClusterTriggerBCBadCluster ->Fill(triggerBC);
422  if(badCell) fhClusterTriggerBCBadCell->Fill(triggerBC);
423  }
424 
425  if(!exotic) fhClusterTriggerBCEventBC ->Fill(triggerBC,eventBC%4);
426  else fhClusterTriggerBCExoticEventBC->Fill(triggerBC,eventBC%4);
427  }
428  else
429  {
430  if (!exotic && !badCluster)
431  {
432  fhClusterTriggerBCUnMatch->Fill(triggerBC);
433  if(reMatchOpenTime) fhClusterTriggerBCUnMatchReMatch[0]->Fill(triggerBC);
434  if(reMatchNeigbour) fhClusterTriggerBCUnMatchReMatch[1]->Fill(triggerBC);
435  if(reMatchBoth) fhClusterTriggerBCUnMatchReMatch[2]->Fill(triggerBC);
436  }
437  else if( exotic && badCluster)
438  {
440  if(badCell) fhClusterTriggerBCBadCellExoticUnMatch ->Fill(triggerBC);
441  }
442  else if( exotic && !badCluster)
443  {
444  fhClusterTriggerBCExoticUnMatch->Fill(triggerBC);
445  if(reMatchOpenTime) fhClusterTriggerBCExoticUnMatchReMatch[0]->Fill(triggerBC);
446  if(reMatchNeigbour) fhClusterTriggerBCExoticUnMatchReMatch[1]->Fill(triggerBC);
447  if(reMatchBoth) fhClusterTriggerBCExoticUnMatchReMatch[2]->Fill(triggerBC);
448  }
449  else if( badCluster && !exotic )
450  {
451  fhClusterTriggerBCBadClusterUnMatch->Fill(triggerBC);
452  if(badCell)fhClusterTriggerBCBadCellUnMatch->Fill(triggerBC);
453  }
454 
455  if(!exotic) fhClusterTriggerBCEventBCUnMatch ->Fill(triggerBC,eventBC%4);
456  else fhClusterTriggerBCExoticEventBCUnMatch->Fill(triggerBC,eventBC%4);
457  }
458 }
459 
460 //_______________________________________________________
463 //_______________________________________________________
465 {
466  if ( !fProcessEvent ) return fCuts;
467 
468  // Reader cuts
469  TObjString * objstring = fReader->GetListOfParameters();
470  fCuts->Add(objstring);
471 
472  // Analysis wagons cuts
473  for(Int_t iana = 0; iana < fAnalysisContainer->GetEntries(); iana++)
474  {
476  objstring = ana->GetAnalysisCuts();
477 
478  if ( objstring ) fCuts->Add(objstring);
479  }
480 
481  return fCuts ;
482 }
483 
484 //___________________________________________________
488 //___________________________________________________
490 {
491  if ( !fProcessEvent ) return fOutputContainer;
492 
493  // General event histograms
494 
495  fhNEventsIn = new TH1F("hNEventsIn", "Number of input events" , 1 , 0 , 1 ) ;
496  fhNEventsIn->SetYTitle("# events");
498 
499  fhNEvents = new TH1F("hNEvents", "Number of analyzed events" , 1 , 0 , 1 ) ;
500  fhNEvents->SetYTitle("# events");
502 
503  fhXVertex = new TH1F("hXVertex", " X vertex distribution" , 200 , -1 , 1 ) ;
504  fhXVertex->SetXTitle("v_{x} (cm)");
506 
507  fhYVertex = new TH1F("hYVertex", " Y vertex distribution" , 200 , -1 , 1 ) ;
508  fhYVertex->SetXTitle("v_{y} (cm)");
510 
511  fhZVertex = new TH1F("hZVertex", " Z vertex distribution" , 200 , -50 , 50 ) ;
512  fhZVertex->SetXTitle("v_{z} (cm)");
514 
515  fhCentrality = new TH1F("hCentrality","Number of events in centrality bin", 100, 0., 100) ;
516  fhCentrality->SetXTitle("Centrality bin");
518 
519  fhEventPlaneAngle = new TH1F("hEventPlaneAngle","Number of events in event plane", 100, 0., TMath::Pi()) ;
520  fhEventPlaneAngle->SetXTitle("EP angle (rad)");
522 
523  fhTrackMult = new TH1F
524  ("hTrackMult",
525  Form("Number of tracks per event with #it{p}_{T} > %2.2f GeV/#it{c} and |#eta|<%2.2f",
526  GetReader()->GetTrackMultiplicityPtCut(),GetReader()->GetTrackMultiplicityEtaCut()),
527  2000 , 0 , 2000) ;
528  fhTrackMult->SetXTitle("# tracks");
530 
531  if(fCheckPtHard)
532  {
533  fhPtHard = new TH1F("hPtHard"," #it{p}_{T}-hard for selected triggers",300,0,300);
534  fhPtHard->SetXTitle("#it{p}_{T}^{hard} (GeV/#it{c})");
536 
539  {
540  fhPtHardWeighted = new TH1F("hPtHardWeighted"," #it{p}_{T}-hard for selected triggers, weighted by cross section",300,0,300);
541  fhPtHardWeighted->SetXTitle("#it{p}_{T}^{hard} (GeV/#it{c})");
543  }
544  }
545 
546  if ( GetReader()->GetWeightUtils()->IsCentralityWeightOn() )
547  {
548  fhNEventsWeighted = new TH1F("hNEventsWeighted", "Number of analyzed events weighted by centrality", 1 , 0 , 1 ) ;
549  fhNEventsWeighted->SetYTitle("# events");
551 
552  fhCentralityWeighted = new TH1F("hCentralityWeighted","Number of events in centrality bin weighted by centrality", 100, 0.,100) ;
553  fhCentralityWeighted->SetXTitle("Centrality bin");
555 
556  fhEventPlaneAngleWeighted = new TH1F("hEventPlaneAngleWeighted","Number of events in event plane weighted by centrality",100, 0., TMath::Pi()) ;
557  fhEventPlaneAngleWeighted->SetXTitle("EP angle (rad)");
559 
560  fhTrackMultWeighted = new TH1F
561  ("hTrackMultWeighted",
562  Form("Number of tracks per weighted event with #it{p}_{T} > %2.2f GeV/#it{c} and |#eta|<%2.2f",
563  GetReader()->GetTrackMultiplicityPtCut(),GetReader()->GetTrackMultiplicityEtaCut()),
564  2000 , 0 , 2000) ;
565  fhTrackMultWeighted->SetXTitle("# tracks");
567  }
568 
570  {
571  // Trigger and exoticity related histograms
572  if(fFillDataControlHisto > 1)
573  {
574  fhNExoticEvents = new TH1F("hNExoticEvents", "Number of analyzed events triggered by exotic cluster" , 1 , 0 , 1 ) ;
575  fhNExoticEvents->SetYTitle("# exotic events");
577 
578  fhNEventsNoTriggerFound = new TH1F("hNEventsNoTriggerFound", "Number of analyzed events triggered but no trigger found" , 1 , 0 , 1 ) ;
579  fhNEventsNoTriggerFound->SetYTitle("# exotic events");
581 
582  Int_t nbin = 11;
583  Float_t minbin =-5.5;
584  Float_t maxbin = 5.5;
585  Int_t labelshift = 6;
586 
587  fhClusterTriggerBCEventBC = new TH2F("hClusterTriggerBCEventBC", "Found trigger BC and Event BC",
588  nbin , minbin ,maxbin,4,0, 4) ;
589  fhClusterTriggerBCEventBC->SetXTitle("cluster trigger BC");
590  for(Int_t i = 0; i < 4; i++)
591  fhClusterTriggerBCEventBC->GetYaxis()->SetBinLabel(i+1 ,Form("BC/4=%d",i));
592  fhClusterTriggerBCEventBC->SetXTitle("cluster trigger BC");
593  for(Int_t i = 1; i < 12; i++)
594  fhClusterTriggerBCEventBC->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
595  fhClusterTriggerBCEventBC->SetYTitle("Event BC%4");
597 
598  fhClusterTriggerBCExoticEventBC = new TH2F("hClusterTriggerBCExoticEventBC", "Found exotic trigger BC and Event BC",
599  nbin , minbin ,maxbin,4,1, 4) ;
600  for(Int_t i = 0; i < 4; i++)
601  fhClusterTriggerBCExoticEventBC->GetYaxis()->SetBinLabel(i+1 ,Form("BC/4=%d",i));
602  fhClusterTriggerBCExoticEventBC->SetXTitle("cluster trigger BC");
603  for(Int_t i = 1; i < 12; i++)
604  fhClusterTriggerBCExoticEventBC->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
605  fhClusterTriggerBCExoticEventBC->SetYTitle("Event BC%4");
607 
608  fhClusterTriggerBCEventBCUnMatch = new TH2F("hClusterTriggerBCEventBCUnMatch", "Found unmatched trigger BC and Event BC",
609  nbin , minbin ,maxbin,4,1, 4) ;
610  for(Int_t i = 0; i < 4; i++)
611  fhClusterTriggerBCEventBCUnMatch->GetYaxis()->SetBinLabel(i+1 ,Form("BC/4=%d",i));
612  fhClusterTriggerBCEventBCUnMatch->SetXTitle("cluster trigger BC");
613  for(Int_t i = 1; i < 12; i++)
614  fhClusterTriggerBCEventBCUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
615  fhClusterTriggerBCEventBCUnMatch->SetYTitle("Event BC%4");
617 
618  fhClusterTriggerBCExoticEventBCUnMatch = new TH2F("hClusterTriggerExoticBCEventBCUnMatch", "Found unmatched trigger BC and Event BC",
619  nbin , minbin ,maxbin,4,1, 4) ;
620  for(Int_t i = 0; i < 4; i++)
621  fhClusterTriggerBCExoticEventBCUnMatch->GetYaxis()->SetBinLabel(i+1 ,Form("BC/4=%d",i));
622  fhClusterTriggerBCExoticEventBCUnMatch->SetXTitle("cluster trigger BC");
623  for(Int_t i = 1; i < 12; i++)
624  fhClusterTriggerBCExoticEventBCUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
625  fhClusterTriggerBCExoticEventBCUnMatch->SetYTitle("Event BC%4");
627 
628  fhClusterTriggerBC = new TH1F("hClusterTriggerBC",
629  "Number of analyzed events triggered by a cluster in a given BC",
630  nbin , minbin ,maxbin) ;
631  fhClusterTriggerBC->SetYTitle("# events");
632  for(Int_t i = 1; i < 12; i++)
633  fhClusterTriggerBC->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
635 
636  fhClusterTriggerBCExotic = new TH1F("hClusterTriggerBCExotic",
637  "Number of analyzed events triggered by a exotic cluster in a given BC",
638  nbin , minbin ,maxbin) ;
639  fhClusterTriggerBCExotic->SetYTitle("# events");
640  for(Int_t i = 1; i < 12; i++)
641  fhClusterTriggerBCExotic->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
643 
644 
645  fhClusterTriggerBCBadCell = new TH1F("hClusterTriggerBCBadCell",
646  "Number of analyzed events triggered by a bad cell in a given BC",
647  nbin , minbin ,maxbin) ;
648 
649  fhClusterTriggerBCBadCell->SetYTitle("# events");
650  for(Int_t i = 1; i < 12; i++)
651  fhClusterTriggerBCBadCell->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
653 
654  fhClusterTriggerBCBadCellExotic = new TH1F("hClusterTriggerBCBadCellExotic",
655  "Number of analyzed events triggered by a bad cell & exotic cluster in a given BC",
656  nbin , minbin ,maxbin) ;
657  fhClusterTriggerBCBadCellExotic->SetYTitle("# events");
658  for(Int_t i = 1; i < 12; i++)
659  fhClusterTriggerBCBadCellExotic->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
661 
662  fhClusterTriggerBCBadCluster = new TH1F("hClusterTriggerBCBadCluster",
663  "Number of analyzed events triggered by a bad cluster in a given BC",
664  nbin , minbin ,maxbin) ;
665 
666  fhClusterTriggerBCBadCluster->SetYTitle("# events");
667  for(Int_t i = 1; i < 12; i++)
668  fhClusterTriggerBCBadCluster->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
670 
671 
672  fhClusterTriggerBCBadClusterExotic = new TH1F("hClusterTriggerBCBadClusterExotic",
673  "Number of analyzed events triggered by a bad cluster & exotic cluster in a given BC",
674  nbin , minbin ,maxbin) ;
675 
676  fhClusterTriggerBCBadClusterExotic->SetYTitle("# events");
677  for(Int_t i = 1; i < 12; i++)
678  fhClusterTriggerBCBadClusterExotic->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
680 
681  fhClusterTriggerBCUnMatch = new TH1F("hClusterTriggerBCUnMatch",
682  "Number of analyzed events triggered by a cluster (no trigger patch match) in a given BC",
683  nbin , minbin ,maxbin) ;
684  fhClusterTriggerBCUnMatch->SetYTitle("# events");
685  for(Int_t i = 1; i < 12; i++)
686  fhClusterTriggerBCUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
688 
689  fhClusterTriggerBCExoticUnMatch = new TH1F("hClusterTriggerBCExoticUnMatch",
690  "Number of analyzed events triggered by a exotic cluster (no trigger patch match) in a given BC",
691  nbin , minbin ,maxbin) ;
692  fhClusterTriggerBCExoticUnMatch->SetYTitle("# events");
693  for(Int_t i = 1; i < 12; i++)
694  fhClusterTriggerBCExoticUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
696 
697 
698  fhClusterTriggerBCBadCellUnMatch = new TH1F("hClusterTriggerBCBadCellUnMatch",
699  "Number of analyzed events triggered by a bad cluster (no trigger patch match) in a given BC",
700  nbin , minbin ,maxbin) ;
701  fhClusterTriggerBCBadCellUnMatch->SetYTitle("# events");
702  for(Int_t i = 1; i < 12; i++)
703  fhClusterTriggerBCBadCellUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
705 
706 
707  fhClusterTriggerBCBadCellExoticUnMatch = new TH1F("hClusterTriggerBCBadCellExoticUnMatch",
708  "Number of analyzed events triggered by a bad&exotic cluster (no trigger patch match) in a given BC",
709  nbin , minbin ,maxbin) ;
710  fhClusterTriggerBCBadCellExoticUnMatch->SetYTitle("# events");
711  for(Int_t i = 1; i < 12; i++)
712  fhClusterTriggerBCBadCellExoticUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
714 
715 
716  fhClusterTriggerBCBadClusterUnMatch = new TH1F("hClusterTriggerBCBadClusterUnMatch",
717  "Number of analyzed events triggered by a bad cluster (no trigger patch match) in a given BC",
718  nbin , minbin ,maxbin) ;
719  fhClusterTriggerBCBadClusterUnMatch->SetYTitle("# events");
720  for(Int_t i = 1; i < 12; i++)
721  fhClusterTriggerBCBadClusterUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
723 
724 
725  fhClusterTriggerBCBadClusterExoticUnMatch = new TH1F("hClusterTriggerBCBadClusterExoticUnMatch",
726  "Number of analyzed events triggered by a bad&exotic cluster (no trigger patch match) in a given BC",
727  nbin , minbin ,maxbin) ;
728  fhClusterTriggerBCBadClusterExoticUnMatch->SetYTitle("# events");
729  for(Int_t i = 1; i < 12; i++)
730  fhClusterTriggerBCBadClusterExoticUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
732 
733  TString rematch[] = {"OpenTime","CheckNeighbours","Both"};
734  for(Int_t j = 0; j < 3; j++)
735  {
736  fhClusterTriggerBCUnMatchReMatch[j] = new TH1F(Form("hClusterTriggerBCUnMatch_ReMatch_%s",rematch[j].Data()),
737  Form("Number of analyzed events triggered by a cluster (no trigger patch match) in a given BC, re-match %s",rematch[j].Data()),
738  nbin , minbin ,maxbin) ;
739  fhClusterTriggerBCUnMatchReMatch[j]->SetYTitle("# events");
740  for(Int_t i = 1; i < 12; i++)
741  fhClusterTriggerBCUnMatchReMatch[j]->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
743 
744  fhClusterTriggerBCExoticUnMatchReMatch[j] = new TH1F(Form("hClusterTriggerBCExoticUnMatch_ReMatch_%s",rematch[j].Data()),
745  Form("Number of analyzed events triggered by a exotic cluster (no trigger patch match) in a given BC, re-match %s",rematch[j].Data()),
746  nbin , minbin ,maxbin) ;
747  fhClusterTriggerBCExoticUnMatchReMatch[j]->SetYTitle("# events");
748  for(Int_t i = 1; i < 12; i++)
749  fhClusterTriggerBCExoticUnMatchReMatch[j]->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
751  }
752 
753  fhXVertexExotic = new TH1F("hXVertexExotic", " X vertex distribution in exotic events" , 200 , -1 , 1 ) ;
754  fhXVertexExotic->SetXTitle("v_{x} (cm)");
756 
757  fhYVertexExotic = new TH1F("hYVertexExotic", " Y vertex distribution in exotic events" , 200 , -1 , 1 ) ;
758  fhYVertexExotic->SetXTitle("v_{y} (cm)");
760 
761  fhZVertexExotic = new TH1F("hZVertexExotic", " Z vertex distribution in exotic events" , 200 , -50 , 50 ) ;
762  fhZVertexExotic->SetXTitle("v_{z} (cm)");
764  }
765 
766  fhNPileUpEvents = new TH1F("hNPileUpEvents", "Number of events considered as pile-up", 8 , 0 , 8 ) ;
767  fhNPileUpEvents->SetYTitle("# events");
768  fhNPileUpEvents->GetXaxis()->SetBinLabel(1 ,"SPD");
769  fhNPileUpEvents->GetXaxis()->SetBinLabel(2 ,"Multi SPD");
770  fhNPileUpEvents->GetXaxis()->SetBinLabel(3 ,"EMCal");
771  fhNPileUpEvents->GetXaxis()->SetBinLabel(4 ,"EMCal || SPD");
772  fhNPileUpEvents->GetXaxis()->SetBinLabel(5 ,"EMCal && SPD");
773  fhNPileUpEvents->GetXaxis()->SetBinLabel(6 ,"!EMCal && SPD");
774  fhNPileUpEvents->GetXaxis()->SetBinLabel(7 ,"EMCal && !SPD");
775  fhNPileUpEvents->GetXaxis()->SetBinLabel(8 ,"!EMCal && !SPD");
777 
778  fhNPileUpEventsTriggerBC0 = new TH1F("hNPileUpEventsTriggerBC0","Number of events considered as pile-up, trigger cluster in BC=0", 8 , 0 , 8 ) ;
779  fhNPileUpEventsTriggerBC0->SetYTitle("# events");
780  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(1 ,"SPD");
781  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(2 ,"Multi SPD");
782  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(3 ,"EMCal");
783  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(4 ,"EMCal || SPD");
784  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(5 ,"EMCal && SPD");
785  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(6 ,"!EMCal && SPD");
786  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(7 ,"EMCal && !SPD");
787  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(8 ,"!EMCal && !SPD");
789 
791  {
792  fhTrackBCEvent = new TH1F("hTrackBCEvent", "Number of events with at least 1 track in a bunch crossing ", 19 , 0 , 19 ) ;
793  fhTrackBCEvent->SetYTitle("# events");
794  fhTrackBCEvent->SetXTitle("Bunch crossing");
795  for(Int_t i = 1; i < 20; i++)
796  fhTrackBCEvent->GetXaxis()->SetBinLabel(i ,Form("%d",i-10));
798 
799  fhTrackBCEventCut = new TH1F("hTrackBCEventCut", "Number of events with at least 1 track in a bunch crossing ", 19 , 0 , 19 ) ;
800  fhTrackBCEventCut->SetYTitle("# events");
801  fhTrackBCEventCut->SetXTitle("Bunch crossing");
802  for(Int_t i = 1; i < 20; i++)
803  fhTrackBCEventCut->GetXaxis()->SetBinLabel(i ,Form("%d",i-10));
805  }
806 
807  fhPrimaryVertexBC = new TH1F("hPrimaryVertexBC", "Number of primary vertex per bunch crossing ", 41 , -20 , 20 ) ;
808  fhPrimaryVertexBC->SetYTitle("# events");
809  fhPrimaryVertexBC->SetXTitle("Bunch crossing");
811 
812  fhEMCalBCEvent = new TH1F("hEMCalBCEvent", "Number of events with at least 1 cluster in a bunch crossing ", 19 , 0 , 19 ) ;
813  fhEMCalBCEvent->SetYTitle("# events");
814  fhEMCalBCEvent->SetXTitle("Bunch crossing");
815  for(Int_t i = 1; i < 20; i++)
816  fhEMCalBCEvent->GetXaxis()->SetBinLabel(i ,Form("%d",i-10));
818 
819  fhEMCalBCEventCut = new TH1F("hEMCalBCEventCut", "Number of events with at least 1 cluster in a bunch crossing", 19 , 0 , 19 ) ;
820  fhEMCalBCEventCut->SetYTitle("# events");
821  fhEMCalBCEventCut->SetXTitle("Bunch crossing");
822  for(Int_t i = 1; i < 20; i++)
823  fhEMCalBCEventCut->GetXaxis()->SetBinLabel(i ,Form("%d",i-10));
825 
826  fhPileUpClusterMult = new TH1F("hPileUpClusterMult", "Number of clusters per event with large time (|t| > 20 ns)" , 100 , 0 , 100 ) ;
827  fhPileUpClusterMult->SetXTitle("# clusters");
829 
830  fhPileUpClusterMultAndSPDPileUp = new TH1F("hPileUpClusterMultAndSPDPileUp", "Number of clusters per event with large time (|t| > 20 ns, events tagged as pile-up by SPD)" , 100 , 0 , 100 ) ;
831  fhPileUpClusterMultAndSPDPileUp->SetXTitle("# clusters");
833 
834  fhNPileUpVertSPD = new TH1F ("hNPileUpVertSPD","N pile-up SPD vertex", 50,0,50);
835  fhNPileUpVertSPD->SetYTitle("# vertex ");
837 
838  fhNPileUpVertTracks = new TH1F ("hNPileUpVertTracks","N pile-up Tracks vertex", 50,0,50);
839  fhNPileUpVertTracks->SetYTitle("# vertex ");
841 
843  {
844  fhTimeStampFraction = new TH1F("hTimeStampFraction","Fraction of events within a given time stamp range",150, -1, 2) ;
845  fhTimeStampFraction->SetXTitle("fraction");
847  }
848  }
849 
850  fhNMergedFiles = new TH1F("hNMergedFiles", "Number of merged output files" , 1 , 0 , 1 ) ;
851  fhNMergedFiles->SetYTitle("# files");
852  fhNMergedFiles->Fill(1); // Fill here with one entry, while merging it will count the rest
854 
855  if(fScaleFactor > 0)
856  {
857  fhScaleFactor = new TH1F("hScaleFactor", "Number of merged output files" , 1 , 0 , 1 ) ;
858  fhScaleFactor->SetYTitle("scale factor");
859  fhScaleFactor->SetBinContent(1,fScaleFactor); // Fill here
861  }
862 
863  // Histograms defined and filled in this class, just get the pointers
864  // and add them to the list.
865  if(GetReader()->GetWeightUtils()->IsMCCrossSectionCalculationOn())
866  {
868 
869  if ( templist && templist->GetEntries() == 2 )
870  {
871  templist->SetOwner(kFALSE); //Owner is fOutputContainer.
872 
873  fOutputContainer->Add(templist->At(0));
874  fOutputContainer->Add(templist->At(1));
875  }
876  }
877 
878  // --------------------------------
879  // Add control histograms in Reader
880  // --------------------------------
881 
882  TList * templist = fReader->GetCreateControlHistograms();
883  templist->SetOwner(kFALSE); //Owner is fOutputContainer.
884 
885  for(Int_t ih = 0; ih < templist->GetEntries() ; ih++)
886  {
887  //if ( fSumw2 ) ((TH1*) templist->At(ih))->Sumw2();
888 
889  //printf("histo %d %p %s\n",ih,templist->At(ih), templist->At(ih)->GetName());
890 
891  //Add histogram to general container
892  fOutputContainer->Add(templist->At(ih)) ;
893  }
894 
895  delete templist;
896 
897  // ------------------------
898  // Add analysis histograms
899  // ------------------------
900 
901  if(!fAnalysisContainer || fAnalysisContainer->GetEntries()==0)
902  {
903  AliWarning("Analysis job list not initialized!!!");
904  return fOutputContainer;
905  }
906 
907  const Int_t buffersize = 255;
908  char newname[buffersize];
909 
910  for(Int_t iana = 0; iana < fAnalysisContainer->GetEntries(); iana++)
911  {
913 
914  if(fMakeHisto) // Analysis with histograms as output on
915  {
916  //Fill container with appropriate histograms
917  templist = ana->GetCreateOutputObjects();
918  templist->SetOwner(kFALSE); //Owner is fOutputContainer.
919 
920  for(Int_t i = 0; i < templist->GetEntries(); i++)
921  {
922  //Add only to the histogram name the name of the task
923  if( strcmp((templist->At(i))->ClassName(),"TObjString") )
924  {
925  snprintf(newname,buffersize, "%s%s", (ana->GetAddedHistogramsStringToName()).Data(), (templist->At(i))->GetName());
926  //printf("name %s, new name %s\n",(templist->At(i))->GetName(),newname);
927 
928  ((TH1*) templist->At(i))->SetName(newname);
929 
930  if ( fSumw2 ) ((TH1*) templist->At(i))->Sumw2();
931  }
932 
933  //Add histogram to general container
934  fOutputContainer->Add(templist->At(i)) ;
935  }
936 
937  delete templist;
938 
939  }// Analysis with histograms as output on
940 
941  }//Loop on analysis defined
942 
943  // Initialize calorimeters geometry pointers
944  //GetCaloUtils()->InitPHOSGeometry();
945  //GetCaloUtils()->InitEMCALGeometry();
946 
947  return fOutputContainer;
948 }
949 
950 //___________________________________
955 //___________________________________
957 {
958  // Activate debug level in maker
959  if( fAnaDebug >= 0 )
960  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(this->ClassName(),fAnaDebug);
961 
962  //Initialize reader
963  GetReader()->Init();
964  GetReader()->SetCaloUtils(GetCaloUtils()); // pass the calo utils pointer to the reader
965 
966  // Activate debug level in reader
967  if( fReader->GetDebug() >= 0 )
968  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(fReader->ClassName(), fReader->GetDebug());
969 
970  // Activate debug level in calo utils
971  if( fCaloUtils->GetDebug() >= 0 )
972  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(fCaloUtils->ClassName(), fCaloUtils->GetDebug());
973 
974  if(!fAnalysisContainer || fAnalysisContainer->GetEntries()==0)
975  {
976  AliWarning("Analysis job list not initialized");
977  return;
978  }
979 
980  for(Int_t iana = 0; iana < fAnalysisContainer->GetEntries(); iana++)
981  {
983 
984  ana->SetReader(fReader); // Set Reader for each analysis
985  ana->SetCaloUtils(fCaloUtils); // Set CaloUtils for each analysis
986 
987  ana->Init();
988  ana->InitDebug();
989  }//Loop on analysis defined
990 }
991 
992 //_____________________________________________
994 //_____________________________________________
996 {
997  fMakeHisto = kTRUE;
998  fMakeAOD = kTRUE;
999  fAnaDebug = 0; // No debugging info displayed by default
1000 }
1001 
1002 //______________________________________________________________
1004 //______________________________________________________________
1006 {
1007  if(! opt)
1008  return;
1009 
1010  if ( !fProcessEvent )
1011  {
1012  printf("Events not processed\n");
1013  return;
1014  }
1015 
1016  printf("***** Print: %s %s ******\n", GetName(), GetTitle() ) ;
1017  printf("Debug level = %d\n", fAnaDebug ) ;
1018  printf("Produce Histo = %d\n", fMakeHisto ) ;
1019  printf("Produce AOD = %d\n", fMakeAOD ) ;
1020  printf("Number of analysis tasks = %d\n", fAnalysisContainer->GetEntries()) ;
1021 
1022  if(!strcmp("all",opt))
1023  {
1024  printf("Print analysis Tasks settings :\n") ;
1025  for(Int_t iana = 0; iana<fAnalysisContainer->GetEntries(); iana++)
1026  {
1028  }
1029 
1030  printf("Print analysis Reader settings :\n") ;
1031  fReader->Print("");
1032  printf("Print analysis Calorimeter Utils settings :\n") ;
1033  fCaloUtils->Print("");
1034  }
1035 }
1036 
1037 //_____________________________________________________________________________________
1047 //_____________________________________________________________________________________
1048 void AliAnaCaloTrackCorrMaker::ProcessEvent(Int_t iEntry, const char * currentFileName)
1049 {
1050  if ( !fProcessEvent ) return;
1051 
1053  AliFatal("Histograms not initialized");
1054 
1055  AliDebug(1,Form("*** AliAnaCaloTrackCorrMaker::ProcessEvent() Event %d ***",iEntry));
1056  AliDebug(2,Form("Current File Name : %s", currentFileName));
1057  //printf("fAODBranchList %p, entries %d\n",fAODBranchList,fAODBranchList->GetEntries());
1058 
1059  // Each event needs an empty branch
1060  TList * aodList = fReader->GetAODBranchList();
1061  Int_t nAODBranches = aodList->GetEntries();
1062  for(Int_t iaod = 0; iaod < nAODBranches; iaod++)
1063  {
1064  TClonesArray *tca = dynamic_cast<TClonesArray*> (aodList->At(iaod));
1065  if(tca) tca->Clear("C");
1066  }
1067 
1068  // Set geometry matrices before filling arrays, in case recalibration/position calculation etc is needed
1070 
1071  // Set the AODB calibration, bad channels etc. parameters at least once
1073 
1074  // Tell the reader to fill the data in the 3 detector lists
1075  Bool_t ok = fReader->FillInputEvent(iEntry, currentFileName);
1076 
1077  // Access pointers, and trigger mask check needed in mixing case
1078  AliAnalysisManager *manager = AliAnalysisManager::GetAnalysisManager();
1079  AliInputEventHandler *inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
1080 
1081  UInt_t isMBTrigger = kFALSE;
1082  UInt_t isTrigger = kFALSE;
1083  if(inputHandler)
1084  {
1085  isMBTrigger = inputHandler->IsEventSelected() & fReader->GetMixEventTriggerMask();
1086  isTrigger = inputHandler->IsEventSelected() & fReader->GetEventTriggerMask();
1087  }
1088 
1089  //Fill trigger control histograms, make sure it is only for triggered events and
1090  // not the MB events used for mixing
1091  if(fReader->IsEventTriggerAtSEOn() || isTrigger)
1092  {
1093  fhNEventsIn->Fill(0);
1095  }
1096 
1097  if(!ok)
1098  {
1099  AliDebug(1,Form("*** Skip event *** %d",iEntry));
1100  fReader->ResetLists();
1101  return ;
1102  }
1103 
1104  // Magic line to write events to file
1105  if(fReader->WriteDeltaAODToFile())AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kTRUE);
1106 
1107  //printf(">>>>>>>>>> BEFORE >>>>>>>>>>>\n");
1108  //gObjectTable->Print();
1109 
1110  // Init mag field for tracks in case of ESDs, not really necessary
1111  if ( !TGeoGlobalMagField::Instance()->GetField() && fReader->GetInputEvent() )
1112  (fReader->GetInputEvent())->InitMagneticField();
1113 
1114  // Loop on analysis algorithms
1115 
1116  AliDebug(1,"*** Begin analysis ***");
1117 
1118  Int_t nana = fAnalysisContainer->GetEntries() ;
1119  for(Int_t iana = 0; iana < nana; iana++)
1120  {
1122 
1123  ana->ConnectInputOutputAODBranches(); // Sets branches for each analysis
1124 
1125  //Fill pool for mixed event for the analysis that need it
1126  if(!fReader->IsEventTriggerAtSEOn() && isMBTrigger)
1127  {
1128  ana->FillEventMixPool();
1129  if(!isTrigger) continue; // pool filled do not try to fill AODs or histograms if trigger is not MB
1130  }
1131 
1132  //Make analysis, create aods in aod branch and in some cases fill histograms
1133  if(fMakeAOD ) ana->MakeAnalysisFillAOD() ;
1134 
1135  //Make further analysis with aod branch and fill histograms
1137 
1138  }
1139 
1140  fReader->ResetLists();
1141 
1142  // In case of mixing analysis, non triggered events are used,
1143  // do not fill control histograms for a non requested triggered event
1144  if(!fReader->IsEventTriggerAtSEOn() && !isTrigger)
1145  {
1146  AliDebug(1,"*** End analysis, MB for mixing ***");
1147  return;
1148  }
1149 
1151 
1152  //printf(">>>>>>>>>> AFTER >>>>>>>>>>>\n");
1153  //gObjectTable->Print();
1154 
1155  AliDebug(1,"*** End analysis ***");
1156 }
1157 
1158 //__________________________________________________________
1161 //__________________________________________________________
1163 {
1164  if ( !fProcessEvent ) return;
1165 
1166  if (!outputList)
1167  {
1168  AliError("No output list");
1169  return;
1170  }
1171 
1172  for(Int_t iana = 0; iana < fAnalysisContainer->GetEntries(); iana++)
1173  {
1175  if(ana->MakePlotsOn())ana->Terminate(outputList);
1176  } // Loop on analysis defined
1177 }
1178 
1179 
1180 
Bool_t IsPileUpFromSPD() const
TH2F * fhClusterTriggerBCExoticEventBCUnMatch
! Correlate the found BC in the exotic trigger and the event BC, when there was no match with the tri...
TH1F * fhTimeStampFraction
! event fraction depending on Time Stamp, only if activated on reader.
TH1F * fhNEvents
! Number of acepted events counter histogram.
virtual void SetCaloUtils(AliCalorimeterUtils *caloutils)
virtual Int_t GetDebug() const
Bool_t IsBadMaxCellTriggerEvent() const
TH2F * fhClusterTriggerBCEventBC
! Correlate the found BC in the trigger and the event BC.
TH1F * fhEMCalBCEventCut
! N events depending on the existence of a cluster above acceptance and E cut in a given bunch crossi...
void ana(Int_t mode=mGRID)
Definition: ana.C:162
TH1F * fhClusterTriggerBCUnMatchReMatch[3]
! Number of events triggered, depending on BC of the cluster, not matched, open cuts and rematch...
TList * GetCreateOutputHistograms()
double Double_t
Definition: External.C:58
TH2F * fhClusterTriggerBCExoticEventBC
! Correlate the found BC in the exotic trigger and the event BC.
TList * fCuts
! List with analysis cuts.
TH1F * fhClusterTriggerBCBadClusterUnMatch
! Number of events triggered, depending on BC of the cluster.
Definition: External.C:236
TH1F * fhPtHardWeighted
! pt of parton, only for MC generation (pythia jet-jet/gamma-jet), weighted by cross section ...
TH1F * fhZVertexExotic
! Z Vertex distribution of exotic event.
TH1F * fhNPileUpVertTracks
! Number of pile-up vertices from tracks.
TH1F * fhClusterTriggerBCBadCell
! Number of events triggered, depending on BC of the cluster.
TH1F * fhNEventsIn
! Number of input events counter histogram.
void InitParameters()
Init data members.
TH1F * fhClusterTriggerBCBadCluster
! Number of events triggered, depending on BC of the cluster.
AliCalorimeterUtils * fCaloUtils
Pointer to AliCalorimeterUtils.
Bool_t WriteDeltaAODToFile() const
Int_t GetVertexBC(const AliVVertex *vtx)
TH1F * fhScaleFactor
! Factor to scale histograms.
virtual AliVEvent * GetInputEvent() const
TH1F * fhTrackBCEventCut
! N events depending on the existence of a track above acceptance and pt cut in a given bunch crossin...
Bool_t IsPileUpFromSPDAndNotEMCal() const
Check if event is from pile-up determined by SPD and not by EMCal.
Int_t fFillDataControlHisto
Fill histograms only interesting with data. 0 not filled; 1 basic control; 2+ trigger related...
void AddAnalysis(TObject *ana, Int_t n)
Add analysis depending on AliAnaCaloTrackCorrBaseClass to list.
TH1F * fhClusterTriggerBCBadCellExoticUnMatch
! Number of events triggered, depending on BC of the cluster.
TH1F * fhNEventsWeighted
! Number of acepted events counter histogram. After centrality weight.
TH1F * fhEMCalBCEvent
! N events depending on the existence of a cluster in a given bunch crossing.
Double_t GetRunTimeStampMin() const
Double_t fScaleFactor
Scaling factor needed for normalization.
TH1F * fhXVertexExotic
! X Vertex distribution of exotic event.
TH2F * fhClusterTriggerBCEventBCUnMatch
! Correlate the found BC in the trigger and the event BC, when there was no match with the trigger BC...
virtual Int_t GetEventCentrality() const
Bool_t IsCentralityWeightOn() const
Definition: AliAnaWeights.h:63
Bool_t IsTriggerMatchedOpenCuts(Int_t i) const
Bool_t IsPileUpFromNotSPDAndNotEMCal() const
Check if event not from pile-up determined neither by SPD nor by EMCal.
void FillTriggerControlHistograms()
Fill here EMCal triggered events control histograms.
virtual AliGenEventHeader * GetGenEventHeader() const
TH1F * fhTrackBCEvent
! N events depending on the existence of a track in a given bunch crossing.
TH1F * fhNPileUpEventsTriggerBC0
! N events pasing pile up cut.
TH1F * fhNMergedFiles
! Number of files merged.
virtual Bool_t FillInputEvent(Int_t iEntry, const char *currentFileName)
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
TH1F * fhXVertex
! X Vertex distribution of accepted event.
Bool_t IsPileUpFromSPDOrEMCal() const
Check if event is from pile-up determined by SPD or EMCal.
Bool_t IsPileUpFromEMCalAndNotSPD() const
Check if event is from pile-up determined by EMCal, not by SPD.
Double_t GetRunTimeStampMax() const
TH1F * fhClusterTriggerBC
! Number of events triggered, depending on BC of the cluster.
Base class for CaloTrackCorr analysis algorithms.
TH1F * fhClusterTriggerBCBadClusterExoticUnMatch
! Number of events triggered, depending on BC of the cluster.
int Int_t
Definition: External.C:63
Int_t GetTrackMultiplicity(Int_t cut=0) const
unsigned int UInt_t
Definition: External.C:33
virtual TList * GetAODBranchList() const
float Float_t
Definition: External.C:68
Bool_t IsTriggerMatched() const
virtual Int_t GetDebug() const
Bool_t IsMCCrossSectionJustHistoFillOn() const
Definition: AliAnaWeights.h:81
TH1F * fhTrackMultWeighted
! Number of tracks per event histogram. After centrality weight.
virtual TObjString * GetListOfParameters()
Save parameters used for analysis in a string.
Bool_t fMakeHisto
If true makes final analysis with histograms as output.
Bool_t fSumw2
Call the histograms method Sumw2() after initialization, off by default, too large memory booking...
TH1F * fhNExoticEvents
! Number of events triggered by exotic, counter histogram.
TH1F * fhClusterTriggerBCExoticUnMatch
! Number of events triggered, depending on BC of the cluster.
Int_t GetTriggerClusterBC() const
Double_t GetEventWeight() const
UInt_t GetEventTriggerMask() const
TH1F * fhYVertex
! Y Vertex distribution of accepted event.
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
virtual TString GetAddedHistogramsStringToName() const
Bool_t IsMCCrossSectionCalculationOn() const
Definition: AliAnaWeights.h:80
TH1F * fhPileUpClusterMult
! N clusters with high time.
TH1F * fhTrackMult
! Number of tracks per event histogram.
Int_t GetEMCalEventBC(Int_t bc) const
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
void ProcessEvent(Int_t iEntry, const char *currentFileName)
TH1F * fhClusterTriggerBCBadCellExotic
! Number of events triggered, depending on BC of the cluster.
TH1F * fhNPileUpEvents
! N events pasing pile up cut.
void SetCaloUtils(AliCalorimeterUtils *caloutils)
Bool_t fCheckPtHard
For MC done in pT-Hard bins, plot specific histogram.
Bool_t IsAccessToTrackTimeOn() const
TH1F * fhClusterTriggerBCBadCellUnMatch
! Number of events triggered, depending on BC of the cluster.
TH1F * fhNEventsNoTriggerFound
! Number of events where whatever was done, no trigger is found.
virtual ~AliAnaCaloTrackCorrMaker()
Destructor. Remove only owned pointers.
TH1F * fhEventPlaneAngle
! Histogram with Event plane angle.
virtual void SetReader(AliCaloTrackReader *reader)
UInt_t GetMixEventTriggerMask() const
virtual void ResetLists()
Reset lists, called in AliAnaCaloTrackCorrMaker.
Bool_t IsExoticEvent() const
TH1F * fhClusterTriggerBCExotic
! Number of events triggered, depending on BC of the cluster.
virtual TClonesArray * GetCreateOutputAODBranch()
Create AOD branch filled in the analysis.
Bool_t IsEventTriggerAtSEOn() const
TH1F * fhCentrality
! Histogram with centrality bins.
TH1F * fhZVertex
! Z Vertex distribution of accepted event.
virtual Double_t GetEventPlaneAngle() const
const char Option_t
Definition: External.C:48
TH1F * fhClusterTriggerBCExoticUnMatchReMatch[3]
! Number of events triggered by exotic, depending on BC of the clusterm not matched, open cuts and rematch.
Int_t GetTrackEventBC(Int_t bc) const
Bool_t IsPileUpFromEMCal() const
Check if event is from pile-up determined by EMCal.
TH1F * fhClusterTriggerBCBadClusterExotic
! Number of events triggered, depending on BC of the cluster.
void FillControlHistograms()
Fill here event control histograms.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
bool Bool_t
Definition: External.C:53
TH1F * fhYVertexExotic
! Y Vertex distribution of exotic event.
TH1F * fhPtHard
! pt of parton, only for MC generation (pythia jet-jet/gamma-jet)
AliCaloTrackReader * GetReader()
void AccessGeometry(AliVEvent *inputEvent)
virtual TList * GetCreateControlHistograms()
AliCalorimeterUtils * GetCaloUtils()
AliAnaWeights * GetWeightUtils()
TH1F * fhCentralityWeighted
! Histogram with centrality bins. After centrality weight.
Bool_t fMakeAOD
If true makes analysis generating AODs.
void AccessOADB(AliVEvent *event)
TH1F * fhPrimaryVertexBC
! Primary vertex BC.
TList * fOutputContainer
! Output histograms container.
Int_t GetEMCalEventBCcut(Int_t bc) const
TH1F * fhPileUpClusterMultAndSPDPileUp
! N clusters with high time in events tagged as pile-up by SPD.
Bool_t IsBadCellTriggerEvent() const
AliCaloTrackReader * fReader
Pointer to AliCaloTrackReader.
Bool_t fProcessEvent
In case of automatic wagon configuration, do not process analysis, but init stuff expected by manager...
TList * fAnalysisContainer
List with analysis pointers.
Definition: External.C:196
TH1F * fhNPileUpVertSPD
! Number of pile-up vertices from SPD.
Int_t GetTrackEventBCcut(Int_t bc) const
Bool_t IsPileUpFromSPDAndEMCal() const
Check if event is from pile-up determined by SPD and EMCal.
TH1F * fhClusterTriggerBCUnMatch
! Number of events triggered, depending on BC of the cluster.
Int_t GetTriggerClusterId() const
TH1F * fhEventPlaneAngleWeighted
! Histogram with Event plane angle. After centrality weight.
Steering class of package CaloTrackCorrelartions.