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), bx_(bx0), phi_int_(-99), theta_int_(-99), valid_(-99),
11  board_(-99), channel_(-99), emtf_sector_(-99), emtf_link_(-99),
12  first_strip_(-99), cluster_size_(-99), phi_glob_(-99), theta_glob_(-99)
13  {
14  }
15 
16  CPPFDigi::CPPFDigi( const RPCDetId& rpcId0, int bx0 , int theta_int0 , int phi_int0 ) :
17  rpcId_(rpcId0), bx_(bx0), phi_int_(phi_int0), theta_int_(theta_int0), valid_(-99),
18  board_(-99), channel_(-99), emtf_sector_(-99), emtf_link_(-99),
19  first_strip_(-99), cluster_size_(-99), phi_glob_(-99), theta_glob_(-99)
20  {
21  }
22 
23  CPPFDigi::CPPFDigi( const RPCDetId& rpcId0, int bx0, int phi_int0, int theta_int0, int valid0,
24  int board0, int channel0, int emtf_sector0, int emtf_link0,
25  int first_strip0, int cluster_size0, float phi_glob0, float theta_glob0 ) :
26  rpcId_(rpcId0), bx_(bx0), phi_int_(phi_int0), theta_int_(theta_int0), valid_(valid0),
27  board_(board0), channel_(channel0), emtf_sector_(emtf_sector0), emtf_link_(emtf_link0),
28  first_strip_(first_strip0), cluster_size_(cluster_size0), phi_glob_(phi_glob0), theta_glob_(theta_glob0)
29  {
30  }
31 
33  return new CPPFDigi(*this);
34  }
35 
36  bool CPPFDigi::operator<(const CPPFDigi& rhs) const
37  {
38  return (rpcId().rawId() < rhs.rpcId().rawId()
39  || (!(rhs.rpcId().rawId() < rpcId().rawId())
40  && (bx() < rhs.bx()
41  || (!(rhs.bx() < bx())
42  && (theta_int() < rhs.theta_int()
43  || (!(rhs.theta_int() < theta_int())
44  && phi_int() < rhs.phi_int()))))));
45  }
46 
47 } // End namespace l1t
48 
49 std::ostream & operator<<(std::ostream & o, const l1t::CPPFDigi& cppf){
50  o << "Local integer phi: " << cppf.phi_int() ;
51  o << "Local integer theta: " << cppf.theta_int() ;
52  return o;
53 }
54 
RPCDetId rpcId() const
Definition: CPPFDigi.h:35
bool operator<(const CPPFDigi &rhs) const
Definition: CPPFDigi.cc:36
virtual CPPFDigi * clone() const
Definition: CPPFDigi.cc:32
int phi_int_
Definition: CPPFDigi.h:53
int first_strip_
Definition: CPPFDigi.h:60
delete x;
Definition: CaloConfig.h:22
int emtf_sector_
Definition: CPPFDigi.h:58
static const uint16_t valid_
Definition: Constants.h:17
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
int theta_int_
Definition: CPPFDigi.h:54
int bx() const
Definition: CPPFDigi.h:36
float phi_glob_
Definition: CPPFDigi.h:62
float theta_glob_
Definition: CPPFDigi.h:63
int theta_int() const
Definition: CPPFDigi.h:38
int channel_
Definition: CPPFDigi.h:57
std::ostream & operator<<(std::ostream &os, const l1t::CaloParamsHelper &p)
int emtf_link_
Definition: CPPFDigi.h:59
RPCDetId rpcId_
Definition: CPPFDigi.h:51
int cluster_size_
Definition: CPPFDigi.h:61
int phi_int() const
Definition: CPPFDigi.h:37