//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Context-aware storage of PID probabilities from // one momentum slice and one fopi detector // Input is created in analysis macros // // // // Environment: // Software developed for GEM-TPC detector in FOPI. // // Author List: // Felix Boehmer TUM (original author) // // //----------------------------------------------------------- #ifndef FOPIPIDPROBSET_HH #define FOPIPIDPROBSET_HH #include "TString.h" #include "TObject.h" #include "FopiPidProb.h" //needs to be loaded here for STL pair instantiation #include class FopiPidProbSet : public TObject { public: FopiPidProbSet(); FopiPidProbSet(const TString& detType, double minMom, double maxMom, double validityLow, double validityHigh); virtual ~FopiPidProbSet() {;} //add a probability to this set. Perfoms check on det-type and //momentum window int addProb(const FopiPidProb& prob, double fraction, double fracErr=0.) ; void getMomWindow(double& min, double& max) const; double getMinMom() const {return fLow;} double getMaxMom() const {return fHigh;} void getValidityRange(double& rangeLow, double& rangeHigh) const; //Particle Types are: //"pion", "kaon", "proton", "deuteron" const FopiPidProb* getProb(const TString& partType) const; double getFraction(const TString& partType) const; double getFractionError(const TString& partType) const; //clear associative containers void clear(); private: //does NOT take ownership over probability objects: std::map fProbMap; // partType <- PDF std::map fFracMap; // partType <- fraction from p-slice fit std::map fFracErrMap; // partType <- fraction error from p-slice fit double fLow; double fHigh; double fRangeLow; double fRangeHigh; TString fDetType; public: ClassDef(FopiPidProbSet,3) }; #endif