CMS 3D CMS Logo

CSCTrackFinderDataTypes.cc
Go to the documentation of this file.
2 #include <iostream>
3 
5 {
6  this->strip = ((1<<8)-1)&u;
7  this->clct_pattern = ((1<<3)-1)&(u>>8);
8  this->pattern_type = 1&(u>>11);
9  this->quality = ((1<<4)-1)&(u>>12);
10  this->lr = 1&(u>>16);
11 
12  return *this;
13 }
14 
16 {
17  this->phi_local = ((1<<10)-1)&u;
18  this->wire_group = ((1<<5)-1)&(u>>10);
19  this->cscid = ((1<<4)-1)&(u>>15);
20 
21  return *this;
22 }
23 
25 {
26  this->phi_bend = ((1<<6)-1)&u;
27  this->phi_local = ((1<<2)-1)&(u>>6);
28  this->wire_group = ((1<<7)-1)&(u>>8);
29  this->cscid = ((1<<4)-1)&(u>>15);
30 
31  return *this;
32 }
33 
34 pt_address& pt_address::operator=(const unsigned& u)
35 {
36  this->delta_phi_12 = ((1<<8)-1)&u;
37  this->delta_phi_23 = ((1<<4)-1)&(u>>8);
38  this->track_eta = ((1<<4)-1)&(u>>12);
39  this->track_mode = ((1<<4)-1)&(u>>16);
40  this->delta_phi_sign = ((1<<1)-1)&(u>>20);
41  this->track_fr = ((1<<1)-1)&(u>>21);
42 
43  return *this;
44 }
45 
46 local_phi_data& local_phi_data::operator=(const unsigned short& us)
47 {
48  this->phi_local = ((1<<10)-1)&us;
49  this->phi_bend_local = ((1<<6)-1)&(us>>10);
50 
51  return *this;
52 }
53 
54 global_phi_data& global_phi_data::operator=(const unsigned short& us)
55 {
56  this->global_phi = ((1<<12)-1)&us;
57 
58  return *this;
59 }
60 
61 global_eta_data& global_eta_data::operator=(const unsigned short& us)
62 {
63  this->global_eta = ((1<<7)-1)&us;
64  this->global_bend = ((1<<5)-1)&(us>>7);
65 
66  return *this;
67 }
68 
69 pt_data& pt_data::operator=(const unsigned short& us)
70 {
71  this->front_rank = ((1<<7)-1)&us;
72  this->charge_valid_front = ((1<<1)-1)&(us>>7);
73  this->rear_rank = ((1<<7)-1)&(us>>8);
74  this->charge_valid_rear = ((1<<1)-1)&(us>>15);
75 
76  return *this;
77 }
78 
79 unsigned short local_phi_data::toint() const
80 {
81  unsigned short us = 0;
82  us = (phi_local | (phi_bend_local << 10));
83  return us;
84 }
85 
86 unsigned short global_eta_data::toint() const
87 {
88  unsigned short us = 0;
89  us = (global_eta | (global_bend << 7));
90  return us;
91 }
92 
93 unsigned short global_phi_data::toint() const
94 {
95  unsigned short us = 0;
96  us = global_phi;
97  return us;
98 }
99 
100 unsigned short pt_data::toint() const
101 {
102  unsigned short us = 0;
103  us = front_rank | (charge_valid_front << 7) | (rear_rank << 8) | (charge_valid_rear << 15);
104  return us;
105 }
106 
107 unsigned local_phi_address::toint() const
108 {
109  unsigned u = 0;
110  u = strip | (clct_pattern << 8) | (pattern_type << 11) | (quality << 12) | (lr << 16);
111  return u;
112 }
113 
115 {
116  unsigned u = 0;
117  u = phi_bend | (phi_local << 6) | (wire_group << 8) | (cscid << 15);
118  return u;
119 }
120 
122 {
123  unsigned u = 0;
124  u = phi_local | (wire_group << 10) | (cscid << 15);
125  return u;
126 }
127 
128 unsigned pt_address::toint() const
129 {
130  unsigned u = 0;
131  u = delta_phi_12 | (delta_phi_23 << 8) | (track_eta << 12) | (track_mode << 16) | (delta_phi_sign << 20) | (track_fr << 21);
132  return u;
133 }
134 
135 unsigned pt_address::delta_phi() const
136 {
137  return ( delta_phi_12 | (delta_phi_23 << 8) );
138 }
unsigned toint() const
unsigned short toint() const
global_eta_address & operator=(const unsigned &u)
unsigned short toint() const
pt_data & operator=(const unsigned short &)
pt_address & operator=(const unsigned &)
local_phi_address & operator=(const unsigned &u)
local_phi_data & operator=(const unsigned short &us)
unsigned short toint() const
global_phi_data & operator=(const unsigned short &us)
global_phi_address & operator=(const unsigned &u)
global_eta_data & operator=(const unsigned short &us)
unsigned short toint() const
unsigned delta_phi() const