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

Add GEN-SIM information to resonant di-muon TkAl ALCARECO producers #45357

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

mmusich
Copy link
Contributor

@mmusich mmusich commented Jul 2, 2024

PR description:

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).

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 #44282) 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.

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:

Not a backport, but can be backported if there's interest for the 2024 MC production.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 2, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 2, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45357/40778

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 2, 2024

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

It involves the following packages:

  • Alignment/CommonAlignmentProducer (alca)

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

cms-bot commands are listed here

@mmusich
Copy link
Contributor Author

mmusich commented Jul 2, 2024

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 2, 2024

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b7006c/40182/summary.html
COMMIT: 107d8e9
CMSSW: CMSSW_14_1_X_2024-07-02-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45357/40182/install.sh to create a dev area with all the needed externals and cmssw changes.

  • DAS Queries: The DAS query tests failed, see the summary page for details.

Comparison Summary

Summary:

  • You potentially removed 5 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3345088
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3345064
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.031 KiB( 47 files compared)
  • DQMHistoSizes: changed ( 1000.0 ): 0.016 KiB MessageLogger/Errors
  • DQMHistoSizes: changed ( 1000.0 ): 0.016 KiB MessageLogger/Warnings
  • Checked 202 log files, 165 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@perrotta
Copy link
Contributor

perrotta commented Jul 3, 2024

+1

  • It increases the event size by a small amount (quantified as about 1%) only for the resonant di-muon TkAl ALCARECO MC samples: given the advantage this can bring to the TkAl group, and potentially also to some analyses (e.g. Mw), such an increase is well justified

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 3, 2024

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. @rappoccio, @antoniovilela, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2)

@antoniovilela
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 94ac0f5 into cms-sw:master Jul 4, 2024
11 checks passed
@mmusich mmusich deleted the mm_tkal_addGS_branches branch July 4, 2024 19:48
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