154 unsigned sector,
unsigned subsector,
158 theEndcap(endcap), theStation(station), theSector(sector),
159 theSubsector(subsector), theTrigChamber(chamber) {
160 static std::atomic<bool> config_dumped{
false};
167 conf.
getParameter<
unsigned int>(
"alctNplanesHitPretrig");
169 conf.
getParameter<
unsigned int>(
"alctNplanesHitPattern");
171 conf.
getParameter<
unsigned int>(
"alctNplanesHitAccelPretrig");
173 conf.
getParameter<
unsigned int>(
"alctNplanesHitAccelPattern");
209 if ((infoV > 0 || isSLHC) && !config_dumped) {
212 config_dumped =
true;
248 static std::atomic<bool> config_dumped{
false};
261 if (!config_dumped) {
264 config_dumped =
true;
311 static std::atomic<bool> config_dumped{
false};
326 if (!config_dumped) {
329 config_dumped =
true;
337 static const unsigned int max_fifo_tbins = 1 << 5;
338 static const unsigned int max_fifo_pretrig = 1 << 5;
339 static const unsigned int max_drift_delay = 1 << 2;
340 static const unsigned int max_nplanes_hit_pretrig = 1 << 3;
341 static const unsigned int max_nplanes_hit_pattern = 1 << 3;
342 static const unsigned int max_nplanes_hit_accel_pretrig = 1 << 3;
343 static const unsigned int max_nplanes_hit_accel_pattern = 1 << 3;
344 static const unsigned int max_trig_mode = 1 << 2;
345 static const unsigned int max_accel_mode = 1 << 2;
352 <<
", exceeds max allowed, " << max_fifo_tbins-1 <<
" +++\n" 353 <<
"+++ Try to proceed with the default value, fifo_tbins=" 360 <<
", exceeds max allowed, " << max_fifo_pretrig-1 <<
" +++\n" 361 <<
"+++ Try to proceed with the default value, fifo_pretrig=" 368 <<
", exceeds max allowed, " << max_drift_delay-1 <<
" +++\n" 369 <<
"+++ Try to proceed with the default value, drift_delay=" 376 <<
", exceeds max allowed, " << max_nplanes_hit_pretrig-1 <<
" +++\n" 377 <<
"+++ Try to proceed with the default value, nplanes_hit_pretrig=" 384 <<
", exceeds max allowed, " << max_nplanes_hit_pattern-1 <<
" +++\n" 385 <<
"+++ Try to proceed with the default value, nplanes_hit_pattern=" 391 <<
"+++ Value of nplanes_hit_accel_pretrig, " 393 << max_nplanes_hit_accel_pretrig-1 <<
" +++\n" 394 <<
"+++ Try to proceed with the default value, " 400 <<
"+++ Value of nplanes_hit_accel_pattern, " 402 << max_nplanes_hit_accel_pattern-1 <<
" +++\n" 403 <<
"+++ Try to proceed with the default value, " 409 <<
"+++ Value of trig_mode, " <<
trig_mode 410 <<
", exceeds max allowed, " << max_trig_mode-1 <<
" +++\n" 411 <<
"+++ Try to proceed with the default value, trig_mode=" 418 <<
", exceeds max allowed, " << max_accel_mode-1 <<
" +++\n" 419 <<
"+++ Try to proceed with the default value, accel_mode=" 426 <<
", exceeds max allowed, " << max_l1a_window_width-1 <<
" +++\n" 427 <<
"+++ Try to proceed with the default value, l1a_window_width=" 449 std::vector<CSCALCTDigi>
454 static std::atomic<bool> config_dumped{
false};
458 config_dumped =
true;
479 <<
"+++ CSC geometry looks garbled; no emulation possible +++\n";
488 <<
" is not defined in current geometry! +++\n" 489 <<
"+++ CSC geometry looks garbled; no emulation possible +++\n";
500 <<
"; ALCT emulation skipped! +++";
501 std::vector<CSCALCTDigi> emptyV;
517 const unsigned int min_layers =
525 unsigned int layersHit = 0;
528 if (!wire[i_layer][i_wire].
empty()) {layersHit++;
break;}
531 if (layersHit >= min_layers)
run(wire);
535 std::vector<CSCALCTDigi> tmpV =
getALCTs();
554 if (!chamber_empty) {
556 unsigned int start_bx = 0;
558 while (start_bx < stop_bx) {
593 digiV[i_layer].clear();
608 <<
"found " <<
digiV[i_layer].size()
609 <<
" wire digi(s) in layer " << i_layer <<
" of " << detid.
chamberName()
612 for (std::vector<CSCWireDigi>::iterator pld =
digiV[i_layer].
begin();
613 pld !=
digiV[i_layer].end(); pld++) {
614 LogTrace(
"CSCAnodeLCTProcessor") <<
" " << (*pld);
627 digiIt != rwired.second; ++digiIt) {
628 digiV[
id.layer()-1].push_back(*digiIt);
639 for (std::vector<CSCWireDigi>::iterator pld =
digiV[i_layer].
begin();
640 pld !=
digiV[i_layer].end(); pld++) {
641 int i_wire = pld->getWireGroup()-1;
642 std::vector<int> bx_times = pld->getTimeBinsOn();
647 <<
"+++ Found wire digi with wrong wire number = " << i_wire
648 <<
" (max wires = " <<
numWireGroups <<
"); skipping it... +++\n";
658 int last_time = -999;
660 wire[i_layer][i_wire].push_back(0);
661 wire[i_layer][i_wire].push_back(6);
664 for (
unsigned int i = 0;
i < bx_times.size();
i++) {
666 if (
i > 0 && bx_times[
i] == (bx_times[
i-1]+1))
continue;
669 <<
"Digi on layer " << i_layer <<
" wire " << i_wire
670 <<
" at time " << bx_times[
i];
675 if (last_time < 0 || ((bx_times[
i]-last_time) >= 6) ) {
676 wire[i_layer][i_wire].push_back(bx_times[
i]);
677 last_time = bx_times[
i];
682 <<
"+++ Skipping wire digi: wire = " << i_wire
683 <<
" layer = " << i_layer <<
", bx = " << bx_times[
i] <<
" +++";
698 bool chamber_empty =
true;
699 int i_wire, i_layer, digi_num;
700 const unsigned int bits_in_pulse = 8*
sizeof(
pulse[0][0]);
704 pulse[i_layer][i_wire] = 0;
708 for (
int j = 0; j < 3; j++)
quality[i_wire][j] = -999;
715 std::vector<int> bx_times =
wire[i_layer][i_wire];
716 for (
unsigned int i = 0;
i < bx_times.size();
i++) {
718 if (bx_times[
i] < 0 || bx_times[
i] +
hit_persist >= bits_in_pulse) {
720 <<
"+++ BX time of wire digi (wire = " << i_wire
721 <<
" layer = " << i_layer <<
") bx = " << bx_times[
i]
722 <<
" is not within the range (0-" << bits_in_pulse
723 <<
"] allowed for pulse extension. Skip this digi! +++\n";
728 if (chamber_empty) chamber_empty =
false;
731 for (
unsigned int bx = bx_times[
i];
733 pulse[i_layer][i_wire] =
pulse[i_layer][i_wire] | (1 << bx);
738 <<
"Wire digi: layer " << i_layer
739 <<
" digi #" << ++digi_num <<
" wire group " << i_wire
740 <<
" time " << bx_times[
i];
742 std::ostringstream strstrm;
743 for (
int i = 1;
i <= 32;
i++) {
744 strstrm << ((pulse[i_layer][i_wire]>>(32-
i)) & 1);
746 LogTrace(
"CSCAnodeLCTProcessor") <<
" Pulse: " << strstrm.str();
754 if (
infoV > 1 && !chamber_empty) {
758 return chamber_empty;
766 unsigned int layers_hit;
768 int this_layer, this_wire;
771 const unsigned int nplanes_hit_pretrig_acc =
783 for (
unsigned int bx_time = start_bx; bx_time < stop_bx; bx_time++) {
786 hit_layer[i_layer] =
false;
795 if (((
pulse[this_layer][this_wire] >> bx_time) & 1) == 1) {
797 if (hit_layer[this_layer] ==
false){
798 hit_layer[this_layer] =
true;
804 if (layers_hit >= pretrig_thresh[i_pattern]) {
808 <<
"Pretrigger was satisfied for wire: " << key_wire
809 <<
" pattern: " << i_pattern
810 <<
" bx_time: " << bx_time;
831 unsigned int temp_quality;
832 int this_layer, this_wire, delta_wire;
835 const unsigned int nplanes_hit_pattern_acc =
841 const std::string ptn_label[] = {
"Accelerator",
"CollisionA",
"CollisionB"};
846 hit_layer[i_layer] =
false;
848 double num_pattern_hits=0., times_sum=0.;
849 std::multiset<int> mset_for_median;
850 mset_for_median.clear();
856 this_wire = delta_wire + key_wire;
861 if ( ( (
pulse[this_layer][this_wire] >>
866 if (hit_layer[this_layer] ==
false){
869 hit_layer[this_layer] =
true;
872 <<
"bx_time: " <<
first_bx[key_wire]
873 <<
" pattern: " << i_pattern <<
" keywire: " << key_wire
874 <<
" layer: " << this_layer
875 <<
" quality: " << temp_quality;
879 if (
abs(delta_wire)<2) {
884 if (((
pulse[this_layer][this_wire] >> (first_bx_layer-1)) & 1) == 1) first_bx_layer--;
887 times_sum += (double)first_bx_layer;
888 num_pattern_hits += 1.;
889 mset_for_median.insert(first_bx_layer);
892 <<
" 1st bx in layer: "<<first_bx_layer
893 <<
" sum bx: "<<times_sum
894 <<
" #pat. hits: "<<num_pattern_hits;
902 const int sz = mset_for_median.size();
904 std::multiset<int>::iterator im = mset_for_median.begin();
905 if (sz > 1) std::advance(im,sz/2-1);
910 #if defined(EDM_ML_DEBUG) 913 for (im = mset_for_median.begin(); im != mset_for_median.end(); im++) {
920 if (temp_quality >= pattern_thresh[i_pattern]) {
928 else if (temp_quality > 3) Q = temp_quality - 3;
932 if (i_pattern == 0) {
934 quality[key_wire][0] = temp_quality;
938 if (static_cast<int>(temp_quality) >
quality[key_wire][1]) {
939 quality[key_wire][1] = temp_quality;
940 quality[key_wire][2] = i_pattern-1;
945 <<
"Pattern found; keywire: " << key_wire
946 <<
" type: " << ptn_label[i_pattern]
947 <<
" quality: " << temp_quality <<
"\n";
954 <<
"Collision Pattern A is chosen" <<
"\n";
955 else if (
quality[key_wire][2] == 1)
957 <<
"Collision Pattern B is chosen" <<
"\n";
972 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
973 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
974 ghost_cleared[key_wire][i_pattern] = 0;
977 int qual_this =
quality[key_wire][i_pattern];
981 int qual_prev = (key_wire > 0) ?
quality[key_wire-1][i_pattern] : 0;
991 if (qual_prev >= qual_this) ghost_cleared[key_wire][i_pattern] = 1;
1000 (qual_prev > qual_this) )
1001 ghost_cleared[key_wire][i_pattern] = 1;
1007 if (ghost_cleared[key_wire][i_pattern] == 1) {
1009 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
1010 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1011 <<
" by wire " << key_wire-1<<
" q="<<qual_prev;
1016 (key_wire < numWireGroups-1) ?
quality[key_wire+1][i_pattern] : 0;
1017 if (qual_next > 0) {
1021 if (qual_next > qual_this) ghost_cleared[key_wire][i_pattern] = 1;
1030 (qual_next >= qual_this) )
1031 ghost_cleared[key_wire][i_pattern] = 1;
1034 if (ghost_cleared[key_wire][i_pattern] == 1) {
1036 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
1037 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1038 <<
" by wire " << key_wire+1<<
" q="<<qual_next;
1047 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
1048 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
1049 if (ghost_cleared[key_wire][i_pattern] > 0) {
1050 clear(key_wire, i_pattern);
1068 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
1069 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
1070 ghost_cleared[key_wire][i_pattern] = 0;
1073 int qual_this =
quality[key_wire][i_pattern];
1074 if (qual_this > 0) {
1079 int qual_prev = (key_wire > 0) ?
quality[key_wire-1][i_pattern] : 0;
1080 if (qual_prev > 0) {
1086 if (
runME21ILT_ or runME3141ILT_) qual_prev = (qual_prev & 0x03);
1095 if (qual_prev > qual_this) ghost_cleared[key_wire][i_pattern] = 1;
1104 (qual_prev > qual_this) )
1105 ghost_cleared[key_wire][i_pattern] = 1;
1111 if (ghost_cleared[key_wire][i_pattern] == 1) {
1113 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
1114 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1115 <<
" by wire " << key_wire-1<<
" q="<<qual_prev<<
" dt="<<
dt;
1121 (key_wire < numWireGroups-1) ?
quality[key_wire+1][i_pattern] : 0;
1122 if (qual_next > 0) {
1129 qual_next = (qual_next & 0x03);
1132 if (qual_next >= qual_this) ghost_cleared[key_wire][i_pattern] = 1;
1141 (qual_next >= qual_this) )
1142 ghost_cleared[key_wire][i_pattern] = 1;
1145 if (ghost_cleared[key_wire][i_pattern] == 1) {
1147 << ((i_pattern == 0) ?
"Accelerator" :
"Collision")
1148 <<
" pattern ghost cancelled on key_wire " << key_wire <<
" q="<<qual_this
1149 <<
" by wire " << key_wire+1<<
" q="<<qual_next<<
" dt="<<
dt;
1158 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
1159 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
1160 if (ghost_cleared[key_wire][i_pattern] > 0) {
1161 clear(key_wire, i_pattern);
1171 std::vector<CSCALCTDigi> lct_list;
1181 if (
infoV>1)
LogTrace(
"CSCAnodeLCTProcessor")<<
" bx="<<bx<<
" fbx="<<fbx;
1186 if (
infoV>1)
LogTrace(
"CSCAnodeLCTProcessor")<<
" bx="<<bx<<
" fbx="<<fbx;
1189 int qual = (
quality[i_wire][0] & 0x03);
1192 lct_list.push_back(lct_info);
1197 int qual = (
quality[i_wire][1] & 0x03);
1200 lct_list.push_back(lct_info);
1201 if (
infoV>1)
LogTrace(
"CSCAnodeLCTProcessor")<<
" got lct_info: "<<lct_info;
1214 int n_alct_all=0, n_alct=0;
1215 for (std::vector <CSCALCTDigi>::const_iterator plct = lct_list.begin(); plct != lct_list.end(); plct++)
1216 if (plct->isValid() && plct->getBX()==6) n_alct_all++;
1217 for (std::vector <CSCALCTDigi>::const_iterator plct = fourBest.begin(); plct != fourBest.end(); plct++)
1218 if (plct->isValid() && plct->getBX()==6) n_alct++;
1221 <<
" all "<<n_alct_all<<
" found "<<n_alct;
1226 for (std::vector<CSCALCTDigi>::const_iterator plct = fourBest.begin();
1227 plct != fourBest.end(); plct++) {
1229 int bx = plct->getBX();
1232 <<
"+++ Bx of ALCT candidate, " << bx <<
", exceeds max allowed, " 1273 const std::vector<CSCALCTDigi>& all_alcts) {
1279 LogTrace(
"CSCAnodeLCTProcessor") << all_alcts.size() <<
1280 " ALCTs at the input of best-track selector: ";
1281 for (std::vector <CSCALCTDigi>::const_iterator plct = all_alcts.begin();
1282 plct != all_alcts.end(); plct++) {
1283 if (!plct->isValid())
continue;
1284 LogTrace(
"CSCAnodeLCTProcessor") << (*plct);
1289 for (std::vector <CSCALCTDigi>::const_iterator plct = all_alcts.begin();
1290 plct != all_alcts.end(); plct++) {
1291 if (!plct->isValid())
continue;
1300 int bx = (*plct).
getBX();
1301 int accel = (*plct).getAccelerator();
1302 int qual = (*plct).getQuality();
1303 int wire = (*plct).getKeyWG();
1304 bool vA = tA[bx][accel].
isValid();
1305 bool vB = tB[bx][accel].
isValid();
1310 if (!vA || qual > qA || (qual == qA && wire > wA)) {
1311 tA[bx][accel] = *plct;
1313 if (!vB || qual > qB || (qual == qB && wire < wB)) {
1314 tB[bx][accel] = *plct;
1319 for (
int accel = 0; accel <= 1; accel++) {
1321 if (tA[bx][accel].isValid()) {
1323 LogTrace(
"CSCAnodeLCTProcessor") <<
"tA: " << tA[bx][accel];
1324 LogTrace(
"CSCAnodeLCTProcessor") <<
"tB: " << tB[bx][accel];
1326 bestALCTs[bx][accel] = tA[bx][accel];
1329 if (tA[bx][accel] != tB[bx][accel] &&
1330 tA[bx][accel].getQuality() == tB[bx][accel].getQuality()) {
1331 secondALCTs[bx][accel] = tB[bx][accel];
1338 for (std::vector <CSCALCTDigi>::const_iterator plct =
1339 all_alcts.begin(); plct != all_alcts.end(); plct++) {
1340 if ((*plct).isValid() &&
1341 (*plct).getAccelerator() == accel && (*plct).getBX() == bx &&
1342 (*plct).getQuality() < bestALCTs[bx][accel].
getQuality() &&
1343 (*plct).getQuality() >= secondALCTs[bx][accel].
getQuality() &&
1344 (*plct).getKeyWG() >= secondALCTs[bx][accel].
getKeyWG()) {
1345 secondALCTs[bx][accel] = *plct;
1354 std::vector<CSCALCTDigi> fourBest;
1356 for (
int i = 0;
i < 2;
i++) {
1357 if (bestALCTs[bx][
i].isValid()) fourBest.push_back(bestALCTs[bx][
i]);
1359 for (
int i = 0;
i < 2;
i++) {
1360 if (secondALCTs[bx][
i].isValid()) fourBest.push_back(secondALCTs[bx][
i]);
1365 LogTrace(
"CSCAnodeLCTProcessor") << fourBest.size() <<
" ALCTs selected: ";
1366 for (std::vector<CSCALCTDigi>::const_iterator plct = fourBest.begin();
1367 plct != fourBest.end(); plct++) {
1368 LogTrace(
"CSCAnodeLCTProcessor") << (*plct);
1380 bool returnValue =
false;
1386 if (lhsALCT.
getBX() < rhsALCT.
getBX()) {returnValue =
true;}
1387 if (lhsALCT.
getBX() != rhsALCT.
getBX()) {
return returnValue;}
1392 if (qual1 > qual2) {returnValue =
true;}
1396 else if (qual1 == qual2 &&
1400 {returnValue =
true;}
1416 if (
quality[key_wire][1] > 0) {
1419 <<
"trigMode(): collision track " << key_wire <<
" disabled" <<
"\n";
1424 if (
quality[key_wire][0] > 0) {
1427 <<
"trigMode(): accelerator track " << key_wire <<
" disabled" <<
"\n";
1436 <<
"trigMode(): collision track " << key_wire <<
" disabled" <<
"\n";
1446 int promotionBit = 1 << 2;
1452 if (
quality[key_wire][0] > 0) {
1455 <<
"alctMode(): accelerator track " << key_wire <<
" ignored" <<
"\n";
1460 if (
quality[key_wire][1] > 0) {
1461 quality[key_wire][1] += promotionBit;
1463 <<
"alctMode(): collision track " << key_wire <<
" promoted" <<
"\n";
1468 if (
quality[key_wire][0] > 0) {
1469 quality[key_wire][0] += promotionBit;
1471 <<
"alctMode(): accelerator track " << key_wire <<
" promoted"<<
"\n";
1476 if (
quality[key_wire][1] > 0) {
1479 <<
"alctMode(): collision track " << key_wire <<
" ignored" <<
"\n";
1487 std::ostringstream strm;
1489 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1490 strm <<
"+ ALCT configuration parameters: +\n";
1491 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1492 strm <<
" fifo_tbins [total number of time bins in DAQ readout] = " 1494 strm <<
" fifo_pretrig [start time of anode raw hits in DAQ readout] = " 1496 strm <<
" drift_delay [drift delay after pre-trigger, in 25 ns bins] = " 1498 strm <<
" nplanes_hit_pretrig [min. number of layers hit for pre-trigger] = " 1500 strm <<
" nplanes_hit_pattern [min. number of layers hit for trigger] = " 1502 strm <<
" nplanes_hit_accel_pretrig [min. number of layers hit for accel." 1504 strm <<
" nplanes_hit_accel_pattern [min. number of layers hit for accel." 1506 strm <<
" trig_mode [enabling/disabling collision/accelerator tracks] = " 1508 strm <<
" accel_mode [preference to collision/accelerator tracks] = " 1510 strm <<
" l1a_window_width [L1Accept window width, in 25 ns bins] = " 1512 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1513 LogDebug(
"CSCAnodeLCTProcessor") << strm.str();
1523 std::ostringstream strstrm;
1525 if (i_wire%10 == 0) {
1526 if (i_wire < 100) strstrm << i_wire/10;
1527 else strstrm << (i_wire-100)/10;
1529 else strstrm <<
" ";
1533 strstrm << i_wire%10;
1539 std::vector<int> bx_times =
wire[i_layer][i_wire];
1540 strstrm << std::hex << bx_times[0] <<
std::dec;
1547 LogTrace(
"CSCAnodeLCTProcessor") << strstrm.str();
1553 std::vector<CSCALCTDigi> tmpV;
1558 const int lct_bins =
1561 static std::atomic<int> late_tbins{
early_tbins + lct_bins};
1563 static std::atomic<int> ifois{0};
1573 <<
"; in-time ALCTs are not getting read-out!!! +++" <<
"\n";
1578 <<
"+++ Allowed range of time bins, [0-" << late_tbins
1580 <<
"+++ Set late_tbins to max allowed +++\n";
1581 late_tbins = CSCConstants::MAX_ALCT_TBINS-1;
1588 std::vector<CSCALCTDigi> all_alcts =
getALCTs();
1589 for (std::vector <CSCALCTDigi>::const_iterator plct = all_alcts.begin();
1590 plct != all_alcts.end(); plct++) {
1591 if (!plct->isValid())
continue;
1593 int bx = (*plct).getBX();
1597 <<
" Do not report ALCT on keywire " << plct->getKeyWG()
1598 <<
": found at bx " << bx <<
", whereas the earliest allowed bx is " 1604 if (bx > late_tbins) {
1606 <<
" Do not report ALCT on keywire " << plct->getKeyWG()
1607 <<
": found at bx " << bx <<
", whereas the latest allowed bx is " 1612 tmpV.push_back(*plct);
1621 for (
auto&
p : tmpV){
1629 std::vector<CSCALCTDigi> tmpV;
1644 std::ostringstream strstrm_header;
1646 <<
"\n" <<
"Pattern: " << i_pattern <<
" Key wire: " << key_wire;
1647 for (
int i = 1;
i <= 32;
i++) {
1648 strstrm_header << ((32-
i)%10);
1650 LogTrace(
"CSCAnodeLCTProcessor") << strstrm_header.str();
1653 std::ostringstream strstrm_pulse;
1657 for (
int i = 1;
i <= 32;
i++) {
1658 strstrm_pulse << ((pulse[this_layer][this_wire]>>(32-
i)) & 1);
1661 << strstrm_pulse.str() <<
" on layer " << this_layer;
1666 <<
"-------------------------------------------";
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
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