AliPhysics  b43479f (b43479f)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskJetsEvshape.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKJETSEVSHAPE
2 #define ALIANALYSISTASKJETSEVSHAPE
3 
4 #include "TH1.h"
5 #include "TH2.h"
6 #include "TH3.h"
7 #include "TF1.h"
8 
9 #include "AliLog.h"
10 
11 #include "AliVParticle.h"
12 #include "AliAnalysisTaskSE.h"
13 #include "AliESDtrackCuts.h"
14 
15 #define ID(x) x, #x
16 #define LAB(x) x + 1, #x
17 
18 class TList;
19 class TClonesArray;
20 class AliVTrack;
21 class AliJetContainer;
24 
27 {
28 public:
29  AliAnalysisTaskJetsEvshape(const char *name = "jets_trg_trd");
31 
32  // analysis operations
33  virtual void UserCreateOutputObjects();
34  virtual Bool_t Notify();
35  virtual void UserExec(Option_t *option);
36  virtual void Terminate(const Option_t *option);
37  virtual void PrintTask(Option_t *option, Int_t indent) const;
38 
39  // output lists
40  enum OutputList_t {
43  };
44 
45  // histograms
46  enum Hist_t {
47  kHistStat = 0,
51  };
52 
53  // statistics
54  enum Stat_t {
55  kStatSeen = 1,
60  };
61 
62 protected:
63  // from EMCAL framework
64  virtual void ExecOnce();
65  virtual Bool_t FillHistograms();
66  virtual Bool_t Run();
67 
68  // task internal
69  AliMCEvent *fMCEvent;
70  AliESDEvent *fESDEvent;
71  AliAODEvent *fAODEvent;
72 
73  Int_t fRunNumber;
74 
75  Bool_t PrepareEvent();
76  Bool_t CleanUpEvent();
77 
81 
82  // output objects
83  TList *fOutputList;
84 
85  // histogram management
86  TH1 *fHist[kHistLast];
87  const char *fShortTaskId;
88 
89  TH1*& GetHistogram(Hist_t hist, const Int_t idx = 0) { return fHist[hist + idx]; }
90 
91  TH1* AddHistogram(Hist_t hist, const char *hid, TString title,
92  Int_t xbins, Float_t xmin, Float_t xmax, Int_t binType = 1);
93  TH2* AddHistogram(Hist_t hist, const char *hid, TString title,
94  Int_t xbins, Float_t xmin, Float_t xmax,
95  Int_t ybins, Float_t ymin, Float_t ymax, Int_t binType = 1);
96  TH3* AddHistogram(Hist_t hist, const char *hid, TString title,
97  Int_t xbins, Float_t xmin, Float_t xmax,
98  Int_t ybins, Float_t ymin, Float_t ymax,
99  Int_t zbins, Float_t zmin, Float_t zmax, Int_t binType = 1);
100 
101  void FillH1(Hist_t hist, Float_t x, Float_t weight = 1., Int_t idx = 0)
102  { GetHistogram(hist, idx)->Fill(x, weight); }
103  void FillH2(Hist_t hist, Float_t x, Float_t y, Float_t weight = 1., Int_t idx = 0)
104  { ((TH2*) GetHistogram(hist, idx))->Fill(x, y, weight); }
105  void FillH3(Hist_t hist, Float_t x, Float_t y, Float_t z, Float_t weight = 1., Int_t idx = 0)
106  { ((TH3*) GetHistogram(hist, idx))->Fill(x, y, z, weight); }
107 
108  // task configuration
109 
110 private:
111  // not implemented
114 
116 };
117 #endif
TH1 * fHist[kHistLast]
list of output objects
const Double_t ymax
Definition: AddTaskCFDStar.C:7
TH1 * AddHistogram(Hist_t hist, const char *hid, TString title, Int_t xbins, Float_t xmin, Float_t xmax, Int_t binType=1)
const char * title
Definition: MakeQAPdf.C:26
AliAnalysisTaskJetsEvshape & operator=(const AliAnalysisTaskJetsEvshape &rhs)
void FillH1(Hist_t hist, Float_t x, Float_t weight=1., Int_t idx=0)
virtual void PrintTask(Option_t *option, Int_t indent) const
const char * fShortTaskId
pointers to histogram
Container for particles within the EMCAL framework.
virtual void Terminate(const Option_t *option)
void FillH3(Hist_t hist, Float_t x, Float_t y, Float_t z, Float_t weight=1., Int_t idx=0)
const Double_t zmin
AliClusterContainer * fCaloClustersCont
Tracks.
AliParticleContainer * fTracksCont
Jets.
TH1 *& GetHistogram(Hist_t hist, const Int_t idx=0)
short identifier for the task
AliAnalysisTaskJetsEvshape(const char *name="jets_trg_trd")
ClassDef(AliAnalysisTaskJetsEvshape, 1)
void FillH2(Hist_t hist, Float_t x, Float_t y, Float_t weight=1., Int_t idx=0)
const Double_t ymin
Definition: AddTaskCFDStar.C:6
const Double_t zmax
virtual void UserExec(Option_t *option)
Container structure for EMCAL clusters.
Bool_t PrepareEvent()
current run number