AliPhysics  aaf9c62 (aaf9c62)
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"
30 #include "AliLog.h"
31 #include "AliGenPythiaEventHeader.h"
32 #include "AliMCEvent.h"
33 
34 //---- CaloTrack corr system ----
37 #include "AliMCAnalysisUtils.h"
38 
40 ClassImp(AliAnaCaloTrackCorrMaker) ;
42 
43 //__________________________________________________
46 //__________________________________________________
48 TObject(),
49 fReader(0), fCaloUtils(0),
50 fOutputContainer(new TList ), fAnalysisContainer(new TList ),
51 fProcessEvent(1),
52 fMakeHisto(kFALSE), fMakeAOD(kFALSE),
53 fAnaDebug(0), fCuts(new TList),
54 fScaleFactor(-1),
55 fFillDataControlHisto(1), fSumw2(0),
56 fCheckPtHard(0),
57 // Control histograms
58 fhNEventsIn(0), fhNEvents(0),
59 fhNExoticEvents(0), fhNEventsNoTriggerFound(0),
60 fhNPileUpEvents(0), fhNPileUpEventsTriggerBC0(0),
61 fhXVertex(0), fhYVertex(0), fhZVertex(0),
62 fhXVertexExotic(0), fhYVertexExotic(0), fhZVertexExotic(0),
63 fhPtHard(0), fhPtHardWeighted(0),
64 fhPileUpClusterMult(0), fhPileUpClusterMultAndSPDPileUp(0),
65 fhTrackMult(0),
66 fhCentrality(0), fhEventPlaneAngle(0),
67 fhNEventsWeighted(0), fhTrackMultWeighted(0),
68 fhCentralityWeighted(0), fhEventPlaneAngleWeighted(0),
69 fhNMergedFiles(0), fhScaleFactor(0),
70 fhEMCalBCEvent(0), fhEMCalBCEventCut(0),
71 fhTrackBCEvent(0), fhTrackBCEventCut(0),
72 fhPrimaryVertexBC(0), fhTimeStampFraction(0),
73 fhNPileUpVertSPD(0), fhNPileUpVertTracks(0),
74 // EMCal trigger control histograms
75 fhClusterTriggerBC(0), fhClusterTriggerBCExotic(0),
76 fhClusterTriggerBCBadCell(0), fhClusterTriggerBCBadCellExotic(0),
77 fhClusterTriggerBCBadCluster(0), fhClusterTriggerBCBadClusterExotic(0),
78 fhClusterTriggerBCUnMatch(0), fhClusterTriggerBCExoticUnMatch(0),
79 fhClusterTriggerBCBadCellUnMatch(0), fhClusterTriggerBCBadCellExoticUnMatch(0),
80 fhClusterTriggerBCBadClusterUnMatch(0), fhClusterTriggerBCBadClusterExoticUnMatch(0),
81 fhClusterTriggerBCEventBC(0), fhClusterTriggerBCEventBCUnMatch(0),
82 fhClusterTriggerBCExoticEventBC(0), fhClusterTriggerBCExoticEventBCUnMatch(0)
83 {
84  AliDebug(1,"*** Analysis Maker Constructor ***");
85 
86  for(Int_t i = 0; i < 3; i++)
87  {
90  }
91 
93 }
94 
95 //________________________________________________________________________________________
97 //________________________________________________________________________________________
99 TObject(),
100 fReader(), //(new AliCaloTrackReader(*maker.fReader)),
101 fCaloUtils(),//(new AliCalorimeterUtils(*maker.fCaloUtils)),
104 fMakeHisto(maker.fMakeHisto), fMakeAOD(maker.fMakeAOD),
105 fAnaDebug(maker.fAnaDebug), fCuts(new TList()),
108 fSumw2(maker.fSumw2),
110 fhNEventsIn(maker.fhNEventsIn),
111 fhNEvents(maker.fhNEvents),
116 fhXVertex(maker.fhXVertex),
117 fhYVertex(maker.fhYVertex),
118 fhZVertex(maker.fhZVertex),
122 fhPtHard(maker.fhPtHard),
126 fhTrackMult(maker.fhTrackMult),
159 {
160  for(Int_t i = 0; i < 3; i++)
161  {
164  }
165 }
166 
167 //___________________________________________________
169 //___________________________________________________
171 {
172  // Do not delete it here, already done somewhere else, need to understand where.
173  // if (fOutputContainer) {
174  // fOutputContainer->Clear();
175  // delete fOutputContainer ;
176  // }
177 
178  if (fAnalysisContainer)
179  {
180  fAnalysisContainer->Delete();
181  delete fAnalysisContainer ;
182  }
183 
184  if (fReader) delete fReader ;
185  if (fCaloUtils) delete fCaloUtils ;
186 
187  if(fCuts)
188  {
189  fCuts->Delete();
190  delete fCuts;
191  }
192 }
193 
194 //__________________________________________________________________
196 //__________________________________________________________________
198 {
199  if ( fAnalysisContainer)
200  {
201  fAnalysisContainer->AddAt(ana,n);
202  }
203  else
204  {
205  AliFatal("AnalysisContainer not initialized");
206  }
207 }
208 
209 //_________________________________________________________
213 //_________________________________________________________
215 {
216  TList *aodBranchList = fReader->GetAODBranchList() ;
217 
218  for(Int_t iana = 0; iana < fAnalysisContainer->GetEntries(); iana++)
219  {
221  if(ana->NewOutputAOD()) aodBranchList->Add(ana->GetCreateOutputAODBranch());
222  }
223 
224  return aodBranchList ;
225 }
226 
227 //____________________________________________________
229 //____________________________________________________
231 {
232  AliVEvent* event = fReader->GetInputEvent();
233  AliESDEvent* esdevent = dynamic_cast<AliESDEvent*> (event);
234  AliAODEvent* aodevent = dynamic_cast<AliAODEvent*> (event);
235 
236  fhNEvents ->Fill(0); // Number of events analyzed
237 
238  Double_t v[3];
239  event->GetPrimaryVertex()->GetXYZ(v) ;
240  fhXVertex->Fill(v[0]);
241  fhYVertex->Fill(v[1]);
242  fhZVertex->Fill(v[2]);
243 
247 
249  {
250  Float_t eventWeight = fReader->GetEventWeight();
251 
252  fhNEventsWeighted ->Fill(0., eventWeight);
253  fhTrackMultWeighted ->Fill(fReader->GetTrackMultiplicity(),eventWeight);
254  fhCentralityWeighted ->Fill(fReader->GetEventCentrality (),eventWeight);
256  }
257 
258  // Check the pT hard in MC, assume it is pythia
259  // Make sure AliCaloTrackReader::FillInputEvent() run before
261  {
262  Float_t pTHard = (fReader->GetGenPythiaEventHeader())->GetPtHard();
263 
264  fhPtHard->Fill(pTHard);
265 
268  fhPtHardWeighted->Fill(pTHard,fReader->GetEventWeight());
269 
270  AliDebug(1,Form("Pythia event selected with pT hard %2.2f GeV/c and weight %2.2e",
271  pTHard,fReader->GetEventWeight()));
272  }
273 
275  {
276  if( fReader->IsPileUpFromSPD())
277  fhNPileUpEvents->Fill(0.5);
278  //if( event->IsPileupFromSPDInMultBins())
279  // fhNPileUpEvents->Fill(1.5);
280  if( fReader->IsPileUpFromEMCal())
281  fhNPileUpEvents->Fill(2.5);
283  fhNPileUpEvents->Fill(3.5);
285  fhNPileUpEvents->Fill(4.5);
287  fhNPileUpEvents->Fill(5.5);
289  fhNPileUpEvents->Fill(6.5);
291  fhNPileUpEvents->Fill(7.5);
292 
293  Int_t triggerBC = fReader->GetTriggerClusterBC() ;
294  if( triggerBC == 0 &&
295  !fReader->IsExoticEvent() &&
297  {
298  if( fReader->IsPileUpFromSPD())
299  fhNPileUpEventsTriggerBC0->Fill(0.5);
300  //if( event->IsPileupFromSPDInMultBins())
301  // fhNPileUpEventsTriggerBC0->Fill(1.5);
302  if( fReader->IsPileUpFromEMCal())
303  fhNPileUpEventsTriggerBC0->Fill(2.5);
305  fhNPileUpEventsTriggerBC0->Fill(3.5);
307  fhNPileUpEventsTriggerBC0->Fill(4.5);
309  fhNPileUpEventsTriggerBC0->Fill(5.5);
311  fhNPileUpEventsTriggerBC0->Fill(6.5);
313  fhNPileUpEventsTriggerBC0->Fill(7.5);
314  }
315 
316  if(fReader->IsPileUpFromSPD())
318 
320 
321  for(Int_t i = 0; i < 19; i++)
322  {
324  {
325  if(fReader->GetTrackEventBC(i)) fhTrackBCEvent ->Fill(i);
327  }
328  if(fReader->GetEMCalEventBC(i)) fhEMCalBCEvent ->Fill(i);
330  }
331 
332  Int_t bc = fReader->GetVertexBC();
333  if(bc!=AliVTrack::kTOFBCNA) fhPrimaryVertexBC->Fill(bc);
334 
335  // N pile up vertices
336  Int_t nVerticesSPD = -1;
337  Int_t nVerticesTracks = -1;
338 
339  if (esdevent)
340  {
341  nVerticesSPD = esdevent->GetNumberOfPileupVerticesSPD();
342  nVerticesTracks = esdevent->GetNumberOfPileupVerticesTracks();
343 
344  }//ESD
345  else if (aodevent)
346  {
347  nVerticesSPD = aodevent->GetNumberOfPileupVerticesSPD();
348  nVerticesTracks = aodevent->GetNumberOfPileupVerticesTracks();
349  }//AOD
350 
351  fhNPileUpVertSPD ->Fill(nVerticesSPD);
352  fhNPileUpVertTracks->Fill(nVerticesTracks);
353 
354  // Time stamp
355  if(fReader->IsSelectEventTimeStampOn() && esdevent)
356  {
357  Int_t timeStamp = esdevent->GetTimeStamp();
358  Float_t timeStampFrac = 1.*(timeStamp-fReader->GetRunTimeStampMin()) /
360 
361  //printf("stamp %d, min %d, max %d, frac %f\n", timeStamp, fReader->GetRunTimeStampMin(), fReader->GetRunTimeStampMax(), timeStampFrac);
362 
363  fhTimeStampFraction->Fill(timeStampFrac);
364  }
365  }
366 }
367 
368 //___________________________________________________________
370 //___________________________________________________________
372 {
373  if ( fFillDataControlHisto < 2 ) return;
374 
375  Int_t triggerBC = fReader->GetTriggerClusterBC() ;
376  Bool_t exotic = fReader->IsExoticEvent();
377  Bool_t badCluster = fReader->IsBadCellTriggerEvent();
379  Bool_t triggerMatch= fReader->IsTriggerMatched();
380  Bool_t triggerBCOK = kTRUE;
381  Int_t triggerId = fReader->GetTriggerClusterId() ;
382 
383  Bool_t reMatchOpenTime = fReader->IsTriggerMatchedOpenCuts(0);
384  Bool_t reMatchNeigbour = fReader->IsTriggerMatchedOpenCuts(1);
385  Bool_t reMatchBoth = fReader->IsTriggerMatchedOpenCuts(2);
386 
387  if(triggerId < 0)
388  {
389  //printf("Trigger id %d\n",triggerId);
390  if(triggerId == -2) fhNEventsNoTriggerFound->Fill(0);
391  triggerBCOK = kFALSE;
392  }
393 
394  if(exotic)
395  {
396  fhNExoticEvents->Fill(0) ;
397  Double_t v[3];
398  fReader->GetInputEvent()->GetPrimaryVertex()->GetXYZ(v) ;
399  fhXVertexExotic->Fill(v[0]);
400  fhYVertexExotic->Fill(v[1]);
401  fhZVertexExotic->Fill(v[2]);
402  }
403  //if(fReader->IsExoticEvent()) printf("Maker: EXOTIC Cluster trigger\n");
404 
405  if(!triggerBCOK) return;
406 
407  Int_t eventBC = fReader->GetInputEvent()->GetBunchCrossNumber();
408  if(eventBC%4 < 0 || eventBC%4 > 3 )
409  AliWarning(Form("STRANGE: Trigger BC %d - Event BC %d, modulo4 %d",triggerBC,eventBC,eventBC%4));
410 
411  if(triggerMatch)
412  {
413  if (!exotic && !badCluster) fhClusterTriggerBC->Fill(triggerBC);
414  else if( exotic && badCluster)
415  {
416  fhClusterTriggerBCBadClusterExotic->Fill(triggerBC);
417  if(badCell) fhClusterTriggerBCBadCellExotic->Fill(triggerBC);
418  }
419  else if( exotic && !badCluster) fhClusterTriggerBCExotic->Fill(triggerBC);
420  else if( badCluster && !exotic )
421  {
422  fhClusterTriggerBCBadCluster ->Fill(triggerBC);
423  if(badCell) fhClusterTriggerBCBadCell->Fill(triggerBC);
424  }
425 
426  if(!exotic) fhClusterTriggerBCEventBC ->Fill(triggerBC,eventBC%4);
427  else fhClusterTriggerBCExoticEventBC->Fill(triggerBC,eventBC%4);
428  }
429  else
430  {
431  if (!exotic && !badCluster)
432  {
433  fhClusterTriggerBCUnMatch->Fill(triggerBC);
434  if(reMatchOpenTime) fhClusterTriggerBCUnMatchReMatch[0]->Fill(triggerBC);
435  if(reMatchNeigbour) fhClusterTriggerBCUnMatchReMatch[1]->Fill(triggerBC);
436  if(reMatchBoth) fhClusterTriggerBCUnMatchReMatch[2]->Fill(triggerBC);
437  }
438  else if( exotic && badCluster)
439  {
441  if(badCell) fhClusterTriggerBCBadCellExoticUnMatch ->Fill(triggerBC);
442  }
443  else if( exotic && !badCluster)
444  {
445  fhClusterTriggerBCExoticUnMatch->Fill(triggerBC);
446  if(reMatchOpenTime) fhClusterTriggerBCExoticUnMatchReMatch[0]->Fill(triggerBC);
447  if(reMatchNeigbour) fhClusterTriggerBCExoticUnMatchReMatch[1]->Fill(triggerBC);
448  if(reMatchBoth) fhClusterTriggerBCExoticUnMatchReMatch[2]->Fill(triggerBC);
449  }
450  else if( badCluster && !exotic )
451  {
452  fhClusterTriggerBCBadClusterUnMatch->Fill(triggerBC);
453  if(badCell)fhClusterTriggerBCBadCellUnMatch->Fill(triggerBC);
454  }
455 
456  if(!exotic) fhClusterTriggerBCEventBCUnMatch ->Fill(triggerBC,eventBC%4);
457  else fhClusterTriggerBCExoticEventBCUnMatch->Fill(triggerBC,eventBC%4);
458  }
459 }
460 
461 //_______________________________________________________
464 //_______________________________________________________
466 {
467  if ( !fProcessEvent ) return fCuts;
468 
469  // Reader cuts
470  TObjString * objstring = fReader->GetListOfParameters();
471  fCuts->Add(objstring);
472 
473  // Analysis wagons cuts
474  for(Int_t iana = 0; iana < fAnalysisContainer->GetEntries(); iana++)
475  {
477  objstring = ana->GetAnalysisCuts();
478 
479  if ( objstring ) fCuts->Add(objstring);
480  }
481 
482  return fCuts ;
483 }
484 
485 //___________________________________________________
489 //___________________________________________________
491 {
492  if ( !fProcessEvent ) return fOutputContainer;
493 
494  // General event histograms
495 
496  fhNEventsIn = new TH1F("hNEventsIn", "Number of input events" , 1 , 0 , 1 ) ;
497  fhNEventsIn->SetYTitle("# events");
499 
500  fhNEvents = new TH1F("hNEvents", "Number of analyzed events" , 1 , 0 , 1 ) ;
501  fhNEvents->SetYTitle("# events");
503 
504  fhXVertex = new TH1F("hXVertex", " X vertex distribution" , 200 , -1 , 1 ) ;
505  fhXVertex->SetXTitle("v_{x} (cm)");
507 
508  fhYVertex = new TH1F("hYVertex", " Y vertex distribution" , 200 , -1 , 1 ) ;
509  fhYVertex->SetXTitle("v_{y} (cm)");
511 
512  fhZVertex = new TH1F("hZVertex", " Z vertex distribution" , 200 , -50 , 50 ) ;
513  fhZVertex->SetXTitle("v_{z} (cm)");
515 
516  fhCentrality = new TH1F("hCentrality","Number of events in centrality bin", 100, 0., 100) ;
517  fhCentrality->SetXTitle("Centrality bin");
519 
520  fhEventPlaneAngle = new TH1F("hEventPlaneAngle","Number of events in event plane", 100, 0., TMath::Pi()) ;
521  fhEventPlaneAngle->SetXTitle("EP angle (rad)");
523 
524  fhTrackMult = new TH1F
525  ("hTrackMult",
526  Form("Number of tracks per event with #it{p}_{T} > %2.2f GeV/#it{c} and |#eta|<%2.2f",
527  GetReader()->GetTrackMultiplicityPtCut(),GetReader()->GetTrackMultiplicityEtaCut()),
528  2000 , 0 , 2000) ;
529  fhTrackMult->SetXTitle("# tracks");
531 
532  if(fCheckPtHard)
533  {
534  fhPtHard = new TH1F("hPtHard"," #it{p}_{T}-hard for selected triggers",300,0,300);
535  fhPtHard->SetXTitle("#it{p}_{T}^{hard} (GeV/#it{c})");
537 
540  {
541  fhPtHardWeighted = new TH1F("hPtHardWeighted"," #it{p}_{T}-hard for selected triggers, weighted by cross section",300,0,300);
542  fhPtHardWeighted->SetXTitle("#it{p}_{T}^{hard} (GeV/#it{c})");
544  }
545  }
546 
547  if ( GetReader()->GetWeightUtils()->IsCentralityWeightOn() )
548  {
549  fhNEventsWeighted = new TH1F("hNEventsWeighted", "Number of analyzed events weighted by centrality", 1 , 0 , 1 ) ;
550  fhNEventsWeighted->SetYTitle("# events");
552 
553  fhCentralityWeighted = new TH1F("hCentralityWeighted","Number of events in centrality bin weighted by centrality", 100, 0.,100) ;
554  fhCentralityWeighted->SetXTitle("Centrality bin");
556 
557  fhEventPlaneAngleWeighted = new TH1F("hEventPlaneAngleWeighted","Number of events in event plane weighted by centrality",100, 0., TMath::Pi()) ;
558  fhEventPlaneAngleWeighted->SetXTitle("EP angle (rad)");
560 
561  fhTrackMultWeighted = new TH1F
562  ("hTrackMultWeighted",
563  Form("Number of tracks per weighted event with #it{p}_{T} > %2.2f GeV/#it{c} and |#eta|<%2.2f",
564  GetReader()->GetTrackMultiplicityPtCut(),GetReader()->GetTrackMultiplicityEtaCut()),
565  2000 , 0 , 2000) ;
566  fhTrackMultWeighted->SetXTitle("# tracks");
568  }
569 
571  {
572  // Trigger and exoticity related histograms
573  if(fFillDataControlHisto > 1)
574  {
575  fhNExoticEvents = new TH1F("hNExoticEvents", "Number of analyzed events triggered by exotic cluster" , 1 , 0 , 1 ) ;
576  fhNExoticEvents->SetYTitle("# exotic events");
578 
579  fhNEventsNoTriggerFound = new TH1F("hNEventsNoTriggerFound", "Number of analyzed events triggered but no trigger found" , 1 , 0 , 1 ) ;
580  fhNEventsNoTriggerFound->SetYTitle("# exotic events");
582 
583  Int_t nbin = 11;
584  Float_t minbin =-5.5;
585  Float_t maxbin = 5.5;
586  Int_t labelshift = 6;
587 
588  fhClusterTriggerBCEventBC = new TH2F("hClusterTriggerBCEventBC", "Found trigger BC and Event BC",
589  nbin , minbin ,maxbin,4,0, 4) ;
590  fhClusterTriggerBCEventBC->SetXTitle("cluster trigger BC");
591  for(Int_t i = 0; i < 4; i++)
592  fhClusterTriggerBCEventBC->GetYaxis()->SetBinLabel(i+1 ,Form("BC/4=%d",i));
593  fhClusterTriggerBCEventBC->SetXTitle("cluster trigger BC");
594  for(Int_t i = 1; i < 12; i++)
595  fhClusterTriggerBCEventBC->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
596  fhClusterTriggerBCEventBC->SetYTitle("Event BC%4");
598 
599  fhClusterTriggerBCExoticEventBC = new TH2F("hClusterTriggerBCExoticEventBC", "Found exotic trigger BC and Event BC",
600  nbin , minbin ,maxbin,4,1, 4) ;
601  for(Int_t i = 0; i < 4; i++)
602  fhClusterTriggerBCExoticEventBC->GetYaxis()->SetBinLabel(i+1 ,Form("BC/4=%d",i));
603  fhClusterTriggerBCExoticEventBC->SetXTitle("cluster trigger BC");
604  for(Int_t i = 1; i < 12; i++)
605  fhClusterTriggerBCExoticEventBC->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
606  fhClusterTriggerBCExoticEventBC->SetYTitle("Event BC%4");
608 
609  fhClusterTriggerBCEventBCUnMatch = new TH2F("hClusterTriggerBCEventBCUnMatch", "Found unmatched trigger BC and Event BC",
610  nbin , minbin ,maxbin,4,1, 4) ;
611  for(Int_t i = 0; i < 4; i++)
612  fhClusterTriggerBCEventBCUnMatch->GetYaxis()->SetBinLabel(i+1 ,Form("BC/4=%d",i));
613  fhClusterTriggerBCEventBCUnMatch->SetXTitle("cluster trigger BC");
614  for(Int_t i = 1; i < 12; i++)
615  fhClusterTriggerBCEventBCUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
616  fhClusterTriggerBCEventBCUnMatch->SetYTitle("Event BC%4");
618 
619  fhClusterTriggerBCExoticEventBCUnMatch = new TH2F("hClusterTriggerExoticBCEventBCUnMatch", "Found unmatched trigger BC and Event BC",
620  nbin , minbin ,maxbin,4,1, 4) ;
621  for(Int_t i = 0; i < 4; i++)
622  fhClusterTriggerBCExoticEventBCUnMatch->GetYaxis()->SetBinLabel(i+1 ,Form("BC/4=%d",i));
623  fhClusterTriggerBCExoticEventBCUnMatch->SetXTitle("cluster trigger BC");
624  for(Int_t i = 1; i < 12; i++)
625  fhClusterTriggerBCExoticEventBCUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
626  fhClusterTriggerBCExoticEventBCUnMatch->SetYTitle("Event BC%4");
628 
629  fhClusterTriggerBC = new TH1F("hClusterTriggerBC",
630  "Number of analyzed events triggered by a cluster in a given BC",
631  nbin , minbin ,maxbin) ;
632  fhClusterTriggerBC->SetYTitle("# events");
633  for(Int_t i = 1; i < 12; i++)
634  fhClusterTriggerBC->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
636 
637  fhClusterTriggerBCExotic = new TH1F("hClusterTriggerBCExotic",
638  "Number of analyzed events triggered by a exotic cluster in a given BC",
639  nbin , minbin ,maxbin) ;
640  fhClusterTriggerBCExotic->SetYTitle("# events");
641  for(Int_t i = 1; i < 12; i++)
642  fhClusterTriggerBCExotic->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
644 
645 
646  fhClusterTriggerBCBadCell = new TH1F("hClusterTriggerBCBadCell",
647  "Number of analyzed events triggered by a bad cell in a given BC",
648  nbin , minbin ,maxbin) ;
649 
650  fhClusterTriggerBCBadCell->SetYTitle("# events");
651  for(Int_t i = 1; i < 12; i++)
652  fhClusterTriggerBCBadCell->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
654 
655  fhClusterTriggerBCBadCellExotic = new TH1F("hClusterTriggerBCBadCellExotic",
656  "Number of analyzed events triggered by a bad cell & exotic cluster in a given BC",
657  nbin , minbin ,maxbin) ;
658  fhClusterTriggerBCBadCellExotic->SetYTitle("# events");
659  for(Int_t i = 1; i < 12; i++)
660  fhClusterTriggerBCBadCellExotic->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
662 
663  fhClusterTriggerBCBadCluster = new TH1F("hClusterTriggerBCBadCluster",
664  "Number of analyzed events triggered by a bad cluster in a given BC",
665  nbin , minbin ,maxbin) ;
666 
667  fhClusterTriggerBCBadCluster->SetYTitle("# events");
668  for(Int_t i = 1; i < 12; i++)
669  fhClusterTriggerBCBadCluster->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
671 
672 
673  fhClusterTriggerBCBadClusterExotic = new TH1F("hClusterTriggerBCBadClusterExotic",
674  "Number of analyzed events triggered by a bad cluster & exotic cluster in a given BC",
675  nbin , minbin ,maxbin) ;
676 
677  fhClusterTriggerBCBadClusterExotic->SetYTitle("# events");
678  for(Int_t i = 1; i < 12; i++)
679  fhClusterTriggerBCBadClusterExotic->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
681 
682  fhClusterTriggerBCUnMatch = new TH1F("hClusterTriggerBCUnMatch",
683  "Number of analyzed events triggered by a cluster (no trigger patch match) in a given BC",
684  nbin , minbin ,maxbin) ;
685  fhClusterTriggerBCUnMatch->SetYTitle("# events");
686  for(Int_t i = 1; i < 12; i++)
687  fhClusterTriggerBCUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
689 
690  fhClusterTriggerBCExoticUnMatch = new TH1F("hClusterTriggerBCExoticUnMatch",
691  "Number of analyzed events triggered by a exotic cluster (no trigger patch match) in a given BC",
692  nbin , minbin ,maxbin) ;
693  fhClusterTriggerBCExoticUnMatch->SetYTitle("# events");
694  for(Int_t i = 1; i < 12; i++)
695  fhClusterTriggerBCExoticUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
697 
698 
699  fhClusterTriggerBCBadCellUnMatch = new TH1F("hClusterTriggerBCBadCellUnMatch",
700  "Number of analyzed events triggered by a bad cluster (no trigger patch match) in a given BC",
701  nbin , minbin ,maxbin) ;
702  fhClusterTriggerBCBadCellUnMatch->SetYTitle("# events");
703  for(Int_t i = 1; i < 12; i++)
704  fhClusterTriggerBCBadCellUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
706 
707 
708  fhClusterTriggerBCBadCellExoticUnMatch = new TH1F("hClusterTriggerBCBadCellExoticUnMatch",
709  "Number of analyzed events triggered by a bad&exotic cluster (no trigger patch match) in a given BC",
710  nbin , minbin ,maxbin) ;
711  fhClusterTriggerBCBadCellExoticUnMatch->SetYTitle("# events");
712  for(Int_t i = 1; i < 12; i++)
713  fhClusterTriggerBCBadCellExoticUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
715 
716 
717  fhClusterTriggerBCBadClusterUnMatch = new TH1F("hClusterTriggerBCBadClusterUnMatch",
718  "Number of analyzed events triggered by a bad cluster (no trigger patch match) in a given BC",
719  nbin , minbin ,maxbin) ;
720  fhClusterTriggerBCBadClusterUnMatch->SetYTitle("# events");
721  for(Int_t i = 1; i < 12; i++)
722  fhClusterTriggerBCBadClusterUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
724 
725 
726  fhClusterTriggerBCBadClusterExoticUnMatch = new TH1F("hClusterTriggerBCBadClusterExoticUnMatch",
727  "Number of analyzed events triggered by a bad&exotic cluster (no trigger patch match) in a given BC",
728  nbin , minbin ,maxbin) ;
729  fhClusterTriggerBCBadClusterExoticUnMatch->SetYTitle("# events");
730  for(Int_t i = 1; i < 12; i++)
731  fhClusterTriggerBCBadClusterExoticUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
733 
734  TString rematch[] = {"OpenTime","CheckNeighbours","Both"};
735  for(Int_t j = 0; j < 3; j++)
736  {
737  fhClusterTriggerBCUnMatchReMatch[j] = new TH1F(Form("hClusterTriggerBCUnMatch_ReMatch_%s",rematch[j].Data()),
738  Form("Number of analyzed events triggered by a cluster (no trigger patch match) in a given BC, re-match %s",rematch[j].Data()),
739  nbin , minbin ,maxbin) ;
740  fhClusterTriggerBCUnMatchReMatch[j]->SetYTitle("# events");
741  for(Int_t i = 1; i < 12; i++)
742  fhClusterTriggerBCUnMatchReMatch[j]->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
744 
745  fhClusterTriggerBCExoticUnMatchReMatch[j] = new TH1F(Form("hClusterTriggerBCExoticUnMatch_ReMatch_%s",rematch[j].Data()),
746  Form("Number of analyzed events triggered by a exotic cluster (no trigger patch match) in a given BC, re-match %s",rematch[j].Data()),
747  nbin , minbin ,maxbin) ;
748  fhClusterTriggerBCExoticUnMatchReMatch[j]->SetYTitle("# events");
749  for(Int_t i = 1; i < 12; i++)
750  fhClusterTriggerBCExoticUnMatchReMatch[j]->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
752  }
753 
754  fhXVertexExotic = new TH1F("hXVertexExotic", " X vertex distribution in exotic events" , 200 , -1 , 1 ) ;
755  fhXVertexExotic->SetXTitle("v_{x} (cm)");
757 
758  fhYVertexExotic = new TH1F("hYVertexExotic", " Y vertex distribution in exotic events" , 200 , -1 , 1 ) ;
759  fhYVertexExotic->SetXTitle("v_{y} (cm)");
761 
762  fhZVertexExotic = new TH1F("hZVertexExotic", " Z vertex distribution in exotic events" , 200 , -50 , 50 ) ;
763  fhZVertexExotic->SetXTitle("v_{z} (cm)");
765  }
766 
767  fhNPileUpEvents = new TH1F("hNPileUpEvents", "Number of events considered as pile-up", 8 , 0 , 8 ) ;
768  fhNPileUpEvents->SetYTitle("# events");
769  fhNPileUpEvents->GetXaxis()->SetBinLabel(1 ,"SPD");
770  fhNPileUpEvents->GetXaxis()->SetBinLabel(2 ,"Multi SPD");
771  fhNPileUpEvents->GetXaxis()->SetBinLabel(3 ,"EMCal");
772  fhNPileUpEvents->GetXaxis()->SetBinLabel(4 ,"EMCal || SPD");
773  fhNPileUpEvents->GetXaxis()->SetBinLabel(5 ,"EMCal && SPD");
774  fhNPileUpEvents->GetXaxis()->SetBinLabel(6 ,"!EMCal && SPD");
775  fhNPileUpEvents->GetXaxis()->SetBinLabel(7 ,"EMCal && !SPD");
776  fhNPileUpEvents->GetXaxis()->SetBinLabel(8 ,"!EMCal && !SPD");
778 
779  fhNPileUpEventsTriggerBC0 = new TH1F("hNPileUpEventsTriggerBC0","Number of events considered as pile-up, trigger cluster in BC=0", 8 , 0 , 8 ) ;
780  fhNPileUpEventsTriggerBC0->SetYTitle("# events");
781  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(1 ,"SPD");
782  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(2 ,"Multi SPD");
783  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(3 ,"EMCal");
784  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(4 ,"EMCal || SPD");
785  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(5 ,"EMCal && SPD");
786  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(6 ,"!EMCal && SPD");
787  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(7 ,"EMCal && !SPD");
788  fhNPileUpEventsTriggerBC0->GetXaxis()->SetBinLabel(8 ,"!EMCal && !SPD");
790 
792  {
793  fhTrackBCEvent = new TH1F("hTrackBCEvent", "Number of events with at least 1 track in a bunch crossing ", 19 , 0 , 19 ) ;
794  fhTrackBCEvent->SetYTitle("# events");
795  fhTrackBCEvent->SetXTitle("Bunch crossing");
796  for(Int_t i = 1; i < 20; i++)
797  fhTrackBCEvent->GetXaxis()->SetBinLabel(i ,Form("%d",i-10));
799 
800  fhTrackBCEventCut = new TH1F("hTrackBCEventCut", "Number of events with at least 1 track in a bunch crossing ", 19 , 0 , 19 ) ;
801  fhTrackBCEventCut->SetYTitle("# events");
802  fhTrackBCEventCut->SetXTitle("Bunch crossing");
803  for(Int_t i = 1; i < 20; i++)
804  fhTrackBCEventCut->GetXaxis()->SetBinLabel(i ,Form("%d",i-10));
806  }
807 
808  fhPrimaryVertexBC = new TH1F("hPrimaryVertexBC", "Number of primary vertex per bunch crossing ", 41 , -20 , 20 ) ;
809  fhPrimaryVertexBC->SetYTitle("# events");
810  fhPrimaryVertexBC->SetXTitle("Bunch crossing");
812 
813  fhEMCalBCEvent = new TH1F("hEMCalBCEvent", "Number of events with at least 1 cluster in a bunch crossing ", 19 , 0 , 19 ) ;
814  fhEMCalBCEvent->SetYTitle("# events");
815  fhEMCalBCEvent->SetXTitle("Bunch crossing");
816  for(Int_t i = 1; i < 20; i++)
817  fhEMCalBCEvent->GetXaxis()->SetBinLabel(i ,Form("%d",i-10));
819 
820  fhEMCalBCEventCut = new TH1F("hEMCalBCEventCut", "Number of events with at least 1 cluster in a bunch crossing", 19 , 0 , 19 ) ;
821  fhEMCalBCEventCut->SetYTitle("# events");
822  fhEMCalBCEventCut->SetXTitle("Bunch crossing");
823  for(Int_t i = 1; i < 20; i++)
824  fhEMCalBCEventCut->GetXaxis()->SetBinLabel(i ,Form("%d",i-10));
826 
827  fhPileUpClusterMult = new TH1F("hPileUpClusterMult", "Number of clusters per event with large time (|t| > 20 ns)" , 100 , 0 , 100 ) ;
828  fhPileUpClusterMult->SetXTitle("# clusters");
830 
831  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 ) ;
832  fhPileUpClusterMultAndSPDPileUp->SetXTitle("# clusters");
834 
835  fhNPileUpVertSPD = new TH1F ("hNPileUpVertSPD","N pile-up SPD vertex", 50,0,50);
836  fhNPileUpVertSPD->SetYTitle("# vertex ");
838 
839  fhNPileUpVertTracks = new TH1F ("hNPileUpVertTracks","N pile-up Tracks vertex", 50,0,50);
840  fhNPileUpVertTracks->SetYTitle("# vertex ");
842 
844  {
845  fhTimeStampFraction = new TH1F("hTimeStampFraction","Fraction of events within a given time stamp range",150, -1, 2) ;
846  fhTimeStampFraction->SetXTitle("fraction");
848  }
849  }
850 
851  fhNMergedFiles = new TH1F("hNMergedFiles", "Number of merged output files" , 1 , 0 , 1 ) ;
852  fhNMergedFiles->SetYTitle("# files");
853  fhNMergedFiles->Fill(1); // Fill here with one entry, while merging it will count the rest
855 
856  if(fScaleFactor > 0)
857  {
858  fhScaleFactor = new TH1F("hScaleFactor", "Number of merged output files" , 1 , 0 , 1 ) ;
859  fhScaleFactor->SetYTitle("scale factor");
860  fhScaleFactor->SetBinContent(1,fScaleFactor); // Fill here
862  }
863 
864  // Histograms defined and filled in this class, just get the pointers
865  // and add them to the list.
866  if(GetReader()->GetWeightUtils()->IsMCCrossSectionCalculationOn())
867  {
869 
870  if ( templist && templist->GetEntries() == 2 )
871  {
872  templist->SetOwner(kFALSE); //Owner is fOutputContainer.
873 
874  fOutputContainer->Add(templist->At(0));
875  fOutputContainer->Add(templist->At(1));
876  }
877  }
878 
879  // --------------------------------
880  // Add control histograms in Reader
881  // --------------------------------
882 
883  TList * templist = fReader->GetCreateControlHistograms();
884  templist->SetOwner(kFALSE); //Owner is fOutputContainer.
885 
886  for(Int_t ih = 0; ih < templist->GetEntries() ; ih++)
887  {
888  //if ( fSumw2 ) ((TH1*) templist->At(ih))->Sumw2();
889 
890  //printf("histo %d %p %s\n",ih,templist->At(ih), templist->At(ih)->GetName());
891 
892  //Add histogram to general container
893  fOutputContainer->Add(templist->At(ih)) ;
894  }
895 
896  delete templist;
897 
898  // ------------------------
899  // Add analysis histograms
900  // ------------------------
901 
902  if(!fAnalysisContainer || fAnalysisContainer->GetEntries()==0)
903  {
904  AliWarning("Analysis job list not initialized!!!");
905  return fOutputContainer;
906  }
907 
908  const Int_t buffersize = 255;
909  char newname[buffersize];
910 
911  for(Int_t iana = 0; iana < fAnalysisContainer->GetEntries(); iana++)
912  {
914 
915  if(fMakeHisto) // Analysis with histograms as output on
916  {
917  //Fill container with appropriate histograms
918  templist = ana->GetCreateOutputObjects();
919  templist->SetOwner(kFALSE); //Owner is fOutputContainer.
920 
921  for(Int_t i = 0; i < templist->GetEntries(); i++)
922  {
923  //Add only to the histogram name the name of the task
924  if( strcmp((templist->At(i))->ClassName(),"TObjString") )
925  {
926  snprintf(newname,buffersize, "%s%s", (ana->GetAddedHistogramsStringToName()).Data(), (templist->At(i))->GetName());
927  //printf("name %s, new name %s\n",(templist->At(i))->GetName(),newname);
928 
929  ((TH1*) templist->At(i))->SetName(newname);
930 
931  if ( fSumw2 ) ((TH1*) templist->At(i))->Sumw2();
932  }
933 
934  //Add histogram to general container
935  fOutputContainer->Add(templist->At(i)) ;
936  }
937 
938  delete templist;
939 
940  }// Analysis with histograms as output on
941 
942  }//Loop on analysis defined
943 
944  // Initialize calorimeters geometry pointers
945  //GetCaloUtils()->InitPHOSGeometry();
946  //GetCaloUtils()->InitEMCALGeometry();
947 
948  return fOutputContainer;
949 }
950 
951 //___________________________________
956 //___________________________________
958 {
959  // Activate debug level in maker
960  if ( fAnaDebug >= 0 )
961  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(this->ClassName(),fAnaDebug);
962 
963  // Initialize reader
964  GetReader()->Init();
965 
966  GetReader()->SetCaloUtils(GetCaloUtils()); // pass the calo utils pointer to the reader
967 
968  // Activate debug level in calo utils
969  if ( fCaloUtils->GetDebug() >= 0 )
970  (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(fCaloUtils->ClassName(), fCaloUtils->GetDebug());
971 
972  if(!fAnalysisContainer || fAnalysisContainer->GetEntries()==0)
973  {
974  AliWarning("Analysis job list not initialized");
975  return;
976  }
977 
978  for(Int_t iana = 0; iana < fAnalysisContainer->GetEntries(); iana++)
979  {
981 
982  ana->SetReader(fReader); // Set Reader for each analysis
983 
984  ana->SetCaloUtils(fCaloUtils); // Set CaloUtils for each analysis
985 
986  ana->Init();
987 
988  ana->InitDebug();
989 
990  } // Loop on analysis defined
991 
992 }
993 
994 //_____________________________________________
996 //_____________________________________________
998 {
999  fMakeHisto = kTRUE;
1000  fMakeAOD = kTRUE;
1001  fAnaDebug = 0; // No debugging info displayed by default
1002 }
1003 
1004 //______________________________________________________________
1006 //______________________________________________________________
1008 {
1009  if(! opt)
1010  return;
1011 
1012  if ( !fProcessEvent )
1013  {
1014  printf("Events not processed\n");
1015  return;
1016  }
1017 
1018  printf("***** Print: %s %s ******\n", GetName(), GetTitle() ) ;
1019  printf("Debug level = %d\n", fAnaDebug ) ;
1020  printf("Produce Histo = %d\n", fMakeHisto ) ;
1021  printf("Produce AOD = %d\n", fMakeAOD ) ;
1022  printf("Number of analysis tasks = %d\n", fAnalysisContainer->GetEntries()) ;
1023 
1024  if(!strcmp("all",opt))
1025  {
1026  printf("Print analysis Tasks settings :\n") ;
1027  for(Int_t iana = 0; iana<fAnalysisContainer->GetEntries(); iana++)
1028  {
1030  }
1031 
1032  printf("Print analysis Reader settings :\n") ;
1033  fReader->Print("");
1034  printf("Print analysis Calorimeter Utils settings :\n") ;
1035  fCaloUtils->Print("");
1036  }
1037 }
1038 
1039 //_____________________________________________________________________________________
1049 //_____________________________________________________________________________________
1050 void AliAnaCaloTrackCorrMaker::ProcessEvent(Int_t iEntry, const char * currentFileName)
1051 {
1052  if ( !fProcessEvent ) return;
1053 
1055  AliFatal("Histograms not initialized");
1056 
1057  AliDebug(1,Form("*** AliAnaCaloTrackCorrMaker::ProcessEvent() Event %d ***",iEntry));
1058  AliDebug(2,Form("Current File Name : %s", currentFileName));
1059  //printf("fAODBranchList %p, entries %d\n",fAODBranchList,fAODBranchList->GetEntries());
1060 
1061  // Each event needs an empty branch
1062  TList * aodList = fReader->GetAODBranchList();
1063  Int_t nAODBranches = aodList->GetEntries();
1064  for(Int_t iaod = 0; iaod < nAODBranches; iaod++)
1065  {
1066  TClonesArray *tca = dynamic_cast<TClonesArray*> (aodList->At(iaod));
1067  if(tca) tca->Clear("C");
1068  }
1069 
1070  // Set geometry matrices before filling arrays, in case recalibration/position calculation etc is needed
1072 
1073  // Set the AODB calibration, bad channels etc. parameters at least once
1075 
1076  // Tell the reader to fill the data in the 3 detector lists
1077  Bool_t ok = fReader->FillInputEvent(iEntry, currentFileName);
1078 
1079  // Access pointers, and trigger mask check needed in mixing case
1080  AliAnalysisManager *manager = AliAnalysisManager::GetAnalysisManager();
1081  AliInputEventHandler *inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
1082 
1083  UInt_t isMBTrigger = kFALSE;
1084  UInt_t isTrigger = kFALSE;
1085  if(inputHandler)
1086  {
1087  isMBTrigger = inputHandler->IsEventSelected() & fReader->GetMixEventTriggerMask();
1088  isTrigger = inputHandler->IsEventSelected() & fReader->GetEventTriggerMask();
1089  }
1090 
1091  //Fill trigger control histograms, make sure it is only for triggered events and
1092  // not the MB events used for mixing
1093  if(fReader->IsEventTriggerAtSEOn() || isTrigger)
1094  {
1095  fhNEventsIn->Fill(0);
1097  }
1098 
1099  if(!ok)
1100  {
1101  AliDebug(1,Form("*** Skip event *** %d",iEntry));
1102  fReader->ResetLists();
1103  return ;
1104  }
1105 
1106  // Magic line to write events to file
1107  if(fReader->WriteDeltaAODToFile())AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kTRUE);
1108 
1109  //printf(">>>>>>>>>> BEFORE >>>>>>>>>>>\n");
1110  //gObjectTable->Print();
1111 
1112  // Init mag field for tracks in case of ESDs, not really necessary
1113  if ( !TGeoGlobalMagField::Instance()->GetField() && fReader->GetInputEvent() )
1114  (fReader->GetInputEvent())->InitMagneticField();
1115 
1116  // Loop on analysis algorithms
1117 
1118  AliDebug(1,"*** Begin analysis ***");
1119 
1120  Int_t nana = fAnalysisContainer->GetEntries() ;
1121  for(Int_t iana = 0; iana < nana; iana++)
1122  {
1124 
1125  ana->ConnectInputOutputAODBranches(); // Sets branches for each analysis
1126 
1127  //Fill pool for mixed event for the analysis that need it
1128  if(!fReader->IsEventTriggerAtSEOn() && isMBTrigger)
1129  {
1130  ana->FillEventMixPool();
1131  if(!isTrigger) continue; // pool filled do not try to fill AODs or histograms if trigger is not MB
1132  }
1133 
1134  //Make analysis, create aods in aod branch and in some cases fill histograms
1135  if(fMakeAOD ) ana->MakeAnalysisFillAOD() ;
1136 
1137  //Make further analysis with aod branch and fill histograms
1139 
1140  }
1141 
1142  fReader->ResetLists();
1143 
1144  // In case of mixing analysis, non triggered events are used,
1145  // do not fill control histograms for a non requested triggered event
1146  if(!fReader->IsEventTriggerAtSEOn() && !isTrigger)
1147  {
1148  AliDebug(1,"*** End analysis, MB for mixing ***");
1149  return;
1150  }
1151 
1153 
1154  //printf(">>>>>>>>>> AFTER >>>>>>>>>>>\n");
1155  //gObjectTable->Print();
1156 
1157  AliDebug(1,"*** End analysis ***");
1158 }
1159 
1160 //__________________________________________________________
1163 //__________________________________________________________
1165 {
1166  if ( !fProcessEvent ) return;
1167 
1168  if (!outputList)
1169  {
1170  AliError("No output list");
1171  return;
1172  }
1173 
1174  for(Int_t iana = 0; iana < fAnalysisContainer->GetEntries(); iana++)
1175  {
1177  if(ana->MakePlotsOn())ana->Terminate(outputList);
1178  } // Loop on analysis defined
1179 }
1180 
1181 
1182 
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)
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...
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...
virtual AliGenPythiaEventHeader * GetGenPythiaEventHeader() const
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...
void ana(anaModes mode=mLocal)
Definition: ana.C:986
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.
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.