Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:14

0001 //-------------------------------------------------
0002 //
0003 /** \class L1MuGMTCancelOutUnit
0004  *
0005  *  L1 Global Muon Trigger Cancel-Out Unit.
0006  *
0007  * It compares (attempts to match) muons in the overlap 
0008  * region in order to cancel out duplicates. The following 
0009  * four instances exist:
0010  *
0011  *                       INPUTS
0012  * idx   unit    where   mu1   mu2   
0013  * ---------------------------------------
0014  *  0   DT/CSC   brl     DT    CSC   
0015  *  1   CSC/DT   fwd     CSC   DT    
0016  *  2   bRPC/CSC brl     bRPC  CSC   
0017  *  3   fRPC/DT  fwd     fRPC  DT    
0018  *                      (mine)  (other chip)  
0019  *
0020  * The first input muons are direct inputs to the chip where the
0021  * COU is located, while the second muons are CSC or DT muon from 
0022  * the other Logic FPGA. 
0023  * 
0024  * Along with the input muons to be compared the COU accesses information
0025  * on whether the input muons are matched with a cnadiate from the 
0026  * complementary system in the respective main matcher.
0027  * 
0028  * The output are cancel-bits which indicate whether to 
0029  * delete one of the inputs.
0030  *
0031 */
0032 //
0033 //
0034 //   Author :
0035 //   H. Sakulin            CERN EP
0036 //
0037 //   Migrated to CMSSW:
0038 //   I. Mikulec
0039 //
0040 //--------------------------------------------------
0041 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTCancelOutUnit_h
0042 #define L1TriggerGlobalMuonTrigger_L1MuGMTCancelOutUnit_h
0043 
0044 //---------------
0045 // C++ Headers --
0046 //---------------
0047 
0048 #include <vector>
0049 
0050 //----------------------
0051 // Base Class Headers --
0052 //----------------------
0053 
0054 //------------------------------------
0055 // Collaborating Class Declarations --
0056 //------------------------------------
0057 
0058 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatcher.h"
0059 
0060 class L1MuGlobalMuonTrigger;
0061 
0062 //              ---------------------
0063 //              -- Class Interface --
0064 //              ---------------------
0065 
0066 class L1MuGMTCancelOutUnit {
0067 public:
0068   /// constructor
0069   L1MuGMTCancelOutUnit(const L1MuGlobalMuonTrigger& gmt, int id);
0070 
0071   /// destructor
0072   virtual ~L1MuGMTCancelOutUnit();
0073 
0074   /// run cancel-out unit
0075   void run();
0076 
0077   /// clear cancel-out unit
0078   void reset();
0079 
0080   /// print cancel-out bits
0081   void print();
0082 
0083   /// return ID (0..DT/CSC in barrel chip, 1..DT/CSC in fwd chip, 2..CSC/bRPC, 3..DT/fRPC)
0084   inline int id() const { return m_id; }
0085 
0086   /// return cancel bit for DT (m_id==0 || m_id==3) or CSC (m_id==1 || m_id==2) muon
0087   const bool cancelMyChipMuon(int idx) const { return m_MyChipCancelbits[idx]; }
0088 
0089   /// return cancel bit for barrel RPC (m_id==2) or forward RPC (m_id==3) muon
0090   const bool cancelOtherChipMuon(int idx) const { return m_OtherChipCancelbits[idx]; }
0091 
0092 private:
0093   void decide();
0094 
0095 private:
0096   const L1MuGlobalMuonTrigger& m_gmt;
0097   int m_id;
0098 
0099   L1MuGMTMatcher m_matcher;
0100   std::vector<bool> m_MyChipCancelbits;
0101   std::vector<bool> m_OtherChipCancelbits;
0102 };
0103 
0104 #endif