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 new reco::Muon 'displacedMuons' collection to AOD #36926

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions RecoMuon/Configuration/python/RecoMuonPPonly_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@
from RecoMuon.MuonIdentification.muonIdProducerSequence_cff import *
muons1stStep.fillGlobalTrackQuality = True

displacedMuons1stStep = muons1stStep.clone(
inputCollectionLabels = ['displacedTracks',
'displacedGlobalMuons',
'displacedStandAloneMuons'],
inputCollectionTypes = ['inner tracks',
'links',
'outer tracks'],
fillGlobalTrackQuality = False
)

#Muon Id isGood flag ValueMap producer sequence
from RecoMuon.MuonIdentification.muonSelectionTypeValueMapProducer_cff import *

Expand Down Expand Up @@ -70,7 +80,9 @@
muontrackingTask = cms.Task(standalonemuontrackingTask,globalmuontrackingTask)
muontracking = cms.Sequence(muontrackingTask)
# Muon Reconstruction
muonrecoTask = cms.Task(muontrackingTask,muonIdProducerTask)
displacedMuonIdProducerTask = cms.Task(displacedMuons1stStep)
muonrecoTask = cms.Task(muontrackingTask,muonIdProducerTask, displacedMuonIdProducerTask)
fastSim.toReplaceWith(muonrecoTask,muonrecoTask.copyAndExclude([displacedMuonIdProducerTask]))
muonreco = cms.Sequence(muonrecoTask)
# Muon Reconstruction plus Isolation
muonreco_plus_isolationTask = cms.Task(muonrecoTask,muIsolationTask)
Expand All @@ -90,8 +102,10 @@

muonGlobalRecoTask = cms.Task(globalmuontrackingTask,
muonIdProducerTask,
displacedMuonIdProducerTask,
muonSelectionTypeTask,
muIsolationTask)
muIsolationTask,
muIsolationDisplacedTask)
muonGlobalReco = cms.Sequence(muonGlobalRecoTask)

# ... instead, the sequences will be run in the following order:
Expand All @@ -104,4 +118,4 @@

########################################################
# not commisoned and not relevant in FastSim (?):
fastSim.toReplaceWith(muonGlobalRecoTask, muonGlobalRecoTask.copyAndExclude([muonreco_with_SET_Task,muonSelectionTypeTask]))
fastSim.toReplaceWith(muonGlobalRecoTask, muonGlobalRecoTask.copyAndExclude([muonreco_with_SET_Task,muonSelectionTypeTask,displacedMuonIdProducerTask,muIsolationDisplacedTask]))
12 changes: 11 additions & 1 deletion RecoMuon/Configuration/python/RecoMuon_EventContent_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@
#'drop *_muons_muons1stStep2muonsMap_*',
#'drop recoIsoDepositedmValueMap_muons_*_*', #not really used
#'drop doubleedmValueMap_muons_muPFIso*_*', #already inside the muon
# displacedMuons collection
'keep recoMuons_displacedMuons_*_*',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what is the contribution to the total size increase given by each of these new collections?

Copy link
Contributor Author

@CeliaFernandez CeliaFernandez Feb 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have computed it in a ttbar sample (runTheMatrix.py workflow 11634.0). The table with the size increase is in slide 28 of this presentation: https://cernbox.cern.ch/index.php/s/FfAZonfSest7kqQ

'keep booledmValueMap_displacedMuons_*_*',
'keep doubleedmValueMap_displacedMuons_dispMuPFMean*_*',
'keep doubleedmValueMap_displacedMuons_dispMuPFSum*_*',
'keep recoMuonTimeExtraedmValueMap_displacedMuons_*_*',
'keep uintedmValueMap_displacedMuons_*_*',
'keep *_particleFlow_displacedMuons_*',
#'keep recoIsoDepositedmValueMap_*Displaced_*_*', # saved in RECO
# Tracks known by the Muon obj
'keep recoTracks_standAloneMuons_*_*',
'keep recoTrackExtras_standAloneMuons_*_*',
Expand Down Expand Up @@ -64,7 +73,8 @@
'keep recoTracks_displacedStandAloneMuons__*',
'keep recoTrackExtras_displacedStandAloneMuons_*_*',
'keep TrackingRecHitsOwned_displacedStandAloneMuons_*_*',
'keep *_muonReducedTrackExtras_*_*')
'keep *_muonReducedTrackExtras_*_*',
'keep *_displacedMuonReducedTrackExtras_*_*')
)
RecoMuonAOD.outputCommands.extend(RecoMuonIsolationAOD.outputCommands)

Expand Down
8 changes: 7 additions & 1 deletion RecoMuon/Configuration/python/RecoMuon_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@

#### High level sequence (i.e., post PF reconstruction) ###
from RecoMuon.MuonIdentification.muons_cfi import *
from RecoMuon.MuonIdentification.displacedMuons_cfi import *
from RecoMuon.MuonIsolation.muonPFIsolation_cff import *
from RecoMuon.MuonIdentification.muonReducedTrackExtras_cfi import *
from RecoMuon.MuonIdentification.displacedMuonReducedTrackExtras_cfi import *

# clusters are not present in fastsim
from Configuration.Eras.Modifier_fastSim_cff import fastSim
Expand All @@ -81,6 +83,10 @@
# cluster collections are different in phase 2
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(muonReducedTrackExtras, outputClusters = False)
phase2_tracker.toModify(displacedMuonReducedTrackExtras, outputClusters = False)

muonshighlevelrecoTask = cms.Task(muonPFIsolationTask,muons,muonReducedTrackExtras)
muonshighlevelrecoTask = cms.Task(muonPFIsolationTask,displacedMuonPFIsolationTask,muons,displacedMuons,muonReducedTrackExtras, displacedMuonReducedTrackExtras)
muonshighlevelreco = cms.Sequence(muonshighlevelrecoTask)

# displaced sequences do not run in fastsim
fastSim.toReplaceWith(muonshighlevelrecoTask,muonshighlevelrecoTask.copyAndExclude([displacedMuonPFIsolationTask,displacedMuons,displacedMuonReducedTrackExtras]))
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import FWCore.ParameterSet.Config as cms

displacedMuonReducedTrackExtras = cms.EDProducer('MuonReducedTrackExtraProducer',
muonTag = cms.InputTag('displacedMuons'),
trackExtraTags = cms.VInputTag(
'displacedTracks',
'displacedGlobalMuons'
),
trackExtraAssocs = cms.VInputTag(),
pixelClusterTag = cms.InputTag('siPixelClusters'),
stripClusterTag = cms.InputTag('siStripClusters'),
cut = cms.string('pt > 3.0'),
outputClusters = cms.bool(True),
mightGet = cms.optional.untracked.vstring
)
100 changes: 100 additions & 0 deletions RecoMuon/MuonIdentification/python/displacedMuons_cfi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import FWCore.ParameterSet.Config as cms

displacedMuons = cms.EDProducer("MuonProducer",
ActivateDebug = cms.untracked.bool(False),
InputMuons = cms.InputTag("displacedMuons1stStep"),

FillPFMomentumAndAssociation = cms.bool(True),
PFCandidates = cms.InputTag("particleFlowTmp"),

FillTimingInfo = cms.bool(True),

FillDetectorBasedIsolation = cms.bool(True),
EcalIsoDeposits = cms.InputTag("muIsoDepositCalByAssociatorTowersDisplaced","ecal"),
HcalIsoDeposits = cms.InputTag("muIsoDepositCalByAssociatorTowersDisplaced","hcal"),
HoIsoDeposits = cms.InputTag("muIsoDepositCalByAssociatorTowersDisplaced","ho"),
TrackIsoDeposits = cms.InputTag("muIsoDepositTkDisplaced"),
JetIsoDeposits = cms.InputTag("muIsoDepositJetsDisplaced"),

FillPFIsolation = cms.bool(True),
PFIsolation = cms.PSet(
pfIsolationR03 = cms.PSet(chargedParticle = cms.InputTag("dispMuPFIsoValueChargedAll03"),
chargedHadron = cms.InputTag("dispMuPFIsoValueCharged03"),
neutralHadron = cms.InputTag("dispMuPFIsoValueNeutral03"),
neutralHadronHighThreshold = cms.InputTag("dispMuPFIsoValueNeutralHighThreshold03"),
photon = cms.InputTag("dispMuPFIsoValueGamma03"),
photonHighThreshold = cms.InputTag("dispMuPFIsoValueGammaHighThreshold03"),
pu = cms.InputTag("dispMuPFIsoValuePU03")),
pfIsolationR04 = cms.PSet(chargedParticle = cms.InputTag("dispMuPFIsoValueChargedAll04"),
chargedHadron = cms.InputTag("dispMuPFIsoValueCharged04"),
neutralHadron = cms.InputTag("dispMuPFIsoValueNeutral04"),
neutralHadronHighThreshold = cms.InputTag("dispMuPFIsoValueNeutralHighThreshold04"),
photon = cms.InputTag("dispMuPFIsoValueGamma04"),
photonHighThreshold = cms.InputTag("dispMuPFIsoValueGammaHighThreshold04"),
pu = cms.InputTag("dispMuPFIsoValuePU04")),
pfIsoMeanDRProfileR03 = cms.PSet(chargedParticle = cms.InputTag("dispMuPFMeanDRIsoValueChargedAll03"),
chargedHadron = cms.InputTag("dispMuPFMeanDRIsoValueCharged03"),
neutralHadron = cms.InputTag("dispMuPFMeanDRIsoValueNeutral03"),
neutralHadronHighThreshold = cms.InputTag("dispMuPFMeanDRIsoValueNeutralHighThreshold03"),
photon = cms.InputTag("dispMuPFMeanDRIsoValueGamma03"),
photonHighThreshold = cms.InputTag("dispMuPFMeanDRIsoValueGammaHighThreshold03"),
pu = cms.InputTag("dispMuPFMeanDRIsoValuePU03")),
pfIsoMeanDRProfileR04 = cms.PSet(chargedParticle = cms.InputTag("dispMuPFMeanDRIsoValueChargedAll04"),
chargedHadron = cms.InputTag("dispMuPFMeanDRIsoValueCharged04"),
neutralHadron = cms.InputTag("dispMuPFMeanDRIsoValueNeutral04"),
neutralHadronHighThreshold = cms.InputTag("dispMuPFMeanDRIsoValueNeutralHighThreshold04"),
photon = cms.InputTag("dispMuPFMeanDRIsoValueGamma04"),
photonHighThreshold = cms.InputTag("dispMuPFMeanDRIsoValueGammaHighThreshold04"),
pu = cms.InputTag("dispMuPFMeanDRIsoValuePU04")),
pfIsoSumDRProfileR03 = cms.PSet(chargedParticle = cms.InputTag("dispMuPFSumDRIsoValueChargedAll03"),
chargedHadron = cms.InputTag("dispMuPFSumDRIsoValueCharged03"),
neutralHadron = cms.InputTag("dispMuPFSumDRIsoValueNeutral03"),
neutralHadronHighThreshold = cms.InputTag("dispMuPFSumDRIsoValueNeutralHighThreshold03"),
photon = cms.InputTag("dispMuPFSumDRIsoValueGamma03"),
photonHighThreshold = cms.InputTag("dispMuPFSumDRIsoValueGammaHighThreshold03"),
pu = cms.InputTag("dispMuPFSumDRIsoValuePU03")),
pfIsoSumDRProfileR04 = cms.PSet(chargedParticle = cms.InputTag("dispMuPFSumDRIsoValueChargedAll04"),
chargedHadron = cms.InputTag("dispMuPFSumDRIsoValueCharged04"),
neutralHadron = cms.InputTag("dispMuPFSumDRIsoValueNeutral04"),
neutralHadronHighThreshold = cms.InputTag("dispMuPFSumDRIsoValueNeutralHighThreshold04"),
photon = cms.InputTag("dispMuPFSumDRIsoValueGamma04"),
photonHighThreshold = cms.InputTag("dispMuPFSumDRIsoValueGammaHighThreshold04"),
pu = cms.InputTag("dispMuPFSumDRIsoValuePU04"))
),

FillSelectorMaps = cms.bool(False),
SelectorMaps = cms.VInputTag(cms.InputTag("muidTMLastStationOptimizedLowPtLoose"),
cms.InputTag("muidTMLastStationOptimizedLowPtTight"),
cms.InputTag("muidTM2DCompatibilityLoose"),
cms.InputTag("muidTM2DCompatibilityTight"),
cms.InputTag("muidTrackerMuonArbitrated"),
cms.InputTag("muidTMLastStationAngLoose"),
cms.InputTag("muidGlobalMuonPromptTight"),
cms.InputTag("muidGMStaChiCompatibility"),
cms.InputTag("muidTMLastStationAngTight"),
cms.InputTag("muidGMTkChiCompatibility"),
cms.InputTag("muidTMOneStationAngTight"),
cms.InputTag("muidTMOneStationAngLoose"),
cms.InputTag("muidTMLastStationLoose"),
cms.InputTag("muidTMLastStationTight"),
cms.InputTag("muidTMOneStationTight"),
cms.InputTag("muidTMOneStationLoose"),
cms.InputTag("muidAllArbitrated"),
cms.InputTag("muidGMTkKinkTight"),
cms.InputTag("muidRPCMuLoose")
),

FillShoweringInfo = cms.bool(False),
ShowerInfoMap = cms.InputTag("muonShowerInformation"),

FillCosmicsIdMap = cms.bool(False),
CosmicIdMap = cms.InputTag("cosmicsVeto"),

ComputeStandardSelectors = cms.bool(True),
vertices = cms.InputTag("offlinePrimaryVertices")

)

# not commisoned and not relevant in FastSim (?):
from Configuration.Eras.Modifier_fastSim_cff import fastSim
fastSim.toModify(displacedMuons, FillCosmicsIdMap = False, FillSelectorMaps = False)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import FWCore.ParameterSet.Config as cms

from CommonTools.ParticleFlow.Isolation.tools_cfi import *


#Now prepare the iso deposits for displacedMuons
dispMuPFIsoDepositCharged=isoDepositReplace('displacedMuons1stStep','pfAllChargedHadrons')
dispMuPFIsoDepositChargedAll=isoDepositReplace('displacedMuons1stStep','pfAllChargedParticles')
dispMuPFIsoDepositNeutral=isoDepositReplace('displacedMuons1stStep','pfAllNeutralHadrons')
dispMuPFIsoDepositGamma=isoDepositReplace('displacedMuons1stStep','pfAllPhotons')
dispMuPFIsoDepositPU=isoDepositReplace('displacedMuons1stStep','pfPileUpAllChargedParticles')

displacedMuonPFIsolationDepositsTask = cms.Task(
dispMuPFIsoDepositCharged,
dispMuPFIsoDepositChargedAll,
dispMuPFIsoDepositGamma,
dispMuPFIsoDepositNeutral,
dispMuPFIsoDepositPU
)
displacedMuonPFIsolationDepositsSequence = cms.Sequence(displacedMuonPFIsolationDepositsTask)
Loading