AliPhysics  8d00e07 (8d00e07)
AliBaseAODTask.cxx
Go to the documentation of this file.
1 #include "AliBaseAODTask.h"
2 #include "AliForwardUtil.h"
3 #include "AliAODForwardMult.h"
4 #include "AliAODCentralMult.h"
5 #include "AliAODMultEventClass.h"
6 #include <AliAnalysisManager.h>
7 #include <AliAnalysisDataSlot.h>
8 #include <AliAnalysisDataContainer.h>
9 #include <AliLog.h>
10 #include <AliAODEvent.h>
11 #include <TROOT.h>
12 #include <TSystem.h>
13 #include <TInterpreter.h>
14 #include <TFile.h>
15 #include <TH2.h>
16 #include <iostream>
17 
18 //____________________________________________________________________
21  fTriggerMask(0xFFFFFFFF),
22  fFilterMask(AliAODForwardMult::kDefaultFilter),
23  fCentAxis(0, 0, -1),
24  fAbsMinCent(-1),
25  fIPzAxis(1,-10,10),
26  fTriggers(0),
27  fEventStatus(0),
28  fVertex(0),
29  fCent(0),
30  fAccVertex(0),
31  fAccVertexXY(0),
32  fAccCent(0),
33  fFirstEvent(true),
34  fCloneList(false),
35  fSums(0),
36  fResults(0)
37 {
38 }
39 //____________________________________________________________________
41  const char* title)
42  : AliAnalysisTaskSE(name),
43  fTriggerMask(0xFFFFFFFF),
44  fFilterMask(AliAODForwardMult::kDefaultFilter),
45  fCentAxis(0, 0, -1),
46  fAbsMinCent(-1),
47  fIPzAxis(1,-10,10),
48  fTriggers(0),
49  fEventStatus(0),
50  fVertex(0),
51  fCent(0),
52  fAccVertex(0),
53  fAccVertexXY(0),
54  fAccCent(0),
55  fFirstEvent(true),
56  fCloneList(false),
57  fSums(0),
58  fResults(0)
59 {
60  SetTitle(title && title[0] != '\0' ? title : this->ClassName());
61  fCentAxis.SetName("centAxis");
62  fCentAxis.SetTitle("Centrality [%]");
63  DefineOutput(1, TList::Class());
64  DefineOutput(2, TList::Class());
65 }
66 
67 //____________________________________________________________________
68 Bool_t
69 AliBaseAODTask::Configure(const char* macro)
70 {
71  // --- Configure the task ------------------------------------------
72  TString macroPath(gROOT->GetMacroPath());
73  if (!macroPath.Contains("$(ALICE_PHYSICS)/PWGLF/FORWARD/analysis2")) {
74  macroPath.Append(":$(ALICE_PHYSICS)/PWGLF/FORWARD/analysis2");
75  gROOT->SetMacroPath(macroPath);
76  }
77  TString mac(macro);
78  if (mac.EqualTo("-default-")) mac = DefaultConfig();
79  const char* config = gSystem->Which(gROOT->GetMacroPath(), mac.Data());
80  if (!config) {
81  AliWarningF("%s not found in %s", mac.Data(), gROOT->GetMacroPath());
82  return false;
83  }
84  // if (gInterpreter->IsLoaded(config))
85  // gInterpreter->UnloadFile(config);
86 
87  AliInfoF("Loading configuration of '%s' from %s", ClassName(), config);
88  gROOT->Macro(Form("%s((%s*)%p)", config, GetTitle(), this));
89 
90  Info("Configure", "Unloading configuration script");
91  gInterpreter->UnloadFile(config);
92  delete config;
93 
94  return true;
95 }
96 
97 //________________________________________________________________________
98 void
100 {
101  //
102  // Set the trigger maskl
103  //
104  // Parameters:
105  // mask Trigger mask
106  //
107  DGUARD(fDebug,3,"Set the trigger mask: %s", mask);
109 }
110 //________________________________________________________________________
111 void
113 {
114  DGUARD(fDebug,3,"Set the trigger mask: 0x%0x", mask);
115  fTriggerMask = mask;
116 }
117 //________________________________________________________________________
118 void
120 {
121  //
122  // Set the trigger maskl
123  //
124  // Parameters:
125  // mask Trigger mask
126  //
127  DGUARD(fDebug,3,"Set the filter mask: %s", mask);
129 }
130 //________________________________________________________________________
131 void
133 {
134  DGUARD(fDebug,3,"Set the filter mask: 0x%0x", mask);
135  fFilterMask = mask;
136 }
137 //====================================================================
138 void AliBaseAODTask::FixAxis(TAxis& axis, const char* title)
139 {
140  if (title && title[0] != '\0') axis.SetTitle(title);
141  axis. SetNdivisions(210);
142  axis. SetLabelFont(42);
143  axis. SetLabelSize(0.03);
144  axis. SetLabelOffset(0.005);
145  axis. SetLabelColor(kBlack);
146  axis. SetTitleOffset(1);
147  axis. SetTitleFont(42);
148  axis. SetTitleSize(0.04);
149  axis. SetTitleColor(kBlack);
150  axis. SetTickLength(0.03);
151  axis. SetAxisColor(kBlack);
152 }
153 //____________________________________________________________________
154 void AliBaseAODTask::SetAxis(TAxis& axis, Int_t n, Double_t* borders)
155 {
156  axis.Set(n, borders);
157  FixAxis(axis);
158 }
159 //____________________________________________________________________
161  const TString& spec,
162  const char* sep)
163 {
164  TString s(spec);
165  Bool_t isRange = false, isUnit = false;
166  if (s[0] == 'r' || s[0] == 'R') {
167  isRange = true;
168  s.Remove(0,1);
169  }
170  if (s[0] == 'u' || s[0] == 'U') {
171  isUnit = true;
172  s.Remove(0,1);
173  }
174  TObjArray* tokens = s.Tokenize(sep);
175  TArrayD bins(tokens->GetEntries());
176  TObjString* token = 0;
177  TIter next(tokens);
178  Int_t i = 0;
179  while ((token = static_cast<TObjString*>(next()))) {
180  Double_t v = token->String().Atof();
181  bins[i] = v;
182  i++;
183  }
184  delete tokens;
185  if (isUnit) {
186  if (bins.GetSize() > 1)
187  SetAxis(axis, Int_t(bins[1]-bins[0]), bins[0], bins[1]);
188  else
189  SetAxis(axis, 2*Int_t(bins[0]), bins[0]);
190  }
191  else if (isRange) {
192  Int_t nBins = Int_t(bins[0]);
193  if (bins.GetSize() > 2)
194  SetAxis(axis, nBins, bins[1], bins[2]);
195  else
196  SetAxis(axis, nBins, bins[1]);
197  }
198  else
199  SetAxis(axis, bins.GetSize()-1,bins.GetArray());
200 }
201 //____________________________________________________________________
203  Int_t n,
204  Double_t l,
205  Double_t h)
206 {
207  axis.Set(n, l, h);
208  FixAxis(axis);
209 }
210 //____________________________________________________________________
212 {
213  SetAxis(axis, n, -TMath::Abs(m), +TMath::Abs(m));
214 }
215 //____________________________________________________________________
217  Int_t nSig,
218  const char* alt)
219 {
220  gROOT->IndentLevel();
221  TString tit(alt ? alt : axis.GetTitle());
222  tit.Append(" axis:");
223  printf(" %-26s ", tit.Data());
224  if (axis.GetXbins() && axis.GetXbins()->GetArray()) {
225  printf("%.*f", nSig, axis.GetBinLowEdge(1));
226  for (Int_t i = 1; i <= axis.GetNbins(); i++)
227  printf(":%.*f", nSig, axis.GetBinUpEdge(i));
228  }
229  else
230  printf("%d bins between %.*f and %.*f",
231  axis.GetNbins(), nSig, axis.GetXmin(),nSig,axis.GetXmax());
232  printf("\n");
233 }
234 
235 //________________________________________________________________________
236 void
238 {
239  DGUARD(fDebug,3,"Set centrality axis, %d bins", n);
240  TArrayD dbins(n+1);
241  for (UShort_t i = 0; i <= n; i++)
242  dbins[i] = (bins[i] == 100 ? 100.1 : bins[i]);
243  SetAxis(fCentAxis, n, dbins.GetArray());
244 }
245 
246 //________________________________________________________________________
247 void
249 {
250  DGUARD(fDebug,3,"Set centrality axis: %s", bins);
251  if (!bins || bins[0] == '\0') return;
252 
253  TString spec(bins);
254  if (spec.EqualTo("none", TString::kIgnoreCase))
255  return;
256 
257  TArrayD edges;
258  if (spec.EqualTo("default", TString::kIgnoreCase) ||
259  spec.EqualTo("pbpb", TString::kIgnoreCase)) {
260  // 1 2 3 4 5 6 7 8 9 10 11 12
261  Double_t tmp[] = { 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
262  SetAxis(fCentAxis,11,tmp);
263  return;
264  }
265  if (spec.EqualTo("ppb", TString::kIgnoreCase) ||
266  spec.EqualTo("pbp", TString::kIgnoreCase)) {
267  // 1 2 3 4 5 6 7 8
268  Double_t tmp[] = { 0, 5, 10, 20, 40, 60, 80, 100 };
269  SetAxis(fCentAxis,7, tmp);
270  return;
271  }
272 
273  SetAxis(fCentAxis,bins);
274 }
275 
276 //________________________________________________________________________
277 void
279 {
280  DGUARD(fDebug,3,"Set centrality axis, %d bins", n);
281  SetAxis(fCentAxis, n, bins);
282 }
283 //________________________________________________________________________
284 void
286 {
287  // Short_t a[] = { low, high };
288  SetAxis(fCentAxis, (high-low), low, high);
289 }
290 
291 //____________________________________________________________________
292 Bool_t
293 AliBaseAODTask::Connect(const char* sumFile,
294  const char* resFile)
295 {
296  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
297  if (!mgr) {
298  Error("AddTaskForwardMult", "No analysis manager to connect to.");
299  return false;
300  }
301 
302  // --- Check that we have an AOD input handler ---------------------
303  UShort_t aodInput = 0;
304  if (!(aodInput = AliForwardUtil::CheckForAOD())) {
305  AliError("Cannot proceed without and AOD handler");
306  return false;
307  }
308  if (aodInput == 2 &&
309  !AliForwardUtil::CheckForTask("AliForwardMultiplicityBase")) {
310  AliError("The relevant task wasn't added to the train");
311  return false;
312  }
313 
314  // Add to the manager
315  mgr->AddTask(this);
316 
317  // Create and connect output containers
318  TString sumOut;
319  TString resOut;
320  if (sumFile && sumFile[0] != '\0') sumOut = sumFile;
321  if (resFile && resFile[0] != '\0') resOut = resFile;
322  else if (sumFile && sumFile[0] != '\0') resOut = sumFile;
323  if (sumOut.IsNull()) sumOut = AliAnalysisManager::GetCommonFileName();
324  if (resOut.IsNull()) resOut = AliAnalysisManager::GetCommonFileName();
325 
326  AliAnalysisDataContainer* sumCon =
327  mgr->CreateContainer(Form("%sSums", GetName()), TList::Class(),
328  AliAnalysisManager::kOutputContainer, sumOut);
329  AliAnalysisDataContainer* resCon =
330  mgr->CreateContainer(Form("%sResults", GetName()), TList::Class(),
331  AliAnalysisManager::kParamContainer, resOut);
332  mgr->ConnectInput(this, 0, mgr->GetCommonInputContainer());
333  mgr->ConnectOutput(this, 1, sumCon);
334  mgr->ConnectOutput(this, 2, resCon);
335 
336  return true;
337 }
338 //____________________________________________________________________
339 void
341 {
342  //
343  // Create output objects
344  //
345  //
346  DGUARD(fDebug,1,"Create user ouput");
347  fSums = new TList;
348  fSums->SetName(Form("%sSums", GetName()));
349  fSums->SetOwner(true);
350 
352  fTriggers->SetDirectory(0);
353 
355  fEventStatus->SetDirectory(0);
356 
357  fSums->Add(fTriggers);
358  fSums->Add(fEventStatus);
359 
361  fVertex = new TH1D("vertex", "IP_{z} of all events",
362  vA->GetNbins(), vA->GetXbins()->GetArray());
363  fVertex->SetXTitle("IP_{z} [cm]");
364  fVertex->SetYTitle("Events");
365  fVertex->SetDirectory(0);
366  fVertex->SetFillColor(kRed+2);
367  fVertex->SetFillStyle(3002);
368  fVertex->SetLineColor(kRed+2);
369  fSums->Add(fVertex);
370  fAccVertex = static_cast<TH1D*>(fVertex->Clone("vertexAcc"));
371  fAccVertex->SetTitle("IP_{z} of accepted events");
372  fAccVertex->SetDirectory(0);
373  fAccVertex->SetFillColor(kGreen+2);
374  fAccVertex->SetLineColor(kGreen+2);
375  fSums->Add(fAccVertex);
376 
377  fAccVertexXY = new TH2D("vertexAccXY", "IP_{x,y} of accepted events",
378  1000,-2,2,1000,-2,2);
379  fAccVertexXY->SetXTitle("IP_{x} [cm]");
380  fAccVertexXY->SetYTitle("IP_{y} [cm]");
381  fAccVertexXY->SetDirectory(0);
382  fSums->Add(fAccVertexXY);
383 
384  fCent = new TH1D("cent","Centrality of all events",102, -1, 101);
385  fCent->SetXTitle("Centrality [%]");
386  fCent->SetYTitle("Events");
387  fCent->SetFillColor(kRed+2);
388  fCent->SetFillStyle(3002);
389  fCent->SetLineColor(kRed+2);
390  fCent->SetDirectory(0);
391  fSums->Add(fCent);
392  fAccCent = static_cast<TH1D*>(fCent->Clone("centAcc"));
393  fAccCent->SetTitle("Centrality of accepted events");
394  fAccCent->SetDirectory(0);
395  fAccCent->SetFillColor(kGreen+2);
396  fAccCent->SetLineColor(kGreen+2);
397  fSums->Add(fAccCent);
398 
399  // Store centrality axis as a histogram - which can be merged
400  TH1* cH = 0;
401  if (fCentAxis.GetXbins() && fCentAxis.GetXbins()->GetSize() > 0)
402  cH = new TH1I(fCentAxis.GetName(), fCentAxis.GetTitle(),
403  fCentAxis.GetNbins(), fCentAxis.GetXbins()->GetArray());
404  else
405  cH = new TH1I(fCentAxis.GetName(), fCentAxis.GetTitle(),
406  fCentAxis.GetNbins(), fCentAxis.GetXmin(),
407  fCentAxis.GetXmax());
408  cH->SetBinContent(1,1);
409  cH->GetXaxis()->SetTitle(fCentAxis.GetTitle());
410  cH->GetXaxis()->SetName(fCentAxis.GetName());
411 
412  fSums->Add(cH);
413 
416  fSums->Add(AliForwardUtil::MakeParameter("count", 1));
417  fSums->Add(AliForwardUtil::MakeParameter("alirootRev",
419  fSums->Add(AliForwardUtil::MakeParameter("alirootBranch",
421 
422 
423 
424  if (!Book()) AliFatalF("Failed to book output objects for %s", GetName());
425 
426  Print();
427 
428  PostData(1, fSums);
429 }
430 
431 //____________________________________________________________________
434 {
435  // Get the forward object that contains our event selection stuff
436  TObject* obj = 0;
437  if (mc) obj = aod.FindListObject("ForwardMC");
438  else obj = aod.FindListObject("Forward");
439  if (!obj) {
440  if (verb) AliWarning("No forward object found");
441  return 0;
442  }
443  AliAODForwardMult* forward = static_cast<AliAODForwardMult*>(obj);
444  return forward;
445 }
446 //____________________________________________________________________
449 {
450  // Get the forward object that contains our event selection stuff
451  TObject* obj = aod.FindListObject("MultClass");
452  if (!obj) {
453  if (verb) AliWarning("No multiplicity event class object found");
454  return 0;
455  }
456  AliAODMultEventClass* multClass = static_cast<AliAODMultEventClass*>(obj);
457  return multClass;
458 }
459 //____________________________________________________________________
460 Double_t
462  AliAODForwardMult* forward,
463  Int_t& qual)
464 {
465  qual = 0;
466  Double_t cent = forward->GetCentrality();
467  Double_t max = (HasCentrality() ? fCentAxis.GetXmax() : 100);
468  if (cent < 0) { cent = -.5; qual = 0xFFFF; }
469  if (cent > max) { cent = TMath::Max(max+.1,100.5); qual = 198; }
470  return cent;
471 }
472 //____________________________________________________________________
473 Double_t
475  AliAODForwardMult* forward)
476 {
477  Int_t qual = 0;
478  Double_t cent = GetCentrality(event, forward, qual);
479  if (qual > 0) forward->SetTriggerBits(AliAODForwardMult::kCentNoCalib);
480  return cent;
481 }
482 
483 //____________________________________________________________________
484 Double_t
486  AliAODForwardMult* forward)
487 {
488  return forward->GetIpZ();
489 }
490 //____________________________________________________________________
491 Bool_t
493 
494 {
495  x = -10000;
496  y = -10000;
497  AliVVertex* gen = aod.GetPrimaryVertex();
498  AliVVertex* vtx[] = { aod.GetPrimaryVertexSPD(),
499  aod.GetPrimaryVertexTPC(),
500  gen };
501  Bool_t ret = false;
502  for (Int_t i = 0; i < 3; i++) {
503  if (!vtx[i] || (vtx[i] != gen && !vtx[i]->IsFromVertexer3D()))
504  continue;
505 
506  x = vtx[i]->GetX();
507  y = vtx[i]->GetY();
508  ret = true;
509  break;
510  }
511  return ret;
512 }
513 
514 //____________________________________________________________________
517 {
518  // Get the central object that contains our event selection stuff
519  TObject* obj = 0;
520  if (mc) obj = aod.FindListObject("CentralClustersMC");
521  else obj = aod.FindListObject("CentralClusters");
522  if (!obj) {
523  if (verb) AliWarning("No central object found");
524  return 0;
525  }
526  AliAODCentralMult* central = static_cast<AliAODCentralMult*>(obj);
527  return central;
528 }
529 //____________________________________________________________________
530 TH2D*
532 {
533  TObject* obj = aod.FindListObject("primary");
534  if (!obj) return 0;
535  TH2D* ret = static_cast<TH2D*>(obj);
536  return ret;
537 }
538 
539 //____________________________________________________________________
540 void
542 {
543  //
544  // Process a single event
545  //
546  // Parameters:
547  // option Not used
548  //
549  // Main loop
550  DGUARD(fDebug,1,"Analyse the AOD event in UserExec");
551  if (!PreEvent()) return;
552 
554  if (!aod) return;
555 
556  // Get the forward object that contains our event selection stuff
557  AliAODForwardMult* forward = GetForward(*aod);
558  if (!forward) return;
559 
560  if (fFirstEvent) {
561  if (!PreData()) return;
562  StoreInformation(*forward);
563  fFirstEvent = false;
564  }
565 
566  // Get our ip_z and centrality
567  Double_t vtx = GetIpZ(*aod, forward);
568  Float_t cent = GetCentrality(*aod, forward);
569  fVertex->Fill(vtx);
570  fCent->Fill(cent);
571  if (HasCentrality() && fAbsMinCent >= 0 && cent < fAbsMinCent) return;
572 
573  // Now check our event selectio up front
574  if (!CheckEvent(*forward)) return;
575 
576  // Let user defined code do the job
577  Bool_t taken = Event(*aod);
578 
579  // Fill our histograms
580  if (taken) {
581  fAccVertex->Fill(vtx);
582  fAccCent->Fill(cent);
583 
584  Double_t ipX, ipY;
585  GetIpXY(*aod, ipX, ipY);
586  fAccVertexXY->Fill(ipX, ipY);
587  }
588 
589  PostData(1, fSums);
590 
591  PostEvent();
592 }
593 
594 //____________________________________________________________________
595 Bool_t
597 {
598  if (HasCentrality()) {
599  return forward.CheckEvent(fTriggerMask,
600  fIPzAxis.GetXmin(),
601  fIPzAxis.GetXmax(),
602  fCentAxis.GetXmin(),
603  fCentAxis.GetXmax(),
604  fTriggers,
605  fEventStatus,
606  fFilterMask);
607 }
608  return forward.CheckEvent(fTriggerMask,
609  fIPzAxis.GetXmin(),
610  fIPzAxis.GetXmax(),
611  0,
612  0,
613  fTriggers,
614  fEventStatus,
615  fFilterMask);
616 }
617 
618 //____________________________________________________________________
619 void
621 {
622  fSums->Add(AliForwardUtil::MakeParameter("sNN", forward.GetSNN()));
623  fSums->Add(AliForwardUtil::MakeParameter("sys", forward.GetSystem()));
624 }
625 
626 //____________________________________________________________________
627 Bool_t
629 {
630  AliAnalysisDataSlot* slot = GetOutputSlot(no);
631  if (!slot) {
632  AliWarningF("No output slot # %d defined", no);
633  return false;
634  }
635 
636  AliAnalysisDataContainer* cont = slot->GetContainer();
637  if (!cont) {
638  AliWarningF("Output slot # %d has no container", no);
639  return false;
640  }
641 
642  TFile* file = cont->GetFile();
643  if (!file) {
644  AliWarningF("Container of output slot %d has no file", no);
645  return false;
646  }
647  if (!file->IsWritable()) {
648  AliWarningF("File (%s) associated with output slot # %d not writable",
649  file->GetName(), no);
650  return false;
651  }
652 
653  TDirectory* save = gDirectory;
654  TNamed* tag = new TNamed("trainName",
655  AliAnalysisManager::GetAnalysisManager()->GetName());
656  file->cd();
657  tag->Write();
658  AliInfoF("Wrote train name (%s) to output file %s",
659  tag->GetTitle(), file->GetName());
660  save->cd();
661 
662  return true;
663 }
664 
665 //____________________________________________________________________
666 void
668 {
669  TList* list = dynamic_cast<TList*>(GetOutputData(1));
670  if (!list) {
671  AliError(Form("No output list defined (%p)", GetOutputData(1)));
672  if (GetOutputData(1)) GetOutputData(1)->Print();
673  return;
674  }
675 
676  // Assign to our internal variable for use by sub-classes
677  fSums = list;
678 
679  // Create our output container
680  TString resName(Form("%sResults", GetName()));
681  if (fCloneList)
682  fResults = static_cast<TList*>(fSums->Clone(resName.Data()));
683  else {
684  fResults = new TList;
685  fResults->SetName(resName.Data());
686  }
687  fResults->SetOwner(true);
688 
689  // Now call user defined routines
690  if (!Finalize()) {
691  AliErrorF("Failed to finalize this task (%s)", GetName());
692  return;
693  }
694 
695  // Store name in output
696  if (!StoreTrainName(2))
697  fResults->Add(new TNamed("trainName",
698  AliAnalysisManager::GetAnalysisManager()
699  ->GetName()));
700 
701  PostData(2, fResults);
702 }
703 
704 #define PF(N,V,...) \
705  AliForwardUtil::PrintField(N,V, ## __VA_ARGS__)
706 #define PFB(N,FLAG) \
707  do { \
708  AliForwardUtil::PrintName(N); \
709  std::cout << std::boolalpha << (FLAG) << std::noboolalpha << std::endl; \
710  } while(false)
711 #define PFV(N,VALUE) \
712  do { \
713  AliForwardUtil::PrintName(N); \
714  std::cout << (VALUE) << std::endl; } while(false)
715 
716 //____________________________________________________________________
717 void
718 AliBaseAODTask::Print(Option_t* /*option=""*/) const
719 {
726  gROOT->IncreaseDirLevel();
729  PFV("Abs.least cent", fAbsMinCent);
730  PrintAxis(fIPzAxis, 1, "IP z");
731  PrintAxis(fCentAxis, 0, "Centraltiy");
732  gROOT->DecreaseDirLevel();
733 }
734 //
735 // EOF
736 //
virtual Bool_t CheckEvent(const AliAODForwardMult &forward)
virtual void Terminate(Option_t *option)
UShort_t GetSystem() const
static UInt_t MakeTriggerMask(const char *what, const char *sep="&")
double Double_t
Definition: External.C:58
static TAxis * MakeFullIpZAxis(Int_t nCenter=20)
void SetTriggerBits(UInt_t bits)
virtual Bool_t PreEvent()
static void SetAxis(TAxis &axis, Int_t n, Double_t *borders)
const char * title
Definition: MakeQAPdf.C:27
void SetTriggerMask(UInt_t mask)
TSystem * gSystem
virtual Bool_t PreData()
static TH1I * MakeTriggerHistogram(const char *name="triggers", UInt_t mask=0)
virtual void UserCreateOutputObjects()
static AliAODEvent * GetAODEvent(AliAnalysisTaskSE *task)
Float_t GetIpZ() const
virtual Bool_t GetIpXY(AliAODEvent &aod, Double_t &x, Double_t &y)
UShort_t GetSNN() const
void SetFilterMask(UInt_t mask)
Int_t cH
Definition: Combine.C:26
Per-event per bin.
virtual Bool_t StoreTrainName(Int_t no)
int Int_t
Definition: External.C:63
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
Double_t fAbsMinCent
float Float_t
Definition: External.C:68
virtual Bool_t PostEvent()
Various utilities used in PWGLF/FORWARD.
virtual Bool_t Configure(const char *macro="-default-")
Definition: External.C:228
Definition: External.C:212
#define PFV(N, VALUE)
void Print(Option_t *option="") const
unsigned long ULong_t
Definition: External.C:38
static void PrintAxis(const TAxis &axis, Int_t nSig=2, const char *alt=0)
static const Char_t * GetTriggerString(UInt_t mask, const char *sep="&")
#define DGUARD(L, N, F,...)
static void PrintTask(const TObject &o)
virtual Bool_t Event(AliAODEvent &aod)=0
short Short_t
Definition: External.C:23
static TObject * MakeParameter(const char *name, UShort_t value)
static TH1I * MakeStatusHistogram(const char *name="status")
virtual Bool_t Connect(const char *sumFile=0, const char *resFile=0)
static void FixAxis(TAxis &axis, const char *title=0)
static UShort_t CheckForAOD()
AliAODMultEventClass * GetMultClass(const AliAODEvent &aod, Bool_t verb=true)
AliAODForwardMult * GetForward(const AliAODEvent &aod, Bool_t mc=false, Bool_t verb=true)
TFile * file
TList with histograms for a given trigger.
static ULong_t AliROOTBranch()
virtual Bool_t Finalize()=0
unsigned short UShort_t
Definition: External.C:28
virtual void StoreInformation(AliAODForwardMult &forward)
void SetCentralityAxis(UShort_t n, Short_t *bins)
Float_t GetCentrality() const
const char Option_t
Definition: External.C:48
virtual Bool_t Book()=0
TH2D * GetPrimary(const AliAODEvent &aod)
virtual const char * DefaultConfig() const
AliAODCentralMult * GetCentral(const AliAODEvent &aod, Bool_t mc=false, Bool_t verb=true)
bool Bool_t
Definition: External.C:53
static Bool_t CheckForTask(const char *clsOrName, Bool_t cls=true)
static ULong_t AliROOTRevision()
virtual Double_t GetCentrality(AliAODEvent &event, AliAODForwardMult *forward, Int_t &qual)
Bool_t CheckEvent(UInt_t triggerMask=kInel, Double_t vzMin=-10, Double_t vzMax=10, Double_t cMin=0, Double_t cMax=100, TH1 *hist=0, TH1 *status=0, UInt_t filterMask=kDefaultFilter) const
Definition: External.C:196
virtual void UserExec(Option_t *option)
Bool_t HasCentrality() const
virtual Double_t GetIpZ(AliAODEvent &event, AliAODForwardMult *forward)