#ifndef CentralityEstimator_H #define CentralityEstimator_H 1 #include #include "TString.h" #include "TNamed.h" #include "TTree.h" #include "TNtuple.h" #include "TH1F.h" class CentralityEstimator : public TNamed { public: /** Default constructor **/ CentralityEstimator() ; enum eMode { kDefault = 0, kNpartOnly = 1, kNpart = 2, kNcoll = 3 }; void SetInputTree(TString filename, TString treename="nt_Au_Au") { fInputfilename = filename; fTreeName= treename;} void SetOutputTree(TString filename) { fOutputfilename = filename;} void LoadInputTree(Int_t nEntries = -1); Double_t GetEstimator(Double_t f, TString flag=""); void AddEstimator(TString name, Double_t f, Double_t mu, Double_t k, TString mode=""); void Run(); Double_t NBD(Double_t n, Double_t mu, Double_t k) const; void SetNBDhist(Double_t mu, Double_t k); Int_t GetRandomNBD(Double_t k, Double_t nbar) const; /** Destructor **/ virtual ~CentralityEstimator() {}; void SetNpartMax (Int_t max) { fNpartMax = max; } void SetNcollMax (Int_t max) { fNcollMax = max; } void SetMultMax (Int_t max) { fMultMax = max; } void SetOutDirName (TString name) { fOutDirName = name; } TH1F *GetNBDHisto () { return hNBD; } TTree* GetTree() const {return fSimTree;} void SetMode (TString mode) { fMode = mode; } private: /** Data members **/ TH1F *hNBD; TTree *fSimTree; TTree *fNewtree; TFile *fSim; TFile *fNewfile; Float_t fB, fNpart, fNcoll; // Float_t fUsedMu, fUsedK; vector estimatorName; vector estimatorMode; vector estimatorF; vector estimatorMu; vector estimatorK; Int_t nEntries; Int_t fNpartMax, fNcollMax; Int_t fMultMax; Int_t fBinSize; Int_t fFitMultMin; Int_t fNormMultMin; TString fMode; TString fOutDirName; TString fOutputfilename; TString fInputfilename; TString fTreeName; ClassDef(CentralityEstimator, 2); }; #endif