Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for Run-3 CSC trigger primitives #34245

Merged
merged 23 commits into from Jun 30, 2021
Merged

Updates for Run-3 CSC trigger primitives #34245

merged 23 commits into from Jun 30, 2021

Conversation

dildick
Copy link
Contributor

@dildick dildick commented Jun 25, 2021

PR description:

This PR is a collection of updates for Run-3 CSC trigger primitives (actually Phase-2 which we're moving forward by several years).

  • The functions in CSCCathodeLCTProcessor to separately read out ME1/ and ME1/b were removed. The readout for ME1/1 will remain unified throughout Run-3
  • The class CSCMotherboardME11 which was originally designed for ME1/1 with a split readout for ME1/ and ME1/b was fully incorporated into the standard class CSCMotherboard. In phase-2 algorithms. Ultimately the only things that were different were (1) whether CLCTs could be re-used and (2) if the ALCT should only be matched to the first CLCT.
  • The LCTContainer that was introduced for Phase-2 studies OTMBs should actually also be in the CSCMotherboard. We've found this out by studying the old TMB firmware in more detail
  • The ALCT-CLCT matching is now done based on preferential CLCT delta BX [0,-1,1,-2,2,-3,3]. This is also how it has been done in the firmware since Run-1. Fortunately, for low pileup conditions this change has no effect. I checked this on the ZeroBias data.
  • A selectLCTs function was also added to the CSCMotherboard to select the best two LCTs in each BX with the new LCTContainer
  • The LCT and CLCT readout functions were made simpler. It is now more clear that the readout is centered around the LCT and CLCT central bunch crossings. Previously there was a disconnect between the "early time bins" and the central BX. The CLCT readout function was actually off by -1 BX, but because the data I analyzed had very low pileup or no pileup, it does not matter.
  • An upgrade that we had planned for Phase-2, i.e. increasing the number of CLCTs/LCTs that are read out, was rolled back. This is not in the firmware for Run-3. We only read out the first two CLCTs/LCTs.
  • CSC showers are only kept for Run-3
  • CSC DQM was equipped with a simple analysis of pre-triggers (by default turned off)
  • Documentation was added here and there for functions

PR validation:

Code was tested on 10k events of B904 cosmic data (to test Run-3 algorithm), and on 26k events of 2018D ZeroBias data Run 322022 (to test Run-2 algorithm). Chambers ME+1/1/9, ME+1/1/10 and ME+1/1/11 were excluded in this comparison because we had loaded prototype Phase-2 firmware on those chambers.

Plots are added below.

An improvement is seen for the B904 data. No change is seen for the 2018D ZeroBias data.

There are minor discrepancies in the ZeroBias data I'm still trying to understand. Second attached PDF file.
a) fewer ALCTs in emulation for ME1/1. It's about 1 every 1000 ALCTs (see page 11)
b) emulation seems to be promoting 4- and 5-layer ALCTs to 6-layer (see page 2)
c) fewer CLCTs in emulation. Also about in every 1000 CLCTs (see page 29)

if this PR is a backport please specify the original PR and why you need to backport that PR:

N/A

Before submitting your pull requests, make sure you followed this checklist:

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5958ab/16246/summary.html
COMMIT: 9da8573
CMSSW: CMSSW_12_0_X_2021-06-25-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/34245/16246/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 7 differences found in the comparisons
  • DQMHistoTests: Total files compared: 38
  • DQMHistoTests: Total histograms compared: 2785711
  • DQMHistoTests: Total failures: 214
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2785474
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 37 files compared)
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 160 log files, 37 edm output root files, 38 DQM output files
  • TriggerResults: no differences found

@dildick
Copy link
Contributor Author

dildick commented Jun 25, 2021

There are quite a bit of failures in the CSC DQM plots. This could be because only the first 2 CLCTs/LCTs should be written out (like in the firmware), instead of all of them. The CSC trigger tends to make copies of patterns at later BX's (typically BX+1).

@cecilecaillol
Copy link
Contributor

+l1

@jfernan2
Copy link
Contributor

There are quite a bit of failures in the CSC DQM plots. This could be because only the first 2 CLCTs/LCTs should be written out (like in the firmware), instead of all of them. The CSC trigger tends to make copies of patterns at later BX's (typically BX+1).

@dildick I am confused by this statement and the actual changes in some of the DQM workflows:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/baseLineComparisons/CMSSW_12_0_X_2021-06-25-1100+5958ab/43672/dqm-histo-comparison-summary.html
Specially those at the bottom of the page

@dildick
Copy link
Contributor Author

dildick commented Jun 28, 2021

I ran WF 11634.0 in CMSSW_12_0_X_2021-06-28-1100 to study it in more detail. Fewer CLCTs are present in some chambers with this PR:

[1] Apparently duplicate CLCTs, which definitely must be removed. In fact, the LCTQualityControl should have a feature to remove duplicate CLCTs.
[2] Genuine CLCTs produced at a later time which the CSC OTMB readout ignores. The OMTF and EMTF only use the first pair. Removing such CLCTs should not have a knock-on effect the OMTF and EMTF.
[3] Duplicate of a CLCT found at a later time (combination of [1] and [2])

CMSSW_12_0_X_2021-06-28-1100

ME-1/1/3 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 10 Quality = 5 Bend = 0 CFEB = 5 HalfStrip = 19 KeyHalfStrip = 179
[1] ME-1/1/3 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 10 Quality = 5 Bend = 0 CFEB = 5 HalfStrip = 19 KeyHalfStrip = 179    
ME-1/1/29 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 8 Quality = 5 Bend = 0 CFEB = 0 HalfStrip = 9 KeyHalfStrip = 9
[1] ME-1/1/29 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 8 Quality = 5 Bend = 0 CFEB = 0 HalfStrip = 9 KeyHalfStrip = 9
ME-2/1/15 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 10 Quality = 5 Bend = 0 CFEB = 1 HalfStrip = 12 KeyHalfStrip = 44
ME-3/1/2 CSC CLCT #1: Valid = 1 BX = 8 Pattern = 9 Quality = 4 Bend = 1 CFEB = 1 HalfStrip = 9 KeyHalfStrip = 41
ME-3/1/15 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 10 Quality = 5 Bend = 0 CFEB = 3 HalfStrip = 21 KeyHalfStrip = 117
ME-4/2/30 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 10 Quality = 5 Bend = 0 CFEB = 2 HalfStrip = 6 KeyHalfStrip = 70
Begin processing the 2nd record. Run 1, Event 2, LumiSection 1 on stream 0 at 28-Jun-2021 11:18:38.180 CDT
Begin processing the 3rd record. Run 1, Event 3, LumiSection 1 on stream 0 at 28-Jun-2021 11:18:40.854 CDT
Begin processing the 4th record. Run 1, Event 4, LumiSection 1 on stream 0 at 28-Jun-2021 11:18:43.678 CDT
Begin processing the 5th record. Run 1, Event 5, LumiSection 1 on stream 0 at 28-Jun-2021 11:18:46.118 CDT
Begin processing the 6th record. Run 1, Event 6, LumiSection 1 on stream 0 at 28-Jun-2021 11:18:48.559 CDT
ME-1/1/29 CSC CLCT #1: Valid = 1 BX = 8 Pattern = 8 Quality = 4 Bend = 0 CFEB = 5 HalfStrip = 0 KeyHalfStrip = 160
[1] ME-1/1/29 CSC CLCT #1: Valid = 1 BX = 8 Pattern = 8 Quality = 4 Bend = 0 CFEB = 5 HalfStrip = 0 KeyHalfStrip = 160
Begin processing the 7th record. Run 1, Event 7, LumiSection 1 on stream 0 at 28-Jun-2021 11:18:51.922 CDT
ME+1/2/15 CSC CLCT #1: Valid = 1 BX = 8 Pattern = 7 Quality = 4 Bend = 1 CFEB = 3 HalfStrip = 1 KeyHalfStrip = 97
ME+2/2/15 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 10 Quality = 5 Bend = 0 CFEB = 3 HalfStrip = 21 KeyHalfStrip = 117
ME+3/2/15 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 8 Quality = 6 Bend = 0 CFEB = 1 HalfStrip = 9 KeyHalfStrip = 41
ME+4/2/15 CSC CLCT #1: Valid = 1 BX = 8 Pattern = 10 Quality = 4 Bend = 0 CFEB = 1 HalfStrip = 15 KeyHalfStrip = 47
Begin processing the 8th record. Run 1, Event 8, LumiSection 1 on stream 0 at 28-Jun-2021 11:18:54.926 CDT
ME+1/1/23 CSC CLCT #1: Valid = 1 BX = 6 Pattern = 9 Quality = 6 Bend = 1 CFEB = 5 HalfStrip = 22 KeyHalfStrip = 182
ME+1/1/23 CSC CLCT #2: Valid = 1 BX = 6 Pattern = 10 Quality = 4 Bend = 0 CFEB = 4 HalfStrip = 20 KeyHalfStrip = 148
[2] ME+1/1/23 CSC CLCT #1: Valid = 1 BX = 8 Pattern = 10 Quality = 4 Bend = 0 CFEB = 4 HalfStrip = 20 KeyHalfStrip = 148
[1] ME+1/1/23 CSC CLCT #1: Valid = 1 BX = 6 Pattern = 9 Quality = 6 Bend = 1 CFEB = 5 HalfStrip = 22 KeyHalfStrip = 182
[1] ME+1/1/23 CSC CLCT #2: Valid = 1 BX = 6 Pattern = 10 Quality = 4 Bend = 0 CFEB = 4 HalfStrip = 20 KeyHalfStrip = 148
[3] ME+1/1/23 CSC CLCT #1: Valid = 1 BX = 8 Pattern = 10 Quality = 4 Bend = 0 CFEB = 4 HalfStrip = 20 KeyHalfStrip = 148
Begin processing the 9th record. Run 1, Event 9, LumiSection 1 on stream 0 at 28-Jun-2021 11:18:57.764 CDT
Begin processing the 10th record. Run 1, Event 10, LumiSection 1 on stream 0 at 28-Jun-2021 11:19:00.497 CDT
ME+1/3/19 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 8 Quality = 5 Bend = 0 CFEB = 1 HalfStrip = 10 KeyHalfStrip = 42

CMSSW_12_0_X_2021-06-28-1100 + #34245

Begin processing the 1st record. Run 1, Event 1, LumiSection 1 on stream 0 at 28-Jun-2021 09:30:44.097 CDT
ME-1/1/3 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 10 Quality = 5 Bend = 0 CFEB = 5 HalfStrip = 19 KeyHalfStrip = 179
ME-1/1/29 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 8 Quality = 5 Bend = 0 CFEB = 0 HalfStrip = 9 KeyHalfStrip = 9
ME-2/1/15 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 10 Quality = 5 Bend = 0 CFEB = 1 HalfStrip = 12 KeyHalfStrip = 44
ME-3/1/2 CSC CLCT #1: Valid = 1 BX = 8 Pattern = 9 Quality = 4 Bend = 1 CFEB = 1 HalfStrip = 9 KeyHalfStrip = 41
ME-3/1/15 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 10 Quality = 5 Bend = 0 CFEB = 3 HalfStrip = 21 KeyHalfStrip = 117
ME-4/2/30 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 10 Quality = 5 Bend = 0 CFEB = 2 HalfStrip = 6 KeyHalfStrip = 70
Begin processing the 2nd record. Run 1, Event 2, LumiSection 1 on stream 0 at 28-Jun-2021 09:30:58.148 CDT
Begin processing the 3rd record. Run 1, Event 3, LumiSection 1 on stream 0 at 28-Jun-2021 09:31:00.387 CDT
Begin processing the 4th record. Run 1, Event 4, LumiSection 1 on stream 0 at 28-Jun-2021 09:31:02.696 CDT
Begin processing the 5th record. Run 1, Event 5, LumiSection 1 on stream 0 at 28-Jun-2021 09:31:04.725 CDT
Begin processing the 6th record. Run 1, Event 6, LumiSection 1 on stream 0 at 28-Jun-2021 09:31:06.573 CDT
ME-1/1/29 CSC CLCT #1: Valid = 1 BX = 8 Pattern = 8 Quality = 4 Bend = 0 CFEB = 5 HalfStrip = 0 KeyHalfStrip = 160
Begin processing the 7th record. Run 1, Event 7, LumiSection 1 on stream 0 at 28-Jun-2021 09:31:09.993 CDT
ME+1/2/15 CSC CLCT #1: Valid = 1 BX = 8 Pattern = 7 Quality = 4 Bend = 1 CFEB = 3 HalfStrip = 1 KeyHalfStrip = 97
ME+2/2/15 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 10 Quality = 5 Bend = 0 CFEB = 3 HalfStrip = 21 KeyHalfStrip = 117
ME+3/2/15 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 8 Quality = 6 Bend = 0 CFEB = 1 HalfStrip = 9 KeyHalfStrip = 41
ME+4/2/15 CSC CLCT #1: Valid = 1 BX = 8 Pattern = 10 Quality = 4 Bend = 0 CFEB = 1 HalfStrip = 15 KeyHalfStrip = 47
Begin processing the 8th record. Run 1, Event 8, LumiSection 1 on stream 0 at 28-Jun-2021 09:31:12.510 CDT
ME+1/1/23 CSC CLCT #1: Valid = 1 BX = 6 Pattern = 9 Quality = 6 Bend = 1 CFEB = 5 HalfStrip = 22 KeyHalfStrip = 182
ME+1/1/23 CSC CLCT #2: Valid = 1 BX = 6 Pattern = 10 Quality = 4 Bend = 0 CFEB = 4 HalfStrip = 20 KeyHalfStrip = 148
Begin processing the 9th record. Run 1, Event 9, LumiSection 1 on stream 0 at 28-Jun-2021 09:31:14.991 CDT
Begin processing the 10th record. Run 1, Event 10, LumiSection 1 on stream 0 at 28-Jun-2021 09:31:17.471 CDT
ME+1/3/19 CSC CLCT #1: Valid = 1 BX = 7 Pattern = 8 Quality = 5 Bend = 0 CFEB = 1 HalfStrip = 10 KeyHalfStrip = 42

@dildick
Copy link
Contributor Author

dildick commented Jun 28, 2021

@jfernan2 The results look good to me. The agreement with recent cosmic is not going to be perfect either. At P5 we're still running Run-2 CSC trigger primitive firmware, but in the emulator, parts of Run-3 and Phase-2 are already enabled.

@jfernan2
Copy link
Contributor

+1

@dildick
Copy link
Contributor Author

dildick commented Jun 29, 2021

@civanch Do you have any comments?

@civanch
Copy link
Contributor

civanch commented Jun 29, 2021

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Jun 30, 2021

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants