26 :
CSCBaseboard(endcap, station, sector, subsector, chamber, conf) {
27 static std::atomic<bool> config_dumped{
false};
65 if ((infoV > 0 || (
isSLHC_)) && !config_dumped) {
86 static std::atomic<bool> config_dumped{
false};
136 static std::atomic<bool> config_dumped{
false};
151 if (!config_dumped) {
154 config_dumped =
true;
162 static const unsigned int max_fifo_tbins = 1 << 5;
163 static const unsigned int max_fifo_pretrig = 1 << 5;
164 static const unsigned int max_drift_delay = 1 << 2;
165 static const unsigned int max_nplanes_hit_pretrig = 1 << 3;
166 static const unsigned int max_nplanes_hit_pattern = 1 << 3;
167 static const unsigned int max_nplanes_hit_accel_pretrig = 1 << 3;
168 static const unsigned int max_nplanes_hit_accel_pattern = 1 << 3;
169 static const unsigned int max_trig_mode = 1 << 2;
170 static const unsigned int max_accel_mode = 1 << 2;
177 <<
"+++ Value of fifo_tbins, " <<
fifo_tbins <<
", exceeds max allowed, " << max_fifo_tbins - 1 <<
" +++\n" 178 <<
"+++ Try to proceed with the default value, fifo_tbins=" <<
def_fifo_tbins <<
" +++\n";
184 <<
"+++ Value of fifo_pretrig, " <<
fifo_pretrig <<
", exceeds max allowed, " << max_fifo_pretrig - 1
186 <<
"+++ Try to proceed with the default value, fifo_pretrig=" <<
def_fifo_pretrig <<
" +++\n";
192 <<
"+++ Value of drift_delay, " <<
drift_delay <<
", exceeds max allowed, " << max_drift_delay - 1 <<
" +++\n" 193 <<
"+++ Try to proceed with the default value, drift_delay=" <<
def_drift_delay <<
" +++\n";
199 <<
"+++ Value of nplanes_hit_pretrig, " <<
nplanes_hit_pretrig <<
", exceeds max allowed, " 200 << max_nplanes_hit_pretrig - 1 <<
" +++\n" 201 <<
"+++ Try to proceed with the default value, nplanes_hit_pretrig=" <<
nplanes_hit_pretrig <<
" +++\n";
207 <<
"+++ Value of nplanes_hit_pattern, " <<
nplanes_hit_pattern <<
", exceeds max allowed, " 208 << max_nplanes_hit_pattern - 1 <<
" +++\n" 209 <<
"+++ Try to proceed with the default value, nplanes_hit_pattern=" <<
nplanes_hit_pattern <<
" +++\n";
216 << max_nplanes_hit_accel_pretrig - 1 <<
" +++\n" 217 <<
"+++ Try to proceed with the default value, " 225 << max_nplanes_hit_accel_pattern - 1 <<
" +++\n" 226 <<
"+++ Try to proceed with the default value, " 233 <<
"+++ Value of trig_mode, " <<
trig_mode <<
", exceeds max allowed, " << max_trig_mode - 1 <<
" +++\n" 234 <<
"+++ Try to proceed with the default value, trig_mode=" <<
trig_mode <<
" +++\n";
240 <<
"+++ Value of accel_mode, " <<
accel_mode <<
", exceeds max allowed, " << max_accel_mode - 1 <<
" +++\n" 241 <<
"+++ Try to proceed with the default value, accel_mode=" <<
accel_mode <<
" +++\n";
247 <<
"+++ Value of l1a_window_width, " <<
l1a_window_width <<
", exceeds max allowed, " 248 << max_l1a_window_width - 1 <<
" +++\n" 249 <<
"+++ Try to proceed with the default value, l1a_window_width=" <<
l1a_window_width <<
" +++\n";
273 static std::atomic<bool> config_dumped{
false};
277 config_dumped =
true;
291 <<
"+++ CSC geometry looks garbled; no emulation possible +++\n";
299 <<
" is not defined in current geometry! +++\n" 300 <<
"+++ CSC geometry looks garbled; no emulation possible +++\n";
310 <<
" numWireGroups = " <<
numWireGroups <<
"; ALCT emulation skipped! +++";
311 std::vector<CSCALCTDigi> emptyV;
326 const unsigned int min_layers =
331 unsigned int layersHit = 0;
334 if (!wire[i_layer][i_wire].
empty()) {
340 if (layersHit >= min_layers)
358 if (!chamber_empty) {
360 unsigned int start_bx = 0;
362 while (start_bx < stop_bx) {
368 int ghost_cleared[2] = {0, 0};
377 if (
quality[i_wire][0] > 0 and bx < CSCConstants::MAX_ALCT_TBINS) {
378 int valid = (ghost_cleared[0] == 0) ? 1 : 0;
381 LogTrace(
"CSCAnodeLCTProcessor") <<
"Add one ALCT to list " <<
lct_list.back();
385 if (
quality[i_wire][1] > 0 and bx < CSCConstants::MAX_ALCT_TBINS) {
386 int valid = (ghost_cleared[1] == 0) ? 1 : 0;
389 LogTrace(
"CSCAnodeLCTProcessor") <<
"Add one ALCT to list " <<
lct_list.back();
421 digiV[i_layer].clear();
435 LogTrace(
"CSCAnodeLCTProcessor") <<
"found " <<
digiV[i_layer].size() <<
" wire digi(s) in layer " << i_layer
438 for (
const auto& wd :
digiV[i_layer]) {
439 LogTrace(
"CSCAnodeLCTProcessor") <<
" " << wd;
451 digiV[
id.layer() - 1].push_back(*digiIt);
460 for (
const auto& wd :
digiV[i_layer]) {
461 int i_wire = wd.getWireGroup() - 1;
462 std::vector<int> bx_times = wd.getTimeBinsOn();
468 <<
"+++ Found wire digi with wrong wire number = " << i_wire <<
" (max wires = " <<
numWireGroups 469 <<
"); skipping it... +++\n";
479 int last_time = -999;
481 wire[i_layer][i_wire].push_back(0);
482 wire[i_layer][i_wire].push_back(6);
484 for (
unsigned int i = 0;
i < bx_times.size();
i++) {
486 if (
i > 0 && bx_times[
i] == (bx_times[
i - 1] + 1))
491 <<
"Digi on layer " << i_layer <<
" wire " << i_wire <<
" at time " << bx_times[
i];
496 if (last_time < 0 || ((bx_times[
i] - last_time) >= 6)) {
497 wire[i_layer][i_wire].push_back(bx_times[
i]);
498 last_time = bx_times[
i];
502 LogTrace(
"CSCAnodeLCTProcessor") <<
"+++ Skipping wire digi: wire = " << i_wire <<
" layer = " << i_layer
503 <<
", bx = " << bx_times[
i] <<
" +++";
513 bool chamber_empty =
true;
514 int i_wire, i_layer, digi_num;
515 const unsigned int bits_in_pulse = 8 *
sizeof(
pulse[0][0]);
519 pulse[i_layer][i_wire] = 0;
523 for (
int j = 0;
j < 3;
j++)
530 if (!wire[i_layer][i_wire].
empty()) {
531 std::vector<int> bx_times = wire[i_layer][i_wire];
532 for (
unsigned int i = 0;
i < bx_times.size();
i++) {
534 if (bx_times[
i] < 0 || bx_times[
i] +
hit_persist >= bits_in_pulse) {
537 <<
"+++ BX time of wire digi (wire = " << i_wire <<
" layer = " << i_layer <<
") bx = " << bx_times[
i]
538 <<
" is not within the range (0-" << bits_in_pulse
539 <<
"] allowed for pulse extension. Skip this digi! +++\n";
545 chamber_empty =
false;
549 pulse[i_layer][i_wire] =
pulse[i_layer][i_wire] | (1 <<
bx);
553 LogTrace(
"CSCAnodeLCTProcessor") <<
"Wire digi: layer " << i_layer <<
" digi #" << ++digi_num
554 <<
" wire group " << i_wire <<
" time " << bx_times[
i];
556 std::ostringstream strstrm;
557 for (
int i = 1;
i <= 32;
i++) {
558 strstrm << ((pulse[i_layer][i_wire] >> (32 -
i)) & 1);
560 LogTrace(
"CSCAnodeLCTProcessor") <<
" Pulse: " << strstrm.str();
568 if (
infoV > 1 && !chamber_empty) {
572 return chamber_empty;
576 int nPreTriggers = 0;
578 unsigned int layers_hit;
580 int this_layer, this_wire;
583 const unsigned int nplanes_hit_pretrig_acc =
593 for (
unsigned int bx_time = start_bx; bx_time < stop_bx; bx_time++) {
596 hit_layer[i_layer] =
false;
605 if (((
pulse[this_layer][this_wire] >> bx_time) & 1) == 1) {
607 if (hit_layer[this_layer] ==
false) {
608 hit_layer[this_layer] =
true;
614 if (layers_hit >= pretrig_thresh[i_pattern]) {
617 LogTrace(
"CSCAnodeLCTProcessor") <<
"Pretrigger was satisfied for wire: " << key_wire
618 <<
" pattern: " << i_pattern <<
" bx_time: " << bx_time;
639 unsigned int temp_quality;
640 int this_layer, this_wire, delta_wire;
643 const unsigned int nplanes_hit_pattern_acc =
647 const std::string ptn_label[] = {
"Accelerator",
"CollisionA",
"CollisionB"};
652 hit_layer[i_layer] =
false;
654 double num_pattern_hits = 0., times_sum = 0.;
655 std::multiset<int> mset_for_median;
656 mset_for_median.clear();
662 this_wire = delta_wire + key_wire;
669 if (hit_layer[this_layer] ==
false) {
672 hit_layer[this_layer] =
true;
675 <<
"bx_time: " <<
first_bx[key_wire] <<
" pattern: " << i_pattern <<
" keywire: " << key_wire
676 <<
" layer: " << this_layer <<
" quality: " << temp_quality;
680 if (
abs(delta_wire) < 2) {
684 for (
unsigned int dbx = 0; dbx <
hit_persist; dbx++) {
685 if (((
pulse[this_layer][this_wire] >> (first_bx_layer - 1)) & 1) == 1)
690 times_sum += (double)first_bx_layer;
691 num_pattern_hits += 1.;
692 mset_for_median.insert(first_bx_layer);
694 LogTrace(
"CSCAnodeLCTProcessor") <<
" 1st bx in layer: " << first_bx_layer <<
" sum bx: " << times_sum
695 <<
" #pat. hits: " << num_pattern_hits;
703 const int sz = mset_for_median.size();
705 std::multiset<int>::iterator im = mset_for_median.begin();
707 std::advance(im, sz / 2 - 1);
710 else if ((sz % 2) == 1)
715 #if defined(EDM_ML_DEBUG) 717 auto lt =
LogTrace(
"CSCAnodeLCTProcessor")
719 for (im = mset_for_median.begin(); im != mset_for_median.end(); im++) {
726 if (temp_quality >= pattern_thresh[i_pattern]) {
733 if (i_pattern == 0) {
735 quality[key_wire][0] = temp_quality;
738 if (static_cast<int>(temp_quality) >
quality[key_wire][1]) {
739 quality[key_wire][1] = temp_quality;
740 quality[key_wire][2] = i_pattern - 1;
744 LogTrace(
"CSCAnodeLCTProcessor") <<
"Pattern found; keywire: " << key_wire <<
" type: " << ptn_label[i_pattern]
745 <<
" quality: " << temp_quality <<
"\n";
751 LogTrace(
"CSCAnodeLCTProcessor") <<
"Collision Pattern A is chosen" 753 else if (
quality[key_wire][2] == 1)
754 LogTrace(
"CSCAnodeLCTProcessor") <<
"Collision Pattern B is chosen" 766 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
767 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
768 ghost_cleared[key_wire][i_pattern] = 0;
771 int qual_this =
quality[key_wire][i_pattern];
774 int qual_prev = (key_wire > 0) ?
quality[key_wire - 1][i_pattern] : 0;
784 if (qual_prev >= qual_this)
785 ghost_cleared[key_wire][i_pattern] = 1;
788 ghost_cleared[key_wire][i_pattern] = 1;
794 if (ghost_cleared[key_wire][i_pattern] == 1) {
797 << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" pattern ghost cancelled on key_wire " 798 << key_wire <<
" q=" << qual_this <<
" by wire " << key_wire - 1 <<
" q=" << qual_prev;
802 int qual_next = (key_wire < numWireGroups - 1) ?
quality[key_wire + 1][i_pattern] : 0;
807 if (qual_next > qual_this)
808 ghost_cleared[key_wire][i_pattern] = 1;
811 ghost_cleared[key_wire][i_pattern] = 1;
814 if (ghost_cleared[key_wire][i_pattern] == 1) {
817 << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" pattern ghost cancelled on key_wire " 818 << key_wire <<
" q=" << qual_this <<
" by wire " << key_wire + 1 <<
" q=" << qual_next;
828 for (
int key_wire = 0; key_wire <
numWireGroups; key_wire++) {
829 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
830 if (ghost_cleared[key_wire][i_pattern] > 0) {
831 clear(key_wire, i_pattern);
840 for (
int i_pattern = 0; i_pattern < 2; i_pattern++) {
841 ghost_cleared[i_pattern] = 0;
846 int qual_this =
quality[key_wire][i_pattern];
855 if (not(
p.getKeyWG() == key_wire - 1 and 1 -
p.getAccelerator() == i_pattern))
858 bool ghost_cleared_prev =
false;
859 int qual_prev =
p.getQuality();
860 int first_bx_prev =
p.getBX();
863 <<
"ghost concellation logic " << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" key_wire " 864 << key_wire <<
" quality " << qual_this <<
" bx " <<
first_bx[key_wire] <<
" previous key_wire " 865 << key_wire - 1 <<
" quality " << qual_prev <<
" bx " <<
first_bx[key_wire - 1];
868 int dt = first_bx[key_wire] - first_bx_prev;
876 if (qual_prev >= qual_this)
877 ghost_cleared[i_pattern] = 1;
878 else if (qual_prev < qual_this)
879 ghost_cleared_prev =
true;
882 ghost_cleared[i_pattern] = 1;
885 ghost_cleared_prev =
true;
888 if (ghost_cleared[i_pattern] == 1) {
891 << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" pattern ghost cancelled on key_wire " 892 << key_wire <<
" q=" << qual_this <<
" by wire " << key_wire - 1 <<
" q=" << qual_prev;
896 if (ghost_cleared_prev) {
899 << ((i_pattern == 0) ?
"Accelerator" :
"Collision") <<
" pattern ghost cancelled on key_wire " 900 << key_wire - 1 <<
" q=" << qual_prev <<
" by wire " << key_wire <<
" q=" << qual_this;
915 int n_alct_all = 0, n_alct = 0;
920 for (
const auto&
p : fourBest) {
926 <<
"C:" <<
theChamber <<
" all " << n_alct_all <<
" found " << n_alct;
931 for (
const auto&
p : fourBest) {
932 const int bx =
p.getBX();
937 <<
"; skipping it... +++\n";
955 LogDebug(
"CSCAnodeLCTProcessor") <<
"\n" 979 LogTrace(
"CSCAnodeLCTProcessor") << all_alcts.size() <<
" ALCTs at the input of best-track selector: ";
980 for (
const auto&
p : all_alcts) {
989 for (
const auto&
p : all_alcts) {
1001 int accel =
p.getAccelerator();
1002 int qual =
p.getQuality();
1003 int wire =
p.getKeyWG();
1010 if (!vA || qual > qA || (qual == qA && wire > wA)) {
1013 if (!vB || qual > qB || (qual == qB && wire < wB)) {
1019 for (
int accel = 0; accel <= 1; accel++) {
1021 if (tA[
bx][accel].isValid()) {
1023 LogTrace(
"CSCAnodeLCTProcessor") <<
"tA: " << tA[
bx][accel];
1024 LogTrace(
"CSCAnodeLCTProcessor") <<
"tB: " << tB[
bx][accel];
1026 bestALCTs[
bx][accel] = tA[
bx][accel];
1029 if (tA[
bx][accel] != tB[
bx][accel] && tA[
bx][accel].getQuality() == tB[
bx][accel].getQuality()) {
1030 secondALCTs[
bx][accel] = tB[
bx][accel];
1036 for (
const auto&
p : all_alcts) {
1037 if (
p.isValid() &&
p.getAccelerator() == accel &&
p.getBX() ==
bx &&
1040 p.getKeyWG() >= secondALCTs[
bx][accel].
getKeyWG()) {
1041 secondALCTs[
bx][accel] =
p;
1050 std::vector<CSCALCTDigi> fourBest;
1053 if (bestALCTs[
bx][
i].isValid()) {
1054 fourBest.push_back(bestALCTs[
bx][
i]);
1058 if (secondALCTs[
bx][
i].isValid()) {
1059 fourBest.push_back(secondALCTs[
bx][
i]);
1065 LogTrace(
"CSCAnodeLCTProcessor") << fourBest.size() <<
" ALCTs selected: ";
1066 for (
const auto&
p : fourBest) {
1075 bool returnValue =
false;
1093 if (qual1 > qual2) {
1122 if (
quality[key_wire][1] > 0) {
1125 LogTrace(
"CSCAnodeLCTProcessor") <<
"trigMode(): collision track " << key_wire <<
" disabled" 1131 if (
quality[key_wire][0] > 0) {
1134 LogTrace(
"CSCAnodeLCTProcessor") <<
"trigMode(): accelerator track " << key_wire <<
" disabled" 1144 LogTrace(
"CSCAnodeLCTProcessor") <<
"trigMode(): collision track " << key_wire <<
" disabled" 1152 int promotionBit = 1 << 2;
1158 if (
quality[key_wire][0] > 0) {
1161 LogTrace(
"CSCAnodeLCTProcessor") <<
"alctMode(): accelerator track " << key_wire <<
" ignored" 1167 if (
quality[key_wire][1] > 0) {
1168 quality[key_wire][1] += promotionBit;
1170 LogTrace(
"CSCAnodeLCTProcessor") <<
"alctMode(): collision track " << key_wire <<
" promoted" 1176 if (
quality[key_wire][0] > 0) {
1177 quality[key_wire][0] += promotionBit;
1179 LogTrace(
"CSCAnodeLCTProcessor") <<
"alctMode(): accelerator track " << key_wire <<
" promoted" 1185 if (
quality[key_wire][1] > 0) {
1188 LogTrace(
"CSCAnodeLCTProcessor") <<
"alctMode(): collision track " << key_wire <<
" ignored" 1197 std::ostringstream strm;
1199 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1200 strm <<
"+ ALCT configuration parameters: +\n";
1201 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1202 strm <<
" fifo_tbins [total number of time bins in DAQ readout] = " <<
fifo_tbins <<
"\n";
1203 strm <<
" fifo_pretrig [start time of anode raw hits in DAQ readout] = " <<
fifo_pretrig <<
"\n";
1204 strm <<
" drift_delay [drift delay after pre-trigger, in 25 ns bins] = " <<
drift_delay <<
"\n";
1205 strm <<
" nplanes_hit_pretrig [min. number of layers hit for pre-trigger] = " <<
nplanes_hit_pretrig <<
"\n";
1206 strm <<
" nplanes_hit_pattern [min. number of layers hit for trigger] = " <<
nplanes_hit_pattern <<
"\n";
1207 strm <<
" nplanes_hit_accel_pretrig [min. number of layers hit for accel." 1209 strm <<
" nplanes_hit_accel_pattern [min. number of layers hit for accel." 1211 strm <<
" trig_mode [enabling/disabling collision/accelerator tracks] = " <<
trig_mode <<
"\n";
1212 strm <<
" accel_mode [preference to collision/accelerator tracks] = " <<
accel_mode <<
"\n";
1213 strm <<
" l1a_window_width [L1Accept window width, in 25 ns bins] = " <<
l1a_window_width <<
"\n";
1214 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1215 LogDebug(
"CSCAnodeLCTProcessor") << strm.str();
1224 std::ostringstream strstrm;
1226 if (i_wire % 10 == 0) {
1228 strstrm << i_wire / 10;
1230 strstrm << (i_wire - 100) / 10;
1236 strstrm << i_wire % 10;
1241 if (!wire[i_layer][i_wire].
empty()) {
1242 std::vector<int> bx_times = wire[i_layer][i_wire];
1243 strstrm << std::hex << bx_times[0] <<
std::dec;
1249 LogTrace(
"CSCAnodeLCTProcessor") << strstrm.str();
1255 std::vector<CSCALCTDigi> tmpV;
1260 const int lct_bins =
1263 static std::atomic<int> late_tbins{
early_tbins + lct_bins};
1265 static std::atomic<int> ifois{0};
1273 <<
"+++ fifo_pretrig = " <<
fifo_pretrig <<
"; in-time ALCTs are not getting read-out!!! +++" 1280 <<
"+++ Allowed range of time bins, [0-" << late_tbins <<
"] exceeds max allowed, " 1282 <<
"+++ Set late_tbins to max allowed +++\n";
1283 late_tbins = CSCConstants::MAX_ALCT_TBINS - 1;
1290 const std::vector<CSCALCTDigi>& all_alcts =
getALCTs();
1291 for (
const auto&
p : all_alcts) {
1299 LogDebug(
"CSCAnodeLCTProcessor") <<
" Do not report ALCT on keywire " <<
p.getKeyWG() <<
": found at bx " << bx
1300 <<
", whereas the earliest allowed bx is " <<
early_tbins + 1;
1305 if (bx > late_tbins) {
1307 LogDebug(
"CSCAnodeLCTProcessor") <<
" Do not report ALCT on keywire " <<
p.getKeyWG() <<
": found at bx " << bx
1308 <<
", whereas the latest allowed bx is " << late_tbins;
1321 for (
auto&
p : tmpV) {
1329 std::vector<CSCALCTDigi> tmpV;
1349 std::ostringstream strstrm_header;
1350 LogTrace(
"CSCAnodeLCTProcessor") <<
"\n" 1351 <<
"Pattern: " << i_pattern <<
" Key wire: " << key_wire;
1352 for (
int i = 1;
i <= 32;
i++) {
1353 strstrm_header << ((32 -
i) % 10);
1355 LogTrace(
"CSCAnodeLCTProcessor") << strstrm_header.str();
1358 std::ostringstream strstrm_pulse;
1362 for (
int i = 1;
i <= 32;
i++) {
1363 strstrm_pulse << ((pulse[this_layer][this_wire] >> (32 -
i)) & 1);
1366 << strstrm_pulse.str() <<
" on layer " << this_layer <<
" wire " << this_wire;
1370 LogTrace(
"CSCAnodeLCTProcessor") <<
"-------------------------------------------";
1376 if (temp_quality > 3)
1377 Q = temp_quality - 3;
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])
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
CSCALCTDigi getSecondALCT(int bx) const
bool getDigis(const CSCWireDigiCollection *wiredc)
const CSCChamber * cscChamber_
bool isValid() const
check ALCT validity (1 - valid ALCT)
unsigned int nplanes_hit_pattern
std::vector< CSCALCTPreTriggerDigi > thePreTriggerDigis
static const int alct_pattern_envelope[CSCConstants::MAX_WIRES_IN_PATTERN]
void clear()
clear this ALCT
unsigned int alctNplanesHitPretrig() const
bool isBetterALCT(const CSCALCTDigi &lhsALCT, const CSCALCTDigi &rhsALCT) const
void setConfigParameters(const CSCDBL1TPParameters *conf)
void trigMode(const int key_wire)
int numberOfWireGroups() const
static const unsigned int def_accel_mode
std::vector< CSCALCTDigi > lct_list
unsigned int alctL1aWindowWidth() const
int getFullBX() const
return 12-bit full BX.
virtual void ghostCancellationLogic()
static const unsigned int def_nplanes_hit_accel_pretrig
const unsigned theTrigChamber
static const unsigned int def_fifo_pretrig
std::vector< CSCALCTDigi > getALCTs() const
std::vector< CSCALCTDigi > readoutALCTs() const
void accelMode(const int key_wire)
Abs< T >::type abs(const T &t)
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
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
static const int alct_pattern_mask_open[CSCConstants::NUM_ALCT_PATTERNS][CSCConstants::MAX_WIRES_IN_PATTERN]
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]
virtual int getTempALCTQuality(int temp_quality) const
static const unsigned int def_l1a_window_width
bool ghost_cancellation_side_quality
int getQuality() const
return quality of a pattern
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
unsigned int alctNplanesHitAccelPretrig() const
void setDefaultConfigParameters()
std::pair< const_iterator, const_iterator > Range
const unsigned theStation
std::vector< DigiType >::const_iterator const_iterator
unsigned int alctNplanesHitAccelPattern() const
std::vector< CSCALCTDigi > bestTrackSelector(const std::vector< CSCALCTDigi > &all_alcts)
static const int alct_pattern_mask_r1[CSCConstants::NUM_ALCT_PATTERNS][CSCConstants::MAX_WIRES_IN_PATTERN]
unsigned int fifo_pretrig
static const int alct_keywire_offset[2][CSCConstants::MAX_WIRES_IN_PATTERN]
CSCALCTDigi bestALCT[CSCConstants::MAX_ALCT_TBINS]
virtual void ghostCancellationLogicOneWire(const int key_wire, int *ghost_cleared)
int first_bx[CSCConstants::MAX_NUM_WIRES]
void dumpConfigParams() const
edm::ParameterSet alctParams_
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.
unsigned int pulse[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES]
unsigned int alctNplanesHitPattern() const
bool patternDetection(const int key_wire)
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
const CSCLayerGeometry * geometry() const
std::vector< CSCWireDigi > digiV[CSCConstants::NUM_LAYERS]
unsigned int nplanes_hit_pretrig
static const unsigned int def_nplanes_hit_pretrig
const unsigned theSubsector
unsigned int nplanes_hit_accel_pretrig
CSCALCTDigi getBestALCT(int bx) const
unsigned int alctFifoTbins() const