Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:56

0001 // Class for RPC trigger primitives sent from CPPF to EMTF
0002 // Author Alejandro Segura -- Universidad de los Andes
0003 
0004 #include "DataFormats/L1TMuon/interface/CPPFDigi.h"
0005 #include <iostream>
0006 
0007 namespace l1t {
0008 
0009   CPPFDigi::CPPFDigi(const RPCDetId& rpcId0, int bx0)
0010       : rpcId_(rpcId0),
0011         bx_(bx0),
0012         phi_int_(-99),
0013         theta_int_(-99),
0014         valid_(-99),
0015         board_(-99),
0016         channel_(-99),
0017         emtf_sector_(-99),
0018         emtf_link_(-99),
0019         first_strip_(-99),
0020         cluster_size_(-99),
0021         phi_glob_(-99),
0022         theta_glob_(-99) {}
0023 
0024   CPPFDigi::CPPFDigi(const RPCDetId& rpcId0, int bx0, int theta_int0, int phi_int0)
0025       : rpcId_(rpcId0),
0026         bx_(bx0),
0027         phi_int_(phi_int0),
0028         theta_int_(theta_int0),
0029         valid_(-99),
0030         board_(-99),
0031         channel_(-99),
0032         emtf_sector_(-99),
0033         emtf_link_(-99),
0034         first_strip_(-99),
0035         cluster_size_(-99),
0036         phi_glob_(-99),
0037         theta_glob_(-99) {}
0038 
0039   CPPFDigi::CPPFDigi(const RPCDetId& rpcId0,
0040                      int bx0,
0041                      int phi_int0,
0042                      int theta_int0,
0043                      int valid0,
0044                      int board0,
0045                      int channel0,
0046                      int emtf_sector0,
0047                      int emtf_link0,
0048                      int first_strip0,
0049                      int cluster_size0,
0050                      float phi_glob0,
0051                      float theta_glob0)
0052       : rpcId_(rpcId0),
0053         bx_(bx0),
0054         phi_int_(phi_int0),
0055         theta_int_(theta_int0),
0056         valid_(valid0),
0057         board_(board0),
0058         channel_(channel0),
0059         emtf_sector_(emtf_sector0),
0060         emtf_link_(emtf_link0),
0061         first_strip_(first_strip0),
0062         cluster_size_(cluster_size0),
0063         phi_glob_(phi_glob0),
0064         theta_glob_(theta_glob0) {}
0065 
0066   CPPFDigi* CPPFDigi::clone() const { return new CPPFDigi(*this); }
0067 
0068   bool CPPFDigi::operator<(const CPPFDigi& rhs) const {
0069     return (rpcId().rawId() < rhs.rpcId().rawId() ||
0070             (!(rhs.rpcId().rawId() < rpcId().rawId()) &&
0071              (bx() < rhs.bx() ||
0072               (!(rhs.bx() < bx()) &&
0073                (theta_int() < rhs.theta_int() || (!(rhs.theta_int() < theta_int()) && phi_int() < rhs.phi_int()))))));
0074   }
0075 
0076 }  // End namespace l1t
0077 
0078 std::ostream& operator<<(std::ostream& o, const l1t::CPPFDigi& cppf) {
0079   o << "Local integer phi: " << cppf.phi_int();
0080   o << "Local integer theta: " << cppf.theta_int();
0081   return o;
0082 }