12 <<
"+++ Upgrade CSCUpgradeAnodeLCTProcessor constructed while runPhase2_ is not set! +++\n";
16 <<
"+++ Upgrade CSCUpgradeAnodeLCTProcessor constructed while enableAlctPhase2_ is not set! +++\n";
22 <<
"+++ Upgrade CSCUpgradeAnodeLCTProcessor constructed while runPhase2_ is not set! +++\n";
26 <<
"+++ Upgrade CSCUpgradeAnodeLCTProcessor constructed while enableAlctPhase2_ is not set! +++\n";
32 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
33 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
34 ghost_cleared[key_wire][i_pattern] = 0;
37 int qual_this =
quality[key_wire][i_pattern];
40 qual_this = (qual_this & 0x03);
43 int qual_prev = (key_wire > 0) ?
quality[key_wire - 1][i_pattern] : 0;
51 qual_prev = (qual_prev & 0x03);
60 if (qual_prev > qual_this)
61 ghost_cleared[key_wire][i_pattern] = 1;
64 ghost_cleared[key_wire][i_pattern] = 1;
70 if (ghost_cleared[key_wire][i_pattern] == 1) {
72 LogTrace(
"CSCUpgradeAnodeLCTProcessor")
73 << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" pattern ghost cancelled on key_wire "
74 << key_wire <<
" q=" << qual_this <<
" by wire " << key_wire - 1 <<
" q=" << qual_prev
88 qual_next = (qual_next & 0x03);
91 if (qual_next >= qual_this)
92 ghost_cleared[key_wire][i_pattern] = 1;
95 ghost_cleared[key_wire][i_pattern] = 1;
98 if (ghost_cleared[key_wire][i_pattern] == 1) {
100 LogTrace(
"CSCUpgradeAnodeLCTProcessor")
101 << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" pattern ghost cancelled on key_wire "
102 << key_wire <<
" q=" << qual_this <<
" by wire " << key_wire + 1 <<
" q=" << qual_next
112 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
113 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
114 if (ghost_cleared[key_wire][i_pattern] > 0) {
115 clear(key_wire, i_pattern);
122 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
123 ghost_cleared[i_pattern] = 0;
128 int qual_this =
quality[key_wire][i_pattern];
131 qual_this = (qual_this & 0x03);
135 if (not(
p.isValid() and
p.getKeyWG() == key_wire - 1 and 1 -
p.getAccelerator() == i_pattern))
138 bool ghost_cleared_prev =
false;
139 int qual_prev =
p.getQuality();
140 int first_bx_prev =
p.getBX();
143 <<
"ghost concellation logic " << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" key_wire "
144 << key_wire <<
" quality " << qual_this <<
" bx " <<
first_bx[key_wire] <<
" previous key_wire "
145 << key_wire - 1 <<
" quality " << qual_prev <<
" bx " <<
first_bx[key_wire - 1];
154 qual_prev = (qual_prev & 0x03);
163 if (qual_prev > qual_this)
164 ghost_cleared[i_pattern] = 1;
167 ghost_cleared[i_pattern] = 1;
170 ghost_cleared_prev =
true;
173 if (ghost_cleared[i_pattern] == 1) {
175 LogTrace(
"CSCUpgradeAnodeLCTProcessor")
176 << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" pattern ghost cancelled on key_wire "
177 << key_wire <<
" q=" << qual_this <<
" by wire " << key_wire - 1 <<
" q=" << qual_prev
181 if (ghost_cleared_prev) {
184 << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" pattern ghost cancelled on key_wire "
185 << key_wire - 1 <<
" q=" << qual_prev <<
" by wire " << key_wire <<
" q=" << qual_this;
200 else if (temp_quality > 3)
201 Q = temp_quality - 3;