From c1fdd695c14269a6122b2e0d4518befe50c42b4f Mon Sep 17 00:00:00 2001 From: Sven Dildick Date: Mon, 7 Jun 2021 14:12:20 -0500 Subject: [PATCH 1/4] Increase the ALCT threshold back to 4 --- L1Trigger/CSCTriggerPrimitives/python/params/alctParams.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/L1Trigger/CSCTriggerPrimitives/python/params/alctParams.py b/L1Trigger/CSCTriggerPrimitives/python/params/alctParams.py index f6902035d2e66..0cce4044fc6cf 100644 --- a/L1Trigger/CSCTriggerPrimitives/python/params/alctParams.py +++ b/L1Trigger/CSCTriggerPrimitives/python/params/alctParams.py @@ -51,7 +51,7 @@ ) alctPhase2GEM = alctPhase2.clone( - alctNplanesHitPattern = 3 + alctNplanesHitPattern = 4 ) alctPSets = cms.PSet( From 1a07452015aa7dd9626c87ede59a661318e1a564 Mon Sep 17 00:00:00 2001 From: Sven Dildick Date: Mon, 7 Jun 2021 14:21:29 -0500 Subject: [PATCH 2/4] Add destructor --- .../interface/CSCUpgradeAnodeLCTProcessor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/L1Trigger/CSCTriggerPrimitives/interface/CSCUpgradeAnodeLCTProcessor.h b/L1Trigger/CSCTriggerPrimitives/interface/CSCUpgradeAnodeLCTProcessor.h index 3156066e2cae8..6e980b05c3a01 100644 --- a/L1Trigger/CSCTriggerPrimitives/interface/CSCUpgradeAnodeLCTProcessor.h +++ b/L1Trigger/CSCTriggerPrimitives/interface/CSCUpgradeAnodeLCTProcessor.h @@ -23,8 +23,8 @@ class CSCUpgradeAnodeLCTProcessor : public CSCAnodeLCTProcessor { unsigned chamber, const edm::ParameterSet& conf); - /** Default constructor. Used for testing. */ - CSCUpgradeAnodeLCTProcessor(); + /** Default destructor. */ + ~CSCUpgradeAnodeLCTProcessor() override{}; private: /* This function looks for LCTs on the previous and next wires. If one From e79a0c845b6e879bf8be3fb2437095d7b9a39354 Mon Sep 17 00:00:00 2001 From: Sven Dildick Date: Mon, 7 Jun 2021 14:21:59 -0500 Subject: [PATCH 3/4] Prevent error messages from being printed out for 3-layer ALCTs in ME2/1 --- .../CSCTriggerPrimitives/src/CSCUpgradeAnodeLCTProcessor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeAnodeLCTProcessor.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeAnodeLCTProcessor.cc index 049ec45cbb3db..42ab9a7bb41bd 100644 --- a/L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeAnodeLCTProcessor.cc +++ b/L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeAnodeLCTProcessor.cc @@ -184,9 +184,9 @@ int CSCUpgradeAnodeLCTProcessor::getTempALCTQuality(int temp_quality) const { // Quality definition changed on 22 June 2007: it no longer depends // on pattern_thresh. int Q; - // hack to run the Phase-II ME2/1, ME3/1 and ME4/1 ILT + // hack to run the Phase-II GE2/1-ME2/1 with 3-layer ALCTs if (temp_quality == 3 and runPhase2_ and runME21ILT_ and isME21_) - Q = 4; + Q = 1; else if (temp_quality > 3) Q = temp_quality - 3; else From 147e1761f4801455120461b7a6151b4edb01abbc Mon Sep 17 00:00:00 2001 From: Sven Dildick Date: Mon, 7 Jun 2021 14:24:10 -0500 Subject: [PATCH 4/4] Add more explanation about the ghost cancellation logic executed parallel for all wiregroups --- .../interface/CSCAnodeLCTProcessor.h | 15 +++++++++++++-- .../src/CSCAnodeLCTProcessor.cc | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/L1Trigger/CSCTriggerPrimitives/interface/CSCAnodeLCTProcessor.h b/L1Trigger/CSCTriggerPrimitives/interface/CSCAnodeLCTProcessor.h index e98b9dda21e09..994a05f3136d8 100644 --- a/L1Trigger/CSCTriggerPrimitives/interface/CSCAnodeLCTProcessor.h +++ b/L1Trigger/CSCTriggerPrimitives/interface/CSCAnodeLCTProcessor.h @@ -222,14 +222,25 @@ class CSCAnodeLCTProcessor : public CSCBaseboard { // set the wire hit container void setWireContainer(CSCALCTDigi&, CSCALCTDigi::WireContainer& wireHits) const; - /* This function looks for LCTs on the previous and next wires. If one + /* This function looks for ALCTs on the previous and next wires. If one exists and it has a better quality and a bx_time up to 4 clocks earlier - than the present, then the present LCT is cancelled. The present LCT + than the present, then the present ALCT is cancelled. The present ALCT also gets cancelled if it has the same quality as the one on the previous wire (this has not been done in 2003 test beam). The cancellation is done separately for collision and accelerator patterns. */ virtual void ghostCancellationLogic(); + /* In older versions of the ALCT emulation, the ghost cancellation was performed after + the ALCTs were found. In December 2018 it became clear that during the study of data + and emulation comparison on 2018 data, a small disagreement between data and emulation + was found. The changes we implemented then allow re-triggering on one wiregroup after + some dead time once an earlier ALCT was constructed built on this wiregroup. Before this + commit the ALCT processor would prohibit the wiregroup from triggering in one event after + an ALCT was found on that wiregroup. In the firwmare, the wiregroup with ALCT is only dead + for a few BX before it can be triggered by next muon. The implementation of ghost cancellation + logic wqas changed to accommodate the re-triggering change while the idea of the ghost + cancellation logic is kept the same. + */ virtual void ghostCancellationLogicOneWire(const int key_wire, int* ghost_cleared); virtual int getTempALCTQuality(int temp_quality) const; diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc index 0412b5fee0ecb..96c074ab8f3a0 100644 --- a/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc +++ b/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc @@ -297,6 +297,18 @@ void CSCAnodeLCTProcessor::run(const std::vector wire[CSCConstants::NUM_LAY if (patternDetection(i_wire, hits_in_patterns)) { trigger = true; int ghost_cleared[2] = {0, 0}; + /* + In older versions of the ALCT emulation, the ghost cancellation was performed after + the ALCTs were found. In December 2018 it became clear that during the study of data + and emulation comparison on 2018 data, a small disagreement between data and emulation + was found. The changes we implemented then allow re-triggering on one wiregroup after + some dead time once an earlier ALCT was constructed built on this wiregroup. Before this + commit the ALCT processor would prohibit the wiregroup from triggering in one event after + an ALCT was found on that wiregroup. In the firwmare, the wiregroup with ALCT is only dead + for a few BX before it can be triggered by next muon. The implementation of ghost cancellation + logic was changed to accommodate the re-triggering change while the idea of ghost cancellation + logic is kept the same. + */ ghostCancellationLogicOneWire(i_wire, ghost_cleared); int bx = (use_corrected_bx) ? first_bx_corrected[i_wire] : first_bx[i_wire]; @@ -349,6 +361,12 @@ void CSCAnodeLCTProcessor::run(const std::vector wire[CSCConstants::NUM_LAY // Do the rest only if there is at least one trigger candidate. if (trigger) { + /* In Run-1 and Run-2, the ghost cancellation was done after the trigger. + In the firmware however, the ghost cancellation is done during the trigger + on each wiregroup in parallel. For Run-3 and beyond, the ghost cancellation is + implemented per wiregroup earlier in the code. See function + "ghostCancellationLogicOneWire". Therefore, the line below is commented out. + */ //ghostCancellationLogic(); lctSearch(); }