1 #ifndef ALIBLASTWAVEFIT_H
2 #define ALIBLASTWAVEFIT_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
8 /* $Id: AliBlastwaveFit.h 49869 2012-05-17 04:49:51Z fnoferin $ */
10 /////////////////////////////////////////////////
12 // Blastwave base Fit Class //
13 // noferini@bo.infn.it //
14 /////////////////////////////////////////////////
19 #include "TGraphErrors.h"
22 class AliBlastwaveFit : public TNamed
25 AliBlastwaveFit(const char *name,Double_t mass);
29 // virtual method to be filled
30 virtual void Initialize() = 0; // should be filled with the initialization of the TF1
31 virtual Int_t SetParameter(Int_t ipar,Double_t val) = 0;
32 virtual Int_t SetNormalization() = 0;
33 virtual Int_t GetNpar() = 0;
34 virtual Float_t GetParStart(Int_t ipar) = 0;
35 virtual Float_t GetParStep(Int_t ipar) = 0;
36 virtual Float_t GetParMin(Int_t ipar) = 0;
37 virtual Float_t GetParMax(Int_t ipar) = 0;
39 virtual void SetMass(Double_t mass) {fMass=mass;};
40 virtual const char *GetParName(Int_t i) {if(i>=0) return "parNoName"; else return "";};
41 virtual void SwitchOffFlow(TMinuit *) const {};
44 virtual Float_t GetMeanBeta() = 0;
45 virtual Float_t GetMeanBeta(Double_t par[]) = 0;
47 Double_t GetMass() const {return fMass;};
49 TF1 *GetSpectraFit() const {return fFunctionYield;};
50 TF1 *GetV2Fit() const {return fFunctionV2;};
52 Double_t EvalYield(Double_t pt){if(fFunctionYield) return fFunctionYield->Eval(pt); else return 0;};
53 Double_t EvalV2(Double_t pt){if(fFunctionV2) return fFunctionV2->Eval(pt); else return 0;};
55 void SetSpectrumObj(TObject *obj);
56 void SetV2Obj(TObject *obj){fV2Obj = obj;};
58 TObject *GetSpectrumObj(){return fSpectraObj;};
59 TObject *GetV2Obj(){return fV2Obj;};
60 TH1 *GetSpectrumObjCopy(){return fSpectraObjCopy;};
62 void SetMinPt(Float_t pt){fXmin = pt;};
63 void SetMaxPt(Float_t pt){fXmax = pt;};
65 Float_t GetMinPt() const {return fXmin;};
66 Float_t GetMaxPt() const {return fXmax;};
68 void Terminate(){if(fFunctionYield) fFunctionYield->SetRange(fXmin,fXmax); if(fFunctionV2) fFunctionV2->SetRange(fXmin,fXmax);};
72 Double_t fMass; // mass value
74 TF1 *fFunctionYield; //! function to describe the yield behaviuor for a fixed fMass
75 TF1 *fFunctionV2; //! function to describe the v2 behaviuor for a fixed fMass
77 TObject *fSpectraObj; // object to be fitted for yield
78 TObject *fV2Obj; // object to be fitted for v2
80 TH1 *fSpectraObjCopy; //! object to be fitted for yield as histo
82 Float_t fXmin; // mininimum pt for the fit
83 Float_t fXmax; // maximum pt for the fit
86 AliBlastwaveFit(const AliBlastwaveFit & old);
87 AliBlastwaveFit& operator=(const AliBlastwaveFit & source); // ass. op.
89 ClassDef(AliBlastwaveFit,1) // blastwave base class