AliPhysics  251aa1e (251aa1e)
 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-");
53  void SetIPzAxis(Int_t n, Double_t min, Double_t max)
54  {
55  SetAxis(fIPzAxis, n, min, max);
56  }
63  void SetIPzAxis(Int_t n, Double_t max)
64  {
65  SetAxis(fIPzAxis, n, max);
66  }
72  void SetIPzAxis(const TString& spec)
73  {
74  SetAxis(fIPzAxis, spec);
75  }
87  void SetCentralityAxis(UShort_t n, Short_t* bins);
99  void SetCentralityAxis(UShort_t n, Double_t* bins);
106  void SetCentralityAxis(Short_t low, Short_t high);
113  void SetCentralityAxis(const char* bins);
127  void SetAbsMinCent(Double_t x=-1) { fAbsMinCent = x; }
133  void SetTriggerMask(UInt_t mask);
139  void SetTriggerMask(const char* mask);
145  void SetFilterMask(UInt_t mask);
151  void SetFilterMask(const char* mask);
152  /* @} */
169  virtual Bool_t Connect(const char* sumFile=0, const char* resFile=0);
181  virtual Bool_t Book() = 0;
189  virtual Bool_t PreData() { return true; }
196  virtual Bool_t PreEvent() { return true; }
204  virtual Bool_t Event(AliAODEvent& aod) = 0;
211  virtual Bool_t PostEvent() { return true; }
217  virtual Bool_t Finalize() = 0;
218  /* @} */
219 
229  void Print(Option_t* option="") const;
230  /* @} */
231 protected:
237  AliBaseAODTask(const AliBaseAODTask& o);
253  virtual void Init() {}
259  virtual void UserCreateOutputObjects();
265  virtual void UserExec(Option_t* option);
273  virtual void Terminate(Option_t* option);
274  /* @} */
285  static void FixAxis(TAxis& axis, const char* title=0);
293  static void SetAxis(TAxis& axis, Int_t n, Double_t* borders);
302  static void SetAxis(TAxis& axis, const TString& spec, const char* sep=":,");
311  static void SetAxis(TAxis& axis, Int_t n, Double_t l, Double_t h);
319  static void SetAxis(TAxis& axis, Int_t n, Double_t m);
327  static void PrintAxis(const TAxis& axis, Int_t nSig=2, const char* alt=0);
328  /* @} */
343  Bool_t mc=false,
344  Bool_t verb=true);
354  Bool_t verb=true);
365  Bool_t mc=false,
366  Bool_t verb=true);
374  TH2D* GetPrimary(const AliAODEvent& aod);
380  virtual void StoreInformation(AliAODForwardMult& forward);
390  virtual Bool_t CheckEvent(const AliAODForwardMult& forward);
397  {
398  return (fCentAxis.GetNbins() >= 1 &&
399  fCentAxis.GetXbins() &&
400  fCentAxis.GetXbins()->GetArray());
401  }
412  virtual Double_t GetCentrality(AliAODEvent& event,
413  AliAODForwardMult* forward,
414  Int_t& qual);
422  virtual Double_t GetCentrality(AliAODEvent& event,
423  AliAODForwardMult* forward);
432  virtual Double_t GetIpZ(AliAODEvent& event,
433  AliAODForwardMult* forward);
443  virtual Bool_t GetIpXY(AliAODEvent& aod, Double_t& x, Double_t& y);
444  /* @} */
453  virtual const char* DefaultConfig() const { return "dNdetaConfig.C"; }
454 
487 
488  ClassDef(AliBaseAODTask,3)
489 };
490 #endif
491 //
492 // Local Variables:
493 // mode: C++
494 // End:
495 //
virtual Bool_t CheckEvent(const AliAODForwardMult &forward)
virtual void Terminate(Option_t *option)
double Double_t
Definition: External.C:58
virtual Bool_t PreEvent()
static void SetAxis(TAxis &axis, Int_t n, Double_t *borders)
const char * title
Definition: MakeQAPdf.C:26
void SetTriggerMask(UInt_t mask)
virtual Bool_t PreData()
virtual void Init()
virtual void UserCreateOutputObjects()
void SetIPzAxis(Int_t n, Double_t min, Double_t max)
virtual Bool_t GetIpXY(AliAODEvent &aod, Double_t &x, Double_t &y)
void SetAbsMinCent(Double_t x=-1)
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
Double_t fAbsMinCent
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
void SetIPzAxis(const TString &spec)
static void PrintAxis(const TAxis &axis, Int_t nSig=2, const char *alt=0)
void SetIPzAxis(Int_t n, Double_t max)
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)
static void FixAxis(TAxis &axis, const char *title=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)