]>
Commit | Line | Data |
---|---|---|
3602328d | 1 | /* $Id$ */ |
2 | ||
0a173978 | 3 | #ifndef ALIMULTIPLICITYCORRECTION_H |
4 | #define ALIMULTIPLICITYCORRECTION_H | |
5 | ||
3602328d | 6 | #include "TNamed.h" |
0a173978 | 7 | |
8 | // | |
9 | // class that contains the correction matrix and the functions for | |
10 | // correction the multiplicity spectrum | |
11 | // | |
12 | ||
13 | class TH1; | |
14 | class TH2; | |
15 | class TH1F; | |
16 | class TH2F; | |
17 | class TH3F; | |
3602328d | 18 | class TF1; |
19 | class TCollection; | |
0a173978 | 20 | |
21 | class AliMultiplicityCorrection : public TNamed { | |
22 | public: | |
23 | AliMultiplicityCorrection(); | |
24 | AliMultiplicityCorrection(const Char_t* name, const Char_t* title); | |
25 | virtual ~AliMultiplicityCorrection(); | |
26 | ||
27 | virtual Long64_t Merge(TCollection* list); | |
28 | ||
29 | void FillMeasured(Float_t vtx, Int_t measured05, Int_t measured10, Int_t measured15, Int_t measured20); | |
30 | void FillGenerated(Float_t vtx, Int_t generated05, Int_t generated10, Int_t generated15, Int_t generated20, Int_t generatedAll); | |
31 | ||
32 | void FillCorrection(Float_t vtx, Int_t generated05, Int_t generated10, Int_t generated15, Int_t generated20, Int_t generatedAll, Int_t measured05, Int_t measured10, Int_t measured15, Int_t measured20); | |
33 | ||
34 | Bool_t LoadHistograms(const Char_t* dir); | |
35 | void SaveHistograms(); | |
36 | void DrawHistograms(); | |
9ca6be09 | 37 | void DrawComparison(const char* name, Int_t mcID, Int_t esdCorrId, Bool_t normalizeESD = kTRUE); |
0a173978 | 38 | |
9ca6be09 | 39 | void ApplyMinuitFit(Int_t inputRange, Bool_t fullPhaseSpace, Bool_t check = kFALSE); |
0a173978 | 40 | void ApplyMinuitFitAll(); |
41 | ||
42 | void ApplyBayesianMethod(Int_t inputRange, Bool_t fullPhaseSpace); | |
43 | ||
9ca6be09 | 44 | void ApplyGaussianMethod(Int_t inputRange, Bool_t fullPhaseSpace); |
45 | ||
0a173978 | 46 | TH2F* GetMultiplicityESD(Int_t i) { return fMultiplicityESD[i]; } |
47 | TH2F* GetMultiplicityMC(Int_t i) { return fMultiplicityMC[i]; } | |
48 | TH3F* GetCorrelation(Int_t i) { return fCorrelation[i]; } | |
49 | ||
9ca6be09 | 50 | void SetMultiplicityESD(Int_t i, TH2F* hist) { fMultiplicityESD[i] = hist; } |
51 | void SetMultiplicityMC(Int_t i, TH2F* hist) { fMultiplicityMC[i] = hist; } | |
52 | void SetCorrelation(Int_t i, TH3F* hist) { fCorrelation[i] = hist; } | |
53 | ||
3602328d | 54 | void SetGenMeasFromFunc(TF1* inputMC, Int_t id); |
55 | TH2F* CalculateMultiplicityESD(TH1* inputMC, Int_t correlationMap); | |
56 | ||
0a173978 | 57 | TH1F* GetMultiplicityESDCorrected(Int_t i) { return fMultiplicityESDCorrected[i]; } |
58 | ||
59 | static void NormalizeToBinWidth(TH1* hist); | |
60 | static void NormalizeToBinWidth(TH2* hist); | |
61 | ||
3602328d | 62 | public: |
0a173978 | 63 | protected: |
64 | enum { kESDHists = 4, kMCHists = 5, kCorrHists = 8 }; | |
65 | ||
66 | static const Int_t fgMaxParams; // number of fit params | |
67 | ||
9ca6be09 | 68 | static Double_t RegularizationPol0(Double_t *params); |
69 | static Double_t RegularizationPol1(Double_t *params); | |
70 | static Double_t RegularizationTotalCurvature(Double_t *params); | |
3602328d | 71 | static Double_t RegularizationEntropy(Double_t *params); |
9ca6be09 | 72 | |
0a173978 | 73 | static void MinuitFitFunction(Int_t&, Double_t*, Double_t& chi2, Double_t *params, Int_t); |
74 | ||
9ca6be09 | 75 | void SetupCurrentHists(Int_t inputRange, Bool_t fullPhaseSpace); |
76 | ||
77 | static TH1* fCurrentESD; // static variable to be accessed by MINUIT | |
78 | static TH1* fCurrentCorrelation; // static variable to be accessed by MINUIT | |
0a173978 | 79 | |
80 | TH2F* fMultiplicityESD[kESDHists]; // multiplicity histogram: vtx vs multiplicity; array: |eta| < 0.5, 1, 1.5, 2 (0..3) | |
81 | TH2F* fMultiplicityMC[kMCHists]; // multiplicity histogram: vtx vs multiplicity; array: |eta| < 0.5, 1, 1.5, 2, inf (0..4) | |
82 | ||
83 | TH3F* fCorrelation[kCorrHists]; // vtx vs. (gene multiplicity) vs. (meas multiplicity); array: |eta| < 0.5, 1, 1.5, 2 (0..3 and 4..7), the first corrects to the eta range itself, the second to full phase space | |
84 | TH1F* fMultiplicityESDCorrected[kCorrHists]; // corrected histograms | |
85 | ||
86 | private: | |
87 | AliMultiplicityCorrection(const AliMultiplicityCorrection&); | |
88 | AliMultiplicityCorrection& operator=(const AliMultiplicityCorrection&); | |
89 | ||
90 | ClassDef(AliMultiplicityCorrection, 1); | |
91 | }; | |
92 | ||
93 | #endif |