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

[14.0.X] Add GEN-SIM information to resonant di-muon TkAl ALCARECO producers #47016

Open
wants to merge 5 commits into
base: CMSSW_14_0_X
Choose a base branch
from

Conversation

mmusich
Copy link
Contributor

@mmusich mmusich commented Dec 20, 2024

backport of #45357
backport of #45385

PR description:

From the original description at #45357 (comment):

The goal of this PR is to add GEN-SIM related branches to the outputs of several Tracker Alignment ALCARECO producers (using resonant di-muon inputs).
The main goal is to be able to produce MC-truth based validations like the ones shown here readily from ALCARECO samples instead of relying on scarce and not very easily available GEN-SIM-RECO samples.
A similar request was done for analysis purposes e.g. in this ticket.
To limit the output size, we don't add the whole genParticles collection, but just the particles with abs(pdgId) == 13.
In order to do that some gymnastics with the outputCommands is required. A simpler solution might entail adding directly a new event content GeneratorInterfaceALCARECO here.
The increase of data volume (limited by construction only to the MC samples, since the added branches are not available in data) is marginal (estimated in less than 1% on 100 input events).

in addition from #45385 (comment)

fixes #45384,

PR validation:

Run the following command: runTheMatrix.py --what upgrade -l 12842.0 -t 4 -j 8 --nEvents=100 to produce an input file, then analyzed with SagittaBiasNtuplizer (introduced back then at PR #44297) by using this patch:

diff --git a/Alignment/OfflineValidation/test/SagittaBiasNtuplizer_cfg.py b/Alignment/OfflineValidation/test/SagittaBiasNtuplizer_cfg.py
index e5f08e57ebf..bfeb8c65021 100644
--- a/Alignment/OfflineValidation/test/SagittaBiasNtuplizer_cfg.py
+++ b/Alignment/OfflineValidation/test/SagittaBiasNtuplizer_cfg.py
@@ -179,18 +179,19 @@ process.refittedTracks = RecoTracker.TrackProducer.TrackRefitter_cfi.TrackRefitt
 ####################################################################
 from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices
 process.offlinePrimaryVerticesFromRefittedTrks = offlinePrimaryVertices.clone()
-#process.offlinePrimaryVerticesFromRefittedTrks.TrackLabel = cms.InputTag("refittedVtxTracks")
-process.offlinePrimaryVerticesFromRefittedTrks.TrackLabel = cms.InputTag("refittedTracks")
+process.offlinePrimaryVerticesFromRefittedTrks.TrackLabel = cms.InputTag("refittedVtxTracks")
+#process.offlinePrimaryVerticesFromRefittedTrks.TrackLabel = cms.InputTag("refittedTracks")
 
 ###################################################################
 # The analysis modules
 ###################################################################
 process.ZtoMMNtuple = cms.EDAnalyzer("SagittaBiasNtuplizer",
-                                     #tracks = cms.InputTag('refittedMuons'),
-                                     useReco = cms.bool(True),
-                                     muons = cms.InputTag('muons'),
+                                     muonTracks = cms.InputTag('refittedMuons'),
+                                     useReco = cms.bool(False),
+                                     #muons = cms.InputTag('muons'),
                                      doGen = cms.bool(True),
-                                     tracks = cms.InputTag('refittedTracks'),
+                                     #tracks = cms.InputTag('refittedTracks'),
+                                     genParticles = cms.InputTag('TkAlDiMuonAndVertexGenMuonSelector'),
                                      vertices = cms.InputTag('offlinePrimaryVerticesFromRefittedTrks'))
 
 process.DiMuonVertexValidation = cms.EDAnalyzer("DiMuonVertexValidation",
@@ -257,9 +258,9 @@ process.TFileService = cms.Service("TFileService",
 # Path
 ###################################################################
 process.p1 = cms.Path(process.offlineBeamSpot
-                      #* process.refittedMuons
-                      #* process.refittedVtxTracks
-                      * process.refittedTracks
+                      * process.refittedMuons
+                      * process.refittedVtxTracks
+                      #* process.refittedTracks
                       * process.offlinePrimaryVerticesFromRefittedTrks
                       * process.ZtoMMNtuple) 
                       #* process.DiMuonVertexValidation

and analyzed with: cmsRun SagittaBiasNtuplizer_cfg.py myfile=file:../../../12842.0_ZMM_13+2024/TkAlDiMuonAndVertex.root. Finally the resulting output ntuple has been checked for having appropriate branches filled.

runTheMatrix.py -l 1001.3 runs with this addition.

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

Verbatim backport of #45357 and #45385 for 2024 MC production purposes.

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 20, 2024

A new Pull Request was created by @mmusich for CMSSW_14_0_X.

It involves the following packages:

  • Alignment/CommonAlignmentProducer (alca)
  • CommonTools/UtilAlgos (reconstruction)

@atpathak, @cmsbuild, @consuegs, @jfernan2, @mandrenguyen, @perrotta can you please review it and eventually sign? Thanks.
@adewit, @missirol, @mmusich, @pakhotin, @rsreds, @tlampen, @tocheng, @yuanchao this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 20, 2024

cms-bot internal usage

@mmusich
Copy link
Contributor Author

mmusich commented Dec 20, 2024

test parameters:

  • workflows = 1001.3, 1001.4, 1002.3, 1002.4

@mmusich
Copy link
Contributor Author

mmusich commented Dec 20, 2024

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2c9a22/43584/summary.html
COMMIT: fe38e9f
CMSSW: CMSSW_14_0_X_2024-12-19-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47016/43584/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 5 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 82 differences found in the comparisons
  • DQMHistoTests: Total files compared: 52
  • DQMHistoTests: Total histograms compared: 3478710
  • DQMHistoTests: Total failures: 2146
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3476543
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.062 KiB( 51 files compared)
  • DQMHistoSizes: changed ( 1002.4,... ): 0.016 KiB MessageLogger/Errors
  • DQMHistoSizes: changed ( 1002.4,... ): 0.016 KiB MessageLogger/Warnings
  • Checked 219 log files, 169 edm output root files, 52 DQM output files
  • TriggerResults: found differences in 4 / 50 workflows

@malbouis
Copy link
Contributor

Hi @cms-sw/orp-l2 , as we have briefly discussed in #46954 (comment) I think it is OK to have this PR in 140X. But I would ask @cms-sw/alca-l2 and @cms-sw/reconstruction-l2 to please do their review of this PR again (even though it is a verbatim backport of the original ones).

Then as soon as it is merged and in a new release, @cms-sw/trk-dpg-l2 , please submit a request for a couple of RelVal samples in order to validate the content that this PR introduces.

Thanks!

@jfernan2
Copy link
Contributor

+1
Backport identical and no issues detected on tests

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.

4 participants