12 <<
"+++ Upgrade CSCUpgradeAnodeLCTProcessor constructed while runPhase2_ is not set! +++\n";
16 <<
"+++ Upgrade CSCUpgradeAnodeLCTProcessor constructed while enableAlctPhase2_ is not set! +++\n";
20 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
21 ghost_cleared[i_pattern] = 0;
26 int qual_this =
quality[key_wire][i_pattern];
29 qual_this = (qual_this & 0x03);
33 if (not(
p.isValid() and
p.getKeyWG() == key_wire - 1 and 1 -
p.getAccelerator() == i_pattern))
36 bool ghost_cleared_prev =
false;
37 int qual_prev =
p.getQuality();
38 int first_bx_prev =
p.getBX();
41 <<
"ghost concellation logic " << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" key_wire " 42 << key_wire <<
" quality " << qual_this <<
" bx " <<
first_bx[key_wire] <<
" previous key_wire " 43 << key_wire - 1 <<
" quality " << qual_prev <<
" bx " <<
first_bx[key_wire - 1];
52 qual_prev = (qual_prev & 0x03);
61 if (qual_prev > qual_this)
62 ghost_cleared[i_pattern] = 1;
65 ghost_cleared[i_pattern] = 1;
68 ghost_cleared_prev =
true;
71 if (ghost_cleared[i_pattern] == 1) {
73 LogTrace(
"CSCUpgradeAnodeLCTProcessor")
74 << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" pattern ghost cancelled on key_wire " 75 << key_wire <<
" q=" << qual_this <<
" by wire " << key_wire - 1 <<
" q=" << qual_prev
79 if (ghost_cleared_prev) {
82 << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" pattern ghost cancelled on key_wire " 83 << key_wire - 1 <<
" q=" << qual_prev <<
" by wire " << key_wire <<
" q=" << qual_this;
98 else if (temp_quality > 3)
int ghost_cancellation_bx_depth
CSCUpgradeAnodeLCTProcessor(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
int first_bx_corrected[CSCConstants::MAX_NUM_WIREGROUPS]
Log< level::Error, false > LogError
std::vector< CSCALCTDigi > lct_list
bool ghost_cancellation_side_quality
void ghostCancellationLogicOneWire(const int key_wire, int *ghost_cleared) override
int getTempALCTQuality(int temp_quality) const override
int first_bx[CSCConstants::MAX_NUM_WIREGROUPS]
int quality[CSCConstants::MAX_NUM_WIREGROUPS][CSCConstants::NUM_ALCT_PATTERNS]