2 // Class AliRsnFitResult
4 // It contains all results from a fit to an invariant mass spectrum
7 #ifndef ALIRSNFITRESULT
8 #define ALIRSNFITRESULT
12 class AliRsnFitResult : public TNamed
46 AliRsnFitResult(const char *name = "none", ESignalType sType = kGaus, EBackgroundType bType = kPoly2);
47 //AliRsnFitResult(const AliRsnFitResult& copy);
48 //AliRsnFitResult& operator=(cont AliRsnFitResult& copy);
50 Double_t NormSquareRoot(Double_t *x, Double_t *par);
51 Double_t NormPoly2(Double_t *x, Double_t *par);
52 Double_t NormLinear(Double_t *x, Double_t *par);
53 Double_t NormBreitWigner(Double_t *x, Double_t *par);
54 Double_t NormGaus(Double_t *x, Double_t *par);
56 Double_t Signal(Double_t *x, Double_t *par);
57 Double_t Background(Double_t *x, Double_t *par);
58 Double_t Sum(Double_t *x, Double_t *par);
60 Int_t GetNParBackground();
61 Bool_t InitFunctions();
62 Bool_t SingleFit(const char *fitOpts, Double_t mass, Double_t width);
64 void SetHistogram(TH1F *histogram);
65 void SetPeakRange(Double_t min, Double_t max) {fPeakRange[0] = TMath::Min(min, max); fPeakRange[1] = TMath::Max(min, max);}
66 void SetFullRange(Double_t min, Double_t max) {fFullRange[0] = TMath::Min(min, max); fFullRange[1] = TMath::Max(min, max);}
70 ESignalType fSignalType; // signal function
71 EBackgroundType fBackgroundType; // background function
73 Double_t fFullRange[2]; // full fit range
74 Double_t fPeakRange[2]; // peak fit range
75 Double_t fFitResult[kValues]; // array of fit results
77 TH1D *fHistogram; // histogram to be fitted
78 TF1 *fSignalFcn; // function for signal
79 TF1 *fBackgroundFcn; // function for background
80 TF1 *fSumFcn; // total function
82 ClassDef(AliRsnFitResult, 1)