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

[12.3.X] run cosmics track refitter in order to fix to Strip Hit residuals #37317

Merged

Conversation

mmusich
Copy link
Contributor

@mmusich mmusich commented Mar 23, 2022

backport of #37316

PR description:

Follow-up to PR #35811.
Noticed that even in the CRAFT'22 DQM (post PR #35811 has been merged) data the Strip End Caps (TID / TEC) residuals are still empty (see e.g.: https://tinyurl.com/yd83lqlz and https://tinyurl.com/y8286jpa).
This has been traced down to the fact that in cosmics, unlike collisions (see:

from DQM.TrackerMonitorTrack.MonitorTrackResiduals_cfi import *
MonitorTrackResiduals.trajectoryInput = 'refittedForPixelDQM'
MonitorTrackResiduals.Tracks = 'refittedForPixelDQM'
MonitorTrackResiduals.Mod_On = False
MonitorTrackResiduals.genericTriggerEventPSet = genericTriggerEventFlag4HLTdb

) the bare track collection (without the trajectory in the event) is fed to TrackerValidationVariables (making it impossible to get precise residuals in the endcap).
This is fixed in this PR introducing the cosmics track refitter in the DQM configuration.

PR validation:

Run: runTheMatrix.py -l 138.2 -j 8 --command='-n 1000'

with the following patch:

diff --git a/DQM/TrackerMonitorTrack/src/MonitorTrackResiduals.cc b/DQM/TrackerMonitorTrack/src/MonitorTrackResiduals.cc
index bb58285028f..4b9eb6d0e8d 100644
--- a/DQM/TrackerMonitorTrack/src/MonitorTrackResiduals.cc
+++ b/DQM/TrackerMonitorTrack/src/MonitorTrackResiduals.cc
@@ -274,14 +274,25 @@ void MonitorTrackResidualsBase<pixel_or_strip>::analyze(const edm::Event &iEvent
 
       auto subdetandlayer = findSubdetAndLayer(RawId, tTopo);
       auto histos = m_SubdetLayerResiduals[subdetandlayer];
+      std::cout << " subdet: " << subdetandlayer.first << " layer: " << subdetandlayer.second << std::endl;
+
       // fill if its error is not zero
       if (it.resXprimeErr != 0 && histos.x.base) {
         histos.x.base->Fill(it.resXprime);
         histos.x.normed->Fill(it.resXprime / it.resXprimeErr);
+
+       if(subdetandlayer.first=="TEC" || subdetandlayer.first=="TID" ){
+         std::cout << "x-residual: " << it.resXprime << " / " << it.resXprimeErr << std::endl;
+       }
         if (!isPixel)
           tkhisto_ResidualsMean->fill(RawId, it.resXprime);
       }
       if (it.resYprimeErr != 0 && histos.y.base) {
+
+       if(subdetandlayer.first=="TEC" || subdetandlayer.first=="TID" ){
+         std::cout << "y-residual:" << it.resYprime << " / " << it.resYprimeErr << std::endl;
+       }
+
         histos.y.base->Fill(it.resYprime);
         histos.y.normed->Fill(it.resYprime / it.resYprimeErr);
       }

and now one gets:

Begin processing the 18th record. Run 343498, Event 18792252, LumiSection 1151 on stream 0 at 23-Mar-2022 13:02:01.846 CET
 subdet: TEC layer: 1
x-residual: -0.0151313 / 0.0473088
 subdet: TEC layer: 2
x-residual: 0.0107512 / 0.0143062
 subdet: TEC layer: 3
x-residual: -0.00317227 / 0.00859425
 subdet: TEC layer: 3
x-residual: -0.00389814 / 0.00671078
 subdet: TEC layer: 3
x-residual: 0.00796366 / 0.00832214
 subdet: TEC layer: 4
x-residual: 0.00557164 / 0.0108646
 subdet: TEC layer: 5
x-residual: -0.00106809 / 0.00630571
 subdet: TEC layer: 5
x-residual: 0.00326104 / 0.00766269
 subdet: TEC layer: 6
x-residual: 0.00382722 / 0.010256
 subdet: TEC layer: 6
x-residual: -0.00890858 / 0.00832553
 subdet: TEC layer: 6
x-residual: -0.00241953 / 0.00897227
 subdet: TEC layer: 6
x-residual: -0.00600596 / 0.00603685
 subdet: TEC layer: 6
x-residual: 0.00968534 / 0.00783616
 subdet: TEC layer: 7
x-residual: 0.00883887 / 0.0321769

whereas before it was:

Begin processing the 18th record. Run 343498, Event 18792252, LumiSection 1151 on stream 0 at 23-Mar-2022 12:25:17.472 CET
 subdet: TEC layer: 7
x-residual: -998001 / 999
 subdet: TEC layer: 6
x-residual: -998001 / 999
 subdet: TEC layer: 6
x-residual: -998001 / 999
 subdet: TEC layer: 6
x-residual: -998001 / 999
 subdet: TEC layer: 6
x-residual: -998001 / 999
 subdet: TEC layer: 6
x-residual: -998001 / 999
 subdet: TEC layer: 5
x-residual: -998001 / 999
 subdet: TEC layer: 5
x-residual: -998001 / 999
 subdet: TEC layer: 4
x-residual: -998001 / 999
 subdet: TEC layer: 3
x-residual: -998001 / 999
 subdet: TEC layer: 3
x-residual: -998001 / 999
 subdet: TEC layer: 3
x-residual: -998001 / 999
 subdet: TEC layer: 2
x-residual: -998001 / 999
 subdet: TEC layer: 1
x-residual: -998001 / 999

Example of obtained plots:

CMSSW_12_4_X_2022-03-22-1100 as-is CMSSW_12_4_X_2022-03-22-1100 + this PR
image image

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

Backport of #37316

@mmusich
Copy link
Contributor Author

mmusich commented Mar 23, 2022

type bug-fix

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 23, 2022

A new Pull Request was created by @mmusich (Marco Musich) for CMSSW_12_3_X.

It involves the following packages:

  • DQM/SiStripMonitorClient (dqm)

@emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please review it and eventually sign? Thanks.
@arossi83, @hdelanno, @sroychow, @fioriNTU, @jandrea, @idebruyn, @threus, @venturia this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@jfernan2
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-df6a3d/23325/summary.html
COMMIT: dcea981
CMSSW: CMSSW_12_3_X_2022-03-23-1100/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/37317/23325/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
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3695161
  • DQMHistoTests: Total failures: 65
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3695074
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 204 log files, 45 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@jfernan2
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

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

@francescobrivio
Copy link
Contributor

@perrotta
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 316c579 into cms-sw:CMSSW_12_3_X Mar 24, 2022
@mmusich mmusich deleted the fixStripEndcapResidualsDQM_12_3_X branch March 24, 2022 19:33
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

5 participants