AliPhysics  648edd6 (648edd6)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  else 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  SetAxis(fCentAxis,bins);
273 }
274 
275 //________________________________________________________________________
276 void
278 {
279  DGUARD(fDebug,3,"Set centrality axis, %d bins", n);
280  SetAxis(fCentAxis, n, bins);
281 }
282 //________________________________________________________________________
283 void
285 {
286  Short_t a[] = { low, high };
287  SetAxis(fCentAxis, (high-low), low, high);
288 }
289 
290 //____________________________________________________________________
291 Bool_t
292 AliBaseAODTask::Connect(const char* sumFile,
293  const char* resFile)
294 {
295  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
296  if (!mgr) {
297  Error("AddTaskForwardMult", "No analysis manager to connect to.");
298  return false;
299  }
300 
301  // --- Check that we have an AOD input handler ---------------------
302  UShort_t aodInput = 0;
303  if (!(aodInput = AliForwardUtil::CheckForAOD())) {
304  AliError("Cannot proceed without and AOD handler");
305  return false;
306  }
307  if (aodInput == 2 &&
308  !AliForwardUtil::CheckForTask("AliForwardMultiplicityBase")) {
309  AliError("The relevant task wasn't added to the train");
310  return false;
311  }
312 
313  // Add to the manager
314  mgr->AddTask(this);
315 
316  // Create and connect output containers
317  TString sumOut;
318  TString resOut;
319  if (sumFile && sumFile[0] != '\0') sumOut = sumFile;
320  if (resFile && resFile[0] != '\0') resOut = resFile;
321  else if (sumFile && sumFile[0] != '\0') resOut = sumFile;
322  if (sumOut.IsNull()) sumOut = AliAnalysisManager::GetCommonFileName();
323  if (resOut.IsNull()) resOut = AliAnalysisManager::GetCommonFileName();
324 
325  AliAnalysisDataContainer* sumCon =
326  mgr->CreateContainer(Form("%sSums", GetName()), TList::Class(),
327  AliAnalysisManager::kOutputContainer, sumOut);
328  AliAnalysisDataContainer* resCon =
329  mgr->CreateContainer(Form("%sResults", GetName()), TList::Class(),
330  AliAnalysisManager::kParamContainer, resOut);
331  mgr->ConnectInput(this, 0, mgr->GetCommonInputContainer());
332  mgr->ConnectOutput(this, 1, sumCon);
333  mgr->ConnectOutput(this, 2, resCon);
334 
335  return true;
336 }
337 //____________________________________________________________________
338 void
340 {
341  //
342  // Create output objects
343  //
344  //
345  DGUARD(fDebug,1,"Create user ouput");
346  fSums = new TList;
347  fSums->SetName(Form("%sSums", GetName()));
348  fSums->SetOwner(true);
349 
351  fTriggers->SetDirectory(0);
352 
354  fEventStatus->SetDirectory(0);
355 
356  fSums->Add(fTriggers);
357  fSums->Add(fEventStatus);
358 
360  fVertex = new TH1D("vertex", "IP_{z} of all events",
361  vA->GetNbins(), vA->GetXbins()->GetArray());
362  fVertex->SetXTitle("IP_{z} [cm]");
363  fVertex->SetYTitle("Events");
364  fVertex->SetDirectory(0);
365  fVertex->SetFillColor(kRed+2);
366  fVertex->SetFillStyle(3002);
367  fVertex->SetLineColor(kRed+2);
368  fSums->Add(fVertex);
369  fAccVertex = static_cast<TH1D*>(fVertex->Clone("vertexAcc"));
370  fAccVertex->SetTitle("IP_{z} of accepted events");
371  fAccVertex->SetDirectory(0);
372  fAccVertex->SetFillColor(kGreen+2);
373  fAccVertex->SetLineColor(kGreen+2);
374  fSums->Add(fAccVertex);
375 
376  fAccVertexXY = new TH2D("vertexAccXY", "IP_{x,y} of accepted events",
377  1000,-2,2,1000,-2,2);
378  fAccVertexXY->SetXTitle("IP_{x} [cm]");
379  fAccVertexXY->SetYTitle("IP_{y} [cm]");
380  fAccVertexXY->SetDirectory(0);
381  fSums->Add(fAccVertexXY);
382 
383  fCent = new TH1D("cent","Centrality of all events",102, -1, 101);
384  fCent->SetXTitle("Centrality [%]");
385  fCent->SetYTitle("Events");
386  fCent->SetFillColor(kRed+2);
387  fCent->SetFillStyle(3002);
388  fCent->SetLineColor(kRed+2);
389  fCent->SetDirectory(0);
390  fSums->Add(fCent);
391  fAccCent = static_cast<TH1D*>(fCent->Clone("centAcc"));
392  fAccCent->SetTitle("Centrality of accepted events");
393  fAccCent->SetDirectory(0);
394  fAccCent->SetFillColor(kGreen+2);
395  fAccCent->SetLineColor(kGreen+2);
396  fSums->Add(fAccCent);
397 
398  // Store centrality axis as a histogram - which can be merged
399  TH1* cH = 0;
400  if (fCentAxis.GetXbins() && fCentAxis.GetXbins()->GetSize() > 0)
401  cH = new TH1I(fCentAxis.GetName(), fCentAxis.GetTitle(),
402  fCentAxis.GetNbins(), fCentAxis.GetXbins()->GetArray());
403  else
404  cH = new TH1I(fCentAxis.GetName(), fCentAxis.GetTitle(),
405  fCentAxis.GetNbins(), fCentAxis.GetXmin(),
406  fCentAxis.GetXmax());
407  cH->SetBinContent(1,1);
408  cH->GetXaxis()->SetTitle(fCentAxis.GetTitle());
409  cH->GetXaxis()->SetName(fCentAxis.GetName());
410 
411  fSums->Add(cH);
412 
415  fSums->Add(AliForwardUtil::MakeParameter("count", 1));
416  fSums->Add(AliForwardUtil::MakeParameter("alirootRev",
418  fSums->Add(AliForwardUtil::MakeParameter("alirootBranch",
420 
421 
422 
423  if (!Book()) AliFatalF("Failed to book output objects for %s", GetName());
424 
425  Print();
426 
427  PostData(1, fSums);
428 }
429 
430 //____________________________________________________________________
433 {
434  // Get the forward object that contains our event selection stuff
435  TObject* obj = 0;
436  if (mc) obj = aod.FindListObject("ForwardMC");
437  else obj = aod.FindListObject("Forward");
438  if (!obj) {
439  if (verb) AliWarning("No forward object found");
440  return 0;
441  }
442  AliAODForwardMult* forward = static_cast<AliAODForwardMult*>(obj);
443  return forward;
444 }
445 //____________________________________________________________________
448 {
449  // Get the forward object that contains our event selection stuff
450  TObject* obj = aod.FindListObject("MultClass");
451  if (!obj) {
452  if (verb) AliWarning("No multiplicity event class object found");
453  return 0;
454  }
455  AliAODMultEventClass* multClass = static_cast<AliAODMultEventClass*>(obj);
456  return multClass;
457 }
458 //____________________________________________________________________
459 Double_t
461  AliAODForwardMult* forward,
462  Int_t& qual)
463 {
464  qual = 0;
465  Double_t cent = forward->GetCentrality();
466  Double_t max = (HasCentrality() ? fCentAxis.GetXmax() : 100);
467  if (cent < 0) { cent = -.5; qual = 0xFFFF; }
468  if (cent > max) { cent = TMath::Max(max+.1,100.5); qual = 198; }
469  return cent;
470 }
471 //____________________________________________________________________
472 Double_t
474  AliAODForwardMult* forward)
475 {
476  Int_t qual = 0;
477  Double_t cent = GetCentrality(event, forward, qual);
478  if (qual > 0) forward->SetTriggerBits(AliAODForwardMult::kCentNoCalib);
479  return cent;
480 }
481 
482 //____________________________________________________________________
483 Double_t
485  AliAODForwardMult* forward)
486 {
487  return forward->GetIpZ();
488 }
489 //____________________________________________________________________
490 Bool_t
492 
493 {
494  x = -10000;
495  y = -10000;
496  AliVVertex* gen = aod.GetPrimaryVertex();
497  AliVVertex* vtx[] = { aod.GetPrimaryVertexSPD(),
498  aod.GetPrimaryVertexTPC(),
499  gen };
500  Bool_t ret = false;
501  for (Int_t i = 0; i < 3; i++) {
502  if (!vtx[i] || (vtx[i] != gen && !vtx[i]->IsFromVertexer3D()))
503  continue;
504 
505  x = vtx[i]->GetX();
506  y = vtx[i]->GetY();
507  ret = true;
508  break;
509  }
510  return ret;
511 }
512 
513 //____________________________________________________________________
516 {
517  // Get the central object that contains our event selection stuff
518  TObject* obj = 0;
519  if (mc) obj = aod.FindListObject("CentralClustersMC");
520  else obj = aod.FindListObject("CentralClusters");
521  if (!obj) {
522  if (verb) AliWarning("No central object found");
523  return 0;
524  }
525  AliAODCentralMult* central = static_cast<AliAODCentralMult*>(obj);
526  return central;
527 }
528 //____________________________________________________________________
529 TH2D*
531 {
532  TObject* obj = aod.FindListObject("primary");
533  if (!obj) return 0;
534  TH2D* ret = static_cast<TH2D*>(obj);
535  return ret;
536 }
537 
538 //____________________________________________________________________
539 void
541 {
542  //
543  // Process a single event
544  //
545  // Parameters:
546  // option Not used
547  //
548  // Main loop
549  DGUARD(fDebug,1,"Analyse the AOD event in UserExec");
550  if (!PreEvent()) return;
551 
553  if (!aod) return;
554 
555  // Get the forward object that contains our event selection stuff
556  AliAODForwardMult* forward = GetForward(*aod);
557  if (!forward) return;
558 
559  if (fFirstEvent) {
560  if (!PreData()) return;
561  StoreInformation(*forward);
562  fFirstEvent = false;
563  }
564 
565  // Get our ip_z and centrality
566  Double_t vtx = GetIpZ(*aod, forward);
567  Float_t cent = GetCentrality(*aod, forward);
568  fVertex->Fill(vtx);
569  fCent->Fill(cent);
570  if (HasCentrality() && fAbsMinCent >= 0 && cent < fAbsMinCent) return;
571 
572  // Now check our event selectio up front
573  if (!CheckEvent(*forward)) return;
574 
575  // Let user defined code do the job
576  Bool_t taken = Event(*aod);
577 
578  // Fill our histograms
579  if (taken) {
580  fAccVertex->Fill(vtx);
581  fAccCent->Fill(cent);
582 
583  Double_t ipX, ipY;
584  GetIpXY(*aod, ipX, ipY);
585  fAccVertexXY->Fill(ipX, ipY);
586  }
587 
588  PostData(1, fSums);
589 
590  PostEvent();
591 }
592 
593 //____________________________________________________________________
594 Bool_t
596 {
597  if (HasCentrality()) {
598  return forward.CheckEvent(fTriggerMask,
599  fIPzAxis.GetXmin(),
600  fIPzAxis.GetXmax(),
601  fCentAxis.GetXmin(),
602  fCentAxis.GetXmax(),
603  fTriggers,
604  fEventStatus,
605  fFilterMask);
606 }
607  return forward.CheckEvent(fTriggerMask,
608  fIPzAxis.GetXmin(),
609  fIPzAxis.GetXmax(),
610  0,
611  0,
612  fTriggers,
613  fEventStatus,
614  fFilterMask);
615 }
616 
617 //____________________________________________________________________
618 void
620 {
621  fSums->Add(AliForwardUtil::MakeParameter("sNN", forward.GetSNN()));
622  fSums->Add(AliForwardUtil::MakeParameter("sys", forward.GetSystem()));
623 }
624 
625 //____________________________________________________________________
626 Bool_t
628 {
629  AliAnalysisDataSlot* slot = GetOutputSlot(no);
630  if (!slot) {
631  AliWarningF("No output slot # %d defined", no);
632  return false;
633  }
634 
635  AliAnalysisDataContainer* cont = slot->GetContainer();
636  if (!cont) {
637  AliWarningF("Output slot # %d has no container", no);
638  return false;
639  }
640 
641  TFile* file = cont->GetFile();
642  if (!file) {
643  AliWarningF("Container of output slot %d has no file", no);
644  return false;
645  }
646  if (!file->IsWritable()) {
647  AliWarningF("File (%s) associated with output slot # %d not writable",
648  file->GetName(), no);
649  return false;
650  }
651 
652  TDirectory* save = gDirectory;
653  TNamed* tag = new TNamed("trainName",
654  AliAnalysisManager::GetAnalysisManager()->GetName());
655  file->cd();
656  tag->Write();
657  AliInfoF("Wrote train name (%s) to output file %s",
658  tag->GetTitle(), file->GetName());
659  save->cd();
660 
661  return true;
662 }
663 
664 //____________________________________________________________________
665 void
667 {
668  TList* list = dynamic_cast<TList*>(GetOutputData(1));
669  if (!list) {
670  AliError(Form("No output list defined (%p)", GetOutputData(1)));
671  if (GetOutputData(1)) GetOutputData(1)->Print();
672  return;
673  }
674 
675  // Assign to our internal variable for use by sub-classes
676  fSums = list;
677 
678  // Create our output container
679  TString resName(Form("%sResults", GetName()));
680  if (fCloneList)
681  fResults = static_cast<TList*>(fSums->Clone(resName.Data()));
682  else {
683  fResults = new TList;
684  fResults->SetName(resName.Data());
685  }
686  fResults->SetOwner(true);
687 
688  // Now call user defined routines
689  if (!Finalize()) {
690  AliErrorF("Failed to finalize this task (%s)", GetName());
691  return;
692  }
693 
694  // Store name in output
695  if (!StoreTrainName(2))
696  fResults->Add(new TNamed("trainName",
697  AliAnalysisManager::GetAnalysisManager()
698  ->GetName()));
699 
700  PostData(2, fResults);
701 }
702 
703 #define PF(N,V,...) \
704  AliForwardUtil::PrintField(N,V, ## __VA_ARGS__)
705 #define PFB(N,FLAG) \
706  do { \
707  AliForwardUtil::PrintName(N); \
708  std::cout << std::boolalpha << (FLAG) << std::noboolalpha << std::endl; \
709  } while(false)
710 #define PFV(N,VALUE) \
711  do { \
712  AliForwardUtil::PrintName(N); \
713  std::cout << (VALUE) << std::endl; } while(false)
714 
715 //____________________________________________________________________
716 void
717 AliBaseAODTask::Print(Option_t* /*option=""*/) const
718 {
725  gROOT->IncreaseDirLevel();
728  PFV("Abs.least cent", fAbsMinCent);
729  PrintAxis(fIPzAxis, 1, "IP z");
730  PrintAxis(fCentAxis, 0, "Centraltiy");
731  gROOT->DecreaseDirLevel();
732 }
733 //
734 // EOF
735 //
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()
TList * list
TDirectory file where lists per trigger are stored in train ouput.
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)