AliPhysics  master (3d17d9d)
AliAnalysisTaskForStudents.h
Go to the documentation of this file.
1 /*
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved.
3  * See cxx source for full Copyright notice
4  * $Id$
5  */
6 
7 /**************************************
8 * template class for student projects *
9 **************************************/
10 
11 #ifndef ALIANALYSISTASKFORSTUDENTS_H
12 #define ALIANALYSISTASKFORSTUDENTS_H
13 
14 #include "AliAnalysisTaskSE.h"
15 #include "AliAODTrack.h"
16 #include "AliAODEvent.h"
17 #include "AliVEvent.h"
18 #include "TH1F.h"
19 
20 //================================================================================================================
21 
23  public:
24 
26  AliAnalysisTaskForStudents(const char *name, Bool_t useParticleWeights=kFALSE);
27  virtual ~AliAnalysisTaskForStudents();
28  virtual void UserCreateOutputObjects();
29  virtual void UserExec(Option_t *);
30  virtual void Terminate(Option_t *);
31 
32  // 0.) Methods called in the constructor:
33  virtual void InitializeArrays();
34 
35  // 1.) Methods called in UserCreateOutputObjects():
36  virtual void BookAndNestAllLists();
37  virtual void BookControlHistograms();
38  virtual void BookFinalResultsHistograms();
39 
40  // 2.) Methods called in UserExec(Option_t *):
41  // ...
42 
43  // 3.) Setters and getters:
44  void SetControlHistogramsList(TList* const chl) {this->fControlHistogramsList = chl;};
46  void SetFinalResultsList(TList* const frl) {this->fFinalResultsList = frl;};
47  TList* GetFinalResultsList() const {return this->fFinalResultsList;}
48 
49  void SetPtBinning(Int_t const nbins, Float_t min, Float_t max)
50  {
51  this->fNbinsPt = nbins;
52  this->fMinBinPt = min;
53  this->fMaxBinPt = max;
54  };
55 
56  private:
59 
60  // 0.) Base lists:
61  TList *fHistList; // base list to hold all output object (a.k.a. grandmother of all lists)
62 
63  // 1.) Control histograms:
64  TList *fControlHistogramsList; // list to hold all control histograms
65  TH1F *fPtHist; // atrack->Pt()
66  Int_t fNbinsPt; // number of bins
67  Float_t fMinBinPt; // min bin
68  Float_t fMaxBinPt; // min bin
69 
70  // 2.) Final results:
71  TList *fFinalResultsList; // list to hold all histograms with final results
72 
73  // Increase this counter in each new version:
74  ClassDef(AliAnalysisTaskForStudents,1);
75 
76 };
77 
78 //================================================================================================================
79 
80 #endif
81 
82 
83 
84 
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
void SetControlHistogramsList(TList *const chl)
AliAnalysisTaskForStudents & operator=(const AliAnalysisTaskForStudents &aatmpf)
void SetFinalResultsList(TList *const frl)
const char Option_t
Definition: External.C:48
const Int_t nbins
bool Bool_t
Definition: External.C:53
void SetPtBinning(Int_t const nbins, Float_t min, Float_t max)