// Author: Daniel.Lohner@cern.ch #ifndef ALIROOT_AliTRDNDFast #define ALIROOT_AliTRDNDFast #ifndef ROOT_TH1 #include "TH1F.h" #endif #ifndef ROOT_TArrayF #include "TArrayF.h" #endif #ifndef ROOT_TF2 #include "TF1.h" #endif #ifndef ROOT_TMath #include "TMath.h" #endif #ifndef ROOT_TRandom #include "TRandom.h" #endif using namespace std; extern Double_t langaufun(Double_t *x,Double_t *par); class AliTRDNDFast : public TObject { public: static const Int_t kNpar = 5; AliTRDNDFast(); AliTRDNDFast(const char *name,Int_t ndim,Int_t nbins,Double_t xlow,Double_t xup); AliTRDNDFast(const AliTRDNDFast&); AliTRDNDFast &operator=(const AliTRDNDFast &ref); virtual ~AliTRDNDFast(); TF1 *FitLandau(TString name,TH1F *htemp,Double_t range[2],TString option); void Build(TH1F **hdEdx,TString path=""); void Build(Double_t **pars); Double_t Eval(Double_t *point) const; void Random(Double_t *point) const; Int_t GetNDim(){return fNDim;}; Double_t GetParam(Int_t dim,Int_t par){if((dim>=0)&&(dim=0)&&(par