CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/L1Trigger/GlobalMuonTrigger/src/L1MuGMTDebugBlock.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00003 //   \class L1MuGMTDebugBlock
00011 //
00012 //   $Date: 2007/04/02 15:45:38 $
00013 //   $Revision: 1.4 $
00014 //
00015 //   Author :
00016 //   H. Sakulin            HEPHY Vienna
00017 //
00018 //   Migrated to CMSSW:
00019 //   I. Mikulec
00020 //
00021 //--------------------------------------------------
00022 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTDebugBlock_h
00023 #define L1TriggerGlobalMuonTrigger_L1MuGMTDebugBlock_h
00024 
00025 //---------------
00026 // C++ Headers --
00027 //---------------
00028 
00029 #include <vector>
00030 
00031 //----------------------
00032 // Base Class Headers --
00033 //----------------------
00034 
00035 
00036 //------------------------------------
00037 // Collaborating Class Declarations --
00038 //------------------------------------
00039 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatrix.h"
00040 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTExtendedCand.h"
00041 
00042 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00043 
00044 //              ---------------------
00045 //              -- Class Interface --
00046 //              ---------------------
00047 
00048 class L1MuGMTDebugBlock {
00049 
00050   public:  
00051     static const int NumMatrices = 6;
00052 
00054     L1MuGMTDebugBlock(int minbx=-10, int maxbx=10);
00055 
00057     virtual ~L1MuGMTDebugBlock();
00058 
00060     void reset ();
00061 
00063     void SetBX(int bx) { 
00064       if (bx < _minbx || bx > _maxbx) edm::LogWarning("RangeViolation") 
00065                                     << "L1MuGMTDebugBlock::SetBX(): bx out of range ";
00066       else _bx=bx;
00067     };
00068 
00069     // index: (0..31: 16*isFWD + 8*isISO + 4* isRPC + nr )
00070 
00072     void SetPhi(int idx, float phi) { _prophi[_bx - _minbx][idx]=phi; };
00073 
00075     void SetEta(int idx, float eta) { _proeta[_bx - _minbx][idx]=eta; };
00076 
00078     void SetPhiSelBits(int idx, unsigned phisel) { _phisel[_bx - _minbx][idx]=phisel; };
00079 
00081     void SetEtaSelBits(int idx, unsigned etasel) { _etasel[_bx - _minbx][idx]=etasel; };
00082 
00084     void SetIsMIPISO(int idx, unsigned ismipiso) { _isMIPISO[_bx - _minbx][idx]=ismipiso; };
00085 
00087     void SetPairMatrix(int idx, L1MuGMTMatrix<bool> pm) { _pairMatrices[_bx - _minbx][idx]=pm; };
00088 
00090     void SetMQMatrix(int idx, L1MuGMTMatrix<int> mqm) { _mqMatrices[_bx - _minbx][idx]=mqm; };
00091 
00093     void SetCancelBits (int idx, std::vector<bool> mine, std::vector<bool> others);
00094 
00096     void SetBrlGMTCands (int idx, L1MuGMTExtendedCand const& cand) { _brlmuons[_bx - _minbx][idx]=cand; };
00097 
00099     void SetFwdGMTCands (int idx, L1MuGMTExtendedCand const& cand) { _fwdmuons[_bx - _minbx][idx]=cand; };
00100 
00101 
00103     float Phi(int bx, int idx) { return _prophi[bx - _minbx][idx]; };
00104 
00106     float Eta(int bx, int idx) { return _proeta[bx - _minbx][idx]; };
00107 
00109     unsigned PhiSel(int bx, int idx) { return _phisel[bx - _minbx][idx]; };
00110 
00112     unsigned EtaSel(int bx, int idx) { return _etasel[bx - _minbx][idx]; };
00113         
00115     unsigned IsMIPISO(int bx, int idx) { return _isMIPISO[bx - _minbx][idx]; };
00116 
00118     L1MuGMTMatrix<bool> GetPairMatrix(int bx, int idx) { return _pairMatrices[bx - _minbx][idx]; };
00119 
00121     L1MuGMTMatrix<int> GetMQMatrix(int bx, int idx) { return _mqMatrices[bx - _minbx][idx]; };
00122 
00124     unsigned GetCancelBits(int bx, int idx) { return _cancelbits[bx - _minbx][idx]; };
00125 
00127     L1MuGMTExtendedCand const& GetBrlGMTCand(int bx, int idx) { return _brlmuons[bx - _minbx][idx];}
00128 
00130     L1MuGMTExtendedCand const& GetFwdGMTCand(int bx, int idx) { return _fwdmuons[bx - _minbx][idx];}
00131 
00133     float Phi(int bx, int isFWD, int isISO, int isRPC, int nr) { 
00134       return _prophi[bx - _minbx][16*isFWD + 8*isISO + 4*isRPC + nr]; 
00135     };
00136 
00138     float Eta(int bx, int isFWD, int isISO, int isRPC, int nr) { 
00139       return _proeta[bx - _minbx][16*isFWD + 8*isISO + 4*isRPC + nr];
00140     };
00141         
00142     
00143 
00144   private:
00145     const int _minbx, _maxbx;
00146     int _bx;
00147     std::vector<std::vector<float> > _prophi;
00148     std::vector<std::vector<float> > _proeta;
00149     std::vector<std::vector<unsigned> > _phisel;
00150     std::vector<std::vector<unsigned> > _etasel;
00151     std::vector<std::vector<unsigned> > _isMIPISO;
00152 
00153     std::vector<std::vector<L1MuGMTMatrix<bool> > > _pairMatrices;
00154     std::vector<std::vector<L1MuGMTMatrix<int> > > _mqMatrices;
00155 
00156     std::vector<std::vector<unsigned> > _cancelbits;
00157     std::vector<std::vector<L1MuGMTExtendedCand> > _brlmuons;
00158     std::vector<std::vector<L1MuGMTExtendedCand> > _fwdmuons;
00159 };
00160 
00161 #endif
00162 
00163 
00164 
00165 
00166 
00167 
00168 
00169 
00170