cmssw
cmssw copied to clipboard
Add GEN-SIM information to resonant di-muon TkAl ALCARECO producers
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 https://github.com/cms-sw/cmssw/pull/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.