AliPhysics  58f3d52 (58f3d52)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliPoissonCalculator.h
Go to the documentation of this file.
1 #ifndef ALIPOISSONCALCULATOR_H
2 #define ALIPOISSONCALCULATOR_H
3 #include <TNamed.h>
4 class TH2D;
5 class TH1D;
6 class TBrowser;
7 class TAxis;
8 
37 {
38 public:
47  AliPoissonCalculator(const char*/*, UShort_t d, Char_t r*/);
54 
58  virtual ~AliPoissonCalculator();
73  void SetLumping(UShort_t nx, UShort_t ny);
79  void SetXLumping(UShort_t nx) { SetLumping(nx, fYLumping); } //*MENU*
85  void SetYLumping(UShort_t ny) { SetLumping(fYLumping, ny); } //*MENU*
92  void Init(Int_t xLumping=-1, Int_t yLumping=-1);
93 
102  void Define(const TAxis& xaxis, const TAxis& yaxis);
107  void MakeOutput();
113  void Output(TList* d);
119  void Reset(const TH2D* base);
128  void Fill(UShort_t strip, UShort_t sec, Bool_t hit, Double_t weight=1);
136  TH2D* Result(Bool_t correct=true);
141  void FillDiagnostics();
145  Bool_t IsFolder() const { return kTRUE; }
151  void Print(const Option_t* option="") const;
157  void Browse(TBrowser* b);
158 
164  TH2D* GetEmptyVsTotal() const { return fEmptyVsTotal; }
170  TH1D* GetMean() const { return fMean; }
176  TH1D* GetOccupancy() const { return fOcc; }
182  TH2D* GetCorrection() const { return fCorr; }
183 
191  Int_t GetReducedXBin(Int_t ix) const;
199  Int_t GetReducedXBin(Double_t x) const;
207  Int_t GetReducedYBin(Int_t iy) const;
215  Int_t GetReducedYBin(Double_t y) const;
216 
217 protected:
227  Int_t CheckLumping(char which, Int_t nBins, Int_t lumping) const;
232  void CleanUp();
258  Double_t CalculateMean(Double_t empty, Double_t total) const;
277  Double_t CalculateCorrection(Double_t empty, Double_t total) const;
278  UShort_t fXLumping; // Grouping of eta bins
279  UShort_t fYLumping; // Grouping of phi bins
280  TH2D* fTotal; // Total number of strips in a region
281  TH2D* fEmpty; // Total number of strips in a region
282  TH2D* fBasic; // Total number basic hits in a region
283  TH2D* fEmptyVsTotal; // Empty versus total cells
284  TH1D* fMean; // Mean calculated by poisson method
285  TH1D* fOcc; // Histogram of occupancies
286  TH2D* fCorr; // Correction as a function of mean
287  ClassDef(AliPoissonCalculator,3) // Calculate N_ch using Poisson
288 };
289 
290 #endif
291 // Local Variables:
292 // mode: C++
293 // End:
294 
double Double_t
Definition: External.C:58
Double_t CalculateCorrection(Double_t empty, Double_t total) const
void Reset(const TH2D *base)
void Define(const TAxis &xaxis, const TAxis &yaxis)
TH2D * GetEmptyVsTotal() const
void SetLumping(UShort_t nx, UShort_t ny)
TH2D * Result(Bool_t correct=true)
TH1D * GetOccupancy() const
void Print(const Option_t *option="") const
Int_t GetReducedXBin(Int_t ix) const
void Init(Int_t xLumping=-1, Int_t yLumping=-1)
int Int_t
Definition: External.C:63
void SetXLumping(UShort_t nx)
Definition: External.C:228
Definition: External.C:212
void Fill(UShort_t strip, UShort_t sec, Bool_t hit, Double_t weight=1)
Int_t CheckLumping(char which, Int_t nBins, Int_t lumping) const
TH2D * GetCorrection() const
Double_t CalculateMean(Double_t empty, Double_t total) const
Int_t GetReducedYBin(Int_t iy) const
unsigned short UShort_t
Definition: External.C:28
void SetYLumping(UShort_t ny)
AliPoissonCalculator & operator=(const AliPoissonCalculator &o)
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53