Go to the documentation of this file.00001 #ifndef FORIA_JETKEY_HH
00002 #define FORIA_JETKEY_HH
00003
00004 #include "ForIA/Jet.hh"
00005
00006 #include "boost/functional/hash.hpp"
00007 #include "boost/cast.hpp"
00008 #include <cmath>
00009
00010 namespace ForIA{
00011
00013 class JetKey{
00014
00015 public:
00022 JetKey(Jet::Algorithm alg, double rparam, Jet::Calibration calibration);
00023
00028 bool operator == (const JetKey &key)const{
00029
00030 return ((this->m_alg == key.m_alg) && doubleEquals(this->m_rparam, key.m_rparam) && (this->m_filtered == key.filtered()));
00031 }
00032
00037 size_t rAsInt()const;
00038
00040 Jet::Algorithm alg()const{
00041 return m_alg;
00042 }
00043
00045 double rParam()const{
00046 return m_rparam;
00047 }
00048
00050 Jet::Calibration calibration()const{
00051 return m_calibration;
00052 }
00053
00055 void setFiltered(bool filtered);
00056
00058 bool filtered()const{
00059 return m_filtered;
00060 }
00061
00062 private:
00063
00064 Jet::Algorithm m_alg;
00065 double m_rparam;
00066 Jet::Calibration m_calibration;
00067 bool m_filtered;
00068
00069 bool doubleEquals(double left, double right)const;
00070
00071 mutable size_t m_rAsInt;
00072 mutable bool m_gotRAsInt;
00073 };
00074
00075 size_t hash_value(const JetKey &key);
00076
00077 }
00078
00079 #endif