AliPhysics  aaf9c62 (aaf9c62)
AliBaseMultTask.h
Go to the documentation of this file.
1 
10 #ifndef ALIBASEMULTTASK_H
11 #define ALIBASEMULTTASK_H
12 #include "AliBaseAODTask.h"
13 
15 {
16 public:
17 
21  struct Bin : public TNamed
22  {
26  Bin();
30  Bin(Double_t etaLow, Double_t etaHigh);
34  Bin(const Bin&){;}
38  Bin& operator=(const Bin&) { return *this; }
42  virtual ~Bin(){}
46  virtual void CreateOutputObjects(TList* cont, Int_t max);
64  virtual void Process(TH1D* dndetaForward,
65  TH1D* dndetaCentral,
66  TH1D* normForward,
67  TH1D* normCentral,
68  TH1D* mc,
69  Double_t ipZ,
70  Bool_t pileup,
71  Bool_t selectedTrigger,
72  Bool_t isMCClass,
73  Bool_t isESDClass,
74  const AliAODEvent& aodevent,
75  Double_t minIPz,
76  Double_t maxIPz);
93  virtual Double_t CalcMult(TH1D* dndetaForward,
94  TH1D* dndetaCentral,
95  TH1D* normForward,
96  TH1D* normCentral,
97  TH1D* mc,
98  Double_t ipZ,
99  Double_t& statErr,
100  Double_t& sysErr,
101  Double_t& mcMult,
102  Double_t& mcErr);
106  static const Char_t* FormBinName(Double_t etaLow, Double_t etaHigh);
107 
108  Double_t fEtaLow; // low eta limit
109  Double_t fEtaHigh; // high eta limit
114  ClassDef(Bin,1); // Base class for eta bins
115  };
116 
117  //__________________________________________________________________
122  AliBaseMultTask();
127  virtual ~AliBaseMultTask() {}
128  //__________________________________________________________________
138  void SetMaxMult(Int_t max) { fMaxMult = max; }
144  void SetMCIsNSD(Bool_t assume) { fMCIsNSD = assume; }
145  /* @} */
146  //__________________________________________________________________
154  void AddBin(Double_t etaLow, Double_t etaHigh)
155  {
156  fBins.Add(MakeBin(etaLow, etaHigh));
157  }
166  virtual Bin* MakeBin(Double_t minEta,Double_t maxEta) = 0;
170  virtual void DefaultBins();
171  /* @} */
172  //__________________________________________________________________
180  virtual Bool_t Book();
186  virtual Bool_t PreEvent() { fIsSelected = false; return true; }
190  virtual Bool_t Event(AliAODEvent& aod);
196  virtual Bool_t Finalize() {return true;}
198 protected:
203  AliBaseMultTask(const char* name);
209  : fBins(),
210  fIsSelected(false),
211  fMaxMult(500),
212  fMCIsNSD(false)
213  {}
218  AliBaseMultTask& operator=(const AliBaseMultTask&) { return *this; }
230  virtual Bool_t CheckEvent(const AliAODForwardMult& fwd);
238  virtual Bool_t IsMCClass(AliAODForwardMult* m) const;
246  virtual Bool_t IsESDClass(AliAODForwardMult* m) const;
247  /* @} */
263  virtual void Process(TH1D* dndetaForward,
264  TH1D* dndetaCentral,
265  TH1D* normForward,
266  TH1D* normCentral,
267  TH1D* mc,
268  Double_t ipZ,
269  Bool_t pileup,
270  Bool_t selectedTrigger,
271  Bool_t isMCClass,
272  Bool_t isESDClass,
273  const AliAODEvent& aodevent);
274  TList fBins; // List of the bins to use
275  Bool_t fIsSelected; // Event was selected
276  Int_t fMaxMult; // Maximum of (and number of bins in) histograms
277  Bool_t fMCIsNSD; // Assume MC event is always NSD
278  ClassDef(AliBaseMultTask,2); // Base class for multiplicity dist tasks,
279 };
280 #endif
281 // Local Variables:
282 // mode: C++
283 // End:
284 
285 
double Double_t
Definition: External.C:58
char Char_t
Definition: External.C:18
virtual Bool_t IsMCClass(AliAODForwardMult *m) const
virtual Bin * MakeBin(Double_t minEta, Double_t maxEta)=0
virtual ~AliBaseMultTask()
virtual Bool_t Event(AliAODEvent &aod)
int Int_t
Definition: External.C:63
virtual Bool_t Book()
AliBaseMultTask(const AliBaseMultTask &)
void SetMCIsNSD(Bool_t assume)
virtual void CreateOutputObjects(TList *cont, Int_t max)
AliBaseMultTask & operator=(const AliBaseMultTask &)
Definition: External.C:228
Definition: External.C:212
virtual Bool_t IsESDClass(AliAODForwardMult *m) const
static const Char_t * FormBinName(Double_t etaLow, Double_t etaHigh)
Bin & operator=(const Bin &)
virtual void DefaultBins()
const char * fwd
void AddBin(Double_t etaLow, Double_t etaHigh)
virtual Double_t CalcMult(TH1D *dndetaForward, TH1D *dndetaCentral, TH1D *normForward, TH1D *normCentral, TH1D *mc, Double_t ipZ, Double_t &statErr, Double_t &sysErr, Double_t &mcMult, Double_t &mcErr)
virtual void Process(TH1D *dndetaForward, TH1D *dndetaCentral, TH1D *normForward, TH1D *normCentral, TH1D *mc, Double_t ipZ, Bool_t pileup, Bool_t selectedTrigger, Bool_t isMCClass, Bool_t isESDClass, const AliAODEvent &aodevent, Double_t minIPz, Double_t maxIPz)
virtual Bool_t Finalize()
virtual Bool_t PreEvent()
bool Bool_t
Definition: External.C:53
void SetMaxMult(Int_t max)
virtual Bool_t CheckEvent(const AliAODForwardMult &fwd)