AliPhysics  32b88a8 (32b88a8)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliBaseAODTask.h
Go to the documentation of this file.
1 #ifndef ALIBASEAODTASK_H
2 #define ALIBASEAODTASK_H
3 #include <AliAnalysisTaskSE.h>
4 #include <TAxis.h>
5 class AliAODEvent;
9 class TList;
10 
16 {
17 public:
21  AliBaseAODTask();
28  AliBaseAODTask(const char* name,
29  const char* title);
33  virtual ~AliBaseAODTask() {}
41  virtual Bool_t Configure(const char* macro="-default-");
52  void SetIpZRange(Double_t min, Double_t max) { fMinIpZ=min; fMaxIpZ=max; }
53  void SetIpZMin(Double_t min) { fMinIpZ = min; }
54  void SetIpZMax(Double_t max) { fMaxIpZ = max; }
60  void SetTriggerMask(UInt_t mask);
66  void SetTriggerMask(const char* mask);
72  void SetFilterMask(UInt_t mask);
73  void SetFilterMask(const char* mask);
85  void SetCentralityAxis(UShort_t n, Short_t* bins);
97  void SetCentralityAxis(UShort_t n, Double_t* bins);
104  void SetCentralityAxis(Short_t low, Short_t high);
111  void SetCentralityAxis(const char* bins);
112  /* @} */
129  virtual Bool_t Connect(const char* sumFile=0, const char* resFile=0);
141  virtual Bool_t Book() = 0;
149  virtual Bool_t PreData() { return true; }
156  virtual Bool_t PreEvent() { return true; }
164  virtual Bool_t Event(AliAODEvent& aod) = 0;
171  virtual Bool_t PostEvent() { return true; }
177  virtual Bool_t Finalize() = 0;
178  /* @} */
179 
189  void Print(Option_t* option="") const;
190  /* @} */
191 protected:
197  AliBaseAODTask(const AliBaseAODTask& o);
213  virtual void Init() {}
219  virtual void UserCreateOutputObjects();
225  virtual void UserExec(Option_t* option);
233  virtual void Terminate(Option_t* option);
234  /* @} */
245  Bool_t mc=false,
246  Bool_t verb=true);
256  Bool_t verb=true);
267  Bool_t mc=false,
268  Bool_t verb=true);
276  TH2D* GetPrimary(const AliAODEvent& aod);
282  virtual void StoreInformation(AliAODForwardMult& forward);
292  virtual Bool_t CheckEvent(const AliAODForwardMult& forward);
299  {
300  return (fCentAxis.GetNbins() >= 1 &&
301  fCentAxis.GetXbins() &&
302  fCentAxis.GetXbins()->GetArray());
303  }
314  virtual Double_t GetCentrality(AliAODEvent& event,
315  AliAODForwardMult* forward,
316  Int_t& qual);
324  virtual Double_t GetCentrality(AliAODEvent& event,
325  AliAODForwardMult* forward);
334  virtual Double_t GetIpZ(AliAODEvent& event,
335  AliAODForwardMult* forward);
345  virtual Bool_t GetIpXY(AliAODEvent& aod, Double_t& x, Double_t& y);
354  virtual const char* DefaultConfig() const { return "dNdetaConfig.C"; }
355 
356  UInt_t fTriggerMask; // Trigger mask
357  UInt_t fFilterMask; // Events to filter out
358  Double_t fMinIpZ; // Least z--coordiante of interaction point
359  Double_t fMaxIpZ; // Largest z--coordiante of interaction point
360  TAxis fCentAxis; // Centrality axis
361  TH1I* fTriggers; // Histogram of triggers
362  TH1I* fEventStatus; // Histogram of event selection
363  TH1D* fVertex; // Vertex distribution of all events
364  TH1D* fCent; // Centrality distribution of all events
365  TH1D* fAccVertex; // Vertex distribution of accepted events
366  TH2D* fAccVertexXY; // Vertex (x,y) distribution of accepted events
367  TH1D* fAccCent; // Centrality distribution of accepted events
368  Bool_t fFirstEvent; // Information stored or not
369  Bool_t fCloneList; // Wether to clone sum list for results
370  TList* fSums; // Output list of sums
371  TList* fResults; // Output list of results
372 
373  ClassDef(AliBaseAODTask,2)
374 };
375 #endif
376 //
377 // Local Variables:
378 // mode: C++
379 // End:
380 //
void SetIpZMax(Double_t max)
virtual Bool_t CheckEvent(const AliAODForwardMult &forward)
virtual void Terminate(Option_t *option)
double Double_t
Definition: External.C:58
virtual Bool_t PreEvent()
const char * title
Definition: MakeQAPdf.C:26
void SetTriggerMask(UInt_t mask)
virtual Bool_t PreData()
void SetIpZMin(Double_t min)
virtual void Init()
virtual void UserCreateOutputObjects()
void SetIpZRange(Double_t min, Double_t max)
virtual Bool_t GetIpXY(AliAODEvent &aod, Double_t &x, Double_t &y)
void SetFilterMask(UInt_t mask)
virtual ~AliBaseAODTask()
int Int_t
Definition: External.C:63
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
virtual Bool_t PostEvent()
virtual Bool_t Configure(const char *macro="-default-")
Definition: External.C:228
Definition: External.C:212
void Print(Option_t *option="") const
virtual Bool_t Event(AliAODEvent &aod)=0
short Short_t
Definition: External.C:23
virtual Bool_t Connect(const char *sumFile=0, const char *resFile=0)
AliAODMultEventClass * GetMultClass(const AliAODEvent &aod, Bool_t verb=true)
AliBaseAODTask & operator=(const AliBaseAODTask &o)
AliAODForwardMult * GetForward(const AliAODEvent &aod, Bool_t mc=false, Bool_t verb=true)
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)
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
virtual Double_t GetCentrality(AliAODEvent &event, AliAODForwardMult *forward, Int_t &qual)
virtual void UserExec(Option_t *option)
Bool_t HasCentrality() const
virtual Double_t GetIpZ(AliAODEvent &event, AliAODForwardMult *forward)