#ifndef _PHYSICS_TOWER_PARAMS_HH_ #define _PHYSICS_TOWER_PARAMS_HH_ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Component: PhysicsTowerParams.hh // Purpose: This is a simple class that holds the parameters used to make a // PhysicsTowerData object. It temporarily holds on to pointers // and does not own them. // // inputType: // 0 or "CalData" = CalData // 1 or "HEPG" = HEPG Bank // calculatorType: // 0 or "Standard" = StandardCalculator // 1 or "FourVector" = FourVectorCalculator // 2 or "Met" = MetCalculator // // Created: 08/11/99 Pierre Savard // History: 17/05/01 Matthias Toennesmann: Added new jetSeedThreshold parameter (used by // jet algorithm modules; // otherwise the default value (0.0) should not be // changed!), and new // access and set methods. // 14/05/03 Dan MacQueen - changes made to allow three-vertex & // beam slope to be used as parameters. // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include #include #include #include "Edm/Id.hh" // namespace calor { class PhysicsTowerParams { public: // // Memory management // PhysicsTowerParams(); PhysicsTowerParams( int inputType , int calculatorType, float calcThreshold, float vertex); PhysicsTowerParams( int inputType , int calculatorType, float calcThreshold, float vertex, Id inputID); PhysicsTowerParams( std::string inputType , std::string calculatorType, float calcThreshold, float vertex); PhysicsTowerParams( int inputType , int calculatorType, float calcThreshold, float vertex[3], float slope[2]); PhysicsTowerParams( int inputType , int calculatorType, float calcThreshold, float vertex[3], float slope[2], Id inputID); PhysicsTowerParams( std::string inputType , std::string calculatorType, float calcThreshold, float vertex[3], float slope[2]); PhysicsTowerParams(const PhysicsTowerParams& rhs); // ~PhysicsTowerParams(); // // Testing // // Equality test bool operator==(const PhysicsTowerParams & rhs) const; bool operator!=(const PhysicsTowerParams & rhs) const; // // Manipulation and access // int inputType() const; int calculatorType() const; std::string inputName() const; std::string calculatorName() const; float calcThreshold() const; Id inputID() const; void setInputID(Id oID); float vertex(int i=2) const; float slope(int i) const; float jetSeedThreshold() const; void setJetSeedThreshold(float newJetSeedThreshold); PhysicsTowerParams& operator=( const PhysicsTowerParams& rhs ); // // Printing // friend std::ostream& operator<<(std::ostream& os, const PhysicsTowerParams& ctd); private: int _inputType; int _calculatorType; float _calcThreshold; float _vertex[3]; float _slope[2]; Id _inputID; // eventually RCPID ? float _jetSeedThreshold; }; inline int PhysicsTowerParams::inputType() const {return _inputType;} inline Id PhysicsTowerParams::inputID() const {return _inputID;} inline void PhysicsTowerParams::setInputID(Id oID) {_inputID = oID;} inline int PhysicsTowerParams::calculatorType() const {return _calculatorType;} inline float PhysicsTowerParams::vertex(int i) const {return _vertex[i];} inline float PhysicsTowerParams::slope(int i) const {return _slope[i];} inline float PhysicsTowerParams::calcThreshold() const {return _calcThreshold;} inline float PhysicsTowerParams::jetSeedThreshold() const {return _jetSeedThreshold;} inline void PhysicsTowerParams::setJetSeedThreshold(float newJetSeedThreshold){ _jetSeedThreshold = newJetSeedThreshold;} inline bool PhysicsTowerParams::operator==( const PhysicsTowerParams& rhs ) const{ return ( ( _inputType == rhs._inputType ) && ( _calculatorType == rhs._calculatorType ) && ( _inputID == rhs._inputID ) && ( _calcThreshold == rhs._calcThreshold ) && ( _vertex[0] == rhs._vertex[0] ) && ( _vertex[1] == rhs._vertex[1] ) && ( _vertex[2] == rhs._vertex[2] ) && ( _slope[0] == rhs._slope[0] ) && ( _slope[1] == rhs._slope[1] ) && ( _jetSeedThreshold == rhs._jetSeedThreshold )); } inline PhysicsTowerParams::PhysicsTowerParams( const PhysicsTowerParams& rhs ){ _inputType = rhs._inputType; _calculatorType = rhs._calculatorType; _calcThreshold = rhs._calcThreshold; _vertex[0] = rhs._vertex[0]; _vertex[1] = rhs._vertex[1]; _vertex[2] = rhs._vertex[2]; _slope[0] = rhs._slope[0]; _slope[1] = rhs._slope[1]; _inputID = rhs._inputID; _jetSeedThreshold = rhs._jetSeedThreshold; } inline bool PhysicsTowerParams::operator!=( const PhysicsTowerParams& rhs ) const{ return ( ( _inputType != rhs._inputType ) || ( _inputID != rhs._inputID ) || ( _calculatorType != rhs._calculatorType ) || ( _calcThreshold != rhs._calcThreshold ) || ( _vertex[0] != rhs._vertex[0] ) || ( _vertex[1] != rhs._vertex[1] ) || ( _vertex[2] != rhs._vertex[2] ) || ( _slope[0] != rhs._slope[0] ) || ( _slope[1] != rhs._slope[1] ) || ( _jetSeedThreshold != rhs._jetSeedThreshold )); } inline PhysicsTowerParams& PhysicsTowerParams::operator=( const PhysicsTowerParams& rhs ){ if (this != &rhs) { _inputType = rhs._inputType; _calculatorType = rhs._calculatorType; _calcThreshold = rhs._calcThreshold; _vertex[0] = rhs._vertex[0]; _vertex[1] = rhs._vertex[1]; _vertex[2] = rhs._vertex[2]; _slope[0] = rhs._slope[0]; _slope[1] = rhs._slope[1]; _inputID = rhs._inputID; _jetSeedThreshold = rhs._jetSeedThreshold; } return (*this); } // } // namespace calor #endif // _PHYSICS_TOWER_PARAMS_HH_