]>
Commit | Line | Data |
---|---|---|
e6f3f2fe | 1 | #ifndef ALICENTRALITYBYFUNCTION_H |
2 | #define ALICENTRALITYBYFUNCTION_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | /* Origin: Alberica Toia, CERN, Alberica.Toia@cern.ch */ | |
7 | ||
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // class to determine centrality percentiles from 2D distributions // | |
11 | // // | |
12 | /////////////////////////////////////////////////////////////////////////////// | |
13 | ||
bdd08257 | 14 | #include <vector> |
15 | #include <map> | |
16 | #include <TString.h> | |
e6f3f2fe | 17 | |
18 | // forward decl | |
19 | class TF1; | |
bdd08257 | 20 | class TH1D; |
21 | class TH2D; | |
e6f3f2fe | 22 | |
23 | class AliCentralityByFunction : public TObject { | |
24 | ||
25 | public: | |
26 | ||
27 | AliCentralityByFunction(); | |
bdd08257 | 28 | virtual ~AliCentralityByFunction() {} |
e6f3f2fe | 29 | |
bdd08257 | 30 | void SetPercentileFile(TString filename) { foutrootfilename = filename; } |
31 | void SetPercentileCrossSection(Float_t xsec) { fpercentXsec = xsec; } | |
e6f3f2fe | 32 | void SetFitFunction(TString distribution, TString func, Double_t xmin, Double_t xmax); |
bdd08257 | 33 | void AddHisto(TString name) { fhistnames.push_back(name); } |
e6f3f2fe | 34 | void MakePercentiles(TString infilename); |
35 | ||
36 | private: | |
bdd08257 | 37 | AliCentralityByFunction(const AliCentralityByFunction&); |
38 | AliCentralityByFunction& operator=(const AliCentralityByFunction&); | |
39 | ||
40 | TFile *finrootfile; // input root file | |
41 | TString foutrootfilename; // output root file name | |
42 | TFile *foutrootfile; // output root file | |
43 | std::vector<TString> fhistnames; // hist names | |
44 | Float_t fpercentXsec; // percentile cross section | |
45 | std::map<TString, TString> fitfunc; // mapping from distribution to fit function name | |
46 | std::map<TString, TF1 *> fitter; // mapping from fit function name to corresponding TF1 | |
e6f3f2fe | 47 | |
48 | TH1D *FitHisto(TString hdistributionName); | |
bdd08257 | 49 | TH1D *MakePercentHisto(TH2D *hist); |
e6f3f2fe | 50 | |
51 | ClassDef(AliCentralityByFunction, 1) | |
52 | }; | |
53 | #endif |