CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/L1Trigger/GlobalCaloTrigger/interface/L1GctRegion.h

Go to the documentation of this file.
00001 #ifndef L1GCTREGION_H
00002 #define L1GCTREGION_H
00003 
00015 #include "DataFormats/L1CaloTrigger/interface/L1CaloRegion.h"
00016 
00017 class L1GctRegion : public L1CaloRegion
00018 {
00019  public:
00020 
00021   enum numberOfBits {
00022     kGctRegionNBits    = 10,
00023     kGctRegionOFlowBit = 1 << kGctRegionNBits,
00024     kGctRegionMaxValue = kGctRegionOFlowBit - 1
00025   };
00026 
00027   // Constructors and destructor
00028   L1GctRegion();
00029 
00030   ~L1GctRegion();
00031 
00032   // Named constructors
00033   static L1GctRegion makeJfInputRegion(const L1CaloRegion&);
00034   static L1GctRegion makeProtoJetRegion(const unsigned et,   const bool overFlow, const bool fineGrain, const bool tauIsolationVeto,
00035                                         const unsigned ieta, const unsigned iphi, const int16_t bx);
00036   static L1GctRegion makeFinalJetRegion(const unsigned et,   const bool overFlow, const bool fineGrain,
00037                                         const unsigned ieta, const unsigned iphi, const int16_t bx);
00038 
00039   // Replace et() method to use 10 bits for all eta
00040   unsigned et() const { return overFlow() ? kGctRegionMaxValue : raw()&kGctRegionMaxValue; }
00041 
00042   // Replace local eta with a non-physical value
00043   unsigned rctEta() const { return ( empty() ? 12 : id().rctEta() ); }
00044 
00045   // Access to additional bit fields
00046   bool featureBit0() { return ((raw() >> 14) & 0x1) != 0; } 
00047   bool featureBit1() { return ((raw() >> 15) & 0x1) != 0; }
00048 
00049   void setFeatureBit0() { setBit(14, true ); }
00050   void clrFeatureBit0() { setBit(14, false); }
00051   void setFeatureBit1() { setBit(15, true ); }
00052   void clrFeatureBit1() { setBit(15, false); }
00053 
00054  private:
00055 
00056   // constructor for internal use
00057   L1GctRegion(const unsigned et,
00058               const bool overFlow, 
00059               const bool fineGrain,
00060               const unsigned ieta, 
00061               const unsigned iphi,
00062               const int16_t bx);
00063 
00064 
00065   void setBit(const unsigned bitNum, const bool onOff);
00066 
00067 };
00068 
00069 #endif