CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CPPFDigi.cc
Go to the documentation of this file.
1 // Class for RPC trigger primitives sent from CPPF to EMTF
2 // Author Alejandro Segura -- Universidad de los Andes
3 
5 #include <iostream>
6 
7 namespace l1t {
8 
9  CPPFDigi::CPPFDigi(const RPCDetId& rpcId0, int bx0)
10  : rpcId_(rpcId0),
11  bx_(bx0),
12  phi_int_(-99),
13  theta_int_(-99),
14  valid_(-99),
15  board_(-99),
16  channel_(-99),
17  emtf_sector_(-99),
18  emtf_link_(-99),
19  first_strip_(-99),
20  cluster_size_(-99),
21  phi_glob_(-99),
22  theta_glob_(-99) {}
23 
24  CPPFDigi::CPPFDigi(const RPCDetId& rpcId0, int bx0, int theta_int0, int phi_int0)
25  : rpcId_(rpcId0),
26  bx_(bx0),
27  phi_int_(phi_int0),
28  theta_int_(theta_int0),
29  valid_(-99),
30  board_(-99),
31  channel_(-99),
32  emtf_sector_(-99),
33  emtf_link_(-99),
34  first_strip_(-99),
35  cluster_size_(-99),
36  phi_glob_(-99),
37  theta_glob_(-99) {}
38 
40  int bx0,
41  int phi_int0,
42  int theta_int0,
43  int valid0,
44  int board0,
45  int channel0,
46  int emtf_sector0,
47  int emtf_link0,
48  int first_strip0,
49  int cluster_size0,
50  float phi_glob0,
51  float theta_glob0)
52  : rpcId_(rpcId0),
53  bx_(bx0),
54  phi_int_(phi_int0),
55  theta_int_(theta_int0),
56  valid_(valid0),
57  board_(board0),
58  channel_(channel0),
59  emtf_sector_(emtf_sector0),
60  emtf_link_(emtf_link0),
61  first_strip_(first_strip0),
62  cluster_size_(cluster_size0),
63  phi_glob_(phi_glob0),
64  theta_glob_(theta_glob0) {}
65 
66  CPPFDigi* CPPFDigi::clone() const { return new CPPFDigi(*this); }
67 
68  bool CPPFDigi::operator<(const CPPFDigi& rhs) const {
69  return (rpcId().rawId() < rhs.rpcId().rawId() ||
70  (!(rhs.rpcId().rawId() < rpcId().rawId()) &&
71  (bx() < rhs.bx() ||
72  (!(rhs.bx() < bx()) &&
73  (theta_int() < rhs.theta_int() || (!(rhs.theta_int() < theta_int()) && phi_int() < rhs.phi_int()))))));
74  }
75 
76 } // End namespace l1t
77 
78 std::ostream& operator<<(std::ostream& o, const l1t::CPPFDigi& cppf) {
79  o << "Local integer phi: " << cppf.phi_int();
80  o << "Local integer theta: " << cppf.theta_int();
81  return o;
82 }
RPCDetId rpcId() const
Definition: CPPFDigi.h:51
bool operator<(const CPPFDigi &rhs) const
Definition: CPPFDigi.cc:68
virtual CPPFDigi * clone() const
Definition: CPPFDigi.cc:66
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
static const uint16_t valid_
Definition: Constants.h:17
int bx() const
Definition: CPPFDigi.h:52
int theta_int() const
Definition: CPPFDigi.h:54
int phi_int() const
Definition: CPPFDigi.h:53