143 unsigned sector,
unsigned subsector,
147 theEndcap(endcap), theStation(station), theSector(sector),
148 theSubsector(subsector), theTrigChamber(chamber) {
149 static std::atomic<bool> config_dumped{
false};
156 conf.
getParameter<
unsigned int>(
"alctNplanesHitPretrig");
158 conf.
getParameter<
unsigned int>(
"alctNplanesHitPattern");
160 conf.
getParameter<
unsigned int>(
"alctNplanesHitAccelPretrig");
162 conf.
getParameter<
unsigned int>(
"alctNplanesHitAccelPattern");
198 if ((infoV > 0 || isSLHC_) && !config_dumped) {
201 config_dumped =
true;
237 static std::atomic<bool> config_dumped{
false};
250 if (!config_dumped) {
253 config_dumped =
true;
300 static std::atomic<bool> config_dumped{
false};
315 if (!config_dumped) {
318 config_dumped =
true;
326 static const unsigned int max_fifo_tbins = 1 << 5;
327 static const unsigned int max_fifo_pretrig = 1 << 5;
328 static const unsigned int max_drift_delay = 1 << 2;
329 static const unsigned int max_nplanes_hit_pretrig = 1 << 3;
330 static const unsigned int max_nplanes_hit_pattern = 1 << 3;
331 static const unsigned int max_nplanes_hit_accel_pretrig = 1 << 3;
332 static const unsigned int max_nplanes_hit_accel_pattern = 1 << 3;
333 static const unsigned int max_trig_mode = 1 << 2;
334 static const unsigned int max_accel_mode = 1 << 2;
341 <<
", exceeds max allowed, " << max_fifo_tbins-1 <<
" +++\n" 342 <<
"+++ Try to proceed with the default value, fifo_tbins=" 349 <<
", exceeds max allowed, " << max_fifo_pretrig-1 <<
" +++\n" 350 <<
"+++ Try to proceed with the default value, fifo_pretrig=" 357 <<
", exceeds max allowed, " << max_drift_delay-1 <<
" +++\n" 358 <<
"+++ Try to proceed with the default value, drift_delay=" 365 <<
", exceeds max allowed, " << max_nplanes_hit_pretrig-1 <<
" +++\n" 366 <<
"+++ Try to proceed with the default value, nplanes_hit_pretrig=" 373 <<
", exceeds max allowed, " << max_nplanes_hit_pattern-1 <<
" +++\n" 374 <<
"+++ Try to proceed with the default value, nplanes_hit_pattern=" 380 <<
"+++ Value of nplanes_hit_accel_pretrig, " 382 << max_nplanes_hit_accel_pretrig-1 <<
" +++\n" 383 <<
"+++ Try to proceed with the default value, " 389 <<
"+++ Value of nplanes_hit_accel_pattern, " 391 << max_nplanes_hit_accel_pattern-1 <<
" +++\n" 392 <<
"+++ Try to proceed with the default value, " 398 <<
"+++ Value of trig_mode, " <<
trig_mode 399 <<
", exceeds max allowed, " << max_trig_mode-1 <<
" +++\n" 400 <<
"+++ Try to proceed with the default value, trig_mode=" 407 <<
", exceeds max allowed, " << max_accel_mode-1 <<
" +++\n" 408 <<
"+++ Try to proceed with the default value, accel_mode=" 415 <<
", exceeds max allowed, " << max_l1a_window_width-1 <<
" +++\n" 416 <<
"+++ Try to proceed with the default value, l1a_window_width=" 431 if (pattern == 0)
quality[wire][0] = -999;
438 std::vector<CSCALCTDigi>
443 static std::atomic<bool> config_dumped{
false};
447 config_dumped =
true;
468 <<
"+++ CSC geometry looks garbled; no emulation possible +++\n";
477 <<
" is not defined in current geometry! +++\n" 478 <<
"+++ CSC geometry looks garbled; no emulation possible +++\n";
489 <<
"; ALCT emulation skipped! +++";
490 std::vector<CSCALCTDigi> emptyV;
506 const unsigned int min_layers =
514 unsigned int layersHit = 0;
517 if (!wire[i_layer][i_wire].
empty()) {layersHit++;
break;}
520 if (layersHit >= min_layers)
run(wire);
524 std::vector<CSCALCTDigi> tmpV =
getALCTs();
543 if (!chamber_empty) {
545 unsigned int start_bx = 0;
547 while (start_bx < stop_bx) {
582 digiV[i_layer].clear();
597 <<
"found " <<
digiV[i_layer].size()
598 <<
" wire digi(s) in layer " << i_layer <<
" of " << detid.
chamberName()
601 for (std::vector<CSCWireDigi>::iterator pld =
digiV[i_layer].
begin();
602 pld !=
digiV[i_layer].end(); pld++) {
603 LogTrace(
"CSCAnodeLCTProcessor") <<
" " << (*pld);
616 digiIt != rwired.second; ++digiIt) {
617 digiV[
id.layer()-1].push_back(*digiIt);
628 for (std::vector<CSCWireDigi>::iterator pld =
digiV[i_layer].
begin();
629 pld !=
digiV[i_layer].end(); pld++) {
630 int i_wire = pld->getWireGroup()-1;
631 std::vector<int> bx_times = pld->getTimeBinsOn();
636 <<
"+++ Found wire digi with wrong wire number = " << i_wire
637 <<
" (max wires = " <<
numWireGroups <<
"); skipping it... +++\n";
647 int last_time = -999;
649 wire[i_layer][i_wire].push_back(0);
650 wire[i_layer][i_wire].push_back(6);
653 for (
unsigned int i = 0;
i < bx_times.size();
i++) {
655 if (
i > 0 && bx_times[
i] == (bx_times[
i-1]+1))
continue;
658 <<
"Digi on layer " << i_layer <<
" wire " << i_wire
659 <<
" at time " << bx_times[
i];
664 if (last_time < 0 || ((bx_times[
i]-last_time) >= 6) ) {
665 wire[i_layer][i_wire].push_back(bx_times[
i]);
666 last_time = bx_times[
i];
671 <<
"+++ Skipping wire digi: wire = " << i_wire
672 <<
" layer = " << i_layer <<
", bx = " << bx_times[
i] <<
" +++";
687 bool chamber_empty =
true;
688 int i_wire, i_layer, digi_num;
689 const unsigned int bits_in_pulse = 8*
sizeof(
pulse[0][0]);
693 pulse[i_layer][i_wire] = 0;
697 for (
int j = 0; j < 3; j++)
quality[i_wire][j] = -999;
703 if (!wire[i_layer][i_wire].
empty()) {
704 std::vector<int> bx_times = wire[i_layer][i_wire];
705 for (
unsigned int i = 0;
i < bx_times.size();
i++) {
707 if (bx_times[
i] < 0 || bx_times[
i] +
hit_persist >= bits_in_pulse) {
709 <<
"+++ BX time of wire digi (wire = " << i_wire
710 <<
" layer = " << i_layer <<
") bx = " << bx_times[
i]
711 <<
" is not within the range (0-" << bits_in_pulse
712 <<
"] allowed for pulse extension. Skip this digi! +++\n";
717 if (chamber_empty) chamber_empty =
false;
720 for (
unsigned int bx = bx_times[
i];
722 pulse[i_layer][i_wire] =
pulse[i_layer][i_wire] | (1 << bx);
727 <<
"Wire digi: layer " << i_layer
728 <<
" digi #" << ++digi_num <<
" wire group " << i_wire
729 <<
" time " << bx_times[
i];
731 std::ostringstream strstrm;
732 for (
int i = 1;
i <= 32;
i++) {
733 strstrm << ((pulse[i_layer][i_wire]>>(32-
i)) & 1);
735 LogTrace(
"CSCAnodeLCTProcessor") <<
" Pulse: " << strstrm.str();
743 if (
infoV > 1 && !chamber_empty) {
747 return chamber_empty;
755 unsigned int layers_hit;
757 int this_layer, this_wire;
760 const unsigned int nplanes_hit_pretrig_acc =
772 for (
unsigned int bx_time = start_bx; bx_time < stop_bx; bx_time++) {
775 hit_layer[i_layer] =
false;
784 if (((
pulse[this_layer][this_wire] >> bx_time) & 1) == 1) {
786 if (hit_layer[this_layer] ==
false){
787 hit_layer[this_layer] =
true;
793 if (layers_hit >= pretrig_thresh[i_pattern]) {
797 <<
"Pretrigger was satisfied for wire: " << key_wire
798 <<
" pattern: " << i_pattern
799 <<
" bx_time: " << bx_time;
820 unsigned int temp_quality;
821 int this_layer, this_wire, delta_wire;
824 const unsigned int nplanes_hit_pattern_acc =
830 const std::string ptn_label[] = {
"Accelerator",
"CollisionA",
"CollisionB"};
835 hit_layer[i_layer] =
false;
837 double num_pattern_hits=0., times_sum=0.;
838 std::multiset<int> mset_for_median;
839 mset_for_median.clear();
845 this_wire = delta_wire + key_wire;
850 if ( ( (
pulse[this_layer][this_wire] >>
855 if (hit_layer[this_layer] ==
false){
858 hit_layer[this_layer] =
true;
861 <<
"bx_time: " <<
first_bx[key_wire]
862 <<
" pattern: " << i_pattern <<
" keywire: " << key_wire
863 <<
" layer: " << this_layer
864 <<
" quality: " << temp_quality;
868 if (
abs(delta_wire)<2) {
873 if (((
pulse[this_layer][this_wire] >> (first_bx_layer-1)) & 1) == 1) first_bx_layer--;
876 times_sum += (double)first_bx_layer;
877 num_pattern_hits += 1.;
878 mset_for_median.insert(first_bx_layer);
881 <<
" 1st bx in layer: "<<first_bx_layer
882 <<
" sum bx: "<<times_sum
883 <<
" #pat. hits: "<<num_pattern_hits;
891 const int sz = mset_for_median.size();
893 std::multiset<int>::iterator im = mset_for_median.begin();
894 if (sz > 1) std::advance(im,sz/2-1);
899 #if defined(EDM_ML_DEBUG) 902 for (im = mset_for_median.begin(); im != mset_for_median.end(); im++) {
909 if (temp_quality >= pattern_thresh[i_pattern]) {
917 else if (temp_quality > 3) Q = temp_quality - 3;
921 if (i_pattern == 0) {
923 quality[key_wire][0] = temp_quality;
927 if (static_cast<int>(temp_quality) >
quality[key_wire][1]) {
928 quality[key_wire][1] = temp_quality;
929 quality[key_wire][2] = i_pattern-1;
934 <<
"Pattern found; keywire: " << key_wire
935 <<
" type: " << ptn_label[i_pattern]
936 <<
" quality: " << temp_quality <<
"\n";
943 <<
"Collision Pattern A is chosen" <<
"\n";
944 else if (
quality[key_wire][2] == 1)
946 <<
"Collision Pattern B is chosen" <<
"\n";
961 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
962 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
963 ghost_cleared[key_wire][i_pattern] = 0;
966 int qual_this =
quality[key_wire][i_pattern];
970 int qual_prev = (key_wire > 0) ?
quality[key_wire-1][i_pattern] : 0;
980 if (qual_prev >= qual_this) ghost_cleared[key_wire][i_pattern] = 1;
989 (qual_prev > qual_this) )
990 ghost_cleared[key_wire][i_pattern] = 1;
996 if (ghost_cleared[key_wire][i_pattern] == 1) {
998 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
999 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1000 <<
" by wire " << key_wire-1<<
" q="<<qual_prev;
1005 (key_wire < numWireGroups-1) ?
quality[key_wire+1][i_pattern] : 0;
1006 if (qual_next > 0) {
1010 if (qual_next > qual_this) ghost_cleared[key_wire][i_pattern] = 1;
1019 (qual_next >= qual_this) )
1020 ghost_cleared[key_wire][i_pattern] = 1;
1023 if (ghost_cleared[key_wire][i_pattern] == 1) {
1025 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
1026 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1027 <<
" by wire " << key_wire+1<<
" q="<<qual_next;
1036 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
1037 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
1038 if (ghost_cleared[key_wire][i_pattern] > 0) {
1039 clear(key_wire, i_pattern);
1057 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
1058 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
1059 ghost_cleared[key_wire][i_pattern] = 0;
1062 int qual_this =
quality[key_wire][i_pattern];
1063 if (qual_this > 0) {
1068 int qual_prev = (key_wire > 0) ?
quality[key_wire-1][i_pattern] : 0;
1069 if (qual_prev > 0) {
1075 if (
runME21ILT_ or runME3141ILT_) qual_prev = (qual_prev & 0x03);
1084 if (qual_prev > qual_this) ghost_cleared[key_wire][i_pattern] = 1;
1093 (qual_prev > qual_this) )
1094 ghost_cleared[key_wire][i_pattern] = 1;
1100 if (ghost_cleared[key_wire][i_pattern] == 1) {
1102 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
1103 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1104 <<
" by wire " << key_wire-1<<
" q="<<qual_prev<<
" dt="<<
dt;
1110 (key_wire < numWireGroups-1) ?
quality[key_wire+1][i_pattern] : 0;
1111 if (qual_next > 0) {
1118 qual_next = (qual_next & 0x03);
1121 if (qual_next >= qual_this) ghost_cleared[key_wire][i_pattern] = 1;
1130 (qual_next >= qual_this) )
1131 ghost_cleared[key_wire][i_pattern] = 1;
1134 if (ghost_cleared[key_wire][i_pattern] == 1) {
1136 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
1137 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1138 <<
" by wire " << key_wire+1<<
" q="<<qual_next<<
" dt="<<
dt;
1147 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
1148 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
1149 if (ghost_cleared[key_wire][i_pattern] > 0) {
1150 clear(key_wire, i_pattern);
1160 std::vector<CSCALCTDigi> lct_list;
1170 if (
infoV>1)
LogTrace(
"CSCAnodeLCTProcessor")<<
" bx="<<bx<<
" fbx="<<fbx;
1175 if (
infoV>1)
LogTrace(
"CSCAnodeLCTProcessor")<<
" bx="<<bx<<
" fbx="<<fbx;
1178 int qual = (
quality[i_wire][0] & 0x03);
1181 lct_list.push_back(lct_info);
1186 int qual = (
quality[i_wire][1] & 0x03);
1189 lct_list.push_back(lct_info);
1190 if (
infoV>1)
LogTrace(
"CSCAnodeLCTProcessor")<<
" got lct_info: "<<lct_info;
1203 int n_alct_all=0, n_alct=0;
1204 for (std::vector <CSCALCTDigi>::const_iterator plct = lct_list.begin(); plct != lct_list.end(); plct++)
1205 if (plct->isValid() && plct->getBX()==6) n_alct_all++;
1206 for (std::vector <CSCALCTDigi>::const_iterator plct = fourBest.begin(); plct != fourBest.end(); plct++)
1207 if (plct->isValid() && plct->getBX()==6) n_alct++;
1210 <<
" all "<<n_alct_all<<
" found "<<n_alct;
1215 for (std::vector<CSCALCTDigi>::const_iterator plct = fourBest.begin();
1216 plct != fourBest.end(); plct++) {
1218 int bx = plct->getBX();
1221 <<
"+++ Bx of ALCT candidate, " << bx <<
", exceeds max allowed, " 1262 const std::vector<CSCALCTDigi>& all_alcts) {
1268 LogTrace(
"CSCAnodeLCTProcessor") << all_alcts.size() <<
1269 " ALCTs at the input of best-track selector: ";
1270 for (std::vector <CSCALCTDigi>::const_iterator plct = all_alcts.begin();
1271 plct != all_alcts.end(); plct++) {
1272 if (!plct->isValid())
continue;
1273 LogTrace(
"CSCAnodeLCTProcessor") << (*plct);
1278 for (std::vector <CSCALCTDigi>::const_iterator plct = all_alcts.begin();
1279 plct != all_alcts.end(); plct++) {
1280 if (!plct->isValid())
continue;
1289 int bx = (*plct).
getBX();
1290 int accel = (*plct).getAccelerator();
1291 int qual = (*plct).getQuality();
1292 int wire = (*plct).getKeyWG();
1293 bool vA = tA[bx][accel].
isValid();
1294 bool vB = tB[bx][accel].
isValid();
1299 if (!vA || qual > qA || (qual == qA && wire > wA)) {
1300 tA[bx][accel] = *plct;
1302 if (!vB || qual > qB || (qual == qB && wire < wB)) {
1303 tB[bx][accel] = *plct;
1308 for (
int accel = 0; accel <= 1; accel++) {
1310 if (tA[bx][accel].isValid()) {
1312 LogTrace(
"CSCAnodeLCTProcessor") <<
"tA: " << tA[bx][accel];
1313 LogTrace(
"CSCAnodeLCTProcessor") <<
"tB: " << tB[bx][accel];
1315 bestALCTs[bx][accel] = tA[bx][accel];
1318 if (tA[bx][accel] != tB[bx][accel] &&
1319 tA[bx][accel].getQuality() == tB[bx][accel].getQuality()) {
1320 secondALCTs[bx][accel] = tB[bx][accel];
1327 for (std::vector <CSCALCTDigi>::const_iterator plct =
1328 all_alcts.begin(); plct != all_alcts.end(); plct++) {
1329 if ((*plct).isValid() &&
1330 (*plct).getAccelerator() == accel && (*plct).getBX() == bx &&
1331 (*plct).getQuality() < bestALCTs[bx][accel].
getQuality() &&
1332 (*plct).getQuality() >= secondALCTs[bx][accel].
getQuality() &&
1333 (*plct).getKeyWG() >= secondALCTs[bx][accel].
getKeyWG()) {
1334 secondALCTs[bx][accel] = *plct;
1343 std::vector<CSCALCTDigi> fourBest;
1345 for (
int i = 0;
i < 2;
i++) {
1346 if (bestALCTs[bx][
i].isValid()) fourBest.push_back(bestALCTs[bx][
i]);
1348 for (
int i = 0;
i < 2;
i++) {
1349 if (secondALCTs[bx][
i].isValid()) fourBest.push_back(secondALCTs[bx][
i]);
1354 LogTrace(
"CSCAnodeLCTProcessor") << fourBest.size() <<
" ALCTs selected: ";
1355 for (std::vector<CSCALCTDigi>::const_iterator plct = fourBest.begin();
1356 plct != fourBest.end(); plct++) {
1357 LogTrace(
"CSCAnodeLCTProcessor") << (*plct);
1369 bool returnValue =
false;
1375 if (lhsALCT.
getBX() < rhsALCT.
getBX()) {returnValue =
true;}
1376 if (lhsALCT.
getBX() != rhsALCT.
getBX()) {
return returnValue;}
1381 if (qual1 > qual2) {returnValue =
true;}
1385 else if (qual1 == qual2 &&
1389 {returnValue =
true;}
1405 if (
quality[key_wire][1] > 0) {
1408 <<
"trigMode(): collision track " << key_wire <<
" disabled" <<
"\n";
1413 if (
quality[key_wire][0] > 0) {
1416 <<
"trigMode(): accelerator track " << key_wire <<
" disabled" <<
"\n";
1425 <<
"trigMode(): collision track " << key_wire <<
" disabled" <<
"\n";
1435 int promotionBit = 1 << 2;
1441 if (
quality[key_wire][0] > 0) {
1444 <<
"alctMode(): accelerator track " << key_wire <<
" ignored" <<
"\n";
1449 if (
quality[key_wire][1] > 0) {
1450 quality[key_wire][1] += promotionBit;
1452 <<
"alctMode(): collision track " << key_wire <<
" promoted" <<
"\n";
1457 if (
quality[key_wire][0] > 0) {
1458 quality[key_wire][0] += promotionBit;
1460 <<
"alctMode(): accelerator track " << key_wire <<
" promoted"<<
"\n";
1465 if (
quality[key_wire][1] > 0) {
1468 <<
"alctMode(): collision track " << key_wire <<
" ignored" <<
"\n";
1476 std::ostringstream strm;
1478 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1479 strm <<
"+ ALCT configuration parameters: +\n";
1480 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1481 strm <<
" fifo_tbins [total number of time bins in DAQ readout] = " 1483 strm <<
" fifo_pretrig [start time of anode raw hits in DAQ readout] = " 1485 strm <<
" drift_delay [drift delay after pre-trigger, in 25 ns bins] = " 1487 strm <<
" nplanes_hit_pretrig [min. number of layers hit for pre-trigger] = " 1489 strm <<
" nplanes_hit_pattern [min. number of layers hit for trigger] = " 1491 strm <<
" nplanes_hit_accel_pretrig [min. number of layers hit for accel." 1493 strm <<
" nplanes_hit_accel_pattern [min. number of layers hit for accel." 1495 strm <<
" trig_mode [enabling/disabling collision/accelerator tracks] = " 1497 strm <<
" accel_mode [preference to collision/accelerator tracks] = " 1499 strm <<
" l1a_window_width [L1Accept window width, in 25 ns bins] = " 1501 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1502 LogDebug(
"CSCAnodeLCTProcessor") << strm.str();
1512 std::ostringstream strstrm;
1514 if (i_wire%10 == 0) {
1515 if (i_wire < 100) strstrm << i_wire/10;
1516 else strstrm << (i_wire-100)/10;
1518 else strstrm <<
" ";
1522 strstrm << i_wire%10;
1527 if (!wire[i_layer][i_wire].
empty()) {
1528 std::vector<int> bx_times = wire[i_layer][i_wire];
1529 strstrm << std::hex << bx_times[0] <<
std::dec;
1536 LogTrace(
"CSCAnodeLCTProcessor") << strstrm.str();
1542 std::vector<CSCALCTDigi> tmpV;
1547 const int lct_bins =
1550 static std::atomic<int> late_tbins{
early_tbins + lct_bins};
1552 static std::atomic<int> ifois{0};
1562 <<
"; in-time ALCTs are not getting read-out!!! +++" <<
"\n";
1567 <<
"+++ Allowed range of time bins, [0-" << late_tbins
1569 <<
"+++ Set late_tbins to max allowed +++\n";
1570 late_tbins = CSCConstants::MAX_ALCT_TBINS-1;
1577 std::vector<CSCALCTDigi> all_alcts =
getALCTs();
1578 for (std::vector <CSCALCTDigi>::const_iterator plct = all_alcts.begin();
1579 plct != all_alcts.end(); plct++) {
1580 if (!plct->isValid())
continue;
1582 int bx = (*plct).getBX();
1586 <<
" Do not report ALCT on keywire " << plct->getKeyWG()
1587 <<
": found at bx " << bx <<
", whereas the earliest allowed bx is " 1593 if (bx > late_tbins) {
1595 <<
" Do not report ALCT on keywire " << plct->getKeyWG()
1596 <<
": found at bx " << bx <<
", whereas the latest allowed bx is " 1601 tmpV.push_back(*plct);
1610 for (
auto&
p : tmpV){
1618 std::vector<CSCALCTDigi> tmpV;
1633 std::ostringstream strstrm_header;
1635 <<
"\n" <<
"Pattern: " << i_pattern <<
" Key wire: " << key_wire;
1636 for (
int i = 1;
i <= 32;
i++) {
1637 strstrm_header << ((32-
i)%10);
1639 LogTrace(
"CSCAnodeLCTProcessor") << strstrm_header.str();
1642 std::ostringstream strstrm_pulse;
1646 for (
int i = 1;
i <= 32;
i++) {
1647 strstrm_pulse << ((pulse[this_layer][this_wire]>>(32-
i)) & 1);
1650 << strstrm_pulse.str() <<
" on layer " << this_layer;
1655 <<
"-------------------------------------------";
T getParameter(std::string const &) const
int ghost_cancellation_bx_depth
void showPatterns(const int key_wire)
void readWireDigis(std::vector< int > wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES])
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
int quality[CSCConstants::MAX_NUM_WIRES][3]
unsigned int alctDriftDelay() const
void checkConfigParameters()
int first_bx_corrected[CSCConstants::MAX_NUM_WIRES]
static const unsigned int def_drift_delay
static const unsigned int def_fifo_tbins
static std::string chamberName(int endcap, int station, int ring, int chamber)
bool getDigis(const CSCWireDigiCollection *wiredc)
bool isValid() const
check ALCT validity (1 - valid ALCT)
unsigned int nplanes_hit_pattern
void clear()
clear this ALCT
const unsigned theTrigChamber
unsigned int alctNplanesHitPretrig() const
void setConfigParameters(const CSCDBL1TPParameters *conf)
void trigMode(const int key_wire)
static int ringFromTriggerLabels(int station, int triggerCSCID)
void ghostCancellationLogicSLHC()
static const unsigned int def_accel_mode
unsigned int alctL1aWindowWidth() const
int getFullBX() const
return 12-bit full BX.
static const int pattern_envelope[CSCConstants::NUM_ALCT_PATTERNS][CSCConstants::MAX_WIRES_IN_PATTERN]
void ghostCancellationLogic()
static const unsigned int def_nplanes_hit_accel_pretrig
static const unsigned int def_fifo_pretrig
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
void accelMode(const int key_wire)
Abs< T >::type abs(const T &t)
int pattern_mask[CSCConstants::NUM_ALCT_PATTERNS][CSCConstants::MAX_WIRES_IN_PATTERN]
unsigned int l1a_window_width
static const unsigned int def_nplanes_hit_pattern
unsigned int alctTrigMode() const
bool preTrigger(const int key_wire, const int start_bx)
bool pulseExtension(const std::vector< int > wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES])
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
CSCALCTDigi secondALCT[CSCConstants::MAX_ALCT_TBINS]
static const unsigned int def_l1a_window_width
bool ghost_cancellation_side_quality
std::string chamberName() const
static const int pattern_mask_open[CSCConstants::NUM_ALCT_PATTERNS][CSCConstants::MAX_WIRES_IN_PATTERN]
int getQuality() const
return quality of a pattern
bool isBetterALCT(const CSCALCTDigi &lhsALCT, const CSCALCTDigi &rhsALCT)
unsigned int alctAccelMode() const
static const unsigned int def_trig_mode
int getAccelerator() const
static const unsigned int def_nplanes_hit_accel_pattern
unsigned int alctFifoPretrig() const
std::vector< CSCALCTDigi > readoutALCTs()
const CSCGeometry * csc_g
unsigned int alctNplanesHitAccelPretrig() const
void setDefaultConfigParameters()
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
const unsigned theStation
std::vector< CSCWireDigi >::const_iterator const_iterator
unsigned int alctNplanesHitAccelPattern() const
std::vector< CSCALCTDigi > bestTrackSelector(const std::vector< CSCALCTDigi > &all_alcts)
unsigned int fifo_pretrig
CSCALCTDigi bestALCT[CSCConstants::MAX_ALCT_TBINS]
int first_bx[CSCConstants::MAX_NUM_WIRES]
void dumpConfigParams() const
std::pair< const_iterator, const_iterator > Range
void dumpDigis(const std::vector< int > wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES]) const
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting ALCTs.
void setFullBX(const uint16_t fullbx)
Set 12-bit full BX.
const unsigned theSubsector
unsigned int pulse[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES]
unsigned int alctNplanesHitPattern() const
bool patternDetection(const int key_wire)
static const int pattern_mask_r1[CSCConstants::NUM_ALCT_PATTERNS][CSCConstants::MAX_WIRES_IN_PATTERN]
unsigned int nplanes_hit_accel_pattern
std::vector< CSCALCTDigi > run(const CSCWireDigiCollection *wiredc)
unsigned int pretrig_extra_deadtime
int getKeyWG() const
return key wire group
std::vector< CSCWireDigi > digiV[CSCConstants::NUM_LAYERS]
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
unsigned int nplanes_hit_pretrig
std::vector< CSCALCTDigi > getALCTs()
static const unsigned int def_nplanes_hit_pretrig
unsigned int nplanes_hit_accel_pretrig
unsigned int alctFifoTbins() const