00001 #ifndef EgammaReco_EgammaTrigger_h 00002 #define EgammaReco_EgammaTrigger_h 00003 00012 #include "DataFormats/EgammaReco/interface/EgammaTriggerFwd.h" 00013 00014 namespace reco { 00015 00016 class SuperCluster; 00017 00018 namespace egamma { 00019 enum { L1Single = 0, L1Double, L1RelaxedDouble, IsolatedL1 }; 00020 template<unsigned char L1> 00021 struct mask { enum { value = mask< L1 - 1 >::value << 1 }; }; 00022 template<> 00023 struct mask<0> { enum { value = 1 }; }; 00024 } 00025 00026 class EgammaTrigger { 00027 public: 00029 EgammaTrigger() : l1word_( 0 ) { } 00030 00032 EgammaTrigger( bool, bool, bool, bool ); 00033 00036 template<unsigned char L1> 00037 bool match() { 00038 return l1word_ & egamma::mask<L1>::value; 00039 } 00040 00043 template<unsigned char L1> 00044 void set() { 00045 l1word_ |= egamma::mask<L1>::value; 00046 } 00047 00049 unsigned char l1word() const { return l1word_; } 00050 00051 private: 00053 unsigned char l1word_; 00054 }; 00055 } 00056 00057 #endif