AliPhysics  67e0feb (67e0feb)
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,
56  };
57 
58  // statistics
59  enum Stat_t {
60  kStatSeen = 1,
65  };
66 
67 protected:
68  // from EMCAL framework
69  virtual void ExecOnce();
70  virtual Bool_t FillHistograms();
71  virtual Bool_t Run();
72 
75 
76  // task internal
77  AliMCEvent *fMCEvent;
80 
82 
85 
89 
90  // intermediate results
93 
94  // task configuration
97 
98  // output objects
100 
101  // histogram management
103  const char *fShortTaskId;
104 
105  TH1*& GetHistogram(Hist_t hist, const Int_t idx = 0) { return fHist[hist + idx]; }
106 
107  TH1* AddHistogram(Hist_t hist, const char *hid, TString title,
108  Int_t xbins, Float_t xmin, Float_t xmax, Int_t binType = 1);
109  TH2* AddHistogram(Hist_t hist, const char *hid, TString title,
110  Int_t xbins, Float_t xmin, Float_t xmax,
111  Int_t ybins, Float_t ymin, Float_t ymax, Int_t binType = 1);
112  TH3* AddHistogram(Hist_t hist, const char *hid, TString title,
113  Int_t xbins, Float_t xmin, Float_t xmax,
114  Int_t ybins, Float_t ymin, Float_t ymax,
115  Int_t zbins, Float_t zmin, Float_t zmax, Int_t binType = 1);
116 
117  void FillH1(Hist_t hist, Float_t x, Float_t weight = 1., Int_t idx = 0)
118  { GetHistogram(hist, idx)->Fill(x, weight); }
119  void FillH2(Hist_t hist, Float_t x, Float_t y, Float_t weight = 1., Int_t idx = 0)
120  { ((TH2*) GetHistogram(hist, idx))->Fill(x, y, weight); }
121  void FillH3(Hist_t hist, Float_t x, Float_t y, Float_t z, Float_t weight = 1., Int_t idx = 0)
122  { ((TH3*) GetHistogram(hist, idx))->Fill(x, y, z, weight); }
123 
124 private:
125  // not implemented
128 
129  ClassDef(AliAnalysisTaskJetsEvshape, 1);
130 };
131 #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:27
Definition: External.C:244
AliAnalysisTaskJetsEvshape & operator=(const AliAnalysisTaskJetsEvshape &rhs)
virtual Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
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)
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
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.
virtual void ExecOnce()
Perform steps needed to initialize the analysis.
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")
void FillH2(Hist_t hist, Float_t x, Float_t y, Float_t weight=1., Int_t idx=0)
Definition: External.C:220
virtual Bool_t FillHistograms()
Function filling histograms.
const Double_t ymin
Definition: AddTaskCFDStar.C:6
Base task in the EMCAL jet framework.
const char Option_t
Definition: External.C:48
const Double_t zmax
bool Bool_t
Definition: External.C:53
virtual void UserExec(Option_t *option)
Container structure for EMCAL clusters.
Container for jet within the EMCAL jet framework.
Definition: External.C:196
Bool_t PrepareEvent()
current run number