//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Storage of all available PID information for a // given track // // // // Environment: // Software developed for GEM-TPC detector in FOPI. // // Author List: // Felix Boehmer TUM (original author) // // //----------------------------------------------------------- #ifndef FOPIPIDINFO_HH #define FOPIPIDINFO_HH #include "TObject.h" #include "TString.h" class FopiPidInfo : public TObject { friend class FopiPidHub; //grants access to getVal() public : FopiPidInfo(unsigned int runNr); virtual ~FopiPidInfo() {;} void setTpcdEdx(double val, double calibOffset=0.); void setCdcdEdx(double val, double calibOffset=0.); void setBarVel(double val, double calibOffset=0.); void setRpcVel(double val, double calibOffset=0.); double getTpcdEdx() const; double getCdcdEdx() const; double getBarVel() const; double getRpcVel() const; unsigned int getRunNr() const; bool hasTpc() const {return fHasTpc;} bool hasCdc() const {return fHasCdc;} bool hasBar() const {return fHasBar;} bool hasRpc() const {return fHasRpc;} void clear(); protected: //detID: 'tpc', 'cdc', 'bar', 'rpc' double getVal(const TString& detID) const; double getCO(const TString& detID) const; void setVal(const TString& detID, double val, double CO=0.); bool hasVal(const TString& detID) const; private : double fTpcdEdx; double fCdcdEdx; double fBarVel; double fRpcVel; double fTpcdEdxCO; //calibration offsets double fCdcdEdxCO; double fBarVelCO; double fRpcVelCO; bool fHasTpc; bool fHasCdc; bool fHasBar; bool fHasRpc; unsigned int fRun; //for calibration information public : ClassDef(FopiPidInfo,1) }; #endif