o Add fitter for B -> J/psi analysis (Annalisa)
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / AliDielectronBtoJPSItoEleCDFfitFCN.h
index 9b6ca88b6068c6fe38e20f1b7cfb2eba0a401b91..4054f68953ccf7215fdbba52e6f5fbe18c775e7c 100644 (file)
@@ -75,6 +75,8 @@ class AliDielectronBtoJPSItoEleCDFfitFCN : public TNamed {
                 Bool_t GetCrystalBallParam()               const { return fCrystalBallParam; }\r
                TH1F * GetCsiMcHisto()                     const { return fhCsiMC; }\r
                 Double_t GetResWeight(Int_t iW)            const { return fWeightType[iW]; }\r
+               \r
+               Double_t* GetParameters()                         { return fParameters;}\r
 \r
                // return pointer to likelihood functions  \r
                TF1* GetCsiMC(Double_t xmin, Double_t xmax,Double_t normalization);\r
@@ -116,7 +118,7 @@ class AliDielectronBtoJPSItoEleCDFfitFCN : public TNamed {
                void SetIntegralMassBkg(Double_t integral) { fintmMassBkg = integral; }\r
                void SetCsiMC(const TH1F* MCtemplate) {fhCsiMC = (TH1F*)MCtemplate->Clone("fhCsiMC");}\r
 \r
-               void SetResolutionConstants(Double_t* resolutionConst, Int_t type);\r
+               void SetResolutionConstants(const Double_t* resolutionConst, Int_t type);\r
                void SetMassWndHigh(Double_t limit) { fMassWndHigh = TDatabasePDG::Instance()->GetParticle(443)->Mass() + limit ;}\r
                void SetMassWndLow(Double_t limit) { fMassWndLow = TDatabasePDG::Instance()->GetParticle(443)->Mass() - limit ;}\r
                void SetCrystalBallFunction(Bool_t okCB) {fCrystalBallParam = okCB;}\r
@@ -128,6 +130,11 @@ class AliDielectronBtoJPSItoEleCDFfitFCN : public TNamed {
 \r
                void PrintStatus();\r
 \r
+               Double_t EvaluateCDFInvMassSigDistr(Double_t m) const ;\r
+               Double_t EvaluateCDFInvMassBkgDistr(Double_t m) const;\r
+               Double_t ResolutionFunc(Double_t x, Int_t type) const;\r
+               Double_t EvaluateCDFDecayTimeBkgDistr(Double_t x, Int_t type) const ;\r
+\r
        private:  \r
                Double_t fParameters[45];        /*  par[0]  = weightRes;                \r
                                                     par[1]  = fPos;\r
@@ -199,13 +206,10 @@ class AliDielectronBtoJPSItoEleCDFfitFCN : public TNamed {
                Double_t EvaluateCDFfuncSignalPart(Double_t x, Double_t m, Int_t type) const ;      // Signal part \r
                Double_t EvaluateCDFDecayTimeSigDistr(Double_t x, Int_t type) const ;\r
                Double_t EvaluateCDFDecayTimeSigDistrFunc(const Double_t* x, const Double_t *par) const { return par[0]*EvaluateCDFDecayTimeSigDistr(x[0],(Int_t)par[1]);}\r
-               Double_t EvaluateCDFInvMassSigDistr(Double_t m) const ;\r
                 Double_t EvaluateCDFInvMassSigDistrFunc(const Double_t* x, const Double_t *par) const {return par[0]*EvaluateCDFInvMassSigDistr(x[0])/fintmMassSig;}\r
                Double_t EvaluateCDFfuncBkgPart(Double_t x,Double_t m,Int_t type) const ;          // Background part\r
-               Double_t EvaluateCDFDecayTimeBkgDistr(Double_t x, Int_t type) const ;\r
                Double_t EvaluateCDFDecayTimeBkgDistrFunc(const Double_t* x, const Double_t *par) const { return EvaluateCDFDecayTimeBkgDistr(x[0],(Int_t)par[1])*par[0];}\r
                 Double_t EvaluateCDFDecayTimeBkgDistrFuncAllTypes(const Double_t* x, const Double_t *par) const {return (fWeightType[2]*EvaluateCDFDecayTimeBkgDistr(x[0],2)+fWeightType[1]*EvaluateCDFDecayTimeBkgDistr(x[0],1)+fWeightType[0]*EvaluateCDFDecayTimeBkgDistr(x[0],0))*par[0];}\r
-               Double_t EvaluateCDFInvMassBkgDistr(Double_t m) const;\r
                 Double_t EvaluateCDFInvMassBkgDistrFunc(const Double_t* x, const Double_t *par) const {return par[0]*EvaluateCDFInvMassBkgDistr(x[0])/fintmMassBkg;} \r
                   \r
                 Double_t EvaluateCDFInvMassTotalDistr(const Double_t* x, const Double_t *par) const;\r
@@ -222,7 +226,6 @@ class AliDielectronBtoJPSItoEleCDFfitFCN : public TNamed {
                Double_t FunBkgPos(Double_t x, Int_t type) const ;\r
                Double_t FunBkgNeg(Double_t x, Int_t type) const ;\r
                Double_t FunBkgSym(Double_t x, Int_t type) const ;\r
-               Double_t ResolutionFunc(Double_t x, Int_t type) const;\r
                Double_t ResolutionFuncf(const Double_t* x, const Double_t *par) const { return ResolutionFunc(x[0],(Int_t)par[1])*par[0];}\r
                 Double_t ResolutionFuncAllTypes(const Double_t* x, const Double_t *par) const { return (fWeightType[2]*ResolutionFunc(x[0],2)+fWeightType[1]*ResolutionFunc(x[0],1)+fWeightType[0]*ResolutionFunc(x[0],0))*par[0]; }                 \r
  \r