24 <<
"+++ Upgrade CSCMotherboardME11 constructed while isSLHC_ is not set! +++\n";
35 <<
"+++ Upgrade CSCMotherboardME11 constructed while isSLHC_ is not set! +++\n";
55 edm::LogError(
"CSCMotherboardME11|SetupError") <<
"+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
69 int used_alct_mask[20];
70 int used_clct_mask[20];
71 for (
int b = 0;
b < 20;
b++)
72 used_alct_mask[
b] = used_clct_mask[
b] = 0;
77 if (
clctProc->getBestCLCT(bx_clct).isValid()) {
78 bool is_matched =
false;
81 for (
int bx_alct = bx_alct_start; bx_alct <= bx_alct_stop; bx_alct++) {
86 if (
alctProc->getBestALCT(bx_alct).isValid()) {
89 <<
"Successful CLCT-ALCT match in ME11: bx_clct = " << bx_clct <<
"; match window: [" << bx_alct_start
90 <<
"; " << bx_alct_stop <<
"]; bx_alct = " << bx_alct;
91 int mbx = bx_alct_stop - bx_alct;
98 if (
allLCTs(bx_alct, mbx, 0).isValid()) {
99 used_alct_mask[bx_alct] += 1;
108 LogTrace(
"CSCMotherboard") <<
"Unsuccessful ALCT-CLCT match (CLCT only): bx_clct = " << bx_clct
109 <<
" first CLCT " <<
clctProc->getBestCLCT(bx_clct) <<
"; match window: [" 110 << bx_alct_start <<
"; " << bx_alct_stop <<
"]";
118 if (
alctProc->getBestALCT(bx_alct).isValid()) {
123 bool is_matched =
false;
124 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
129 if (
clctProc->getBestCLCT(bx_clct).isValid()) {
132 <<
"Successful ALCT-CLCT match in ME11: bx_alct = " << bx_alct <<
"; match window: [" << bx_clct_start
133 <<
"; " << bx_clct_stop <<
"]; bx_clct = " << bx_clct;
134 int mbx = bx_clct - bx_clct_start;
141 if (
allLCTs(bx_alct, mbx, 0).isValid()) {
143 used_clct_mask[bx_clct] += 1;
151 LogTrace(
"CSCMotherboard") <<
"Unsuccessful ALCT-CLCT match (ALCT only): bx_alct = " << bx_alct
152 <<
" first ALCT " <<
alctProc->getBestALCT(bx_alct) <<
"; match window: [" 153 << bx_clct_start <<
"; " << bx_clct_stop <<
"]";
163 unsigned int nlct = 0;
164 unsigned int nbx = 0;
172 LogDebug(
"CSCMotherboardME11") <<
"LCT" <<
i + 1 <<
" " <<
bx <<
"/" 173 <<
bx + mbx - match_trig_window_size / 2 <<
": " <<
allLCTs(
bx, mbx,
i);
180 if (
infoV > 0 && nlct > 0)
181 LogDebug(
"CSCMotherboardME11") <<
"bx " <<
bx <<
" nLCT: " << nlct <<
" total mbx with LCTs " << nbx;
193 if (nlct > CSCConstants::MAX_LCTS_PER_CSC
or nbx > 0)
202 LogDebug(
"CSCMotherboardME11") <<
"After x-bx sorting:";
209 LogDebug(
"CSCMotherboardME11") <<
"LCT" <<
i + 1 <<
" " <<
bx <<
"/" 210 <<
bx + mbx - match_trig_window_size / 2 <<
": " <<
allLCTs(
bx, mbx,
i);
214 if (
infoV > 0 && nlct > 0)
215 LogDebug(
"CSCMotherboardME11") <<
"bx " <<
bx <<
" nnLCT: " << nlct;
228 std::vector<CSCCorrelatedLCTDigi> tmpV;
243 std::vector<CSCCorrelatedLCTDigi> all_lcts;
248 std::vector<CSCCorrelatedLCTDigi>::const_iterator plct = all_lcts.begin();
249 for (; plct != all_lcts.end(); plct++) {
250 if (!plct->isValid())
253 int bx = (*plct).getBX();
266 tmpV.push_back(*plct);
267 if (bx_readout == -1)
270 tmpV.push_back(*plct);
277 std::vector<CSCCorrelatedLCTDigi> tmpV;
294 std::vector<CSCCorrelatedLCTDigi> tmpV;
330 const bool anodeBestValid = bestALCT.
isValid();
331 const bool anodeSecondValid = secondALCT.
isValid();
332 const bool cathodeBestValid = bestCLCT.
isValid();
333 const bool cathodeSecondValid = secondCLCT.
isValid();
334 if (anodeBestValid and !anodeSecondValid)
335 secondALCT = bestALCT;
336 if (!anodeBestValid and anodeSecondValid)
337 bestALCT = secondALCT;
338 if (cathodeBestValid and !cathodeSecondValid)
339 secondCLCT = bestCLCT;
340 if (!cathodeBestValid and cathodeSecondValid)
341 bestCLCT = secondCLCT;
348 if (((secondALCT != bestALCT)
or (secondCLCT != bestCLCT)) and
355 if (secondALCT == bestALCT)
357 if (secondCLCT == bestCLCT)
364 const int code = (ok11 << 3) | (ok12 << 2) | (ok21 << 1) | (ok22);
368 LogTrace(
"CSCMotherboardME11") <<
"debug correlateLCTs in ME11 " <<
cscId_ << std::endl
369 <<
"ALCT1: " << bestALCT << std::endl
370 <<
"ALCT2: " << secondALCT << std::endl
371 <<
"CLCT1: " << bestCLCT << std::endl
372 <<
"CLCT2: " << secondCLCT << std::endl
373 <<
"ok 11 12 21 22 code = " << ok11 <<
" " << ok12 <<
" " << ok21 <<
" " << ok22
374 <<
" " << code << std::endl;
402 LogTrace(
"CSCMotherboardME11") <<
"lut 0 1 = " << lut[code][0] <<
" " << lut[code][1] << std::endl;
404 switch (lut[code][0]) {
422 LogTrace(
"CSCMotherboardME11") <<
"lct1: " << lct1 << std::endl;
424 switch (lut[code][1]) {
428 LogTrace(
"CSCMotherboardME11") <<
"lct2: " << lct2 << std::endl;
433 LogTrace(
"CSCMotherboardME11") <<
"lct2: " << lct2 << std::endl;
438 LogTrace(
"CSCMotherboardME11") <<
"lct2: " << lct2 << std::endl;
444 LogTrace(
"CSCMotherboardME11") <<
"out of correlateLCTsME11" << std::endl;
T getParameter(std::string const &) const
std::vector< CSCCLCTDigi > clctV
unsigned int clct_trig_enable
void setConfigParameters(const CSCDBL1TPParameters *conf)
bool match_earliest_alct_only
unsigned int match_trig_window_size
std::vector< CSCCorrelatedLCTDigi > getLCTs1a() const
bool isValid() const
check ALCT validity (1 - valid ALCT)
bool match_earliest_clct_only
void clear()
clear this ALCT
std::unique_ptr< CSCCathodeLCTProcessor > clctProc
int pref[CSCConstants::MAX_LCT_TBINS]
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc) override
unsigned int mpc_block_me1a
void correlateLCTsME11(const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::vector< CSCALCTDigi > alctV
~CSCMotherboardME11() override
unsigned int tmb_l1a_window_size
bool isValid() const
check CLCT validity (1 - valid CLCT)
std::unique_ptr< CSCMotherboardLUTME11 > cscTmbLUT_
unsigned int match_trig_enable
CSCCorrelatedLCTDigi constructLCTs(const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT, int type, int trknmb) const
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1a() const
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1b() const
bool doesALCTCrossCLCT(const CSCALCTDigi &a, const CSCCLCTDigi &c) const
const CSCGeometry * cscGeometry_
edm::ParameterSet tmbParams_
std::vector< CSCCorrelatedLCTDigi > getLCTs1b() const
unsigned int alct_trig_enable
std::vector< CSCCorrelatedLCTDigi > readoutLCTs() const override
std::unique_ptr< CSCAnodeLCTProcessor > alctProc
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
void clear()
clear this CLCT
unsigned int tmb_cross_bx_algo
unsigned int alctClctOffset_