Skip to content

Commit 107d8e9

Browse files
committed
save only muon genParticles in ALCARECOTkAl[*] producers
1 parent 9295c9a commit 107d8e9

8 files changed

+51
-4
lines changed

Alignment/CommonAlignmentProducer/python/ALCARECOTkAlDiMuonAndVertex_Output_cff.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
from SimGeneral.Configuration.SimGeneral_EventContent_cff import SimGeneralAOD
2929

3030
OutALCARECOTkAlDiMuonAndVertex_noDrop.outputCommands.extend(GeneratorInterfaceAOD.outputCommands)
31+
_modifiedCommandsForGEN = OutALCARECOTkAlDiMuonAndVertex_noDrop.outputCommands.copy()
32+
_modifiedCommandsForGEN.remove('keep *_genParticles_*_*') # full genParticles list is too heavy
33+
_modifiedCommandsForGEN.append('keep *_TkAlDiMuonAndVertexGenMuonSelector_*_*') # Keep only the filtered gen muons
34+
OutALCARECOTkAlDiMuonAndVertex_noDrop.outputCommands = _modifiedCommandsForGEN
35+
3136
OutALCARECOTkAlDiMuonAndVertex_noDrop.outputCommands.extend(SimGeneralAOD.outputCommands)
3237

3338
# in Phase2, remove the SiStrip clusters and keep the OT ones instead

Alignment/CommonAlignmentProducer/python/ALCARECOTkAlDiMuonAndVertex_cff.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@
1717
import Alignment.CommonAlignmentProducer.AlignmentTracksFromVertexSelector_cfi as TracksFromVertex
1818
ALCARECOTkAlDiMuonVertexTracks = TracksFromVertex.AlignmentTracksFromVertexSelector.clone()
1919

20+
##################################################################
21+
# for the GEN level information
22+
##################################################################
23+
TkAlDiMuonAndVertexGenMuonSelector = cms.EDFilter("GenParticleSelector",
24+
src = cms.InputTag("genParticles"),
25+
cut = cms.string("abs(pdgId) == 13"), # Select only muons
26+
filter = cms.bool(False))
27+
2028
##################################################################
2129
# The sequence
2230
#################################################################
@@ -25,7 +33,8 @@
2533
ALCARECOTkAlDiMuonGoodMuons+
2634
ALCARECOTkAlDiMuonRelCombIsoMuons+
2735
ALCARECOTkAlDiMuon+
28-
ALCARECOTkAlDiMuonVertexTracks)
36+
ALCARECOTkAlDiMuonVertexTracks+
37+
TkAlDiMuonAndVertexGenMuonSelector)
2938

3039
## customizations for the pp_on_AA eras
3140
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

Alignment/CommonAlignmentProducer/python/ALCARECOTkAlJpsiMuMu_Output_cff.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
from SimGeneral.Configuration.SimGeneral_EventContent_cff import SimGeneralAOD
2424

2525
OutALCARECOTkAlJpsiMuMu_noDrop.outputCommands.extend(GeneratorInterfaceAOD.outputCommands)
26+
_modifiedCommandsForGEN = OutALCARECOTkAlJpsiMuMu_noDrop.outputCommands.copy()
27+
_modifiedCommandsForGEN.remove('keep *_genParticles_*_*') # full genParticles list is too heavy
28+
_modifiedCommandsForGEN.append('keep *_TkAlJpsiMuMuGenMuonSelector_*_*') # Keep only the filtered gen muons
29+
OutALCARECOTkAlJpsiMuMu_noDrop.outputCommands = _modifiedCommandsForGEN
30+
2631
OutALCARECOTkAlJpsiMuMu_noDrop.outputCommands.extend(SimGeneralAOD.outputCommands)
2732

2833
# in Run3, SCAL digis replaced by onlineMetaDataDigis

Alignment/CommonAlignmentProducer/python/ALCARECOTkAlJpsiMuMu_cff.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@
4949
ALCARECOTkAlJpsiMuMu.TwoBodyDecaySelector.acoplanarDistance = 1 ##radian
5050
ALCARECOTkAlJpsiMuMu.TwoBodyDecaySelector.numberOfCandidates = 1
5151

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

5460
## customizations for the pp_on_AA eras
5561
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

Alignment/CommonAlignmentProducer/python/ALCARECOTkAlUpsilonMuMu_Output_cff.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
from SimGeneral.Configuration.SimGeneral_EventContent_cff import SimGeneralAOD
2424

2525
OutALCARECOTkAlUpsilonMuMu_noDrop.outputCommands.extend(GeneratorInterfaceAOD.outputCommands)
26+
_modifiedCommandsForGEN = OutALCARECOTkAlUpsilonMuMu_noDrop.outputCommands.copy()
27+
_modifiedCommandsForGEN.remove('keep *_genParticles_*_*') # full genParticles list is too heavy
28+
_modifiedCommandsForGEN.append('keep *_TkAlUpsilonMuMuGenMuonSelector_*_*') # Keep only the filtered gen muons
29+
OutALCARECOTkAlUpsilonMuMu_noDrop.outputCommands = _modifiedCommandsForGEN
30+
2631
OutALCARECOTkAlUpsilonMuMu_noDrop.outputCommands.extend(SimGeneralAOD.outputCommands)
2732

2833
# in Run3, SCAL digis replaced by onlineMetaDataDigis

Alignment/CommonAlignmentProducer/python/ALCARECOTkAlUpsilonMuMu_cff.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@
5454
ALCARECOTkAlUpsilonMuMu.TwoBodyDecaySelector.acoplanarDistance = 1 ##radian
5555
ALCARECOTkAlUpsilonMuMu.TwoBodyDecaySelector.numberOfCandidates = 1
5656

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

5965
## customizations for the pp_on_AA eras
6066
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

Alignment/CommonAlignmentProducer/python/ALCARECOTkAlZMuMu_Output_cff.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
from SimGeneral.Configuration.SimGeneral_EventContent_cff import SimGeneralAOD
2424

2525
OutALCARECOTkAlZMuMu_noDrop.outputCommands.extend(GeneratorInterfaceAOD.outputCommands)
26+
_modifiedCommandsForGEN = OutALCARECOTkAlZMuMu_noDrop.outputCommands.copy()
27+
_modifiedCommandsForGEN.remove('keep *_genParticles_*_*') # full genParticles list is too heavy
28+
_modifiedCommandsForGEN.append('keep *_TkAlZMuMuGenMuonSelector_*_*') # Keep only the filtered gen muons
29+
OutALCARECOTkAlZMuMu_noDrop.outputCommands = _modifiedCommandsForGEN
30+
2631
OutALCARECOTkAlZMuMu_noDrop.outputCommands.extend(SimGeneralAOD.outputCommands)
2732

2833
# in Run3, SCAL digis replaced by onlineMetaDataDigis

Alignment/CommonAlignmentProducer/python/ALCARECOTkAlZMuMu_cff.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@
5151
ALCARECOTkAlZMuMu.TwoBodyDecaySelector.applyAcoplanarityFilter = False
5252
ALCARECOTkAlZMuMu.TwoBodyDecaySelector.numberOfCandidates = 1
5353

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

5662
## customizations for the pp_on_AA eras
5763
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

0 commit comments

Comments
 (0)