Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:35:54

0001 // Class for RPC trigger primitives sent from CPPF to EMTF
0002 // Author Alejandro Segura -- Universidad de los Andes
0003 
0004 #ifndef DataFormats_L1TMuon_CPPFDigi_h
0005 #define DataFormats_L1TMuon_CPPFDigi_h
0006 
0007 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0008 #include <vector>
0009 
0010 namespace l1t {
0011 
0012   class CPPFDigi {
0013   public:
0014     CPPFDigi()
0015         : bx_(-99),
0016           phi_int_(-99),
0017           theta_int_(-99),
0018           valid_(-99),
0019           board_(-99),
0020           channel_(-99),
0021           emtf_sector_(-99),
0022           emtf_link_(-99),
0023           first_strip_(-99),
0024           cluster_size_(-99),
0025           phi_glob_(-99),
0026           theta_glob_(-99) {}
0027 
0028     explicit CPPFDigi(const RPCDetId& rpcId0,
0029                       int bx0,
0030                       int phi_int0,
0031                       int theta_int0,
0032                       int valid0,
0033                       int board0,
0034                       int channel0,
0035                       int emtf_sector0,
0036                       int emtf_link0,
0037                       int first_strip0,
0038                       int cluster_size0,
0039                       float phi_glob0,
0040                       float theta_glob0);
0041 
0042     virtual ~CPPFDigi() {}
0043 
0044     virtual CPPFDigi* clone() const;
0045 
0046     CPPFDigi(const RPCDetId& rpcId0, int bx0);
0047     CPPFDigi(const RPCDetId& rpcId0, int bx0, int theta_int0, int phi_int0);
0048 
0049     bool operator<(const CPPFDigi& rhs) const;
0050 
0051     RPCDetId rpcId() const { return rpcId_; }
0052     int bx() const { return bx_; }
0053     int phi_int() const { return phi_int_; }
0054     int theta_int() const { return theta_int_; }
0055     int valid() const { return valid_; }
0056     int board() const { return board_; }
0057     int channel() const { return channel_; }
0058     int emtf_sector() const { return emtf_sector_; }
0059     int emtf_link() const { return emtf_link_; }
0060     int first_strip() const { return first_strip_; }
0061     int cluster_size() const { return cluster_size_; }
0062     float phi_glob() const { return phi_glob_; }
0063     float theta_glob() const { return theta_glob_; }
0064 
0065   private:
0066     RPCDetId rpcId_;  // RPC detector ID (includes endcap, ring, station, sector, and chamber)
0067     int bx_;          // Bunch crossing, signed, centered at 0
0068     int phi_int_;     // Local integer phi value within an EMTF sector, represents 1/15 degree
0069     int theta_int_;   // Integer theta value in EMTF scale, represents 36.5/32 degree
0070     int valid_;
0071     int board_;         // CPPF board, 1 - 4 in each endcap
0072     int channel_;       // CPPF output link, 0 - 8 in each board
0073     int emtf_sector_;   // EMTF sector, 1 - 6 in each endcap
0074     int emtf_link_;     // EMTF input link, 0 - 6 in each sector
0075     int first_strip_;   // Lowest-numbered strip in the cluster
0076     int cluster_size_;  // Number of strips in the cluster
0077     float phi_glob_;    // Global phi coordinate in degrees, from -180 to 180
0078     float theta_glob_;  // Global theta coordinate in degrees, from 0 to 90
0079 
0080   };  // End of class CPPFDigi
0081 
0082   // Define a collection of CPPFDigis
0083   typedef std::vector<CPPFDigi> CPPFDigiCollection;
0084 
0085 }  // End of namespace l1t
0086 
0087 /// The ostream operator
0088 std::ostream& operator<<(std::ostream& o, const l1t::CPPFDigi& cppf);
0089 
0090 #endif /* #define DataFormats_L1TMuon_CPPFDigi_h */