1 #ifndef ALIANALYSISMUMUJPSIRESULT_H
2 #define ALIANALYSISMUMUJPSIRESULT_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
8 /// AliAnalysisMuMuJpsiResult : helper class to store Jpsi results from
9 /// AliAnalysisTaskMuMu
11 /// author : Laurent Aphecetche (Subatech)
15 #include "AliAnalysisMuMuResult.h"
16 #include "AliAnalysisMuMuBinning.h"
24 class AliAnalysisMuMuJpsiResult : public AliAnalysisMuMuResult
29 AliAnalysisMuMuJpsiResult(TRootIOCtor* io);
31 // AliAnalysisMuMuJpsiResult(const TH1& hminv);
33 AliAnalysisMuMuJpsiResult(const char* particle,
37 AliAnalysisMuMuJpsiResult(const char* particle,
39 const char* triggerClass,
40 const char* eventSelection,
41 const char* pairSelection,
42 const char* centSelection,
43 const AliAnalysisMuMuBinning::Range& bin);
45 AliAnalysisMuMuJpsiResult(const AliAnalysisMuMuJpsiResult& rhs);
46 AliAnalysisMuMuJpsiResult& operator=(const AliAnalysisMuMuJpsiResult& rhs);
48 virtual ~AliAnalysisMuMuJpsiResult();
50 virtual TObject* Clone(const char* newname = "") const;
52 Bool_t Correct(const AliAnalysisMuMuJpsiResult& other, const char* particle, const char* subResultName="");
54 TH1* Histo() const { return fHisto; }
56 Int_t NofTriggers() const;
58 void SetNofTriggers(Int_t n);
60 void Print(Option_t* opt="") const;
62 Bool_t AddFit(const char* fitType);
64 AliAnalysisMuMuJpsiResult* CountJpsi(TH1& h);
66 /** All the fit functions should have a prototype starting like :
68 AliAnalysisMuMuJpsiResult* FitXXX();
70 If extra parameters to the specific FitXXX function are needed, they should be given
71 using the SetValue(...) method, and retrieved from the FitXXX method using
72 the GetValue(...) method.
80 void FitPSIPSIPRIMECB2VWG();
81 void FitPSIPSIPRIMECB2POL2EXP();
82 void FitPSIPSIPRIMENA60NEWVWG();
83 void FitPSIPSIPRIMENA60NEWPOL2EXP();
85 void FitPSIPSIPRIMECB2POL4EXP();
86 void FitPSIPSIPRIMENA60NEWPOL4EXP();
87 void FitPSIPSIPRIMECB2VWGINDEPTAILS();
89 //** All the mean pt fit methods MUST contain the corresponding name of the inv mass spectra method
90 void FitMPTPSIPSIPRIMECB2VWG_BKGMPTPOL2();
91 void FitMPTPSIPSIPRIMECB2VWG_BKGMPTPOL2EXP();
92 void FitMPTPSIPSIPRIMECB2POL2EXP_BKGMPTPOL2();
93 void FitMPTPSIPSIPRIMECB2POL2EXP_BKGMPTPOL2EXP();
95 void FitMPTPSIPSIPRIMECB2VWG_BKGMPTLIN();
96 void FitMPTPSIPSIPRIMECB2VWG_BKGMPTPOL3();
97 void FitMPTPSIPSIPRIMECB2VWG_BKGMPTPOL4();
98 void FitMPTPSIPSIPRIMECB2VWGINDEPTAILS_BKGMPTPOL2();
100 // void FitMPT2CB2POL2EXP_BKGMPTPOL4();
101 // void FitMPT2CB2POL4EXP_BKGMPTPOL2();
102 // void FitMPT2CB2POL4EXP_BKGMPTPOL4();
104 void FitMPTPSIPSIPRIMENA60NEWVWG_BKGMPTPOL2();
105 void FitMPTPSIPSIPRIMENA60NEWVWG_BKGMPTPOL2EXP();
106 void FitMPTPSIPSIPRIMENA60NEWPOL2EXP_BKGMPTPOL2();
107 void FitMPTPSIPSIPRIMENA60NEWPOL2EXP_BKGMPTPOL2EXP();
108 void FitMPTPSIPSIPRIMENA60NEWPOL4EXP_BKGMPTPOL2();
110 void FitPSIPSIPRIMECOMB_CB2VWG_MPTCB2VWG_BKGMPTPOL2();
112 // void FitMPT2NA60NEWVWG_BKGMPTPOL4();
113 // void FitMPT2NA60NEWPOL2EXP_BKGMPTPOL4();
114 // void FitMPT2NA60NEWPOL4EXP_BKGMPTPOL4();
116 Int_t NofRuns() const;
118 void SetNofRuns(int n);
120 const AliAnalysisMuMuBinning::Range& Bin() const;
122 void SetBin(const AliAnalysisMuMuBinning::Range& bin);
124 void SetNofInputParticles(const char* particle, int n);
126 void SetNofInputParticles(const TH1& hminv);
128 void SetHisto(const TH1& h);
130 Long64_t Merge(TCollection* list);
132 static Double_t CountParticle(const TH1& hminv, const char* particle, Double_t sigma=-1.0);
134 virtual AliAnalysisMuMuJpsiResult* Mother() const { return static_cast<AliAnalysisMuMuJpsiResult*>(AliAnalysisMuMuResult::Mother()); }
136 void PrintValue(const char* key, const char* opt, Double_t value, Double_t errorStat, Double_t rms=0.0) const;
138 TString FitFunctionName() const { return fFitFunction; }
140 TString GetFitFunctionMethodName() const;
142 void Draw(Option_t* opt="");
144 const char* GetParticle() { return fParticle; }
154 void DecodeFitType(const char* fitType);
156 void PrintParticle(const char* particle, const char* opt) const;
158 Double_t FitFunctionBackgroundLin(Double_t *x, Double_t *par);
160 Double_t FitFunctionBackgroundPol2Exp(Double_t* x, Double_t* par);
162 Double_t FitFunctionBackgroundPol4Exp(Double_t *x, Double_t *par);
164 Double_t FitFunctionBackgroundPol2(Double_t *x, Double_t *par);
166 Double_t FitFunctionBackgroundPol3(Double_t *x, Double_t *par);
168 Double_t FitFunctionBackgroundPol4(Double_t *x, Double_t *par);
170 Double_t FitFunctionBackgroundVWG(Double_t* x, Double_t* par);
172 Double_t FitFunctionSignalCrystalBallExtended(Double_t *x,Double_t *par);
174 Double_t FitFunctionNA60New(Double_t *x,Double_t *par);
176 Double_t FitFunctionTotalTwoNA60NewVWG(Double_t *x, Double_t *par);
178 Double_t FitFunctionTotalTwoNA60NewPol2Exp(Double_t *x, Double_t *par);
180 Double_t FitFunctionTotalTwoNA60NewPol4Exp(Double_t *x, Double_t *par);
182 Double_t FitFunctionTotalTwoCB2Pol2Exp(Double_t *x, Double_t *par);
184 Double_t FitFunctionTotalTwoCB2Pol4Exp(Double_t *x, Double_t *par);
186 Double_t FitFunctionTotalTwoCB2VWG(Double_t *x, Double_t *par);
188 Double_t FitFunctionTotalTwoCB2Lin(Double_t *x, Double_t *par);
190 Double_t FitFunctionTotalTwoCB2VWGINDEPTAILS(Double_t *x, Double_t *par);
192 Double_t alphaCB2VWG(Double_t*x, Double_t* par);
194 Double_t alphaCB2POL2EXP(Double_t*x, Double_t* par);
196 Double_t alphaNA60NEWVWG(Double_t*x, Double_t* par);
198 Double_t alphaNA60NEWPOL2EXP(Double_t*x, Double_t* par);
200 Double_t FitFunctionMeanPtSCB2Lin(Double_t* x, Double_t* par);
202 Double_t FitFunctionMeanPtS2CB2Lin(Double_t *x, Double_t *par);
204 Double_t FitFunctionMeanPtSCB2VWGPOL2(Double_t* x, Double_t* par);
208 Double_t FitFunctionMeanPtS2CB2VWGPOL2(Double_t *x, Double_t *par);
210 Double_t FitFunctionMeanPtS2CB2VWGPOL2EXP(Double_t *x, Double_t *par);
212 Double_t FitFunctionMeanPtS2CB2POL2EXPPOL2(Double_t *x, Double_t *par);
214 Double_t FitFunctionMeanPtS2CB2POL2EXPPOL2EXP(Double_t *x, Double_t *par);
216 Double_t FitFunctionMeanPtS2NA60NEWVWGPOL2(Double_t *x, Double_t *par);
218 Double_t FitFunctionMeanPtS2NA60NEWVWGPOL2EXP(Double_t *x, Double_t *par);
220 Double_t FitFunctionMeanPtS2NA60NEWPOL2EXPPOL2(Double_t *x, Double_t *par);
222 Double_t FitFunctionMeanPtS2NA60NEWPOL2EXPPOL2EXP(Double_t *x, Double_t *par);
226 Double_t FitFunctionMeanPtS2CB2VWGPOL3(Double_t *x, Double_t *par);
228 Double_t FitFunctionMeanPtS2CB2VWGPOL2INDEPTAILS(Double_t *x, Double_t *par);
230 Double_t FitFunctionMeanPtS2CB2VWGPOL4(Double_t *x, Double_t *par);
232 void SetFitRejectRange(Double_t a=TMath::Limits<Double_t>::Max(),
233 Double_t b=TMath::Limits<Double_t>::Max());
235 void AttachFunctionsToHisto(TF1* signal, TF1* bck, TF1* total, Double_t xmin, Double_t xmax); //Might be unnecesary since we have the one with 2 signals
237 void AttachFunctionsToHisto(TF1* signal1, TF1* signal2, TF1* bck, TF1* total,Double_t xmin, Double_t xmax);
239 void SetParameter(TF1* func, Int_t npar, Double_t fix, Double_t initialValue,
240 Double_t min, Double_t max) const;
242 Bool_t WrongParameter(TF1* fitFunction, Int_t npar, Double_t fixValueIfWrong);
244 Bool_t StrongCorrelation(TFitResultPtr& fitResult, TF1* fitFunction, Int_t npar1, Int_t npar2, Double_t fixValueIfWrong);
248 Int_t fNofRuns; // number of runs used to get this result
249 Int_t fNofTriggers; // number of trigger analyzed
250 TH1* fHisto; // invariant mass spectrum
251 AliAnalysisMuMuBinning::Range fBin; // bin range
253 TString fTriggerClass; // trigger class for this result
254 TString fEventSelection; // event selection for this result
255 TString fPairSelection; // pair selection for this result
256 TString fCentralitySelection; // centrality selection for this result
258 TString fFitFunction; // fit function used
259 Double_t fFitRejectRangeLow; // fit range to reject
260 Double_t fFitRejectRangeHigh; // fit range to reject
261 Bool_t fRejectFitPoints; // whether or not some fit points should be rejected
264 TString fMinvRS; // minv spectra range and sigmaPsiP factor for the mpt fits
266 ClassDef(AliAnalysisMuMuJpsiResult,8) // a class to hold invariant mass analysis results (counts, yields, AccxEff, R_AB, etc...)