File indexing completed on 2024-04-06 12:04:06
0001 #ifndef EgammaReco_EgammaTrigger_h
0002 #define EgammaReco_EgammaTrigger_h
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "DataFormats/EgammaReco/interface/EgammaTriggerFwd.h"
0012
0013 namespace reco {
0014
0015 class SuperCluster;
0016
0017 namespace egamma {
0018 enum { L1Single = 0, L1Double, L1RelaxedDouble, IsolatedL1 };
0019 template <unsigned char L1>
0020 struct mask {
0021 enum { value = mask<L1 - 1>::value << 1 };
0022 };
0023 template <>
0024 struct mask<0> {
0025 enum { value = 1 };
0026 };
0027 }
0028
0029 class EgammaTrigger {
0030 public:
0031
0032 EgammaTrigger() : l1word_(0) {}
0033
0034
0035 EgammaTrigger(bool, bool, bool, bool);
0036
0037
0038
0039 template <unsigned char L1>
0040 bool match() {
0041 return l1word_ & egamma::mask<L1>::value;
0042 }
0043
0044
0045
0046 template <unsigned char L1>
0047 void set() {
0048 l1word_ |= egamma::mask<L1>::value;
0049 }
0050
0051
0052 unsigned char l1word() const { return l1word_; }
0053
0054 private:
0055
0056 unsigned char l1word_;
0057 };
0058 }
0059
0060 #endif