CMS 3D CMS Logo

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 }
l1t::CPPFDigi::theta_int
int theta_int() const
Definition: CPPFDigi.h:54
RPCDetId
Definition: RPCDetId.h:16
l1t::CPPFDigi::rpcId
RPCDetId rpcId() const
Definition: CPPFDigi.h:51
CPPFDigi.h
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
sistrip::valid_
static const uint16_t valid_
Definition: Constants.h:17
operator<<
std::ostream & operator<<(std::ostream &o, const l1t::CPPFDigi &cppf)
The ostream operator.
Definition: CPPFDigi.cc:78
l1t::CPPFDigi::bx
int bx() const
Definition: CPPFDigi.h:52
l1t
delete x;
Definition: CaloConfig.h:22
l1t::CPPFDigi::operator<
bool operator<(const CPPFDigi &rhs) const
Definition: CPPFDigi.cc:68
l1t::CPPFDigi::clone
virtual CPPFDigi * clone() const
Definition: CPPFDigi.cc:66
l1t::CPPFDigi::CPPFDigi
CPPFDigi()
Definition: CPPFDigi.h:14
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
l1t::CPPFDigi
Definition: CPPFDigi.h:12
l1t::CPPFDigi::phi_int
int phi_int() const
Definition: CPPFDigi.h:53