Skip to content

Commit

Permalink
Merge pull request #45357 from mmusich/mm_tkal_addGS_branches
Browse files Browse the repository at this point in the history
Add GEN-SIM information to resonant di-muon TkAl ALCARECO producers
  • Loading branch information
cmsbuild authored Jul 4, 2024
2 parents ce21d39 + 107d8e9 commit 94ac0f5
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@
'keep *_offlinePrimaryVertices_*_*')
)

# add branches for MC truth evaluation
from GeneratorInterface.Configuration.GeneratorInterface_EventContent_cff import GeneratorInterfaceAOD
from SimGeneral.Configuration.SimGeneral_EventContent_cff import SimGeneralAOD

OutALCARECOTkAlDiMuonAndVertex_noDrop.outputCommands.extend(GeneratorInterfaceAOD.outputCommands)
_modifiedCommandsForGEN = OutALCARECOTkAlDiMuonAndVertex_noDrop.outputCommands.copy()
_modifiedCommandsForGEN.remove('keep *_genParticles_*_*') # full genParticles list is too heavy
_modifiedCommandsForGEN.append('keep *_TkAlDiMuonAndVertexGenMuonSelector_*_*') # Keep only the filtered gen muons
OutALCARECOTkAlDiMuonAndVertex_noDrop.outputCommands = _modifiedCommandsForGEN

OutALCARECOTkAlDiMuonAndVertex_noDrop.outputCommands.extend(SimGeneralAOD.outputCommands)

# in Phase2, remove the SiStrip clusters and keep the OT ones instead
_phase2_common_removedCommands = OutALCARECOTkAlDiMuonAndVertex_noDrop.outputCommands.copy()
_phase2_common_removedCommands.remove('keep SiStripClusteredmNewDetSetVector_ALCARECOTkAlDiMuon_*_*')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
import Alignment.CommonAlignmentProducer.AlignmentTracksFromVertexSelector_cfi as TracksFromVertex
ALCARECOTkAlDiMuonVertexTracks = TracksFromVertex.AlignmentTracksFromVertexSelector.clone()

##################################################################
# for the GEN level information
##################################################################
TkAlDiMuonAndVertexGenMuonSelector = cms.EDFilter("GenParticleSelector",
src = cms.InputTag("genParticles"),
cut = cms.string("abs(pdgId) == 13"), # Select only muons
filter = cms.bool(False))

##################################################################
# The sequence
#################################################################
Expand All @@ -25,7 +33,8 @@
ALCARECOTkAlDiMuonGoodMuons+
ALCARECOTkAlDiMuonRelCombIsoMuons+
ALCARECOTkAlDiMuon+
ALCARECOTkAlDiMuonVertexTracks)
ALCARECOTkAlDiMuonVertexTracks+
TkAlDiMuonAndVertexGenMuonSelector)

## customizations for the pp_on_AA eras
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
'keep *_offlinePrimaryVertices_*_*')
)

# add branches for MC truth evaluation
from GeneratorInterface.Configuration.GeneratorInterface_EventContent_cff import GeneratorInterfaceAOD
from SimGeneral.Configuration.SimGeneral_EventContent_cff import SimGeneralAOD

OutALCARECOTkAlJpsiMuMu_noDrop.outputCommands.extend(GeneratorInterfaceAOD.outputCommands)
_modifiedCommandsForGEN = OutALCARECOTkAlJpsiMuMu_noDrop.outputCommands.copy()
_modifiedCommandsForGEN.remove('keep *_genParticles_*_*') # full genParticles list is too heavy
_modifiedCommandsForGEN.append('keep *_TkAlJpsiMuMuGenMuonSelector_*_*') # Keep only the filtered gen muons
OutALCARECOTkAlJpsiMuMu_noDrop.outputCommands = _modifiedCommandsForGEN

OutALCARECOTkAlJpsiMuMu_noDrop.outputCommands.extend(SimGeneralAOD.outputCommands)

# in Run3, SCAL digis replaced by onlineMetaDataDigis
import copy
_run3_common_removedCommands = OutALCARECOTkAlJpsiMuMu_noDrop.outputCommands.copy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@
ALCARECOTkAlJpsiMuMu.TwoBodyDecaySelector.acoplanarDistance = 1 ##radian
ALCARECOTkAlJpsiMuMu.TwoBodyDecaySelector.numberOfCandidates = 1

seqALCARECOTkAlJpsiMuMu = cms.Sequence(ALCARECOTkAlJpsiMuMuHLT+ALCARECOTkAlJpsiMuMuDCSFilter+ALCARECOTkAlJpsiMuMuGoodMuons+ALCARECOTkAlJpsiMuMu)
## for the GEN level information
TkAlJpsiMuMuGenMuonSelector = cms.EDFilter("GenParticleSelector",
src = cms.InputTag("genParticles"),
cut = cms.string("abs(pdgId) == 13"), # Select only muons
filter = cms.bool(False))

seqALCARECOTkAlJpsiMuMu = cms.Sequence(ALCARECOTkAlJpsiMuMuHLT+ALCARECOTkAlJpsiMuMuDCSFilter+ALCARECOTkAlJpsiMuMuGoodMuons+ALCARECOTkAlJpsiMuMu+TkAlJpsiMuMuGenMuonSelector)

## customizations for the pp_on_AA eras
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
'keep *_offlinePrimaryVertices_*_*')
)

# add branches for MC truth evaluation
from GeneratorInterface.Configuration.GeneratorInterface_EventContent_cff import GeneratorInterfaceAOD
from SimGeneral.Configuration.SimGeneral_EventContent_cff import SimGeneralAOD

OutALCARECOTkAlUpsilonMuMu_noDrop.outputCommands.extend(GeneratorInterfaceAOD.outputCommands)
_modifiedCommandsForGEN = OutALCARECOTkAlUpsilonMuMu_noDrop.outputCommands.copy()
_modifiedCommandsForGEN.remove('keep *_genParticles_*_*') # full genParticles list is too heavy
_modifiedCommandsForGEN.append('keep *_TkAlUpsilonMuMuGenMuonSelector_*_*') # Keep only the filtered gen muons
OutALCARECOTkAlUpsilonMuMu_noDrop.outputCommands = _modifiedCommandsForGEN

OutALCARECOTkAlUpsilonMuMu_noDrop.outputCommands.extend(SimGeneralAOD.outputCommands)

# in Run3, SCAL digis replaced by onlineMetaDataDigis
import copy
_run3_common_removedCommands = OutALCARECOTkAlUpsilonMuMu_noDrop.outputCommands.copy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@
ALCARECOTkAlUpsilonMuMu.TwoBodyDecaySelector.acoplanarDistance = 1 ##radian
ALCARECOTkAlUpsilonMuMu.TwoBodyDecaySelector.numberOfCandidates = 1

seqALCARECOTkAlUpsilonMuMu = cms.Sequence(ALCARECOTkAlUpsilonMuMuHLT+ALCARECOTkAlUpsilonMuMuDCSFilter+ALCARECOTkAlUpsilonMuMuGoodMuons+ALCARECOTkAlUpsilonMuMuRelCombIsoMuons+ALCARECOTkAlUpsilonMuMu)
## for the GEN level information
TkAlUpsilonMuMuGenMuonSelector = cms.EDFilter("GenParticleSelector",
src = cms.InputTag("genParticles"),
cut = cms.string("abs(pdgId) == 13"), # Select only muons
filter = cms.bool(False))

seqALCARECOTkAlUpsilonMuMu = cms.Sequence(ALCARECOTkAlUpsilonMuMuHLT+ALCARECOTkAlUpsilonMuMuDCSFilter+ALCARECOTkAlUpsilonMuMuGoodMuons+ALCARECOTkAlUpsilonMuMuRelCombIsoMuons+ALCARECOTkAlUpsilonMuMu+TkAlUpsilonMuMuGenMuonSelector)

## customizations for the pp_on_AA eras
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
'keep *_offlinePrimaryVertices_*_*')
)

# add branches for MC truth evaluation
from GeneratorInterface.Configuration.GeneratorInterface_EventContent_cff import GeneratorInterfaceAOD
from SimGeneral.Configuration.SimGeneral_EventContent_cff import SimGeneralAOD

OutALCARECOTkAlZMuMu_noDrop.outputCommands.extend(GeneratorInterfaceAOD.outputCommands)
_modifiedCommandsForGEN = OutALCARECOTkAlZMuMu_noDrop.outputCommands.copy()
_modifiedCommandsForGEN.remove('keep *_genParticles_*_*') # full genParticles list is too heavy
_modifiedCommandsForGEN.append('keep *_TkAlZMuMuGenMuonSelector_*_*') # Keep only the filtered gen muons
OutALCARECOTkAlZMuMu_noDrop.outputCommands = _modifiedCommandsForGEN

OutALCARECOTkAlZMuMu_noDrop.outputCommands.extend(SimGeneralAOD.outputCommands)

# in Run3, SCAL digis replaced by onlineMetaDataDigis
import copy
_run3_common_removedCommands = OutALCARECOTkAlZMuMu_noDrop.outputCommands.copy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@
ALCARECOTkAlZMuMu.TwoBodyDecaySelector.applyAcoplanarityFilter = False
ALCARECOTkAlZMuMu.TwoBodyDecaySelector.numberOfCandidates = 1

seqALCARECOTkAlZMuMu = cms.Sequence(ALCARECOTkAlZMuMuHLT+ALCARECOTkAlZMuMuDCSFilter+ALCARECOTkAlZMuMuGoodMuons+ALCARECOTkAlZMuMuRelCombIsoMuons+ALCARECOTkAlZMuMu)
## for the GEN level information
TkAlZMuMuGenMuonSelector = cms.EDFilter("GenParticleSelector",
src = cms.InputTag("genParticles"),
cut = cms.string("abs(pdgId) == 13"), # Select only muons
filter = cms.bool(False))

seqALCARECOTkAlZMuMu = cms.Sequence(ALCARECOTkAlZMuMuHLT+ALCARECOTkAlZMuMuDCSFilter+ALCARECOTkAlZMuMuGoodMuons+ALCARECOTkAlZMuMuRelCombIsoMuons+ALCARECOTkAlZMuMu+TkAlZMuMuGenMuonSelector)

## customizations for the pp_on_AA eras
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
Expand Down

0 comments on commit 94ac0f5

Please sign in to comment.