AliPhysics  608b256 (608b256)
AliAnalysisTaskStudentsCM.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 ALIANALYSISTASKSTUDENTSCM_H // {Needed with line 12 and the last one to avoid errors from multiple inclusions of the same class (see RC3)}
12 #define ALIANALYSISTASKSTUDENTSCM_H
13 
14 #include "AliAnalysisTaskSE.h"
15 #include "AliAODTrack.h"
16 #include "AliAODEvent.h"
17 #include "AliVEvent.h"
18 #include "TProfile.h"
19 #include "TH1F.h"
20 #include "TH1I.h"
21 #include "TComplex.h"
22 #include "TH2F.h"
23 
24 //================================================================================================================
25 
26 class AliAnalysisTaskStudentsCM : public AliAnalysisTaskSE{ // {AliAnalysisTaskSE is mandatory for the compiler to know how execute the tasks}
27  public:
28 
29  // {The six following lines are mandatory}
30  AliAnalysisTaskStudentsCM(); // {Constructors of the class}
31  AliAnalysisTaskStudentsCM(const char *name, Bool_t useParticleWeights=kFALSE);
32  virtual ~AliAnalysisTaskStudentsCM(); // {Destructor of the class}
33  virtual void UserCreateOutputObjects(); // {The three following lines are needed with these exact names to let know to the compiler where the data members are defined, where the tasks to do on the events are and what to do once the run on the events is over}
34  virtual void UserExec(Option_t *);
35  virtual void Terminate(Option_t *);
36 
37  // 0.) Methods called in the constructor:
38  virtual void InitializeArrays(); // {Every data members are be initialise in the constructor without any problem, except Arrays that need a special function}
39 
40  // 1.) Methods called in UserCreateOutputObjects():
41  virtual void BookAndNestAllLists(); // {The three functions are useful to get a nice organisation in folders and subfolders in the final output root file}
42  virtual void BookControlHistograms();
43  virtual void BookTestHistograms(); // {TEST: addition of a new subfolder in the output root with personal histograms}
44  virtual void BookFinalResultsHistograms();
45 
46  // 2.) Methods called in UserExec(Option_t *):
47  // ...
48 
49  // 3.) Methods called in Terminate():
50  // ...
51 
52  // 4.) Setters and getters: // {Used to access the data members and initialise them for example}
53  void SetControlHistogramsList(TList* const chl) {this->fControlHistogramsList = chl;};
55  void SetTestHistogramsList(TList* const thl) {this->fTestHistogramsList = thl;}; // {TEST: setter and getter of the new subfolder}
57  void SetFinalResultsList(TList* const frl) {this->fFinalResultsList = frl;};
58  TList* GetFinalResultsList() const {return this->fFinalResultsList;}
59 
60  void SetBinning(Int_t const nbins, Float_t min, Float_t max)
61  {
62  this->fNbins = nbins;
63  this->fMinBin = min;
64  this->fMaxBin = max;
65  };
66 
67  private:
70 
71  // 0.) Base lists:
72  TList *fHistList; // base list to hold all output object (a.k.a. grandmother of all lists)
73 
74  // 1.) Control histograms:
75  TList *fControlHistogramsList; // list to hold all control histograms
76  TList *fTestHistogramsList; // {TEST: list to hold the personal histograms for playing around ^^}
77  TH1F *fPtHistNoCut; // Histogram containing the transverse momenta before the application of cuts
78  TH1F *fPtHist; // atrack->Pt() {Histogram containing the transverse momenta}
79  Int_t fNbins; // number of bins
80  Float_t fMinBin; // min bin
81  Float_t fMaxBin; // max bin
82  TH1F *fPhiHist; // atrack->Phi()
83  TH1F *fEtaHist; // atrack->Eta()
84  TH1F *fEnergyHist; // atrack->E() {TEST, histogram containing the energy}
85  TH1F *fEnergyHistNoCut; // Histogram containing the energy before the application of cuts
86  TH2F *fPtPhiHist; // {TEST: 2D histogram containing the azimuthal angle phi as a function of the transverse momentum}
87  TH1F *fMassSquareHist; // TEST: mass^2 of the particles
88 
89  // 2.) Final results:
90  TList *fFinalResultsList; // list to hold all histograms with final results
91  TH2F *fEtaMassSquareHist; // TEST: m^2 as a function of eta, offline made
92 
93  ClassDef(AliAnalysisTaskStudentsCM,2); // {Needed to be increase each time a new version that changes the structure of the output file is sent for the daily tag}
94 
95 };
96 
97 //================================================================================================================
98 
99 #endif
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
AliAnalysisTaskStudentsCM & operator=(const AliAnalysisTaskStudentsCM &aatmpf)
Definition: External.C:236
void SetFinalResultsList(TList *const frl)
virtual void Terminate(Option_t *)
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
void SetBinning(Int_t const nbins, Float_t min, Float_t max)
void SetTestHistogramsList(TList *const thl)
const char Option_t
Definition: External.C:48
const Int_t nbins
bool Bool_t
Definition: External.C:53
void SetControlHistogramsList(TList *const chl)