CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgammaTrigger.h
Go to the documentation of this file.
1 #ifndef EgammaReco_EgammaTrigger_h
2 #define EgammaReco_EgammaTrigger_h
3 
12 
13 namespace reco {
14 
15  class SuperCluster;
16 
17  namespace egamma {
19  template<unsigned char L1>
20  struct mask { enum { value = mask< L1 - 1 >::value << 1 }; };
21  template<>
22  struct mask<0> { enum { value = 1 }; };
23  }
24 
25  class EgammaTrigger {
26  public:
28  EgammaTrigger() : l1word_( 0 ) { }
29 
31  EgammaTrigger( bool, bool, bool, bool );
32 
35  template<unsigned char L1>
36  bool match() {
37  return l1word_ & egamma::mask<L1>::value;
38  }
39 
42  template<unsigned char L1>
43  void set() {
44  l1word_ |= egamma::mask<L1>::value;
45  }
46 
48  unsigned char l1word() const { return l1word_; }
49 
50  private:
52  unsigned char l1word_;
53  };
54 }
55 
56 #endif
Definition: value.py:1
unsigned char l1word_
trigger work (packed). Only 4 bits are used.
Definition: EgammaTrigger.h:52
EgammaTrigger()
default constructor
Definition: EgammaTrigger.h:28
unsigned char l1word() const
return the trigger work
Definition: EgammaTrigger.h:48
fixed size matrix