#ifndef _TOWER_CORRECTIONS_HH_ #define _TOWER_CORRECTIONS_HH_ ///////////////////////////////////////////////////////////////////////////////////////////////// // // Component: TowerCorrection.hh // Purpose: This class has a correction for a given tower in a // given PhysicsTowerData object. // // Created: 13/09/99 Pierre Savard // //////////////////////////////////////////////////////////////////////////////////////////////////// #include #include #include "Edm/Link.hh" #include "Rtypes.h" class TBuffer ; class EventRecord ; // namespace calor class TowerCorrection { public: TowerCorrection() : _type('u'),_corFactorEm(1.0),_corFactorHad(1.0),_iEta(0),_iPhi(0) { } ~TowerCorrection(){} TowerCorrection(unsigned char type, size_t iEta, size_t iPhi, float emcorrection, float hadcorrection) : _type(type), _iEta(iEta), _iPhi(iPhi), _corFactorEm(emcorrection), _corFactorHad(hadcorrection) { } friend bool operator == (const TowerCorrection& rhs, const TowerCorrection& lhs); friend bool operator != (const TowerCorrection& rhs, const TowerCorrection& lhs) { return(! (rhs == lhs) ) ; } unsigned char type() const { return(_type) ; } float emcorrection() const { return(_corFactorEm) ; } float hadcorrection() const { return(_corFactorHad) ; } size_t iEta() const { return(_iEta) ; } size_t iPhi() const { return(_iPhi) ; } public: void print(std::ostream& os = std::cout) const ; void Streamer (TBuffer & buf); static Version_t class_version() { return _VERSION;} private: unsigned char _type; // type of tower size_t _iEta; size_t _iPhi; float _corFactorEm; // the correction factor float _corFactorHad; // the correction factor static const Version_t _VERSION; }; // class TowerCorrection // } // namespace calor std::ostream& operator<<(std::ostream& os, const TowerCorrection& tc) ; #endif // _TOWER_CORRECTION_HH_