diff --git a/PhysicsTools/PatAlgos/plugins/DisplacedMuonFilterProducer.cc b/PhysicsTools/PatAlgos/plugins/DisplacedMuonFilterProducer.cc new file mode 100644 index 0000000000000..28c227dd6f963 --- /dev/null +++ b/PhysicsTools/PatAlgos/plugins/DisplacedMuonFilterProducer.cc @@ -0,0 +1,300 @@ +/** \class DisplacedMuonFilterProducer + * + * The filter takes a reco::Muon collection as an input and preselects + * the muons that will be processed by the next sequences. + * + * 1) StandAlone muons matched to an inner track (either as Tracker or Global muons) + * are preselected if the StandAlone track has pt > minPtSTA_ or the tracker track + * has pt > minPtTK_ + * + * (Global muon are contained in this subset) + * + * 2) StandAlone-only muons are preselected if they have number of segments > minMatches_ + * and they have pt > minPtSTA_ + * + * 3) Tracker muons without an StandAlone track are preselected if they have pt > minPtTK_ + * and they are labelled as isTrackerMuon() i.e. not RPC/GEM muons. + * + * \author C. Fernandez Madrazo + * + */ + +// system include files +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DataFormats/MuonReco/interface/MuonFwd.h" +#include "DataFormats/MuonReco/interface/Muon.h" +#include "DataFormats/MuonReco/interface/MuonTimeExtra.h" +#include "DataFormats/MuonReco/interface/MuonTimeExtraMap.h" + +#include "DataFormats/Common/interface/ValueMap.h" +#include "DataFormats/RecoCandidate/interface/IsoDepositFwd.h" +#include "DataFormats/RecoCandidate/interface/IsoDeposit.h" + +#include "DataFormats/Common/interface/Handle.h" + +namespace pat { + class DisplacedMuonFilterProducer : public edm::stream::EDProducer<> { + public: + explicit DisplacedMuonFilterProducer(const edm::ParameterSet&); + + ~DisplacedMuonFilterProducer() override; + + void produce(edm::Event&, const edm::EventSetup&) override; + /// description of config file parameters + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + + private: + template + void fillMuonMap(edm::Event& event, + const edm::OrphanHandle& muonHandle, + const std::vector& muonExtra, + const std::string& label); + + // muon collections + const edm::InputTag srcMuons_; + const edm::EDGetTokenT srcMuonToken_; + + // filter criteria and selection + const double minPtTK_; // Minimum pt of inner tracks + const double minPtSTA_; // Minimum pt of standalone tracks + const double minMatches_; // Minimum number of matches of standalone-only muons + + // what information to fill + bool fillDetectorBasedIsolation_; + bool fillTimingInfo_; + + // timing info + edm::EDGetTokenT timeMapCmbToken_; + edm::EDGetTokenT timeMapDTToken_; + edm::EDGetTokenT timeMapCSCToken_; + + // detector based isolation + edm::EDGetTokenT theTrackDepositToken_; + edm::EDGetTokenT theEcalDepositToken_; + edm::EDGetTokenT theHcalDepositToken_; + edm::EDGetTokenT theHoDepositToken_; + edm::EDGetTokenT theJetDepositToken_; + }; +} // namespace pat + +pat::DisplacedMuonFilterProducer::DisplacedMuonFilterProducer(const edm::ParameterSet& iConfig) + : srcMuons_(iConfig.getParameter("srcMuons")), + srcMuonToken_(consumes(srcMuons_)), + minPtTK_(iConfig.getParameter("minPtTK")), + minPtSTA_(iConfig.getParameter("minPtSTA")), + minMatches_(iConfig.getParameter("minMatches")), + fillDetectorBasedIsolation_(iConfig.getParameter("FillDetectorBasedIsolation")), + fillTimingInfo_(iConfig.getParameter("FillTimingInfo")) { + produces(); + + if (fillTimingInfo_) { + timeMapCmbToken_ = consumes(edm::InputTag(srcMuons_.label(), "combined")); + timeMapDTToken_ = consumes(edm::InputTag(srcMuons_.label(), "dt")); + timeMapCSCToken_ = consumes(edm::InputTag(srcMuons_.label(), "csc")); + + produces("combined"); + produces("dt"); + produces("csc"); + } + + if (fillDetectorBasedIsolation_) { + theTrackDepositToken_ = consumes(iConfig.getParameter("TrackIsoDeposits")); + theJetDepositToken_ = consumes(iConfig.getParameter("JetIsoDeposits")); + theEcalDepositToken_ = consumes(iConfig.getParameter("EcalIsoDeposits")); + theHcalDepositToken_ = consumes(iConfig.getParameter("HcalIsoDeposits")); + theHoDepositToken_ = consumes(iConfig.getParameter("HoIsoDeposits")); + produces("tracker"); + produces("ecal"); + produces("hcal"); + produces("ho"); + produces("jets"); + } +} + +pat::DisplacedMuonFilterProducer::~DisplacedMuonFilterProducer() {} + +void pat::DisplacedMuonFilterProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + // filteredDisplacedMuons + edm::ParameterSetDescription desc; + desc.add("srcMuons", edm::InputTag("displacedMuons")); + desc.add("FillTimingInfo", true); + desc.add("FillDetectorBasedIsolation", false); + desc.add("TrackIsoDeposits", edm::InputTag("displacedMuons", "tracker")); + desc.add("JetIsoDeposits", edm::InputTag("displacedMuons", "jets")); + desc.add("EcalIsoDeposits", edm::InputTag("displacedMuons", "ecal")); + desc.add("HcalIsoDeposits", edm::InputTag("displacedMuons", "hcal")); + desc.add("HoIsoDeposits", edm::InputTag("displacedMuons", "ho")); + desc.add("minPtSTA", 3.5); + desc.add("minPtTK", 3.5); + desc.add("minMatches", 2); + descriptions.add("filteredDisplacedMuons", desc); +} + +// Filter muons + +void pat::DisplacedMuonFilterProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { + auto output = std::make_unique(); + + // muon collections + edm::Handle srcMuons; + iEvent.getByToken(srcMuonToken_, srcMuons); + + int nMuons = srcMuons->size(); + + // filter the muons + std::vector filteredmuons(nMuons, true); + int oMuons = nMuons; + + for (unsigned int i = 0; i < srcMuons->size(); i++) { + const reco::Muon& muon(srcMuons->at(i)); + + if (muon.isStandAloneMuon()) { + if (muon.innerTrack().isNonnull()) { + // Discard STA + GL/TR muons that are below pt threshold + if (muon.innerTrack()->pt() < minPtTK_ && muon.standAloneMuon()->pt() < minPtSTA_) { + filteredmuons[i] = false; + oMuons = oMuons - 1; + continue; + } + } else { + // Discard STA-only muons with less than minMatches_ segments and below pt threshold + if (!muon.isMatchesValid() || muon.numberOfMatches() < minMatches_ || muon.standAloneMuon()->pt() < minPtSTA_) { + filteredmuons[i] = false; + oMuons = oMuons - 1; + continue; + } + } + } else { + if (muon.innerTrack().isNonnull()) { + if (muon.innerTrack()->pt() < minPtTK_ || !muon.isTrackerMuon()) { + filteredmuons[i] = false; + oMuons = oMuons - 1; + continue; + } + } else { // Should never happen + edm::LogWarning("muonBadTracks") << "Muon that has not standalone nor tracker track." + << "There should be no such object. Muon is skipped."; + filteredmuons[i] = false; + oMuons = oMuons - 1; + continue; + } + } + } + + // timing information + edm::Handle timeMapCmb; + edm::Handle timeMapDT; + edm::Handle timeMapCSC; + + std::vector dtTimeColl(oMuons); + std::vector cscTimeColl(oMuons); + std::vector combinedTimeColl(oMuons); + + if (fillTimingInfo_) { + iEvent.getByToken(timeMapCmbToken_, timeMapCmb); + iEvent.getByToken(timeMapDTToken_, timeMapDT); + iEvent.getByToken(timeMapCSCToken_, timeMapCSC); + } + + // detector based isolation + std::vector trackDepColl(oMuons); + std::vector ecalDepColl(oMuons); + std::vector hcalDepColl(oMuons); + std::vector hoDepColl(oMuons); + std::vector jetDepColl(oMuons); + + edm::Handle trackIsoDepMap; + edm::Handle ecalIsoDepMap; + edm::Handle hcalIsoDepMap; + edm::Handle hoIsoDepMap; + edm::Handle jetIsoDepMap; + + if (fillDetectorBasedIsolation_) { + iEvent.getByToken(theTrackDepositToken_, trackIsoDepMap); + iEvent.getByToken(theEcalDepositToken_, ecalIsoDepMap); + iEvent.getByToken(theHcalDepositToken_, hcalIsoDepMap); + iEvent.getByToken(theHoDepositToken_, hoIsoDepMap); + iEvent.getByToken(theJetDepositToken_, jetIsoDepMap); + } + + // save filtered muons + unsigned int k = 0; + for (unsigned int i = 0; i < srcMuons->size(); i++) { + if (filteredmuons[i]) { + const reco::Muon& inMuon(srcMuons->at(i)); + reco::MuonRef muRef(srcMuons, i); + + // Copy the muon + reco::Muon outMuon = inMuon; + + // Fill timing information + if (fillTimingInfo_) { + combinedTimeColl[k] = (*timeMapCmb)[muRef]; + dtTimeColl[k] = (*timeMapDT)[muRef]; + cscTimeColl[k] = (*timeMapCSC)[muRef]; + } + + // Fill detector based isolation + if (fillDetectorBasedIsolation_) { + trackDepColl[k] = (*trackIsoDepMap)[muRef]; + ecalDepColl[k] = (*ecalIsoDepMap)[muRef]; + hcalDepColl[k] = (*hcalIsoDepMap)[muRef]; + hoDepColl[k] = (*hoIsoDepMap)[muRef]; + jetDepColl[k] = (*jetIsoDepMap)[muRef]; + } + + output->push_back(outMuon); + k++; + } + } + + // fill information + edm::OrphanHandle muonHandle = iEvent.put(std::move(output)); + + if (fillTimingInfo_) { + fillMuonMap(iEvent, muonHandle, combinedTimeColl, "combined"); + fillMuonMap(iEvent, muonHandle, dtTimeColl, "dt"); + fillMuonMap(iEvent, muonHandle, cscTimeColl, "csc"); + } + + if (fillDetectorBasedIsolation_) { + fillMuonMap(iEvent, muonHandle, trackDepColl, "tracker"); + fillMuonMap(iEvent, muonHandle, jetDepColl, "jets"); + fillMuonMap(iEvent, muonHandle, ecalDepColl, "ecal"); + fillMuonMap(iEvent, muonHandle, hcalDepColl, "hcal"); + fillMuonMap(iEvent, muonHandle, hoDepColl, "ho"); + } +} + +template +void pat::DisplacedMuonFilterProducer::fillMuonMap(edm::Event& event, + const edm::OrphanHandle& muonHandle, + const std::vector& muonExtra, + const std::string& label) { + typedef typename edm::ValueMap::Filler FILLER; + + auto muonMap = std::make_unique>(); + if (!muonExtra.empty()) { + FILLER filler(*muonMap); + filler.insert(muonHandle, muonExtra.begin(), muonExtra.end()); + filler.fill(); + } + event.put(std::move(muonMap), label); +} + +#include "FWCore/Framework/interface/MakerMacros.h" +using pat::DisplacedMuonFilterProducer; +DEFINE_FWK_MODULE(DisplacedMuonFilterProducer); diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/displacedMuonProducer_cff.py b/PhysicsTools/PatAlgos/python/producersLayer1/displacedMuonProducer_cff.py new file mode 100644 index 0000000000000..33fa195521ff9 --- /dev/null +++ b/PhysicsTools/PatAlgos/python/producersLayer1/displacedMuonProducer_cff.py @@ -0,0 +1,100 @@ +import FWCore.ParameterSet.Config as cms + +from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import * +from PhysicsTools.PatAlgos.producersLayer1.muonProducer_cfi import * + +from PhysicsTools.PatAlgos.recoLayer0.filteredDisplacedMuons_cfi import * +filteredDisplacedMuonsTask = cms.Task(filteredDisplacedMuons) + + +patDisplacedMuons = patMuons.clone( + + # Input collection + muonSource = "filteredDisplacedMuons", + + # embedding objects + embedMuonBestTrack = True, ## embed in AOD externally stored muon best track from global pflow + embedTunePMuonBestTrack = True, ## embed in AOD externally stored muon best track from muon only + forceBestTrackEmbedding = False, ## force embedding separately the best tracks even if they're already embedded e.g. as tracker or global tracks + embedTrack = True, ## embed in AOD externally stored tracker track + embedCombinedMuon = True, ## embed in AOD externally stored combined muon track + embedStandAloneMuon = True, ## embed in AOD externally stored standalone muon track + embedPickyMuon = False, ## embed in AOD externally stored TeV-refit picky muon track + embedTpfmsMuon = False, ## embed in AOD externally stored TeV-refit TPFMS muon track + embedDytMuon = False, ## embed in AOD externally stored TeV-refit DYT muon track + embedPFCandidate = False, ## embed in AOD externally stored particle flow candidate + + # embedding of muon MET corrections for caloMET + embedCaloMETMuonCorrs = False, + # embedding of muon MET corrections for tcMET + embedTcMETMuonCorrs = False, # removed from RECO/AOD! + + # Read and store combined inverse beta + addInverseBeta = True, + sourceMuonTimeExtra = ["filteredDisplacedMuons","combined"], + + # mc matching (deactivated) + addGenMatch = False, + embedGenMatch = False, + genParticleMatch = "displacedMuonMatch", # deactivated + + # high level selections + embedHighLevelSelection = True, + beamLineSrc = "offlineBeamSpot", + pvSrc = "offlinePrimaryVertices", + + # ecal PF energy + embedPfEcalEnergy = False, + addPuppiIsolation = False, + + # Compute and store Mini-Isolation. + # Implemention and a description of parameters can be found in: + # PhysicsTools/PatUtils/src/PFIsolation.cc + # only works in miniaod, so set to True in miniAOD_tools.py + computeMiniIso = False, + effectiveAreaVec = [0.0566, 0.0562, 0.0363, 0.0119, 0.0064], + pfCandsForMiniIso = "packedPFCandidates", + miniIsoParams = [0.05, 0.2, 10.0, 0.5, 0.0001, 0.01, 0.01, 0.01, 0.0], + + computePuppiCombinedIso = False, + # Standard Muon Selectors and Jet-related observables + # Depends on MiniIsolation, so only works in miniaod + # Don't forget to set flags properly in miniAOD_tools.py + computeMuonMVA = False, + mvaTrainingFile = "RecoMuon/MuonIdentification/data/mu_2017_BDTG.weights.xml", + lowPtmvaTrainingFile = "RecoMuon/MuonIdentification/data/mu_lowpt_BDTG.weights.xml", + recomputeBasicSelectors = False, + mvaUseJec = False, + mvaDrMax = 0.4, + mvaJetTag = "pfCombinedInclusiveSecondaryVertexV2BJetTags", + mvaL1Corrector = "ak4PFCHSL1FastjetCorrector", + mvaL1L2L3ResCorrector = "ak4PFCHSL1FastL2L3Corrector", + rho = "fixedGridRhoFastjetCentralNeutral", + + computeSoftMuonMVA = False, + softMvaTrainingFile = "RecoMuon/MuonIdentification/data/TMVA-muonid-bmm4-B-25.weights.xml", + + # MC Info + muonSimInfo = "displacedMuonSimClassifier", # This module does not exists but producer checks existence by itself + + # Trigger Info + addTriggerMatching = False, + triggerObjects = "slimmedPatTrigger", + triggerResults = ["TriggerResults","","HLT"], + hltCollectionFilters = ['*'] + +) + +patDisplacedMuons.isoDeposits = cms.PSet() +patDisplacedMuons.isolationValues = cms.PSet() + + + +# Displaced muon task filters the displacedMuons that overlap with standard muons +makePatDisplacedMuonsTask = cms.Task( + filteredDisplacedMuonsTask, + patDisplacedMuons + ) + +makePatDisplacedMuons = cms.Sequence(makePatDisplacedMuonsTask) + diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/patCandidates_cff.py b/PhysicsTools/PatAlgos/python/producersLayer1/patCandidates_cff.py index 6f40251875909..1286dca89bbfd 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/patCandidates_cff.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/patCandidates_cff.py @@ -3,6 +3,7 @@ from PhysicsTools.PatAlgos.producersLayer1.electronProducer_cff import * from PhysicsTools.PatAlgos.producersLayer1.lowPtElectronProducer_cff import * from PhysicsTools.PatAlgos.producersLayer1.muonProducer_cff import * +from PhysicsTools.PatAlgos.producersLayer1.displacedMuonProducer_cff import * from PhysicsTools.PatAlgos.producersLayer1.tauProducer_cff import * from PhysicsTools.PatAlgos.producersLayer1.photonProducer_cff import * from PhysicsTools.PatAlgos.producersLayer1.ootPhotonProducer_cff import * @@ -16,6 +17,7 @@ cms.InputTag("patElectrons"), cms.InputTag("patLowPtElectrons"), cms.InputTag("patMuons"), + cms.InputTag("patDisplacedMuons"), cms.InputTag("patTaus"), cms.InputTag("patPhotons"), cms.InputTag("patOOTPhotons"), @@ -28,6 +30,7 @@ makePatElectronsTask, makePatLowPtElectronsTask, makePatMuonsTask, + makePatDisplacedMuonsTask, makePatTausTask, makePatPhotonsTask, makePatOOTPhotonsTask, @@ -49,5 +52,14 @@ (pp_on_AA | _mAOD).toModify(patCandidateSummary.candidates, func = lambda list: list.remove(cms.InputTag("patLowPtElectrons")) ) +from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL +(pp_on_AA | _mAOD | run2_miniAOD_UL).toReplaceWith(patCandidatesTask, + patCandidatesTask.copyAndExclude([makePatDisplacedMuonsTask])) +(pp_on_AA | _mAOD | run2_miniAOD_UL).toModify(patCandidateSummary.candidates, + func = lambda list: list.remove(cms.InputTag("patDisplacedMuons")) ) + +from Configuration.Eras.Modifier_fastSim_cff import fastSim +fastSim.toReplaceWith(patCandidatesTask, patCandidatesTask.copyAndExclude([makePatDisplacedMuonsTask])) + patCandidates = cms.Sequence(patCandidateSummary, patCandidatesTask) diff --git a/PhysicsTools/PatAlgos/python/recoLayer0/filteredDisplacedMuons_cfi.py b/PhysicsTools/PatAlgos/python/recoLayer0/filteredDisplacedMuons_cfi.py new file mode 100644 index 0000000000000..b88bbd927f800 --- /dev/null +++ b/PhysicsTools/PatAlgos/python/recoLayer0/filteredDisplacedMuons_cfi.py @@ -0,0 +1,23 @@ +import FWCore.ParameterSet.Config as cms + +filteredDisplacedMuons = cms.EDProducer("DisplacedMuonFilterProducer", + + # Muon collections + srcMuons = cms.InputTag("displacedMuons"), + + FillTimingInfo = cms.bool(True), + + # Muon detector based isolation + FillDetectorBasedIsolation = cms.bool(False), + + TrackIsoDeposits = cms.InputTag("displacedMuons:tracker"), + JetIsoDeposits = cms.InputTag("displacedMuons:jets"), + EcalIsoDeposits = cms.InputTag("displacedMuons:ecal"), + HcalIsoDeposits = cms.InputTag("displacedMuons:hcal"), + HoIsoDeposits = cms.InputTag("displacedMuons:ho"), + + # Preselection criteria + minPtSTA = cms.double( 3.5 ), + minPtTK = cms.double( 3.5 ), + minMatches = cms.double( 2 ), +) diff --git a/PhysicsTools/PatAlgos/python/selectionLayer1/displacedMuonSelector_cfi.py b/PhysicsTools/PatAlgos/python/selectionLayer1/displacedMuonSelector_cfi.py new file mode 100644 index 0000000000000..5de4cb6fd54f5 --- /dev/null +++ b/PhysicsTools/PatAlgos/python/selectionLayer1/displacedMuonSelector_cfi.py @@ -0,0 +1,10 @@ +import FWCore.ParameterSet.Config as cms + +# module to select displacedMuons +# +selectedPatDisplacedMuons = cms.EDFilter("PATMuonSelector", + src = cms.InputTag("patDisplacedMuons"), + cut = cms.string("") +) + + diff --git a/PhysicsTools/PatAlgos/python/selectionLayer1/selectedPatCandidates_cff.py b/PhysicsTools/PatAlgos/python/selectionLayer1/selectedPatCandidates_cff.py index 50381daef2318..e4a4d968ac500 100644 --- a/PhysicsTools/PatAlgos/python/selectionLayer1/selectedPatCandidates_cff.py +++ b/PhysicsTools/PatAlgos/python/selectionLayer1/selectedPatCandidates_cff.py @@ -3,6 +3,7 @@ from PhysicsTools.PatAlgos.selectionLayer1.electronSelector_cfi import * from PhysicsTools.PatAlgos.selectionLayer1.lowPtElectronSelector_cfi import * from PhysicsTools.PatAlgos.selectionLayer1.muonSelector_cfi import * +from PhysicsTools.PatAlgos.selectionLayer1.displacedMuonSelector_cfi import * from PhysicsTools.PatAlgos.selectionLayer1.tauSelector_cfi import * from PhysicsTools.PatAlgos.selectionLayer1.photonSelector_cfi import * from PhysicsTools.PatAlgos.selectionLayer1.ootPhotonSelector_cff import * @@ -16,6 +17,7 @@ cms.InputTag("selectedPatElectrons"), cms.InputTag("selectedPatLowPtElectrons"), cms.InputTag("selectedPatMuons"), + cms.InputTag("selectedPatDisplacedMuons"), cms.InputTag("selectedPatTaus"), cms.InputTag("selectedPatPhotons"), cms.InputTag("selectedPatOOTPhotons"), @@ -27,6 +29,7 @@ selectedPatElectrons, selectedPatLowPtElectrons, selectedPatMuons, + selectedPatDisplacedMuons, selectedPatTaus, selectedPatPhotons, selectedPatOOTPhotons, @@ -46,3 +49,12 @@ selectedPatCandidatesTask.copyAndExclude([selectedPatLowPtElectrons])) (pp_on_AA | _mAOD).toModify(selectedPatCandidateSummary.candidates, func = lambda list: list.remove(cms.InputTag("selectedPatLowPtElectrons")) ) + +from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL +(pp_on_AA | _mAOD | run2_miniAOD_UL).toReplaceWith(selectedPatCandidatesTask, + selectedPatCandidatesTask.copyAndExclude([selectedPatDisplacedMuons])) +(pp_on_AA | _mAOD | run2_miniAOD_UL).toModify(selectedPatCandidateSummary.candidates, + func = lambda list: list.remove(cms.InputTag("selectedPatDisplacedMuons")) ) + +from Configuration.Eras.Modifier_fastSim_cff import fastSim +fastSim.toReplaceWith(selectedPatCandidatesTask, selectedPatCandidatesTask.copyAndExclude([selectedPatDisplacedMuons])) diff --git a/PhysicsTools/PatAlgos/python/slimming/MicroEventContent_cff.py b/PhysicsTools/PatAlgos/python/slimming/MicroEventContent_cff.py index 5035ec39e78e4..7b285010e986c 100644 --- a/PhysicsTools/PatAlgos/python/slimming/MicroEventContent_cff.py +++ b/PhysicsTools/PatAlgos/python/slimming/MicroEventContent_cff.py @@ -95,6 +95,12 @@ # patLowPtElectrons 'keep *_slimmedLowPtElectrons_*_*', 'keep *_gsfTracksOpenConversions_*_*', + # patDisplacedMuons + 'keep *_slimmedDisplacedMuons_*_*', + 'keep recoTrackExtras_slimmedDisplacedMuonTrackExtras_*_*', + 'keep TrackingRecHitsOwned_slimmedDisplacedMuonTrackExtras_*_*', + 'keep SiPixelClusteredmNewDetSetVector_slimmedDisplacedMuonTrackExtras_*_*', + 'keep SiStripClusteredmNewDetSetVector_slimmedDisplacedMuonTrackExtras_*_*', ) ) diff --git a/PhysicsTools/PatAlgos/python/slimming/slimmedDisplacedMuons_cfi.py b/PhysicsTools/PatAlgos/python/slimming/slimmedDisplacedMuons_cfi.py new file mode 100644 index 0000000000000..fda6baa221747 --- /dev/null +++ b/PhysicsTools/PatAlgos/python/slimming/slimmedDisplacedMuons_cfi.py @@ -0,0 +1,23 @@ +import FWCore.ParameterSet.Config as cms + +slimmedDisplacedMuons = cms.EDProducer("PATMuonSlimmer", + src = cms.InputTag("selectedPatDisplacedMuons"), + linkToPackedPFCandidates = cms.bool(False), + linkToLostTrack = cms.bool(False), + pfCandidates = cms.VInputTag(cms.InputTag("particleFlow")), + packedPFCandidates = cms.VInputTag(cms.InputTag("packedPFCandidates")), + lostTracks = cms.InputTag("lostTracks"), + saveTeVMuons = cms.string("0"), # you can put a cut to slim selectively, e.g. pt > 10 + dropDirectionalIso = cms.string("0"), + dropPfP4 = cms.string("1"), + slimCaloVars = cms.string("1"), + slimKinkVars = cms.string("1"), + slimCaloMETCorr = cms.string("1"), + slimMatches = cms.string("1"), + segmentsMuonSelection = cms.string("pt > 50"), #segments are needed for EXO analysis looking at TOF and for very high pt from e.g. Z' + saveSegments = cms.bool(True), + modifyMuons = cms.bool(True), + modifierConfig = cms.PSet( modifications = cms.VPSet() ), + trackExtraAssocs = cms.VInputTag(["displacedMuonReducedTrackExtras", "slimmedDisplacedMuonTrackExtras"]), +) + diff --git a/PhysicsTools/PatAlgos/python/slimming/slimmedTrackExtras_cff.py b/PhysicsTools/PatAlgos/python/slimming/slimmedTrackExtras_cff.py index 61997c42e81f4..43c4d1feceb77 100644 --- a/PhysicsTools/PatAlgos/python/slimming/slimmedTrackExtras_cff.py +++ b/PhysicsTools/PatAlgos/python/slimming/slimmedTrackExtras_cff.py @@ -9,6 +9,14 @@ pixelClusterTag = "muonReducedTrackExtras", stripClusterTag = "muonReducedTrackExtras") +from RecoMuon.MuonIdentification.displacedMuonReducedTrackExtras_cfi import displacedMuonReducedTrackExtras +slimmedDisplacedMuonTrackExtras = displacedMuonReducedTrackExtras.clone(muonTag = "selectedPatDisplacedMuons", + cut = "pt > 4.5", + trackExtraTags = ["displacedMuonReducedTrackExtras", "displacedStandAloneMuons"], + trackExtraAssocs = ["displacedMuonReducedTrackExtras"], + pixelClusterTag = "displacedMuonReducedTrackExtras", + stripClusterTag = "displacedMuonReducedTrackExtras") + # no clusters in fastsim from Configuration.Eras.Modifier_fastSim_cff import fastSim fastSim.toModify(slimmedMuonTrackExtras, outputClusters = False) @@ -16,6 +24,7 @@ # cluster collections are different in phase 2, so skip this for now from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker phase2_tracker.toModify(slimmedMuonTrackExtras, outputClusters = False) +phase2_tracker.toModify(slimmedDisplacedMuonTrackExtras, outputClusters = False) # lower minimum pt for B-parking from Configuration.Eras.Modifier_bParking_cff import bParking diff --git a/PhysicsTools/PatAlgos/python/slimming/slimming_cff.py b/PhysicsTools/PatAlgos/python/slimming/slimming_cff.py index 306efa71e690e..1de9d39cab7a7 100644 --- a/PhysicsTools/PatAlgos/python/slimming/slimming_cff.py +++ b/PhysicsTools/PatAlgos/python/slimming/slimming_cff.py @@ -18,6 +18,7 @@ from PhysicsTools.PatAlgos.slimming.slimmedLowPtElectrons_cff import * from PhysicsTools.PatAlgos.slimming.slimmedTrackExtras_cff import * from PhysicsTools.PatAlgos.slimming.slimmedMuons_cfi import * +from PhysicsTools.PatAlgos.slimming.slimmedDisplacedMuons_cfi import * from PhysicsTools.PatAlgos.slimming.slimmedPhotons_cfi import * from PhysicsTools.PatAlgos.slimming.slimmedOOTPhotons_cff import * from PhysicsTools.PatAlgos.slimming.slimmedTaus_cfi import * @@ -52,6 +53,8 @@ slimmedLowPtElectronsTask, slimmedMuonTrackExtras, slimmedMuons, + slimmedDisplacedMuonTrackExtras, + slimmedDisplacedMuons, slimmedPhotons, slimmedOOTPhotons, slimmedTaus, @@ -75,6 +78,10 @@ (pp_on_AA | _mAOD).toReplaceWith(slimmingTask, slimmingTask.copyAndExclude([slimmedLowPtElectronsTask])) +from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL +(pp_on_AA | _mAOD | run2_miniAOD_UL).toReplaceWith(slimmingTask, + slimmingTask.copyAndExclude([slimmedDisplacedMuons, slimmedDisplacedMuonTrackExtras])) + from PhysicsTools.PatAlgos.slimming.hiPixelTracks_cfi import hiPixelTracks from RecoHI.HiEvtPlaneAlgos.HiEvtPlane_cfi import hiEvtPlane from RecoHI.HiEvtPlaneAlgos.hiEvtPlaneFlat_cfi import hiEvtPlaneFlat @@ -98,6 +105,9 @@ slimmingTask, cms.Task(slimmingTask.copy(), offlinePrimaryVerticesRecovery, offlineSlimmedPrimaryVerticesRecovery)) +from Configuration.Eras.Modifier_fastSim_cff import fastSim +fastSim.toReplaceWith(slimmingTask, slimmingTask.copyAndExclude([slimmedDisplacedMuons, slimmedDisplacedMuonTrackExtras])) + from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing _phase2_timing_slimmingTask = cms.Task(slimmingTask.copy(), offlineSlimmedPrimaryVertices4D) diff --git a/PhysicsTools/PatAlgos/test/IntegrationTest_cfg.py b/PhysicsTools/PatAlgos/test/IntegrationTest_cfg.py index fa1bd5897bfd7..a5ceb82bfad31 100644 --- a/PhysicsTools/PatAlgos/test/IntegrationTest_cfg.py +++ b/PhysicsTools/PatAlgos/test/IntegrationTest_cfg.py @@ -27,6 +27,9 @@ process.patLowPtElectrons.genParticleMatch = "electronMatch" process.selectedPatLowPtElectrons.cut = "pt>99999." +process.filteredDisplacedMuons.srcMuons = "muons" +process.selectedPatDisplacedMuons.cut = "pt>99999." + ## ------------------------------------------------------ # In addition you usually want to change the following # parameters: diff --git a/PhysicsTools/PatAlgos/test/patTuple_addTriggerInfo_cfg.py b/PhysicsTools/PatAlgos/test/patTuple_addTriggerInfo_cfg.py index 9e7c2fe6ffa7e..c31d5b90344d8 100644 --- a/PhysicsTools/PatAlgos/test/patTuple_addTriggerInfo_cfg.py +++ b/PhysicsTools/PatAlgos/test/patTuple_addTriggerInfo_cfg.py @@ -23,6 +23,9 @@ process.patLowPtElectrons.genParticleMatch = "electronMatch" process.selectedPatLowPtElectrons.cut = "pt>99999." +process.filteredDisplacedMuons.srcMuons = "muons" +process.selectedPatDisplacedMuons.cut = "pt>99999." + ### Get PAT trigger tools from PhysicsTools.PatAlgos.tools.trigTools import * diff --git a/RecoMuon/Configuration/python/RecoMuonPPonly_cff.py b/RecoMuon/Configuration/python/RecoMuonPPonly_cff.py index 7d05060ffbc85..a59d02fa956a1 100644 --- a/RecoMuon/Configuration/python/RecoMuonPPonly_cff.py +++ b/RecoMuon/Configuration/python/RecoMuonPPonly_cff.py @@ -40,6 +40,21 @@ from RecoMuon.MuonIdentification.muonIdProducerSequence_cff import * muons1stStep.fillGlobalTrackQuality = True +# Displaced muons +displacedMuons1stStep = muons1stStep.clone( + inputCollectionLabels = ['displacedTracks', + 'displacedGlobalMuons', + 'displacedStandAloneMuons'], + inputCollectionTypes = ['inner tracks', + 'links', + 'outer tracks'], + fillGlobalTrackQuality = False +) +displacedMuons1stStep.TrackExtractorPSet.Diff_r = 0.2 +displacedMuons1stStep.TrackExtractorPSet.Diff_z = 0.5 + +displacedMuonIdProducerTask = cms.Task(displacedMuons1stStep) + #Muon Id isGood flag ValueMap producer sequence from RecoMuon.MuonIdentification.muonSelectionTypeValueMapProducer_cff import * @@ -70,7 +85,8 @@ muontrackingTask = cms.Task(standalonemuontrackingTask,globalmuontrackingTask) muontracking = cms.Sequence(muontrackingTask) # Muon Reconstruction -muonrecoTask = cms.Task(muontrackingTask,muonIdProducerTask) +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) @@ -90,8 +106,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: @@ -104,4 +122,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])) diff --git a/RecoMuon/Configuration/python/RecoMuon_EventContent_cff.py b/RecoMuon/Configuration/python/RecoMuon_EventContent_cff.py index 9463e22dfcec5..06be3e0ba451f 100644 --- a/RecoMuon/Configuration/python/RecoMuon_EventContent_cff.py +++ b/RecoMuon/Configuration/python/RecoMuon_EventContent_cff.py @@ -36,6 +36,14 @@ #'drop *_muons_muons1stStep2muonsMap_*', #'drop recoIsoDepositedmValueMap_muons_*_*', #not really used #'drop doubleedmValueMap_muons_muPFIso*_*', #already inside the muon + # displacedMuons collection + 'keep recoMuons_displacedMuons_*_*', + 'keep booledmValueMap_displacedMuons_*_*', + 'keep doubleedmValueMap_displacedMuons_dispMuPFMean*_*', + 'keep doubleedmValueMap_displacedMuons_dispMuPFSum*_*', + 'keep recoMuonTimeExtraedmValueMap_displacedMuons_*_*', + 'keep uintedmValueMap_displacedMuons_*_*', + 'keep *_particleFlow_displacedMuons_*', # Tracks known by the Muon obj 'keep recoTracks_standAloneMuons_*_*', 'keep recoTrackExtras_standAloneMuons_*_*', @@ -64,7 +72,8 @@ 'keep recoTracks_displacedStandAloneMuons__*', 'keep recoTrackExtras_displacedStandAloneMuons_*_*', 'keep TrackingRecHitsOwned_displacedStandAloneMuons_*_*', - 'keep *_muonReducedTrackExtras_*_*') + 'keep *_muonReducedTrackExtras_*_*', + 'keep *_displacedMuonReducedTrackExtras_*_*') ) RecoMuonAOD.outputCommands.extend(RecoMuonIsolationAOD.outputCommands) diff --git a/RecoMuon/Configuration/python/RecoMuon_cff.py b/RecoMuon/Configuration/python/RecoMuon_cff.py index a2d0f63e6863a..2363b949eeba2 100644 --- a/RecoMuon/Configuration/python/RecoMuon_cff.py +++ b/RecoMuon/Configuration/python/RecoMuon_cff.py @@ -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 @@ -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])) diff --git a/RecoMuon/MuonIdentification/python/displacedMuonReducedTrackExtras_cfi.py b/RecoMuon/MuonIdentification/python/displacedMuonReducedTrackExtras_cfi.py new file mode 100644 index 0000000000000..ed60cab92dd15 --- /dev/null +++ b/RecoMuon/MuonIdentification/python/displacedMuonReducedTrackExtras_cfi.py @@ -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 +) diff --git a/RecoMuon/MuonIdentification/python/displacedMuons_cfi.py b/RecoMuon/MuonIdentification/python/displacedMuons_cfi.py new file mode 100644 index 0000000000000..b82eb11a0fa70 --- /dev/null +++ b/RecoMuon/MuonIdentification/python/displacedMuons_cfi.py @@ -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) diff --git a/RecoMuon/MuonIsolation/python/displacedMuonPFIsolationDeposits_cff.py b/RecoMuon/MuonIsolation/python/displacedMuonPFIsolationDeposits_cff.py new file mode 100644 index 0000000000000..53f5cd53a737e --- /dev/null +++ b/RecoMuon/MuonIsolation/python/displacedMuonPFIsolationDeposits_cff.py @@ -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) diff --git a/RecoMuon/MuonIsolation/python/displacedMuonPFIsolationValues_cff.py b/RecoMuon/MuonIsolation/python/displacedMuonPFIsolationValues_cff.py new file mode 100644 index 0000000000000..8206fc284948b --- /dev/null +++ b/RecoMuon/MuonIsolation/python/displacedMuonPFIsolationValues_cff.py @@ -0,0 +1,618 @@ +import FWCore.ParameterSet.Config as cms + + + +dispMuPFIsoValueCharged03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositCharged"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) + + +dispMuPFSumDRIsoValueCharged03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositCharged"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + +dispMuPFMeanDRIsoValueCharged03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositCharged"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + + +dispMuPFIsoValueChargedAll03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositChargedAll"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) + +dispMuPFSumDRIsoValueChargedAll03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositChargedAll"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + +dispMuPFMeanDRIsoValueChargedAll03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositChargedAll"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + + +dispMuPFIsoValueGamma03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) +dispMuPFSumDRIsoValueGamma03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + +dispMuPFMeanDRIsoValueGamma03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + + +dispMuPFIsoValueNeutral03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) +dispMuPFSumDRIsoValueNeutral03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + +dispMuPFMeanDRIsoValueNeutral03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + + + +dispMuPFIsoValueGammaHighThreshold03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) +dispMuPFSumDRIsoValueGammaHighThreshold03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + +dispMuPFMeanDRIsoValueGammaHighThreshold03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + + +dispMuPFIsoValueNeutralHighThreshold03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) + +dispMuPFMeanDRIsoValueNeutralHighThreshold03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + +dispMuPFSumDRIsoValueNeutralHighThreshold03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + +dispMuPFIsoValuePU03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositPU"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) + +dispMuPFSumDRIsoValuePU03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositPU"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + +dispMuPFMeanDRIsoValuePU03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositPU"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + + + +dispMuPFIsoValueCharged04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositCharged"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) + +dispMuPFSumDRIsoValueCharged04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositCharged"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + +dispMuPFMeanDRIsoValueCharged04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositCharged"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + + + + +dispMuPFIsoValueChargedAll04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositChargedAll"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) + +dispMuPFSumDRIsoValueChargedAll04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositChargedAll"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + +dispMuPFMeanDRIsoValueChargedAll04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositChargedAll"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + + + + + +dispMuPFIsoValueGamma04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) + +dispMuPFSumDRIsoValueGamma04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + +dispMuPFMeanDRIsoValueGamma04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + + +dispMuPFIsoValueNeutral04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) + +) + +dispMuPFSumDRIsoValueNeutral04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) + +) + +dispMuPFMeanDRIsoValueNeutral04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) + +) + + +dispMuPFIsoValueGammaHighThreshold04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) + +dispMuPFMeanDRIsoValueGammaHighThreshold04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + +dispMuPFSumDRIsoValueGammaHighThreshold04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositGamma"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + + +dispMuPFIsoValueNeutralHighThreshold04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) + +) + +dispMuPFMeanDRIsoValueNeutralHighThreshold04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) + +) + +dispMuPFSumDRIsoValueNeutralHighThreshold04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositNeutral"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(1.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) + +) + +dispMuPFIsoValuePU04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositPU"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) +) + +dispMuPFMeanDRIsoValuePU04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositPU"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('meanDR') + ) + ) +) + +dispMuPFSumDRIsoValuePU04 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("dispMuPFIsoDepositPU"), + deltaR = cms.double(0.4), + weight = cms.string('1'), + vetos = cms.vstring('0.01','Threshold(0.5)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sumDR') + ) + ) +) + +displacedMuonPFIsolationValuesTask = cms.Task( + dispMuPFIsoValueCharged03, + dispMuPFMeanDRIsoValueCharged03, + dispMuPFSumDRIsoValueCharged03, + dispMuPFIsoValueChargedAll03, + dispMuPFMeanDRIsoValueChargedAll03, + dispMuPFSumDRIsoValueChargedAll03, + dispMuPFIsoValueGamma03, + dispMuPFMeanDRIsoValueGamma03, + dispMuPFSumDRIsoValueGamma03, + dispMuPFIsoValueNeutral03, + dispMuPFMeanDRIsoValueNeutral03, + dispMuPFSumDRIsoValueNeutral03, + dispMuPFIsoValueGammaHighThreshold03, + dispMuPFMeanDRIsoValueGammaHighThreshold03, + dispMuPFSumDRIsoValueGammaHighThreshold03, + dispMuPFIsoValueNeutralHighThreshold03, + dispMuPFMeanDRIsoValueNeutralHighThreshold03, + dispMuPFSumDRIsoValueNeutralHighThreshold03, + dispMuPFIsoValuePU03, + dispMuPFMeanDRIsoValuePU03, + dispMuPFSumDRIsoValuePU03, + ############################## + dispMuPFIsoValueCharged04, + dispMuPFMeanDRIsoValueCharged04, + dispMuPFSumDRIsoValueCharged04, + dispMuPFIsoValueChargedAll04, + dispMuPFMeanDRIsoValueChargedAll04, + dispMuPFSumDRIsoValueChargedAll04, + dispMuPFIsoValueGamma04, + dispMuPFMeanDRIsoValueGamma04, + dispMuPFSumDRIsoValueGamma04, + dispMuPFIsoValueNeutral04, + dispMuPFMeanDRIsoValueNeutral04, + dispMuPFSumDRIsoValueNeutral04, + dispMuPFIsoValueGammaHighThreshold04, + dispMuPFMeanDRIsoValueGammaHighThreshold04, + dispMuPFSumDRIsoValueGammaHighThreshold04, + dispMuPFIsoValueNeutralHighThreshold04, + dispMuPFMeanDRIsoValueNeutralHighThreshold04, + dispMuPFSumDRIsoValueNeutralHighThreshold04, + dispMuPFIsoValuePU04, + dispMuPFMeanDRIsoValuePU04, + dispMuPFSumDRIsoValuePU04 + ) +displacedMuonPFIsolationValuesSequence = cms.Sequence(displacedMuonPFIsolationValuesTask) diff --git a/RecoMuon/MuonIsolation/python/muonPFIsolation_cff.py b/RecoMuon/MuonIsolation/python/muonPFIsolation_cff.py index 72d8b3e1274da..59e645fd86b73 100644 --- a/RecoMuon/MuonIsolation/python/muonPFIsolation_cff.py +++ b/RecoMuon/MuonIsolation/python/muonPFIsolation_cff.py @@ -9,3 +9,12 @@ muonPFIsolationValuesTask ) muonPFIsolationSequence = cms.Sequence(muonPFIsolationTask) + +from RecoMuon.MuonIsolation.displacedMuonPFIsolationDeposits_cff import * +from RecoMuon.MuonIsolation.displacedMuonPFIsolationValues_cff import * + +displacedMuonPFIsolationTask = cms.Task( + displacedMuonPFIsolationDepositsTask, + displacedMuonPFIsolationValuesTask +) +displacedMuonPFIsolationSequence = cms.Sequence(displacedMuonPFIsolationTask) diff --git a/RecoMuon/MuonIsolationProducers/python/muIsoDepositCopies_cfi.py b/RecoMuon/MuonIsolationProducers/python/muIsoDepositCopies_cfi.py index fed75c5caeaec..cf95ff86f022d 100644 --- a/RecoMuon/MuonIsolationProducers/python/muIsoDepositCopies_cfi.py +++ b/RecoMuon/MuonIsolationProducers/python/muIsoDepositCopies_cfi.py @@ -5,14 +5,28 @@ depositNames = cms.vstring('') ) +muIsoDepositTkDisplaced = cms.EDProducer("MuIsoDepositCopyProducer", + inputTags = cms.VInputTag(cms.InputTag("displacedMuons1stStep:tracker")), + depositNames = cms.vstring('') +) + muIsoDepositJets = cms.EDProducer("MuIsoDepositCopyProducer", inputTags = cms.VInputTag(cms.InputTag("muons1stStep:jets")), depositNames = cms.vstring('') ) +muIsoDepositJetsDisplaced = cms.EDProducer("MuIsoDepositCopyProducer", + inputTags = cms.VInputTag(cms.InputTag("displacedMuons1stStep:jets")), + depositNames = cms.vstring('') +) + muIsoDepositCalByAssociatorTowers = cms.EDProducer("MuIsoDepositCopyProducer", inputTags = cms.VInputTag(cms.InputTag("muons1stStep:ecal"), cms.InputTag("muons1stStep:hcal"), cms.InputTag("muons1stStep:ho")), depositNames = cms.vstring('ecal', 'hcal', 'ho') ) +muIsoDepositCalByAssociatorTowersDisplaced = cms.EDProducer("MuIsoDepositCopyProducer", + inputTags = cms.VInputTag(cms.InputTag("displacedMuons1stStep:ecal"), cms.InputTag("displacedMuons1stStep:hcal"), cms.InputTag("displacedMuons1stStep:ho")), + depositNames = cms.vstring('ecal', 'hcal', 'ho') +) diff --git a/RecoMuon/MuonIsolationProducers/python/muIsoDeposits_cff.py b/RecoMuon/MuonIsolationProducers/python/muIsoDeposits_cff.py index 404884c074e18..7c5e64f0e1324 100644 --- a/RecoMuon/MuonIsolationProducers/python/muIsoDeposits_cff.py +++ b/RecoMuon/MuonIsolationProducers/python/muIsoDeposits_cff.py @@ -32,6 +32,9 @@ # "standard sequences" muIsoDeposits_muonsTask = cms.Task(muIsoDepositTk,muIsoDepositCalByAssociatorTowers,muIsoDepositJets) muIsoDeposits_muons = cms.Sequence(muIsoDeposits_muonsTask) +# "displaced sequences" +muIsoDeposits_displacedMuonsTask = cms.Task(muIsoDepositTkDisplaced,muIsoDepositCalByAssociatorTowersDisplaced,muIsoDepositJetsDisplaced) +muIsoDeposits_displacedMuons = cms.Sequence(muIsoDeposits_displacedMuonsTask) #old one, using a reduced config set muIsoDeposits_ParamGlobalMuonsOldTask = cms.Task(muParamGlobalIsoDepositGsTk,muParamGlobalIsoDepositCalEcal,muParamGlobalIsoDepositCalHcal) muIsoDeposits_ParamGlobalMuonsOld = cms.Sequence(muIsoDeposits_ParamGlobalMuonsOldTask) diff --git a/RecoMuon/MuonIsolationProducers/python/muIsolation_EventContent_cff.py b/RecoMuon/MuonIsolationProducers/python/muIsolation_EventContent_cff.py index d8ef478a30458..a7df782f4cac0 100644 --- a/RecoMuon/MuonIsolationProducers/python/muIsolation_EventContent_cff.py +++ b/RecoMuon/MuonIsolationProducers/python/muIsolation_EventContent_cff.py @@ -27,6 +27,10 @@ 'keep *_muIsoDepositCalByAssociatorTowers_*_*', 'keep *_muIsoDepositCalByAssociatorHits_*_*', 'keep *_muIsoDepositJets_*_*', + 'keep *_muIsoDepositTkDisplaced_*_*', + 'keep *_muIsoDepositCalByAssociatorTowersDisplaced_*_*', + 'keep *_muIsoDepositCalByAssociatorHitsDisplaced_*_*', + 'keep *_muIsoDepositJetsDisplaced_*_*', 'keep *_muGlobalIsoDepositCtfTk_*_*', 'keep *_muGlobalIsoDepositCalByAssociatorTowers_*_*', 'keep *_muGlobalIsoDepositCalByAssociatorHits_*_*', diff --git a/RecoMuon/MuonIsolationProducers/python/muIsolation_cff.py b/RecoMuon/MuonIsolationProducers/python/muIsolation_cff.py index 1d69b8046550f..7ba50afec4a2b 100644 --- a/RecoMuon/MuonIsolationProducers/python/muIsolation_cff.py +++ b/RecoMuon/MuonIsolationProducers/python/muIsolation_cff.py @@ -6,6 +6,8 @@ # sequences suggested for reco (only isoDeposits are produced at this point) muIsolation_muonsTask = cms.Task(muIsoDeposits_muonsTask) muIsolation_muons = cms.Sequence(muIsolation_muonsTask) +muIsolation_displacedMuonsTask = cms.Task(muIsoDeposits_displacedMuonsTask) +muIsolation_displacedMuons = cms.Sequence(muIsolation_displacedMuonsTask) muIsolation_ParamGlobalMuonsTask = cms.Task(muIsoDeposits_ParamGlobalMuonsTask) muIsolation_ParamGlobalMuons = cms.Sequence(muIsolation_ParamGlobalMuonsTask) muIsolation_ParamGlobalMuonsOldTask = cms.Task(muIsoDeposits_ParamGlobalMuonsOldTask) @@ -13,4 +15,6 @@ #standard sequence muIsolationTask = cms.Task(muIsolation_muonsTask) muIsolation = cms.Sequence(muIsolationTask) +muIsolationDisplacedTask = cms.Task(muIsolation_displacedMuonsTask) +muIsolationDisplaced = cms.Sequence(muIsolationDisplacedTask)