CMS 3D CMS Logo

L1MuKBMTCombinedStub.cc
Go to the documentation of this file.
2 
3 #include <iostream>
4 #include <iomanip>
5 #include <cmath>
6 
7 using namespace std;
9  whNum_(0),scNum_(0),stNum_(0),phi_(0), phiB_(0),tag_(false), quality_(-1), bxNum_(17),
10  eta1_(0),eta2_(0),qeta1_(-1),qeta2_(-1) {}
11 
12 
13 L1MuKBMTCombinedStub::L1MuKBMTCombinedStub(int wheel,int sector,int station,int phi,int phiB,bool tag,int bx,int quality,int eta1,int eta2, int qeta1,int qeta2):
14  whNum_(wheel),
15  scNum_(sector),
16  stNum_(station),
17  phi_(phi),
18  phiB_(phiB),
19  tag_(tag),
20  quality_(quality),
21  bxNum_(bx),
22  eta1_(eta1),
23  eta2_(eta2),
24  qeta1_(qeta1),
25  qeta2_(qeta2)
26 {
27 
28 }
29 
31 
32 
34 
35  if ( whNum_ != id.whNum_ ) return false;
36  if ( scNum_ != id.scNum_ ) return false;
37  if ( stNum_ != id.stNum_ ) return false;
38  if ( tag_ != id.tag_ ) return false;
39  if ( phi_ != id.phi_ ) return false;
40  if ( phiB_ != id.phiB_) return false;
41  if ( quality_ != id.quality_ ) return false;
42  if ( bxNum_ != id.bxNum_ ) return false;
43  if ( eta1_ != id.eta1_ ) return false;
44  if ( eta2_ != id.eta2_ ) return false;
45  if ( qeta1_ != id.qeta1_ ) return false;
46  if ( qeta2_ != id.qeta2_ ) return false;
47  return true;
48 
49 }
50 
51 //
52 // output stream operator for phi track segments
53 //
54 ostream& operator<<(ostream& s, const L1MuKBMTCombinedStub& id) {
55 
56  s.setf(ios::right,ios::adjustfield);
57  s << "BX: " << setw(5) << id.bxNum_ << " "
58  << "wheel: " << setw(5) << id.whNum_ << " "
59  << "sector: " << setw(5) << id.scNum_ << " "
60  << "station: " << setw(5) << id.stNum_ << " "
61  << "tag: " << setw(5) << id.tag_ << " "
62  << "phi: " << setw(5) << id.phi_ << " "
63  << "phiB: " << setw(4) << id.phiB_ << " "
64  << "quality: " << setw(4) << id.quality_ << " "
65  << "eta1:" << setw(4) <<id.eta1_ << " "
66  << "eta2:" << setw(4) <<id.eta2_ << " "
67  << "qeta1:" << setw(4) <<id.qeta1_ << " "
68  << "qeta2:" << setw(4) <<id.qeta2_;
69 
70  return s;
71 
72 }
bool operator==(const L1MuKBMTCombinedStub &) const
equal operator
int tag() const
return tag (second TS tag)
int eta1() const
return first eta
friend std::ostream & operator<<(std::ostream &, const L1MuKBMTCombinedStub &)
overload output stream operator for phi track segments
int quality() const
return quality code
L1MuKBMTCombinedStub()
default constructor
int qeta2() const
return second eta quality
int phi() const
return phi
int phiB() const
return phib
int eta2() const
return second eta
int qeta1() const
return first eta quality