AliPhysics  e34b7ac (e34b7ac)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliBaseMCCorrectionsTask.h
Go to the documentation of this file.
1 //
2 // Calculate the corrections in the base regions
3 //
4 #ifndef ALIBASEMCCORRECTIONS_H
5 #define ALIBASEMCCORRECTIONS_H
6 
16 #include <AliBaseESDTask.h>
17 #include <AliESDFMD.h>
18 #include "AliFMDMCEventInspector.h"
19 #include <TH1I.h>
22 class AliESDEvent;
23 class TH2D;
24 class TH1D;
25 class TList;
26 class TVector3;
27 
47 {
48 public:
55  AliBaseMCCorrectionsTask(const char* name,
70  virtual Bool_t Book();
78  virtual Bool_t Event(AliESDEvent& esd);
84  virtual Bool_t Finalize();
93  void Print(Option_t* option="") const;
94 
102  void SetVertexAxis(Int_t nBins, Double_t vzMin, Double_t vzMax=-1000000);
108  void SetVertexAxis(const TAxis& axis);
116  void SetEtaAxis(Int_t nBins, Double_t etaMin, Double_t etaMax=-1000000);
122  void SetEtaAxis(const TAxis& axis);
128  void SetSatellite(Bool_t sat);
134  virtual AliBaseMCTrackDensity& GetTrackDensity() = 0;
140  virtual const AliBaseMCTrackDensity& GetTrackDensity() const = 0;
161 protected:
182  struct VtxBin : public TNamed
183  {
187  VtxBin();
196  VtxBin(Double_t low, Double_t high, const TAxis& etaAxis, UShort_t nPhi);
197  virtual ~VtxBin() {}
203  VtxBin(const VtxBin& o){;}
211  VtxBin& operator=(const VtxBin& o){return *this;}
220  static const char* BinName(Double_t low, Double_t high);
226  virtual TList* CreateOutputObjects(TList* list);
227  TH2D* fPrimary; // Cache or primary
228  TH1D* fCounts; // Event count
229 
230  // ClassDef(VtxBin,1); // Vertex bin
231  };
232  virtual TAxis* DefaultVertexAxis() const { return const_cast<TAxis*>(&fVtxAxis); }
233  virtual TAxis* DefaultEtaAxis() const { return const_cast<TAxis*>(&fEtaAxis); }
242  virtual VtxBin* CreateVtxBin(Double_t low, Double_t high) = 0;
253  virtual Bool_t ProcessESD(const AliESDEvent& esd,
254  const AliMCEvent& mc,
255  VtxBin& bin,
256  const TVector3& ip) = 0;
262  virtual void CreateCorrections(TList* results) = 0;
271  virtual Bool_t FinalizeVtxBin(VtxBin* bin,
272  UShort_t iVz) = 0;
278  void DefineBins(TList* list);
279 
280  AliFMDMCEventInspector fInspector; // Event inspector
281 
282  TObjArray* fVtxBins; // Vertex bins
283  TH1I* fHEvents; // All Events
284  TH1I* fHEventsTr; // Histogram of events w/trigger
285  TH1I* fHEventsTrVtx; // Events w/trigger and vertex
286  TAxis fVtxAxis; // Vertex axis
287  TAxis fEtaAxis; // Eta axis
288  Bool_t fUseESDVertex; // if true use Z vertex from ESD in calculations
289  Bool_t fAfterEventSel; //if true corr. be calc. after events selection
290 
291  ClassDef(AliBaseMCCorrectionsTask,1) // Base corrections class
292 };
293 
294 #endif
295 // Local Variables:
296 // mode: C++
297 // End:
virtual AliBaseMCTrackDensity & GetTrackDensity()=0
virtual Bool_t FinalizeVtxBin(VtxBin *bin, UShort_t iVz)=0
double Double_t
Definition: External.C:58
virtual Bool_t ProcessESD(const AliESDEvent &esd, const AliMCEvent &mc, VtxBin &bin, const TVector3 &ip)=0
virtual Bool_t Event(AliESDEvent &esd)
void SetEtaAxis(Int_t nBins, Double_t etaMin, Double_t etaMax=-1000000)
TList * list
AliFMDEventInspector & GetEventInspector()
virtual void CreateCorrections(TList *results)=0
ClassDef(AliBaseESDTask, 1)
int Int_t
Definition: External.C:63
Definition: External.C:204
virtual TAxis * DefaultVertexAxis() const
static const char * BinName(Double_t low, Double_t high)
AliFMDMCEventInspector fInspector
Definition: External.C:228
Definition: External.C:212
virtual TList * CreateOutputObjects(TList *list)
virtual VtxBin * CreateVtxBin(Double_t low, Double_t high)=0
void SetVertexAxis(Int_t nBins, Double_t vzMin, Double_t vzMax=-1000000)
void Print(Option_t *option="") const
AliBaseMCCorrectionsTask & operator=(const AliBaseMCCorrectionsTask &o)
unsigned short UShort_t
Definition: External.C:28
const char Option_t
Definition: External.C:48
virtual TAxis * DefaultEtaAxis() const
bool Bool_t
Definition: External.C:53
const AliFMDEventInspector & GetEventInspector() const