184 unsigned sector,
unsigned subsector,
188 theEndcap(endcap), theStation(station), theSector(sector),
189 theSubsector(subsector), theTrigChamber(chamber) {
190 static std::atomic<bool> config_dumped{
false};
197 conf.
getParameter<
unsigned int>(
"alctNplanesHitPretrig");
199 conf.
getParameter<
unsigned int>(
"alctNplanesHitPattern");
201 conf.
getParameter<
unsigned int>(
"alctNplanesHitAccelPretrig");
203 conf.
getParameter<
unsigned int>(
"alctNplanesHitAccelPattern");
243 if ((infoV > 0 || isSLHC) && !config_dumped) {
246 config_dumped =
true;
284 static std::atomic<bool> config_dumped{
false};
299 if (!config_dumped) {
302 config_dumped =
true;
351 static std::atomic<bool> config_dumped{
false};
366 if (!config_dumped) {
369 config_dumped =
true;
377 static const unsigned int max_fifo_tbins = 1 << 5;
378 static const unsigned int max_fifo_pretrig = 1 << 5;
379 static const unsigned int max_drift_delay = 1 << 2;
380 static const unsigned int max_nplanes_hit_pretrig = 1 << 3;
381 static const unsigned int max_nplanes_hit_pattern = 1 << 3;
382 static const unsigned int max_nplanes_hit_accel_pretrig = 1 << 3;
383 static const unsigned int max_nplanes_hit_accel_pattern = 1 << 3;
384 static const unsigned int max_trig_mode = 1 << 2;
385 static const unsigned int max_accel_mode = 1 << 2;
392 <<
", exceeds max allowed, " << max_fifo_tbins-1 <<
" +++\n" 393 <<
"+++ Try to proceed with the default value, fifo_tbins=" 400 <<
", exceeds max allowed, " << max_fifo_pretrig-1 <<
" +++\n" 401 <<
"+++ Try to proceed with the default value, fifo_pretrig=" 408 <<
", exceeds max allowed, " << max_drift_delay-1 <<
" +++\n" 409 <<
"+++ Try to proceed with the default value, drift_delay=" 416 <<
", exceeds max allowed, " << max_nplanes_hit_pretrig-1 <<
" +++\n" 417 <<
"+++ Try to proceed with the default value, nplanes_hit_pretrig=" 424 <<
", exceeds max allowed, " << max_nplanes_hit_pattern-1 <<
" +++\n" 425 <<
"+++ Try to proceed with the default value, nplanes_hit_pattern=" 431 <<
"+++ Value of nplanes_hit_accel_pretrig, " 433 << max_nplanes_hit_accel_pretrig-1 <<
" +++\n" 434 <<
"+++ Try to proceed with the default value, " 440 <<
"+++ Value of nplanes_hit_accel_pattern, " 442 << max_nplanes_hit_accel_pattern-1 <<
" +++\n" 443 <<
"+++ Try to proceed with the default value, " 449 <<
"+++ Value of trig_mode, " <<
trig_mode 450 <<
", exceeds max allowed, " << max_trig_mode-1 <<
" +++\n" 451 <<
"+++ Try to proceed with the default value, trig_mode=" 458 <<
", exceeds max allowed, " << max_accel_mode-1 <<
" +++\n" 459 <<
"+++ Try to proceed with the default value, accel_mode=" 466 <<
", exceeds max allowed, " << max_l1a_window_width-1 <<
" +++\n" 467 <<
"+++ Try to proceed with the default value, l1a_window_width=" 489 std::vector<CSCALCTDigi>
494 static std::atomic<bool> config_dumped{
false};
498 config_dumped =
true;
514 <<
" found in ME" << ((
theEndcap == 1) ?
"+" :
"-")
520 <<
"+++ CSC geometry looks garbled; no emulation possible +++\n";
526 <<
"+++ ME" << ((
theEndcap == 1) ?
"+" :
"-")
530 <<
" is not defined in current geometry! +++\n" 531 <<
"+++ CSC geometry looks garbled; no emulation possible +++\n";
538 <<
"+++ ME" << ((
theEndcap == 1) ?
"+" :
"-")
543 <<
"; ALCT emulation skipped! +++";
544 std::vector<CSCALCTDigi> emptyV;
560 const unsigned int min_layers =
568 unsigned int layersHit = 0;
571 if (!wire[i_layer][i_wire].
empty()) {layersHit++;
break;}
574 if (layersHit >= min_layers)
run(wire);
578 std::vector<CSCALCTDigi> tmpV =
getALCTs();
597 if (!chamber_empty) {
599 unsigned int start_bx = 0;
601 while (start_bx < stop_bx) {
636 digiV[i_layer].clear();
651 <<
"found " <<
digiV[i_layer].size()
652 <<
" wire digi(s) in layer " << i_layer <<
" of ME" 656 for (std::vector<CSCWireDigi>::iterator pld =
digiV[i_layer].
begin();
657 pld !=
digiV[i_layer].end(); pld++) {
658 LogTrace(
"CSCAnodeLCTProcessor") <<
" " << (*pld);
671 digiIt != rwired.second; ++digiIt) {
672 digiV[
id.layer()-1].push_back(*digiIt);
683 for (std::vector<CSCWireDigi>::iterator pld =
digiV[i_layer].
begin();
684 pld !=
digiV[i_layer].end(); pld++) {
685 int i_wire = pld->getWireGroup()-1;
686 std::vector<int> bx_times = pld->getTimeBinsOn();
691 <<
"+++ Found wire digi with wrong wire number = " << i_wire
692 <<
" (max wires = " <<
numWireGroups <<
"); skipping it... +++\n";
702 int last_time = -999;
704 wire[i_layer][i_wire].push_back(0);
705 wire[i_layer][i_wire].push_back(6);
708 for (
unsigned int i = 0;
i < bx_times.size();
i++) {
710 if (
i > 0 && bx_times[
i] == (bx_times[
i-1]+1))
continue;
713 <<
"Digi on layer " << i_layer <<
" wire " << i_wire
714 <<
" at time " << bx_times[
i];
719 if (last_time < 0 || ((bx_times[
i]-last_time) >= 6) ) {
720 wire[i_layer][i_wire].push_back(bx_times[
i]);
721 last_time = bx_times[
i];
726 <<
"+++ Skipping wire digi: wire = " << i_wire
727 <<
" layer = " << i_layer <<
", bx = " << bx_times[
i] <<
" +++";
742 bool chamber_empty =
true;
743 int i_wire, i_layer, digi_num;
744 const unsigned int bits_in_pulse = 8*
sizeof(
pulse[0][0]);
748 pulse[i_layer][i_wire] = 0;
752 for (
int j = 0; j < 3; j++)
quality[i_wire][j] = -999;
759 std::vector<int> bx_times =
wire[i_layer][i_wire];
760 for (
unsigned int i = 0;
i < bx_times.size();
i++) {
762 if (bx_times[
i] < 0 || bx_times[
i] +
hit_persist >= bits_in_pulse) {
764 <<
"+++ BX time of wire digi (wire = " << i_wire
765 <<
" layer = " << i_layer <<
") bx = " << bx_times[
i]
766 <<
" is not within the range (0-" << bits_in_pulse
767 <<
"] allowed for pulse extension. Skip this digi! +++\n";
772 if (chamber_empty) chamber_empty =
false;
775 for (
unsigned int bx = bx_times[
i];
777 pulse[i_layer][i_wire] =
pulse[i_layer][i_wire] | (1 << bx);
782 <<
"Wire digi: layer " << i_layer
783 <<
" digi #" << ++digi_num <<
" wire group " << i_wire
784 <<
" time " << bx_times[
i];
786 std::ostringstream strstrm;
787 for (
int i = 1;
i <= 32;
i++) {
788 strstrm << ((pulse[i_layer][i_wire]>>(32-
i)) & 1);
790 LogTrace(
"CSCAnodeLCTProcessor") <<
" Pulse: " << strstrm.str();
798 if (
infoV > 1 && !chamber_empty) {
802 return chamber_empty;
810 unsigned int layers_hit;
812 int this_layer, this_wire;
815 const unsigned int nplanes_hit_pretrig_acc =
827 for (
unsigned int bx_time = start_bx; bx_time < stop_bx; bx_time++) {
830 hit_layer[i_layer] =
false;
839 if (((
pulse[this_layer][this_wire] >> bx_time) & 1) == 1) {
841 if (hit_layer[this_layer] ==
false){
842 hit_layer[this_layer] =
true;
848 if (layers_hit >= pretrig_thresh[i_pattern]) {
852 <<
"Pretrigger was satisfied for wire: " << key_wire
853 <<
" pattern: " << i_pattern
854 <<
" bx_time: " << bx_time;
875 unsigned int temp_quality;
876 int this_layer, this_wire, delta_wire;
879 const unsigned int nplanes_hit_pattern_acc =
885 const std::string ptn_label[] = {
"Accelerator",
"CollisionA",
"CollisionB"};
890 hit_layer[i_layer] =
false;
892 double num_pattern_hits=0., times_sum=0.;
893 std::multiset<int> mset_for_median;
894 mset_for_median.clear();
900 this_wire = delta_wire + key_wire;
905 if ( ( (
pulse[this_layer][this_wire] >>
910 if (hit_layer[this_layer] ==
false){
913 hit_layer[this_layer] =
true;
916 <<
"bx_time: " <<
first_bx[key_wire]
917 <<
" pattern: " << i_pattern <<
" keywire: " << key_wire
918 <<
" layer: " << this_layer
919 <<
" quality: " << temp_quality;
923 if (
abs(delta_wire)<2) {
928 if (((
pulse[this_layer][this_wire] >> (first_bx_layer-1)) & 1) == 1) first_bx_layer--;
931 times_sum += (double)first_bx_layer;
932 num_pattern_hits += 1.;
933 mset_for_median.insert(first_bx_layer);
936 <<
" 1st bx in layer: "<<first_bx_layer
937 <<
" sum bx: "<<times_sum
938 <<
" #pat. hits: "<<num_pattern_hits;
946 const int sz = mset_for_median.size();
948 std::multiset<int>::iterator im = mset_for_median.begin();
949 if (sz > 1) std::advance(im,sz/2-1);
954 #if defined(EDM_ML_DEBUG) 957 for (im = mset_for_median.begin(); im != mset_for_median.end(); im++) {
964 if (temp_quality >= pattern_thresh[i_pattern]) {
970 temp_quality -= (pattern_thresh[i_pattern]-1);
978 else if (temp_quality > 3) Q = temp_quality - 3;
983 if (i_pattern == 0) {
985 quality[key_wire][0] = temp_quality;
989 if (static_cast<int>(temp_quality) >
quality[key_wire][1]) {
990 quality[key_wire][1] = temp_quality;
991 quality[key_wire][2] = i_pattern-1;
996 <<
"Pattern found; keywire: " << key_wire
997 <<
" type: " << ptn_label[i_pattern]
998 <<
" quality: " << temp_quality <<
"\n";
1003 if (
quality[key_wire][2] == 0)
1005 <<
"Collision Pattern A is chosen" <<
"\n";
1006 else if (
quality[key_wire][2] == 1)
1008 <<
"Collision Pattern B is chosen" <<
"\n";
1023 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
1024 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
1025 ghost_cleared[key_wire][i_pattern] = 0;
1028 int qual_this =
quality[key_wire][i_pattern];
1029 if (qual_this > 0) {
1032 int qual_prev = (key_wire > 0) ?
quality[key_wire-1][i_pattern] : 0;
1033 if (qual_prev > 0) {
1042 if (qual_prev >= qual_this) ghost_cleared[key_wire][i_pattern] = 1;
1051 (qual_prev > qual_this) )
1052 ghost_cleared[key_wire][i_pattern] = 1;
1058 if (ghost_cleared[key_wire][i_pattern] == 1) {
1060 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
1061 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1062 <<
" by wire " << key_wire-1<<
" q="<<qual_prev;
1067 (key_wire < numWireGroups-1) ?
quality[key_wire+1][i_pattern] : 0;
1068 if (qual_next > 0) {
1072 if (qual_next > qual_this) ghost_cleared[key_wire][i_pattern] = 1;
1081 (qual_next >= qual_this) )
1082 ghost_cleared[key_wire][i_pattern] = 1;
1085 if (ghost_cleared[key_wire][i_pattern] == 1) {
1087 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
1088 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1089 <<
" by wire " << key_wire+1<<
" q="<<qual_next;
1098 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
1099 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
1100 if (ghost_cleared[key_wire][i_pattern] > 0) {
1101 clear(key_wire, i_pattern);
1119 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
1120 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
1121 ghost_cleared[key_wire][i_pattern] = 0;
1124 int qual_this =
quality[key_wire][i_pattern];
1125 if (qual_this > 0) {
1130 int qual_prev = (key_wire > 0) ?
quality[key_wire-1][i_pattern] : 0;
1131 if (qual_prev > 0) {
1137 if (
runME21ILT_ or runME3141ILT_) qual_prev = (qual_prev & 0x03);
1146 if (qual_prev > qual_this) ghost_cleared[key_wire][i_pattern] = 1;
1155 (qual_prev > qual_this) )
1156 ghost_cleared[key_wire][i_pattern] = 1;
1162 if (ghost_cleared[key_wire][i_pattern] == 1) {
1164 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
1165 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1166 <<
" by wire " << key_wire-1<<
" q="<<qual_prev<<
" dt="<<
dt;
1172 (key_wire < numWireGroups-1) ?
quality[key_wire+1][i_pattern] : 0;
1173 if (qual_next > 0) {
1180 qual_next = (qual_next & 0x03);
1183 if (qual_next >= qual_this) ghost_cleared[key_wire][i_pattern] = 1;
1192 (qual_next >= qual_this) )
1193 ghost_cleared[key_wire][i_pattern] = 1;
1196 if (ghost_cleared[key_wire][i_pattern] == 1) {
1198 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
1199 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1200 <<
" by wire " << key_wire+1<<
" q="<<qual_next<<
" dt="<<
dt;
1209 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
1210 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
1211 if (ghost_cleared[key_wire][i_pattern] > 0) {
1212 clear(key_wire, i_pattern);
1222 std::vector<CSCALCTDigi> lct_list;
1232 if (
infoV>1)
LogTrace(
"CSCAnodeLCTProcessor")<<
" bx="<<bx<<
" fbx="<<fbx;
1237 if (
infoV>1)
LogTrace(
"CSCAnodeLCTProcessor")<<
" bx="<<bx<<
" fbx="<<fbx;
1240 int qual = (
quality[i_wire][0] & 0x03);
1243 lct_list.push_back(lct_info);
1248 int qual = (
quality[i_wire][1] & 0x03);
1251 lct_list.push_back(lct_info);
1252 if (
infoV>1)
LogTrace(
"CSCAnodeLCTProcessor")<<
" got lct_info: "<<lct_info;
1265 int n_alct_all=0, n_alct=0;
1266 for (std::vector <CSCALCTDigi>::const_iterator plct = lct_list.begin(); plct != lct_list.end(); plct++)
1267 if (plct->isValid() && plct->getBX()==6) n_alct_all++;
1268 for (std::vector <CSCALCTDigi>::const_iterator plct = fourBest.begin(); plct != fourBest.end(); plct++)
1269 if (plct->isValid() && plct->getBX()==6) n_alct++;
1272 <<
" all "<<n_alct_all<<
" found "<<n_alct;
1277 for (std::vector<CSCALCTDigi>::const_iterator plct = fourBest.begin();
1278 plct != fourBest.end(); plct++) {
1280 int bx = plct->getBX();
1283 <<
"+++ Bx of ALCT candidate, " << bx <<
", exceeds max allowed, " 1308 if (first_bx < CSCConstants::MAX_ALCT_TBINS) {
1345 const std::vector<CSCALCTDigi>& all_alcts) {
1351 LogTrace(
"CSCAnodeLCTProcessor") << all_alcts.size() <<
1352 " ALCTs at the input of best-track selector: ";
1353 for (std::vector <CSCALCTDigi>::const_iterator plct = all_alcts.begin();
1354 plct != all_alcts.end(); plct++) {
1355 if (!plct->isValid())
continue;
1356 LogTrace(
"CSCAnodeLCTProcessor") << (*plct);
1361 for (std::vector <CSCALCTDigi>::const_iterator plct = all_alcts.begin();
1362 plct != all_alcts.end(); plct++) {
1363 if (!plct->isValid())
continue;
1372 int bx = (*plct).
getBX();
1373 int accel = (*plct).getAccelerator();
1374 int qual = (*plct).getQuality();
1375 int wire = (*plct).getKeyWG();
1376 bool vA = tA[bx][accel].
isValid();
1377 bool vB = tB[bx][accel].
isValid();
1382 if (!vA || qual > qA || (qual == qA && wire > wA)) {
1383 tA[bx][accel] = *plct;
1385 if (!vB || qual > qB || (qual == qB && wire < wB)) {
1386 tB[bx][accel] = *plct;
1391 for (
int accel = 0; accel <= 1; accel++) {
1393 if (tA[bx][accel].isValid()) {
1395 LogTrace(
"CSCAnodeLCTProcessor") <<
"tA: " << tA[bx][accel];
1396 LogTrace(
"CSCAnodeLCTProcessor") <<
"tB: " << tB[bx][accel];
1398 bestALCTs[bx][accel] = tA[bx][accel];
1401 if (tA[bx][accel] != tB[bx][accel] &&
1402 tA[bx][accel].getQuality() == tB[bx][accel].getQuality()) {
1403 secondALCTs[bx][accel] = tB[bx][accel];
1410 for (std::vector <CSCALCTDigi>::const_iterator plct =
1411 all_alcts.begin(); plct != all_alcts.end(); plct++) {
1412 if ((*plct).isValid() &&
1413 (*plct).getAccelerator() == accel && (*plct).getBX() == bx &&
1414 (*plct).getQuality() < bestALCTs[bx][accel].
getQuality() &&
1415 (*plct).getQuality() >= secondALCTs[bx][accel].
getQuality() &&
1416 (*plct).getKeyWG() >= secondALCTs[bx][accel].
getKeyWG()) {
1417 secondALCTs[bx][accel] = *plct;
1426 std::vector<CSCALCTDigi> fourBest;
1428 for (
int i = 0;
i < 2;
i++) {
1429 if (bestALCTs[bx][
i].isValid()) fourBest.push_back(bestALCTs[bx][
i]);
1431 for (
int i = 0;
i < 2;
i++) {
1432 if (secondALCTs[bx][
i].isValid()) fourBest.push_back(secondALCTs[bx][
i]);
1437 LogTrace(
"CSCAnodeLCTProcessor") << fourBest.size() <<
" ALCTs selected: ";
1438 for (std::vector<CSCALCTDigi>::const_iterator plct = fourBest.begin();
1439 plct != fourBest.end(); plct++) {
1440 LogTrace(
"CSCAnodeLCTProcessor") << (*plct);
1452 bool returnValue =
false;
1458 if (lhsALCT.
getBX() < rhsALCT.
getBX()) {returnValue =
true;}
1459 if (lhsALCT.
getBX() != rhsALCT.
getBX()) {
return returnValue;}
1464 if (qual1 > qual2) {returnValue =
true;}
1468 else if (qual1 == qual2 &&
1472 {returnValue =
true;}
1488 if (
quality[key_wire][1] > 0) {
1491 <<
"trigMode(): collision track " << key_wire <<
" disabled" <<
"\n";
1496 if (
quality[key_wire][0] > 0) {
1499 <<
"trigMode(): accelerator track " << key_wire <<
" disabled" <<
"\n";
1508 <<
"trigMode(): collision track " << key_wire <<
" disabled" <<
"\n";
1518 int promotionBit = 1 << 2;
1524 if (
quality[key_wire][0] > 0) {
1527 <<
"alctMode(): accelerator track " << key_wire <<
" ignored" <<
"\n";
1532 if (
quality[key_wire][1] > 0) {
1533 quality[key_wire][1] += promotionBit;
1535 <<
"alctMode(): collision track " << key_wire <<
" promoted" <<
"\n";
1540 if (
quality[key_wire][0] > 0) {
1541 quality[key_wire][0] += promotionBit;
1543 <<
"alctMode(): accelerator track " << key_wire <<
" promoted"<<
"\n";
1548 if (
quality[key_wire][1] > 0) {
1551 <<
"alctMode(): collision track " << key_wire <<
" ignored" <<
"\n";
1559 std::ostringstream strm;
1561 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1562 strm <<
"+ ALCT configuration parameters: +\n";
1563 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1564 strm <<
" fifo_tbins [total number of time bins in DAQ readout] = " 1566 strm <<
" fifo_pretrig [start time of anode raw hits in DAQ readout] = " 1568 strm <<
" drift_delay [drift delay after pre-trigger, in 25 ns bins] = " 1570 strm <<
" nplanes_hit_pretrig [min. number of layers hit for pre-trigger] = " 1572 strm <<
" nplanes_hit_pattern [min. number of layers hit for trigger] = " 1574 strm <<
" nplanes_hit_accel_pretrig [min. number of layers hit for accel." 1576 strm <<
" nplanes_hit_accel_pattern [min. number of layers hit for accel." 1578 strm <<
" trig_mode [enabling/disabling collision/accelerator tracks] = " 1580 strm <<
" accel_mode [preference to collision/accelerator tracks] = " 1582 strm <<
" l1a_window_width [L1Accept window width, in 25 ns bins] = " 1584 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1585 LogDebug(
"CSCAnodeLCTProcessor") << strm.str();
1592 <<
"ME" << ((
theEndcap == 1) ?
"+" :
"-")
1596 std::ostringstream strstrm;
1598 if (i_wire%10 == 0) {
1599 if (i_wire < 100) strstrm << i_wire/10;
1600 else strstrm << (i_wire-100)/10;
1602 else strstrm <<
" ";
1606 strstrm << i_wire%10;
1612 std::vector<int> bx_times =
wire[i_layer][i_wire];
1613 strstrm << std::hex << bx_times[0] <<
std::dec;
1620 LogTrace(
"CSCAnodeLCTProcessor") << strstrm.str();
1626 std::vector<CSCALCTDigi> tmpV;
1631 const int lct_bins =
1634 static std::atomic<int> late_tbins{
early_tbins + lct_bins};
1636 static std::atomic<int> ifois{0};
1646 <<
"; in-time ALCTs are not getting read-out!!! +++" <<
"\n";
1651 <<
"+++ Allowed range of time bins, [0-" << late_tbins
1653 <<
"+++ Set late_tbins to max allowed +++\n";
1654 late_tbins = CSCConstants::MAX_ALCT_TBINS-1;
1661 std::vector<CSCALCTDigi> all_alcts =
getALCTs();
1662 for (std::vector <CSCALCTDigi>::const_iterator plct = all_alcts.begin();
1663 plct != all_alcts.end(); plct++) {
1664 if (!plct->isValid())
continue;
1666 int bx = (*plct).getBX();
1670 <<
" Do not report ALCT on keywire " << plct->getKeyWG()
1671 <<
": found at bx " << bx <<
", whereas the earliest allowed bx is " 1677 if (bx > late_tbins) {
1679 <<
" Do not report ALCT on keywire " << plct->getKeyWG()
1680 <<
": found at bx " << bx <<
", whereas the latest allowed bx is " 1685 tmpV.push_back(*plct);
1694 for (
auto&
p : tmpV){
1702 std::vector<CSCALCTDigi> tmpV;
1717 std::ostringstream strstrm_header;
1719 <<
"\n" <<
"Pattern: " << i_pattern <<
" Key wire: " << key_wire;
1720 for (
int i = 1;
i <= 32;
i++) {
1721 strstrm_header << ((32-
i)%10);
1723 LogTrace(
"CSCAnodeLCTProcessor") << strstrm_header.str();
1726 std::ostringstream strstrm_pulse;
1730 for (
int i = 1;
i <= 32;
i++) {
1731 strstrm_pulse << ((pulse[this_layer][this_wire]>>(32-
i)) & 1);
1734 << strstrm_pulse.str() <<
" on layer " << this_layer;
1739 <<
"-------------------------------------------";
static const int time_weights[CSCConstants::MAX_WIRES_IN_PATTERN]
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
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
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)
static const int pattern_mask_slim[CSCConstants::NUM_ALCT_PATTERNS][CSCConstants::MAX_WIRES_IN_PATTERN]
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