]>
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(); | |
31 | void SetGlauberParam(Int_t Nk, Double_t klow, Double_t khigh, Int_t Nalpha, Double_t alphalow, Double_t alphahigh, Int_t Nsigma, Double_t sigmalow, Double_t sigmahigh, Int_t Nbog, Double_t boglow, Double_t boghigh, Int_t NCP, Double_t CPlow, Double_t CPhigh); | |
32 | void SetInputFile(TString filename) { fInrootfilename = filename; } | |
33 | void SetInputNtuple(TString ntuplename) { fInntuplename = ntuplename; } | |
34 | void SetNevents(Int_t f) { fNevents=f; } | |
35 | void SetOutputFile(TString filename) { fOutrootfilename = filename; } | |
36 | void SetOutputNtuple(TString ntuplename) { fOutntuplename = ntuplename;} | |
37 | void SetRangeToFit(Double_t multmin, Double_t multmax); | |
38 | void SetRangeToScale(Double_t scalemin); | |
39 | void SetRebin(Int_t f) { fRebinFactor=f; } | |
40 | void UseChi2(Bool_t f) { fUseChi2=f; } | |
41 | void SetSaturation(Bool_t saturation) {fApplySaturation = saturation;} | |
42 | void SetSaturationParams(Int_t ngray=15, Int_t nblack=28) {fnGraySaturation=ngray; fnBlackSaturation=nblack;} | |
1665860d | 43 | void SetIsZN() {fIsZN=kTRUE;} |
44 | void SetIsZP() {fIsZN=kFALSE;} | |
45 | ||
704dfdbd | 46 | private: |
47 | Int_t fNk; // k points | |
48 | Double_t fKlow; // k low | |
49 | Double_t fKhigh; // k high | |
50 | Int_t fNalpha; // alpha points | |
51 | Double_t fAlphalow; // alpha low | |
52 | Double_t fAlphahigh; // alpha high | |
53 | Int_t fNsigma; // sigma points | |
54 | Double_t fSigmalow; // sigma low | |
55 | Double_t fSigmahigh; // sigma high | |
56 | Int_t fNbog; // bog points | |
57 | Double_t fBoglow; // bog low | |
58 | Double_t fBoghigh; // bog high | |
59 | Int_t fNCP; // CP points | |
60 | Double_t fCPlow; // CP low | |
61 | Double_t fCPhigh; // CP high | |
62 | Int_t fRebinFactor; // rebin factor | |
63 | Double_t fScalemin; // mult min where to scale | |
64 | Double_t fMultmin; // mult min | |
65 | Double_t fMultmax; // mult max | |
66 | TNtuple *fGlauntuple; // glauber ntuple | |
67 | Float_t fNpart; // number participants | |
68 | Float_t fNcoll; // number collisions | |
69 | Float_t fB; // impact parameter | |
70 | Float_t fTaa; // taa | |
71 | TH1F *fTempHist; // Temporary pointer to data histo, to be used in minimization | |
72 | TH1F *fGlauberHist; // Glauber histogram | |
73 | Bool_t fUseChi2; // If true, use chi2 | |
74 | Int_t fNevents; // Number of events to use in the glauber ntuple | |
75 | Bool_t fApplySaturation;// | |
76 | Int_t fnGraySaturation; // | |
77 | Int_t fnBlackSaturation;// | |
1665860d | 78 | Bool_t fIsZN; |
704dfdbd | 79 | |
80 | TString fInrootfilename; // input root file | |
81 | TString fInntuplename; // input Gauber ntuple | |
82 | TString fOutrootfilename; // output root file | |
83 | TString fOutntuplename; // output Glauber ntuple | |
84 | TString fAncfilename; // ancestor file name | |
85 | std::vector<TString> fHistnames; // histogram names | |
86 | ||
87 | Double_t CalculateChi2(TH1F *hDATA, TH1F *thistGlau); | |
88 | TH1F *GlauberHisto(Double_t k, Double_t alpha, Double_t sigma, Double_t bog, Double_t CP, TH1F *hDATA, Bool_t save=kFALSE); | |
89 | void SaveHisto(TH1F *hist1,TH1F *hist2, TFile *outrootfile); | |
90 | void MakeSlowNucleons(Int_t fNcoll, Double_t alpha, Double_t k, Double_t &nbn, Double_t &ngn); | |
91 | void MakeSlowNucleons2(Int_t fNcoll, Double_t alpha, Double_t k, Double_t bog, Double_t CP, Double_t &nbn, Double_t &ngn,Double_t &nbp, Double_t &ngp); | |
97c4eaf2 | 92 | void MakeSlowNucleons2s(Int_t fNcoll, Double_t alpha, Double_t k, Double_t bog, Double_t CP, Double_t &nbn, Double_t &ngn,Double_t &nbp, Double_t &ngp); |
704dfdbd | 93 | //void MakeSlowNucleons2(Int_t fNcoll, Double_t alpha, Double_t k, Double_t bog, Double_t CP, Double_t &nbn, Double_t &ngn); |
94 | Double_t ConvertToEnergy(Double_t T); | |
95 | Double_t Maxwell(Double_t m, Double_t p, Double_t T); | |
96 | ||
97 | AliCentralityGlauberFit(const AliCentralityGlauberFit&); | |
98 | AliCentralityGlauberFit &operator=(const AliCentralityGlauberFit&); | |
99 | ||
1665860d | 100 | ClassDef(AliCentralityGlauberFit, 2) |
704dfdbd | 101 | }; |
102 | #endif |