//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Storage for Fopi PID information from TPC/CDC dE/dx // Contains a (normalized) RooAbsPdf // Aware of its momentum range // // // Environment: // Software developed for GEM-TPC detector in FOPI. // // Author List: // Felix Boehmer TUM (original author) // // //----------------------------------------------------------- #ifndef FOPIPIDPROB_HH #define FOPIPIDPROB_HH #include "TString.h" #include "TObject.h" #include "RooRealVar.h" class TF1; class RooAbsPdf; class RooRealVar; class FopiPidProb : public TObject { public: FopiPidProb(); FopiPidProb(const FopiPidProb& other); //copies are created from pdf and var (the fitting variable used) FopiPidProb(double momLow, double momHigh, const TString& partType, const TString& detType, const RooAbsPdf* pdf, const TString& varName); //name of the underlying RooRealVar virtual ~FopiPidProb(); void setProb(const RooAbsPdf* pdf); void setPartType(const TString& type) {fPartType = type;} void setDetType(const TString& det) {fDetType = det;} void setMomRange(double momLow, double momHigh) {fLow=momLow;fHigh=momHigh;} const RooAbsPdf* getProbDens() const {return fPdf;} //const RooRealVar* getVar() const {return fVar;} TString getPartType() const {return fPartType;} TString getDetType() const {return fDetType;} TString getVarName() const {return fVarName;} void getMomRange(double& momLow, double& momHigh) const; double getMomLow() const {return fLow;} double getMomHigh() const {return fHigh;} //get a (normalized) likelihood between min and max double getLikelihoodValue(double min, double max) const; //returns ROOT TF1 object. Caller takes ownership TF1* getTF1() const; private: const RooAbsPdf* fPdf; // mumps //const RooRealVar* fVar; // TString fPartType; TString fDetType; TString fVarName; double fLow; double fHigh; public: ClassDef(FopiPidProb,2) }; #endif