Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:03

0001 #ifndef L1Trigger_L1TMuonOverlap_OmtfName_H
0002 #define L1Trigger_L1TMuonOverlap_OmtfName_H
0003 
0004 #include <string>
0005 #include <ostream>
0006 
0007 #include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h"
0008 
0009 class OmtfName {
0010 public:
0011   enum Board {
0012     OMTFn1 = -1,
0013     OMTFn2 = -2,
0014     OMTFn3 = -3,
0015     OMTFn4 = -4,
0016     OMTFn5 = -5,
0017     OMTFn6 = -6,
0018     OMTFp1 = 1,
0019     OMTFp2 = 2,
0020     OMTFp3 = 3,
0021     OMTFp4 = 4,
0022     OMTFp5 = 5,
0023     OMTFp6 = 6,
0024     UNKNOWN = 0
0025   };
0026 
0027 public:
0028   OmtfName(Board board = UNKNOWN) : theBoard(board) {}
0029 
0030   OmtfName(const std::string& name);
0031 
0032   //by giving procesor id [0,5] and endcap position {+1,-1} as in uGMT.
0033   explicit OmtfName(unsigned int iProcesor, int endcap);
0034 
0035   //by giving procesor id [0,5] and endcap position as l1t::tftype of omtf_pos or omtf_neg.
0036   explicit OmtfName(unsigned int iProcesor, l1t::tftype endcap);
0037 
0038   operator int() const { return theBoard; }
0039   bool operator==(const OmtfName& o) const { return theBoard == o.theBoard; }
0040   bool operator!=(const OmtfName& o) const { return !(*this == o); }
0041 
0042   unsigned int processor() const;
0043   int position() const;
0044   l1t::tftype tftype() const;
0045 
0046   std::string name() const;
0047 
0048 private:
0049   Board theBoard;
0050 
0051   friend std::ostream& operator<<(std::ostream& out, const OmtfName& n) {
0052     out << n.name();
0053     return out;
0054   }
0055 };
0056 #endif