From e27b5f3daeceeb6a7ba33893c959c70feaf0a669 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 30 Aug 2022 10:05:17 +0200 Subject: [PATCH] set readout window in constructor --- L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc | 3 +++ L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc | 4 ++++ L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc index 9c22a47e1ad11..42d341e25843a 100644 --- a/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc +++ b/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc @@ -86,6 +86,9 @@ CSCAnodeLCTProcessor::CSCAnodeLCTProcessor(unsigned endcap, thresholds_ = shower.getParameter>("showerThresholds"); showerNumTBins_ = shower.getParameter("showerNumTBins"); minLayersCentralTBin_ = shower.getParameter("minLayersCentralTBin"); + minbx_readout_ = CSCConstants::LCT_CENTRAL_BX - l1a_window_width / 2; + maxbx_readout_ = CSCConstants::LCT_CENTRAL_BX + l1a_window_width / 2; + assert(l1a_window_width / 2 <= CSCConstants::LCT_CENTRAL_BX); } void CSCAnodeLCTProcessor::loadPatternMask() { diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc index 95a13e5a767bb..4432781b6b84b 100644 --- a/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc +++ b/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc @@ -98,6 +98,10 @@ CSCCathodeLCTProcessor::CSCCathodeLCTProcessor(unsigned endcap, showerNumTBins_ = shower.getParameter("showerNumTBins"); minLayersCentralTBin_ = shower.getParameter("minLayersCentralTBin"); peakCheck_ = shower.getParameter("peakCheck"); + minbx_readout_ = CSCConstants::LCT_CENTRAL_BX - tmb_l1a_window_size / 2; + maxbx_readout_ = CSCConstants::LCT_CENTRAL_BX + tmb_l1a_window_size / 2; + assert(tmb_l1a_window_size / 2 <= CSCConstants::LCT_CENTRAL_BX); + thePreTriggerDigis.clear(); // quality control of stubs diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc index 5348036f90e26..669d3b6493ea8 100644 --- a/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc +++ b/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc @@ -69,6 +69,11 @@ CSCMotherboard::CSCMotherboard(unsigned endcap, unsigned csc_idx = CSCDetId::iChamberType(theStation, theRing) - 2; thisShowerSource_ = showerSource_[csc_idx]; + // shower readout window + minbx_readout_ = CSCConstants::LCT_CENTRAL_BX - tmb_l1a_window_size / 2; + maxbx_readout_ = CSCConstants::LCT_CENTRAL_BX + tmb_l1a_window_size / 2; + assert(tmb_l1a_window_size / 2 <= CSCConstants::LCT_CENTRAL_BX); + // enable the upgrade processors for ring 1 stations if (runPhase2_ and theRing == 1) { clctProc = std::make_unique(endcap, station, sector, subsector, chamber, conf);