16 unsigned sector,
unsigned subsector,
22 <<
"+++ Upgrade CSCMotherboardME11 constructed while isSLHC_ is not set! +++\n";
35 <<
"+++ Upgrade CSCMotherboardME11 constructed while isSLHC_ is not set! +++\n";
67 <<
"+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
80 int used_alct_mask[20];
81 int used_clct_mask[20];
82 for (
int b=0;
b<20;
b++)
83 used_alct_mask[
b] = used_clct_mask[
b] = 0;
90 if (
clctProc->bestCLCT[bx_clct].isValid()) {
91 bool is_matched =
false;
94 for (
int bx_alct = bx_alct_start; bx_alct <= bx_alct_stop; bx_alct++) {
98 if (
alctProc->bestALCT[bx_alct].isValid()) {
100 <<
"Successful CLCT-ALCT match in ME11: bx_clct = " << bx_clct
101 <<
"; match window: [" << bx_alct_start <<
"; " << bx_alct_stop
102 <<
"]; bx_alct = " << bx_alct;
103 int mbx = bx_alct_stop - bx_alct;
107 if (
allLCTs(bx_alct,mbx,0).isValid()) {
108 used_alct_mask[bx_alct] += 1;
116 <<
"Unsuccessful ALCT-CLCT match (CLCT only): bx_clct = " 117 << bx_clct <<
" first CLCT "<<
clctProc->bestCLCT[bx_clct]
118 <<
"; match window: [" << bx_alct_start
119 <<
"; " << bx_alct_stop <<
"]";
128 if (
alctProc->bestALCT[bx_alct].isValid()) {
133 bool is_matched =
false;
134 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
137 if (
clctProc->bestCLCT[bx_clct].isValid()) {
139 <<
"Successful ALCT-CLCT match in ME11: bx_alct = " << bx_alct
140 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
141 <<
"]; bx_clct = " << bx_clct;
142 int mbx = bx_clct-bx_clct_start;
146 if (
allLCTs(bx_alct,mbx,0).isValid()) {
148 used_clct_mask[bx_clct] += 1;
155 <<
"Unsuccessful ALCT-CLCT match (ALCT only): bx_alct = " 156 << bx_alct <<
" first ALCT "<<
alctProc->bestALCT[bx_alct]
157 <<
"; match window: [" << bx_clct_start
158 <<
"; " << bx_clct_stop <<
"]";
169 unsigned int nbx = 0;
177 LogDebug(
"CSCMotherboardME11") <<
"LCT"<<
i+1<<
" "<<bx<<
"/" 178 <<bx + mbx - match_trig_window_size/2<<
": "<<
allLCTs(bx,mbx,
i);
184 if (
infoV > 0 && nlct>0)
LogDebug(
"CSCMotherboardME11") <<
"bx "<<bx<<
" nLCT: "<<nlct <<
" total mbx with LCTs "<< nbx;
202 if (
infoV > 0)
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)
LogDebug(
"CSCMotherboardME11") <<
"bx "<<bx<<
" nnLCT: "<<nlct;
237 std::vector<CSCCorrelatedLCTDigi> tmpV;
254 std::vector<CSCCorrelatedLCTDigi> all_lcts;
257 std::vector <CSCCorrelatedLCTDigi>::const_iterator plct = all_lcts.begin();
258 for (; plct != all_lcts.end(); plct++)
260 if (!plct->isValid())
continue;
262 int bx = (*plct).getBX();
267 if (bx > late_tbins)
continue;
274 tmpV.push_back(*plct);
275 if (bx_readout == -1) bx_readout = bx;
277 else tmpV.push_back(*plct);
286 std::vector<CSCCorrelatedLCTDigi> tmpV;
305 std::vector<CSCCorrelatedLCTDigi> tmpV;
344 const bool anodeBestValid = bestALCT.
isValid();
345 const bool anodeSecondValid = secondALCT.
isValid();
346 const bool cathodeBestValid = bestCLCT.
isValid();
347 const bool cathodeSecondValid = secondCLCT.
isValid();
348 if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
349 if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
350 if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
351 if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
359 if (((secondALCT != bestALCT)
or (secondCLCT != bestCLCT)) and
369 if (secondALCT == bestALCT) secondALCT.
clear();
370 if (secondCLCT == bestCLCT) secondCLCT.
clear();
376 const int code = (ok11<<3) | (ok12<<2) | (ok21<<1) | (ok22);
379 if (dbg)
LogTrace(
"CSCMotherboardME11")<<
"debug correlateLCTs in ME11 "<<
cscId_ <<std::endl
380 <<
"ALCT1: "<<bestALCT<<std::endl
381 <<
"ALCT2: "<<secondALCT<<std::endl
382 <<
"CLCT1: "<<bestCLCT<<std::endl
383 <<
"CLCT2: "<<secondCLCT<<std::endl
384 <<
"ok 11 12 21 22 code = "<<ok11<<
" "<<ok12<<
" "<<ok21<<
" "<<ok22<<
" "<<code<<std::endl;
386 if ( code==0 )
return;
410 if (dbg)
LogTrace(
"CSCMotherboardME11")<<
"lut 0 1 = "<<lut[code][0]<<
" "<<lut[code][1]<<std::endl;
412 switch (lut[code][0]) {
428 if (dbg)
LogTrace(
"CSCMotherboardME11")<<
"lct1: "<<lct1<<std::endl;
430 switch (lut[code][1]){
433 if (dbg)
LogTrace(
"CSCMotherboardME11")<<
"lct2: "<<lct2<<std::endl;
437 if (dbg)
LogTrace(
"CSCMotherboardME11")<<
"lct2: "<<lct2<<std::endl;
441 if (dbg)
LogTrace(
"CSCMotherboardME11")<<
"lct2: "<<lct2<<std::endl;
445 if (dbg)
LogTrace(
"CSCMotherboardME11")<<
"out of correlateLCTsME11"<<std::endl;
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
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
void clear()
clear this CLCT
unsigned int tmb_cross_bx_algo
unsigned int alctClctOffset_