]>
Commit | Line | Data |
---|---|---|
704dfdbd | 1 | #ifndef ALICENTRALITYGLAUBERFIT_H |
2 | #define ALICENTRALITYGLAUBERFIT_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 1D distributions // | |
11 | // // | |
12 | /////////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #include <vector> | |
15 | #include <TObject.h> | |
16 | #include <TString.h> | |
17 | ||
18 | class TNtuple; | |
19 | class TFile; | |
20 | ||
21 | class AliCentralityGlauberFit : public TObject { | |
22 | ||
23 | public: | |
24 | ||
25 | AliCentralityGlauberFit(const char * filename); | |
26 | virtual ~AliCentralityGlauberFit() {} | |
27 | ||
28 | void AddHisto(TString name) { fHistnames.push_back(name); } | |
29 | TH1F *GetGlauberHist() { return fGlauberHist; } | |
30 | void MakeFits(); | |
59b46d22 | 31 | void SetGlauberParam(Int_t Nk, Double_t klow, Double_t khigh, Int_t Nalpha, Double_t alphalow, Double_t alphahigh, |
32 | Int_t Nsigma, Double_t sigmalow, Double_t sigmahigh, Int_t Nbog, Double_t boglow, Double_t boghigh, | |
33 | Int_t Ngamma, Double_t gammalow, Double_t gammahigh, Int_t Nsigmap, Double_t sigmaplow, Double_t sigmaphigh); | |
34 | void SetNParam(double a, double b, double c, double d); | |
704dfdbd | 35 | void SetInputFile(TString filename) { fInrootfilename = filename; } |
36 | void SetInputNtuple(TString ntuplename) { fInntuplename = ntuplename; } | |
37 | void SetNevents(Int_t f) { fNevents=f; } | |
38 | void SetOutputFile(TString filename) { fOutrootfilename = filename; } | |
39 | void SetOutputNtuple(TString ntuplename) { fOutntuplename = ntuplename;} | |
40 | void SetRangeToFit(Double_t multmin, Double_t multmax); | |
41 | void SetRangeToScale(Double_t scalemin); | |
42 | void SetRebin(Int_t f) { fRebinFactor=f; } | |
43 | void UseChi2(Bool_t f) { fUseChi2=f; } | |
44 | void SetSaturation(Bool_t saturation) {fApplySaturation = saturation;} | |
45 | void SetSaturationParams(Int_t ngray=15, Int_t nblack=28) {fnGraySaturation=ngray; fnBlackSaturation=nblack;} | |
1665860d | 46 | void SetIsZN() {fIsZN=kTRUE;} |
47 | void SetIsZP() {fIsZN=kFALSE;} | |
59b46d22 | 48 | void SetNTrials(int ntrials) {fNTrials=ntrials;} |
49 | void SetChi2Min(double chi2min) {fChi2Min=chi2min;} | |
1665860d | 50 | |
704dfdbd | 51 | private: |
7c159fe3 | 52 | Int_t fNk; // k points |
704dfdbd | 53 | Double_t fKlow; // k low |
54 | Double_t fKhigh; // k high | |
7c159fe3 | 55 | Int_t fNalpha; // alpha points |
704dfdbd | 56 | Double_t fAlphalow; // alpha low |
57 | Double_t fAlphahigh; // alpha high | |
7c159fe3 | 58 | Int_t fNsigma; // sigma points |
704dfdbd | 59 | Double_t fSigmalow; // sigma low |
60 | Double_t fSigmahigh; // sigma high | |
7c159fe3 | 61 | Int_t fNbog; // bog points |
59b46d22 | 62 | Double_t fBoglow; // bog low |
63 | Double_t fBoghigh; // bog high | |
7c159fe3 | 64 | Int_t fNgamma; // gamma points |
59b46d22 | 65 | Double_t fgammalow; // gamma low |
66 | Double_t fgammahigh; // gamma high | |
7c159fe3 | 67 | Int_t fNsigmap; // sigmap points |
59b46d22 | 68 | Double_t fsigmaplow; // sigmap low |
69 | Double_t fsigmaphigh; // sigmap high | |
7c159fe3 | 70 | Int_t fRebinFactor; // rebin factor |
704dfdbd | 71 | Double_t fScalemin; // mult min where to scale |
72 | Double_t fMultmin; // mult min | |
73 | Double_t fMultmax; // mult max | |
74 | TNtuple *fGlauntuple; // glauber ntuple | |
7c159fe3 | 75 | Float_t fNpart; // number participants |
76 | Float_t fNcoll; // number collisions | |
77 | Float_t fB; // impact parameter | |
78 | Float_t fTaa; // taa | |
79 | TH1F *fTempHist; // Temporary pointer to data histo, to be used in minimization | |
80 | TH1F *fGlauberHist; // Glauber histogram | |
81 | Bool_t fUseChi2; // If true, use chi2 | |
82 | Int_t fNevents; // Number of events to use in the glauber ntuple | |
83 | Bool_t fApplySaturation; | |
84 | Int_t fnGraySaturation; | |
85 | Int_t fnBlackSaturation; | |
86 | Bool_t fIsZN; | |
87 | Float_t fSDprobability[40]; | |
59b46d22 | 88 | Double_t fParamnSlow[4]; |
89 | Int_t fNTrials; | |
90 | Double_t fChi2Min; | |
704dfdbd | 91 | |
92 | TString fInrootfilename; // input root file | |
93 | TString fInntuplename; // input Gauber ntuple | |
94 | TString fOutrootfilename; // output root file | |
95 | TString fOutntuplename; // output Glauber ntuple | |
96 | TString fAncfilename; // ancestor file name | |
97 | std::vector<TString> fHistnames; // histogram names | |
98 | ||
59b46d22 | 99 | Double_t CalculateChi2(TH1F *hDATA, TH1F *thistGlau); |
100 | TH1F *GlauberHisto(Double_t k, Double_t alpha, Double_t sigma, Double_t bog, Double_t gamma, Double_t sigmap, | |
101 | TH1F *hDATA, Bool_t save=kFALSE); | |
102 | void SaveHisto(TH1F *hist1,TH1F *hist2, TFile *outrootfile); | |
103 | void MakeSlowNucleons(Int_t fNcoll, Double_t &nbn, Double_t &ngn,Double_t &nbp, Double_t &ngp); | |
104 | void MakeSlowNucleons2(Int_t fNcoll, Double_t bog, Double_t gamma, | |
105 | Double_t &nbn, Double_t &ngn,Double_t &nbp, Double_t &ngp, Double_t &lcp); | |
7c159fe3 | 106 | void MakeSlowNucleons2s(Float_t fNcoll, Double_t bog, Double_t gamma, Double_t sigmap, |
59b46d22 | 107 | Double_t &nbn, Double_t &ngn,Double_t &nbp, Double_t &ngp, Double_t &lcp); |
704dfdbd | 108 | Double_t ConvertToEnergy(Double_t T); |
109 | Double_t Maxwell(Double_t m, Double_t p, Double_t T); | |
110 | ||
111 | AliCentralityGlauberFit(const AliCentralityGlauberFit&); | |
112 | AliCentralityGlauberFit &operator=(const AliCentralityGlauberFit&); | |
113 | ||
59b46d22 | 114 | ClassDef(AliCentralityGlauberFit, 4) |
704dfdbd | 115 | }; |
116 | #endif |