ROOT logo
#ifndef ALICORRECTION_H
#define ALICORRECTION_H

/* $Id$ */

// ------------------------------------------------------
//
// This class is used to store the correction for one effect. 
//
// Most effects have to be correction on track and event level, this class combines
// two correction matrices. One of the type AliCorrectionMatrix2D and one of
// the type AliCorrectionMatrix3D
//
// ------------------------------------------------------

#include <TNamed.h>
#include "AliPWG0Helper.h"

class AliCorrectionMatrix2D;
class AliCorrectionMatrix3D;

class AliCorrection : public TNamed
{
public:
  AliCorrection();
  AliCorrection(const Char_t* name, const Char_t* title, AliPWG0Helper::AnalysisMode analysisMode = (AliPWG0Helper::AnalysisMode) (AliPWG0Helper::kTPC | AliPWG0Helper::kFieldOn));
  AliCorrection(const AliCorrection& c);

  virtual ~AliCorrection();
  AliCorrection& operator=(const AliCorrection& corr);
  virtual void Copy(TObject& c) const;

  virtual Long64_t Merge(TCollection* list);

  AliCorrectionMatrix2D* GetEventCorrection() const { return fEventCorr; }
  AliCorrectionMatrix3D* GetTrackCorrection() const { return fTrackCorr; }

  void SetEventCorrection(AliCorrectionMatrix2D* corr) { fEventCorr = corr; }
  void SetTrackCorrection(AliCorrectionMatrix3D* corr) { fTrackCorr = corr; }

  void Divide();
  void Multiply();
  void SetCorrectionToUnity();
  void ResetErrorsOnCorrections();
  void Scale(Double_t factor);

  void Add(AliCorrection* aCorrectionToAdd, Float_t c=1);

  virtual Bool_t LoadHistograms(const Char_t* dir = 0);
  virtual void SaveHistograms();
  virtual void DrawHistograms(const Char_t* name = 0);
  virtual void DrawOverview(const char* canvasName = 0);

  virtual void ReduceInformation();

  virtual void Reset(Option_t* option = "");
  void PrintStats(Float_t zRange, Float_t etaRange, Float_t ptCut);
  void PrintInfo(Float_t ptCut);

protected:
  AliCorrectionMatrix2D* fEventCorr; // correction on event level
  AliCorrectionMatrix3D* fTrackCorr; // correction on track level

  ClassDef(AliCorrection,1)
};

#endif

 AliCorrection.h:1
 AliCorrection.h:2
 AliCorrection.h:3
 AliCorrection.h:4
 AliCorrection.h:5
 AliCorrection.h:6
 AliCorrection.h:7
 AliCorrection.h:8
 AliCorrection.h:9
 AliCorrection.h:10
 AliCorrection.h:11
 AliCorrection.h:12
 AliCorrection.h:13
 AliCorrection.h:14
 AliCorrection.h:15
 AliCorrection.h:16
 AliCorrection.h:17
 AliCorrection.h:18
 AliCorrection.h:19
 AliCorrection.h:20
 AliCorrection.h:21
 AliCorrection.h:22
 AliCorrection.h:23
 AliCorrection.h:24
 AliCorrection.h:25
 AliCorrection.h:26
 AliCorrection.h:27
 AliCorrection.h:28
 AliCorrection.h:29
 AliCorrection.h:30
 AliCorrection.h:31
 AliCorrection.h:32
 AliCorrection.h:33
 AliCorrection.h:34
 AliCorrection.h:35
 AliCorrection.h:36
 AliCorrection.h:37
 AliCorrection.h:38
 AliCorrection.h:39
 AliCorrection.h:40
 AliCorrection.h:41
 AliCorrection.h:42
 AliCorrection.h:43
 AliCorrection.h:44
 AliCorrection.h:45
 AliCorrection.h:46
 AliCorrection.h:47
 AliCorrection.h:48
 AliCorrection.h:49
 AliCorrection.h:50
 AliCorrection.h:51
 AliCorrection.h:52
 AliCorrection.h:53
 AliCorrection.h:54
 AliCorrection.h:55
 AliCorrection.h:56
 AliCorrection.h:57
 AliCorrection.h:58
 AliCorrection.h:59
 AliCorrection.h:60
 AliCorrection.h:61
 AliCorrection.h:62
 AliCorrection.h:63
 AliCorrection.h:64
 AliCorrection.h:65
 AliCorrection.h:66
 AliCorrection.h:67
 AliCorrection.h:68