CbmRoot
PairAnalysisHelper.h
Go to the documentation of this file.
1 #ifndef PAIRANALYSISHELPER_H
2 #define PAIRANALYSISHELPER_H
3 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
7 // //
8 // PairAnalysis helpers //
9 // //
10 // //
11 // Authors: //
12 // Julian Book <Julian.Book@cern.ch> //
13 // //
15 
16 
17 #include <TArrayD.h>
18 #include <TVectorDfwd.h>
19 
20 #include "CbmDefs.h"
21 
22 //class AliKFParticle;
23 /* class AliVEvent; */
24 /* class AliMCEvent; */
26 class TFormula;
27 class TH1;
28 class TH2;
29 class TObjArray;
30 
31 namespace PairAnalysisHelper {
32 
33  TVectorD* MakeLogBinning(Int_t nbinsX, Double_t xmin, Double_t xmax);
34  TVectorD* MakeLinBinning(Int_t nbinsX, Double_t xmin, Double_t xmax);
35  TVectorD* MakeArbitraryBinning(const char* bins);
36  TVectorD* MakeGausBinning(Int_t nbinsX, Double_t mean, Double_t sigma);
37  TVectorD* CombineBinning(TVectorD* low, TVectorD* high);
38 
39  TArrayD* MakeStatBinLimits(TH1* h, Double_t stat);
40 
41  TVectorD* MakePdgBinning();
42 
43  // void RotateKFParticle(AliKFParticle * kfParticle,Double_t angle/*, const PairAnalysisEventNEW * const ev=0x0*/);
44 
45  // tformula functions
46  Double_t EvalFormula(TFormula* form, const Double_t* values);
47  TString GetFormulaTitle(TFormula* form);
48  TString GetFormulaName(TFormula* form);
49  TFormula* GetFormula(const char* name, const char* formula);
50 
51  // pdg labels
52  void SetPDGBinLabels(TH1* hist, Bool_t clean);
53  TString GetPDGlabel(Int_t pdg);
54  void SetGEANTBinLabels(TH1* hist);
55 
56  // misc
57  TString GetDetName(ECbmModuleId det);
58  Double_t GetContentMinimum(TH1* h, Bool_t inclErr = kTRUE);
59  Double_t GetContentMaximum(TH1* h, Bool_t inclErr = kTRUE);
60  Double_t GetQuantile(TH1* h1, Double_t p = 0.5);
61 
62  void NormalizeSlicesY(TH2* h);
63  void CumulateSlicesX(TH2* h, Bool_t reverse = kFALSE, Bool_t norm = kFALSE);
64  void Cumulate(TH1* h, Bool_t reverse = kFALSE, Bool_t norm = kFALSE);
65 
66  TObject* FindObjectByTitle(TObjArray* arrhist, TString ref);
67 
68  Int_t GetPrecision(Double_t value);
69 
70 } // namespace PairAnalysisHelper
71 
72 #endif
PairAnalysisHelper::EvalFormula
Double_t EvalFormula(TFormula *form, const Double_t *values)
Definition: PairAnalysisHelper.cxx:278
PairAnalysisHelper::SetGEANTBinLabels
void SetGEANTBinLabels(TH1 *hist)
Definition: PairAnalysisHelper.cxx:450
PairAnalysisHelper::GetDetName
TString GetDetName(ECbmModuleId det)
Definition: PairAnalysisHelper.cxx:468
PairAnalysisHelper::NormalizeSlicesY
void NormalizeSlicesY(TH2 *h)
Definition: PairAnalysisHelper.cxx:580
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
PairAnalysisHelper::MakeStatBinLimits
TArrayD * MakeStatBinLimits(TH1 *h, Double_t stat)
Definition: PairAnalysisHelper.cxx:203
PairAnalysisHelper::MakeLinBinning
TVectorD * MakeLinBinning(Int_t nbinsX, Double_t xmin, Double_t xmax)
Definition: PairAnalysisHelper.cxx:70
PairAnalysisHelper::GetPrecision
Int_t GetPrecision(Double_t value)
Definition: PairAnalysisHelper.cxx:657
PairAnalysisHelper::MakeLogBinning
TVectorD * MakeLogBinning(Int_t nbinsX, Double_t xmin, Double_t xmax)
Definition: PairAnalysisHelper.cxx:40
PairAnalysisHelper::GetFormulaName
TString GetFormulaName(TFormula *form)
Definition: PairAnalysisHelper.cxx:315
PairAnalysisHelper::GetFormula
TFormula * GetFormula(const char *name, const char *formula)
Definition: PairAnalysisHelper.cxx:330
h
Data class with information on a STS local track.
PairAnalysisHelper::CombineBinning
TVectorD * CombineBinning(TVectorD *low, TVectorD *high)
Definition: PairAnalysisHelper.cxx:180
PairAnalysisHelper::MakeGausBinning
TVectorD * MakeGausBinning(Int_t nbinsX, Double_t mean, Double_t sigma)
Definition: PairAnalysisHelper.cxx:122
PairAnalysisHelper::CumulateSlicesX
void CumulateSlicesX(TH2 *h, Bool_t reverse=kFALSE, Bool_t norm=kFALSE)
Definition: PairAnalysisHelper.cxx:597
PairAnalysisHelper::FindObjectByTitle
TObject * FindObjectByTitle(TObjArray *arrhist, TString ref)
Definition: PairAnalysisHelper.cxx:639
PairAnalysisHelper
Definition: PairAnalysisHelper.h:31
PairAnalysisHelper::MakePdgBinning
TVectorD * MakePdgBinning()
Definition: PairAnalysisHelper.cxx:252
PairAnalysisHelper::GetPDGlabel
TString GetPDGlabel(Int_t pdg)
Definition: PairAnalysisHelper.cxx:386
PairAnalysisHelper::MakeArbitraryBinning
TVectorD * MakeArbitraryBinning(const char *bins)
Definition: PairAnalysisHelper.cxx:91
PairAnalysisHelper::Cumulate
void Cumulate(TH1 *h, Bool_t reverse=kFALSE, Bool_t norm=kFALSE)
Definition: PairAnalysisHelper.cxx:619
PairAnalysisHelper::GetContentMaximum
Double_t GetContentMaximum(TH1 *h, Bool_t inclErr=kTRUE)
Definition: PairAnalysisHelper.cxx:513
PairAnalysisHelper::SetPDGBinLabels
void SetPDGBinLabels(TH1 *hist, Bool_t clean)
Definition: PairAnalysisHelper.cxx:350
PairAnalysisHelper::GetContentMinimum
Double_t GetContentMinimum(TH1 *h, Bool_t inclErr=kTRUE)
Definition: PairAnalysisHelper.cxx:480
PairAnalysisHelper::GetQuantile
Double_t GetQuantile(TH1 *h1, Double_t p=0.5)
Definition: PairAnalysisHelper.cxx:541
PairAnalysisHelper::GetFormulaTitle
TString GetFormulaTitle(TFormula *form)
Definition: PairAnalysisHelper.cxx:291
CbmDefs.h