]>
Commit | Line | Data |
---|---|---|
ba06aaec | 1 | #ifndef ALIPERFANALYZEINVPT_H |
2 | #define ALIPERFANALYZEINVPT_H | |
acb9d358 | 3 | |
ba06aaec | 4 | //---------------------------------------------------------------------------------------------------- |
5 | // Class to analyse output of AliPerformancePtCalib.cxx and AliPerformancePtCalibMC.cxx: | |
6 | // Projection of 1/pt vs theta and vs phi resp. histoprams will be fitted with either | |
7 | // polynomial or gaussian fit function to extract minimum position of 1/pt. | |
8 | // Fit options and theta, phi bins can be set by user. | |
9 | // Attention: use the Set* functions of AliPerformancePtCalib.h and AliPerformancePtCalibMC.h | |
10 | // when running AliPerformancePtCalib*::Analyse(). | |
11 | // | |
12 | // Author: S. Schuchmann 11/13/2009 | |
13 | //---------------------------------------------------------------------------------------------------- | |
acb9d358 | 14 | |
15 | class TNamed; | |
16 | class TString; | |
17 | class TList; | |
ba06aaec | 18 | class TF1; |
acb9d358 | 19 | class TH1F; |
20 | class TH2F; | |
ba06aaec | 21 | class TH3F; |
acb9d358 | 22 | class TGraphErrors; |
ba06aaec | 23 | //class TMath; |
24 | class TH1D; | |
25 | class TH2D; | |
26 | class TCanvas; | |
27 | class TObjArray; | |
28 | ||
acb9d358 | 29 | |
30 | class AliPerfAnalyzeInvPt : public TNamed { | |
31 | ||
ba06aaec | 32 | public: |
33 | AliPerfAnalyzeInvPt(); | |
34 | AliPerfAnalyzeInvPt(Char_t* name, Char_t* title); | |
acb9d358 | 35 | virtual ~AliPerfAnalyzeInvPt(){;} |
ba06aaec | 36 | void InitGraphs(Double_t *binsXTheta,Double_t *fitParamTheta,Double_t *errFitParamTheta,Double_t *binsXPhi,Double_t *fitParamPhi,Double_t *errFitParamPhi); |
acb9d358 | 37 | void InitFitFcn(); |
ba06aaec | 38 | void StartAnalysis(const TH2F *histThetaInvPt, const TH2F *histPhiInvPt, TObjArray* aFolderObj); |
39 | void SetProjBinsPhi(const Double_t *pBins,const Int_t sizep); | |
40 | void SetProjBinsTheta(const Double_t *tBins, const Int_t sizet); | |
41 | void SetMakeFitOption(const Bool_t setGausFit, const Double_t exclusionR,const Double_t fitR ); | |
acb9d358 | 42 | |
43 | ||
ba06aaec | 44 | protected: |
45 | Double_t fThetaBins[100];// array of theta bins for projection and fit | |
46 | Double_t fPhiBins[100];// array of phi bins for projection and fit | |
acb9d358 | 47 | |
ba06aaec | 48 | Int_t fNThetaBins;// number of theta bins for projection and fit |
49 | Int_t fNPhiBins; // number of phi bins for projection and fit | |
50 | Double_t fRange;// fit range of 1/pt spectrum | |
51 | Double_t fExclRange ;// range of exlusion of points around 0 when fitting 1/pt | |
52 | Bool_t fFitGaus;// set this flag for usage of gaussian fit function instead of polynomial (default) | |
53 | ||
54 | // projection histos | |
55 | TH1F *fHistFitTheta[100];// projection histos for analysis in theta bins | |
56 | TH1F *fHistFitPhi[100];// projection histos for analysis in phi bins | |
acb9d358 | 57 | |
ba06aaec | 58 | //histos for copy of input histos |
59 | TH2F *fHistH2InvPtTheta; // for copy of input histos | |
60 | TH2F *fHistH2InvPtPhi; // for copy of input histos | |
61 | ||
62 | //graphs for displaying the fit parameters (minimum position of 1/pt and error) | |
63 | TGraphErrors *fGrMinPosTheta; | |
64 | TGraphErrors *fGrMinPosPhi; | |
acb9d358 | 65 | |
66 | ||
67 | ||
ba06aaec | 68 | private: |
69 | //fit functions | |
70 | TF1 *fFitMinPos;//fit function for first fit with polynomial | |
71 | TF1 *fFitMinPosRejP;//fit function for second fit with polynomial to improve result | |
72 | TF1 *fFitInvGauss;//fit functionfor first fit with gaussian | |
73 | TF1 *fFitInvGaussRejP;//fit function for second fit with gaussian to improve result | |
acb9d358 | 74 | |
ba06aaec | 75 | // infput for fit functions |
76 | static Double_t Polynomial(Double_t *x, const Double_t *par); | |
77 | static Double_t PolynomialRejP(Double_t *x, const Double_t *par); | |
78 | static Double_t InvGauss(Double_t *x, const Double_t *par); | |
79 | static Double_t InvGaussRejP(Double_t *x, const Double_t *par); | |
80 | ||
81 | //functions for fitting procedure | |
82 | void MakeFit(TH1F *dmproy, TF1 * fitpb, Double_t &mean, Double_t &ErrMean, Double_t &excl,Double_t &range); | |
83 | void MakeFitBetter(TH1F *dmproy, TF1 * fitpb2, Double_t &mean, Double_t &ErrMean, Double_t &f, Double_t &excl, Double_t &range); | |
84 | void MakeFitInvGauss(TH1F *dmproy, TF1 * fitpb2, Double_t &mean, Double_t &ErrMean,Double_t &excl , Double_t &range); | |
85 | void MakeFitInvGaussBetter(TH1F *dmproy, TF1 * fitpb2, Double_t &mean, Double_t &ErrMean, Double_t &f,Double_t &excl, Double_t &range); | |
acb9d358 | 86 | |
87 | ||
88 | ||
89 | ||
ba06aaec | 90 | AliPerfAnalyzeInvPt(const AliPerfAnalyzeInvPt&); // not implemented |
91 | AliPerfAnalyzeInvPt& operator=(const AliPerfAnalyzeInvPt&); // not implemented | |
acb9d358 | 92 | |
ba06aaec | 93 | ClassDef(AliPerfAnalyzeInvPt, 1); |
acb9d358 | 94 | }; |
95 | ||
96 | #endif |