def miniAOD_customizeMC(process): task = getPatAlgosToolsTask(process) #GenJetFlavourInfos process.load("PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi") task.add(process.selectedHadronsAndPartons) task.add(process.selectedHadronsAndPartonsForGenJetsFlavourInfos) process.load("PhysicsTools.JetMCAlgos.AK4GenJetFlavourInfos_cfi") task.add(process.ak4GenJetFlavourInfos) process.load( 'PhysicsTools.PatAlgos.slimming.slimmedGenJetsFlavourInfos_cfi') task.add(process.slimmedGenJetsFlavourInfos) #slimmed pileup information process.load('PhysicsTools.PatAlgos.slimming.slimmedAddPileupInfo_cfi') task.add(process.slimmedAddPileupInfo) process.muonMatch.matched = "prunedGenParticles" process.electronMatch.matched = "prunedGenParticles" process.electronMatch.src = cms.InputTag("reducedEgamma", "reducedGedGsfElectrons") process.photonMatch.matched = "prunedGenParticles" process.photonMatch.src = cms.InputTag("reducedEgamma", "reducedGedPhotons") process.ootPhotonMatch.matched = "prunedGenParticles" process.ootPhotonMatch.src = cms.InputTag("reducedEgamma", "reducedOOTPhotons") process.tauMatch.matched = "prunedGenParticles" process.tauGenJets.GenParticles = "prunedGenParticles" #Boosted taus process.tauMatchBoosted.matched = "prunedGenParticles" process.tauGenJetsBoosted.GenParticles = "prunedGenParticles" process.patJetPartons.particles = "genParticles" process.patJetPartonMatch.matched = "prunedGenParticles" pp_on_AA.toModify(process.patJetPartonMatch, matched="hiSignalGenParticles") from Configuration.ProcessModifiers.genJetSubEvent_cff import genJetSubEvent genJetSubEvent.toModify(process.patJetPartonMatch, matched="cleanedPartons") process.patJetPartonMatch.mcStatus = [3, 23] process.patJetGenJetMatch.matched = "slimmedGenJets" (~pp_on_AA).toModify( process, patJetGenJetMatchAK8Puppi=dict(matched="slimmedGenJetsAK8")) process.patMuons.embedGenMatch = False process.patElectrons.embedGenMatch = False process.patPhotons.embedGenMatch = False process.patOOTPhotons.embedGenMatch = False process.patTaus.embedGenMatch = False process.patTausBoosted.embedGenMatch = False process.patJets.embedGenPartonMatch = False #also jet flavour must be switched process.patJetFlavourAssociation.rParam = 0.4 from PhysicsTools.PatAlgos.producersHeavyIons.heavyIonJetSetup import removeJECsForMC pp_on_AA.toModify(process, removeJECsForMC) pp_on_AA.toReplaceWith( task, task.copyAndExclude([process.slimmedGenJetsFlavourInfos]))
############################################################################## # AK8 jets with various pileup subtraction schemes ############################################################################## ak8PFJetsPuppi = ak8PFJets.clone( src = "particleFlow", applyWeight = True, srcWeights = cms.InputTag("puppi") ) ak8PFJetsCHS = ak8PFJets.clone( src = "pfNoPileUpJME" ) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(ak8PFJetsCHS, src = "pfEmptyCollection") pp_on_AA.toModify(ak8PFJetsPuppi, src = "pfEmptyCollection") ak8PFJetsCS = ak8PFJets.clone( useConstituentSubtraction = cms.bool(True), csRParam = cms.double(0.4), csRho_EtaMax = ak8PFJets.Rho_EtaMax, # Just use the same eta for both C.S. and rho by default useExplicitGhosts = cms.bool(True), doAreaFastjet = True, jetPtMin = 100.0 ) ############################################################################## # Preclustered constituents for substructure, various subtraction schemes ##############################################################################
src='highPtTripletStepTracks', qualityCuts=[0.2, 0.3, 0.4]) from RecoTracker.FinalTrackSelectors.TrackLwtnnClassifier_cfi import * from RecoTracker.FinalTrackSelectors.trackSelectionLwtnn_cfi import * trackdnn.toReplaceWith( highPtTripletStep, TrackLwtnnClassifier.clone( src='highPtTripletStepTracks', qualityCuts=[0.75, 0.775, 0.8], )) highBetaStar_2018.toModify(highPtTripletStep, qualityCuts=[-0.2, 0.3, 0.4]) pp_on_AA.toModify( highPtTripletStep, mva=dict(GBRForestLabel='HIMVASelectorHighPtTripletStep_Phase1'), qualityCuts=[-0.9, -0.3, 0.85], ) fastSim.toModify(highPtTripletStep, vertices='firstStepPrimaryVerticesBeforeMixing') # For Phase2PU140 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi highPtTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone( src='highPtTripletStepTracks', trackSelectors=[ RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone( name='highPtTripletStepLoose', chi2n_par=2.0, res_par=(0.003, 0.002),
def miniAOD_customizeCommon(process): process.patMuons.isoDeposits = cms.PSet() process.patElectrons.isoDeposits = cms.PSet() process.patTaus.isoDeposits = cms.PSet() process.patPhotons.isoDeposits = cms.PSet() # process.patMuons.embedTrack = True # used for IDs process.patMuons.embedCombinedMuon = True # used for IDs process.patMuons.embedMuonBestTrack = True # used for IDs process.patMuons.embedStandAloneMuon = True # maybe? process.patMuons.embedPickyMuon = False # no, use best track process.patMuons.embedTpfmsMuon = False # no, use best track process.patMuons.embedDytMuon = False # no, use best track process.patMuons.addPuppiIsolation = cms.bool(True) process.patMuons.puppiIsolationChargedHadrons = cms.InputTag( "muonPUPPIIsolation", "h+-DR040-ThresholdVeto000-ConeVeto000") process.patMuons.puppiIsolationNeutralHadrons = cms.InputTag( "muonPUPPIIsolation", "h0-DR040-ThresholdVeto000-ConeVeto001") process.patMuons.puppiIsolationPhotons = cms.InputTag( "muonPUPPIIsolation", "gamma-DR040-ThresholdVeto000-ConeVeto001") process.patMuons.puppiNoLeptonsIsolationChargedHadrons = cms.InputTag( "muonPUPPINoLeptonsIsolation", "h+-DR040-ThresholdVeto000-ConeVeto000") process.patMuons.puppiNoLeptonsIsolationNeutralHadrons = cms.InputTag( "muonPUPPINoLeptonsIsolation", "h0-DR040-ThresholdVeto000-ConeVeto001") process.patMuons.puppiNoLeptonsIsolationPhotons = cms.InputTag( "muonPUPPINoLeptonsIsolation", "gamma-DR040-ThresholdVeto000-ConeVeto001") process.patMuons.computeMiniIso = True process.patMuons.computeMuonMVA = True process.patMuons.computeMuonIDMVA = True process.patMuons.computeSoftMuonMVA = True process.patMuons.addTriggerMatching = True from Configuration.Eras.Modifier_run2_muon_2016_cff import run2_muon_2016 from Configuration.Eras.Modifier_run2_muon_2017_cff import run2_muon_2017 from Configuration.Eras.Modifier_run2_muon_2018_cff import run2_muon_2018 run2_muon_2016.toModify( process.patMuons, effectiveAreaVec=[0.0735, 0.0619, 0.0465, 0.0433, 0.0577]) run2_muon_2017.toModify( process.patMuons, effectiveAreaVec=[0.0566, 0.0562, 0.0363, 0.0119, 0.0064]) run2_muon_2018.toModify( process.patMuons, effectiveAreaVec=[0.0566, 0.0562, 0.0363, 0.0119, 0.0064]) run2_muon_2016.toModify( process.patMuons, mvaTrainingFile= "RecoMuon/MuonIdentification/data/mu_2016_BDTG.weights.xml") process.patMuons.computePuppiCombinedIso = True # # disable embedding of electron and photon associated objects already stored by the ReducedEGProducer process.patElectrons.embedGsfElectronCore = False ## process.patElectrons.embed in AOD externally stored gsf electron core process.patElectrons.embedSuperCluster = False ## process.patElectrons.embed in AOD externally stored supercluster process.patElectrons.embedPflowSuperCluster = False ## process.patElectrons.embed in AOD externally stored supercluster process.patElectrons.embedSeedCluster = False ## process.patElectrons.embed in AOD externally stored the electron's seedcluster process.patElectrons.embedBasicClusters = False ## process.patElectrons.embed in AOD externally stored the electron's basic clusters process.patElectrons.embedPreshowerClusters = False ## process.patElectrons.embed in AOD externally stored the electron's preshower clusters process.patElectrons.embedPflowBasicClusters = False ## process.patElectrons.embed in AOD externally stored the electron's pflow basic clusters process.patElectrons.embedPflowPreshowerClusters = False ## process.patElectrons.embed in AOD externally stored the electron's pflow preshower clusters process.patElectrons.embedRecHits = False ## process.patElectrons.embed in AOD externally stored the RecHits - can be called from the PATElectronProducer process.patElectrons.electronSource = cms.InputTag( "reducedEgamma", "reducedGedGsfElectrons") process.patElectrons.usePfCandidateMultiMap = True process.patElectrons.pfCandidateMultiMap = cms.InputTag( "reducedEgamma", "reducedGsfElectronPfCandMap") process.patElectrons.electronIDSources = cms.PSet() from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17 (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17).toModify( process.patElectrons, addPFClusterIso=True, ecalPFClusterIsoMap="reducedEgamma:eleEcalPFClusIso", hcalPFClusterIsoMap="reducedEgamma:eleHcalPFClusIso") #add puppi isolation in miniAOD process.patElectrons.addPuppiIsolation = cms.bool(True) process.patElectrons.puppiIsolationChargedHadrons = cms.InputTag( "egmElectronPUPPIIsolation", "h+-DR030-BarVeto000-EndVeto001") process.patElectrons.puppiIsolationNeutralHadrons = cms.InputTag( "egmElectronPUPPIIsolation", "h0-DR030-BarVeto000-EndVeto000") process.patElectrons.puppiIsolationPhotons = cms.InputTag( "egmElectronPUPPIIsolation", "gamma-DR030-BarVeto000-EndVeto008") process.patElectrons.puppiNoLeptonsIsolationChargedHadrons = cms.InputTag( "egmElectronPUPPINoLeptonsIsolation", "h+-DR030-BarVeto000-EndVeto001") process.patElectrons.puppiNoLeptonsIsolationNeutralHadrons = cms.InputTag( "egmElectronPUPPINoLeptonsIsolation", "h0-DR030-BarVeto000-EndVeto000") process.patElectrons.puppiNoLeptonsIsolationPhotons = cms.InputTag( "egmElectronPUPPINoLeptonsIsolation", "gamma-DR030-BarVeto000-EndVeto008") process.patElectrons.computeMiniIso = cms.bool(True) process.elPFIsoDepositChargedPAT.src = cms.InputTag( "reducedEgamma", "reducedGedGsfElectrons") process.elPFIsoDepositChargedAllPAT.src = cms.InputTag( "reducedEgamma", "reducedGedGsfElectrons") process.elPFIsoDepositNeutralPAT.src = cms.InputTag( "reducedEgamma", "reducedGedGsfElectrons") process.elPFIsoDepositGammaPAT.src = cms.InputTag( "reducedEgamma", "reducedGedGsfElectrons") process.elPFIsoDepositPUPAT.src = cms.InputTag("reducedEgamma", "reducedGedGsfElectrons") # process.patPhotons.embedSuperCluster = False ## whether to process.patPhotons.embed in AOD externally stored supercluster process.patPhotons.embedSeedCluster = False ## process.patPhotons.embed in AOD externally stored the photon's seedcluster process.patPhotons.embedBasicClusters = False ## process.patPhotons.embed in AOD externally stored the photon's basic clusters process.patPhotons.embedPreshowerClusters = False ## process.patPhotons.embed in AOD externally stored the photon's preshower clusters process.patPhotons.embedRecHits = False ## process.patPhotons.embed in AOD externally stored the RecHits - can be called from the PATPhotonProducer #add puppi isolation in miniAOD process.patPhotons.addPuppiIsolation = cms.bool(True) process.patPhotons.puppiIsolationChargedHadrons = cms.InputTag( "egmPhotonPUPPIIsolation", "h+-DR030-") process.patPhotons.puppiIsolationNeutralHadrons = cms.InputTag( "egmPhotonPUPPIIsolation", "h0-DR030-") process.patPhotons.puppiIsolationPhotons = cms.InputTag( "egmPhotonPUPPIIsolation", "gamma-DR030-") (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17).toModify( process.patPhotons, addPFClusterIso=True, ecalPFClusterIsoMap="reducedEgamma:phoEcalPFClusIso", hcalPFClusterIsoMap="reducedEgamma:phoHcalPFClusIso") #the 80X legacy customsations are done in ootPhotonProducer for OOT photons run2_miniAOD_94XFall17.toModify( process.patOOTPhotons, addPFClusterIso=True, ecalPFClusterIsoMap="reducedEgamma:ootPhoEcalPFClusIso", hcalPFClusterIsoMap="reducedEgamma:ootPhoHcalPFClusIso") process.patPhotons.photonSource = cms.InputTag("reducedEgamma", "reducedGedPhotons") process.patPhotons.electronSource = cms.InputTag("reducedEgamma", "reducedGedGsfElectrons") process.phPFIsoDepositChargedPAT.src = cms.InputTag( "reducedEgamma", "reducedGedPhotons") process.phPFIsoDepositChargedAllPAT.src = cms.InputTag( "reducedEgamma", "reducedGedPhotons") process.phPFIsoDepositNeutralPAT.src = cms.InputTag( "reducedEgamma", "reducedGedPhotons") process.phPFIsoDepositGammaPAT.src = cms.InputTag("reducedEgamma", "reducedGedPhotons") process.phPFIsoDepositPUPAT.src = cms.InputTag("reducedEgamma", "reducedGedPhotons") # process.patOOTPhotons.photonSource = cms.InputTag("reducedEgamma", "reducedOOTPhotons") process.patOOTPhotons.electronSource = cms.InputTag( "reducedEgamma", "reducedGedGsfElectrons") # process.selectedPatJets.cut = cms.string("pt > 10") process.selectedPatMuons.cut = cms.string( "pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose')))" ) from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon phase2_muon.toModify( process.selectedPatMuons, cut= "pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose') || muonID('ME0MuonArbitrated') || muonID('GEMMuonArbitrated')) )" ) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify( process.selectedPatMuons, cut= "pt > 5 || isPFMuon || (pt > 1.2 && (isGlobalMuon || isStandAloneMuon) )" ) process.selectedPatElectrons.cut = cms.string("") process.selectedPatTaus.cut = cms.string( "pt > 18. && tauID('decayModeFindingNewDMs')> 0.5") process.selectedPatPhotons.cut = cms.string("") _dummyPatJets = process.selectedPatJets.clone(cut="pt < 0") task = getPatAlgosToolsTask(process) def _applySubstructure(process): from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection from PhysicsTools.PatAlgos.slimming.applySubstructure_cff import applySubstructure applySubstructure(process) (~pp_on_AA).toModify(process, _applySubstructure) pp_on_AA.toModify(process, func=lambda p: addToProcessAndTask( 'slimmedJets', p.selectedPatJets.clone(), p, task)) pp_on_AA.toModify(process, func=lambda p: addToProcessAndTask( 'slimmedJetsAK8', _dummyPatJets.clone(), p, task)) # from PhysicsTools.PatAlgos.tools.trigTools import switchOnTriggerStandAlone switchOnTriggerStandAlone(process, outputModule='') process.patTrigger.packTriggerPathNames = cms.bool(True) # # apply type I + other PFMEt corrections to pat::MET object # and estimate systematic uncertainties on MET from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties import runMetCorAndUncForMiniAODProduction runMetCorAndUncForMiniAODProduction(process, metType="PF", jetCollUnskimmed="patJets") #caloMET computation from PhysicsTools.PatAlgos.tools.metTools import addMETCollection addMETCollection(process, labelName="patCaloMet", metSource="caloMetM") #noHF pfMET ========= process.noHFCands = cms.EDFilter( "GenericPFCandidateSelector", src=cms.InputTag("particleFlow"), cut=cms.string("abs(pdgId)!=1 && abs(pdgId)!=2 && abs(eta)<3.0")) task.add(process.noHFCands) runMetCorAndUncForMiniAODProduction( process, pfCandColl=cms.InputTag("noHFCands"), recoMetFromPFCs=True, #needed for HF removal jetSelection="pt>15 && abs(eta)<3.", postfix="NoHF") process.load('PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi') task.add(process.slimmedMETs) (~pp_on_AA).toModify(process.slimmedMETs, addDeepMETs=True) def _add_slimmedMETsNoHF(process): addToProcessAndTask('slimmedMETsNoHF', process.slimmedMETs.clone(), process, task) process.slimmedMETsNoHF.src = cms.InputTag("patMETsNoHF") process.slimmedMETsNoHF.rawVariation = cms.InputTag("patPFMetNoHF") process.slimmedMETsNoHF.t1Uncertainties = cms.InputTag( "patPFMetT1%sNoHF") process.slimmedMETsNoHF.t01Variation = cms.InputTag( "patPFMetT0pcT1NoHF") process.slimmedMETsNoHF.t1SmearedVarsAndUncs = cms.InputTag( "patPFMetT1Smear%sNoHF") process.slimmedMETsNoHF.tXYUncForRaw = cms.InputTag("patPFMetTxyNoHF") process.slimmedMETsNoHF.tXYUncForT1 = cms.InputTag("patPFMetT1TxyNoHF") process.slimmedMETsNoHF.tXYUncForT01 = cms.InputTag( "patPFMetT0pcT1TxyNoHF") process.slimmedMETsNoHF.tXYUncForT1Smear = cms.InputTag( "patPFMetT1SmearTxyNoHF") process.slimmedMETsNoHF.tXYUncForT01Smear = cms.InputTag( "patPFMetT0pcT1SmearTxyNoHF") del process.slimmedMETsNoHF.caloMET (~pp_on_AA).toModify(process, _add_slimmedMETsNoHF) # ================== NoHF pfMET # ================== CHSMET process.load("CommonTools.ParticleFlow.pfCHS_cff") task.add(process.pfCHS) from RecoMET.METProducers.pfMet_cfi import pfMet process.pfMetCHS = pfMet.clone(src='pfCHS') task.add(process.pfMetCHS) addMETCollection(process, labelName="patCHSMet", metSource="pfMetCHS") process.patCHSMet.computeMETSignificance = cms.bool(False) # ================== CHSMET # ================== TrkMET process.TrkCands = chargedPackedCandsForTkMet.clone() task.add(process.TrkCands) process.pfMetTrk = pfMet.clone(src='TrkCands') task.add(process.pfMetTrk) addMETCollection(process, labelName="patTrkMet", metSource="pfMetTrk") process.patTrkMet.computeMETSignificance = cms.bool(False) # ================== TrkMET ## PU JetID process.load("RecoJets.JetProducers.PileupJetID_cfi") task.add(process.pileUpJetIDTask) process.patJets.userData.userFloats.src = [ cms.InputTag("pileupJetId:fullDiscriminant"), ] process.patJets.userData.userInts.src = [ cms.InputTag("pileupJetId:fullId"), ] ## Quark Gluon Likelihood process.load('RecoJets.JetProducers.QGTagger_cfi') task.add(process.QGTaggerTask) process.patJets.userData.userFloats.src += [ 'QGTagger:qgLikelihood', ] #HF jet shower shape process.load('RecoJets.JetProducers.hfJetShowerShape_cfi') task.add(process.hfJetShowerShape) process.patJets.userData.userFloats.src += [ 'hfJetShowerShape:sigmaEtaEta', 'hfJetShowerShape:sigmaPhiPhi' ] process.patJets.userData.userInts.src += [ 'hfJetShowerShape:centralEtaStripSize', 'hfJetShowerShape:adjacentEtaStripsSize' ] ## DeepCSV meta discriminators (simple arithmethic on output probabilities) def _add_deepFlavour(process): process.load('RecoBTag.Combined.deepFlavour_cff') task.add(process.pfDeepCSVDiscriminatorsJetTags) process.patJets.discriminatorSources.extend([ 'pfDeepCSVDiscriminatorsJetTags:BvsAll', 'pfDeepCSVDiscriminatorsJetTags:CvsB', 'pfDeepCSVDiscriminatorsJetTags:CvsL', ]) from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018 (~pp_on_AA_2018).toModify(process, _add_deepFlavour) ## CaloJets process.caloJetMap = cms.EDProducer( "RecoJetDeltaRValueMapProducer", src=process.patJets.jetSource, matched=cms.InputTag("ak4CaloJets"), distMax=cms.double(0.4), values=cms.vstring('pt', 'emEnergyFraction'), valueLabels=cms.vstring('pt', 'emEnergyFraction'), lazyParser=cms.bool(True)) task.add(process.caloJetMap) process.patJets.userData.userFloats.src += [ 'caloJetMap:pt', 'caloJetMap:emEnergyFraction' ] pp_on_AA.toModify(process.patJets.userData.userInts, src=[]) pp_on_AA.toModify(process.patJets.userData.userFloats, src=[]) #Muon object modifications from PhysicsTools.PatAlgos.slimming.muonIsolationsPUPPI_cfi import makeInputForPUPPIIsolationMuon makeInputForPUPPIIsolationMuon(process) #EGM object modifications from PhysicsTools.PatAlgos.slimming.egmIsolationsPUPPI_cfi import makeInputForPUPPIIsolationEgm makeInputForPUPPIIsolationEgm(process) from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff import egamma_modifications process.slimmedElectrons.modifierConfig.modifications = egamma_modifications process.slimmedPhotons.modifierConfig.modifications = egamma_modifications #VID Electron IDs process.patElectrons.addElectronID = cms.bool(True) electron_ids = [ 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV70_cff', 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV71_cff', 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Fall17_94X_V1_cff', 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Fall17_94X_V2_cff', 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V1_cff', 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V1_cff', 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V2_cff', 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V2_cff', 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff', 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring16_GeneralPurpose_V1_cff', 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring16_HZZ_V1_cff', 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Summer16UL_ID_ISO_cff', 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Summer17UL_ID_ISO_cff', 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Summer18UL_ID_ISO_cff', ] switchOnVIDElectronIdProducer(process, DataFormat.MiniAOD, task) process.egmGsfElectronIDs.physicsObjectSrc = cms.InputTag( "reducedEgamma", "reducedGedGsfElectrons") process.electronMVAValueMapProducer.src = cms.InputTag( 'reducedEgamma', 'reducedGedGsfElectrons') # To use older DataFormats, the electronMVAValueMapProducer MUST take a updated electron collection # such that the conversion variables are filled correctly. process.load("RecoEgamma.EgammaTools.gedGsfElectronsTo106X_cff") run2_miniAOD_80XLegacy.toModify( task, func=lambda t: t.add(process.gedGsfElectronsFrom80XTo106XTask)) run2_miniAOD_80XLegacy.toModify( process.electronMVAValueMapProducer, keysForValueMaps=cms.InputTag('reducedEgamma', 'reducedGedGsfElectrons'), src=cms.InputTag("gedGsfElectronsFrom80XTo106X")) run2_miniAOD_94XFall17.toModify( task, func=lambda t: t.add(process.gedGsfElectronsFrom94XTo106XTask)) run2_miniAOD_94XFall17.toModify( process.electronMVAValueMapProducer, keysForValueMaps=cms.InputTag('reducedEgamma', 'reducedGedGsfElectrons'), src=cms.InputTag("gedGsfElectronsFrom94XTo106X")) from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018 pp_on_AA_2018.toModify( task, func=lambda t: t.add(process.gedGsfElectronsFrom94XTo106XTask)) pp_on_AA_2018.toModify(process.electronMVAValueMapProducer, keysForValueMaps=cms.InputTag( 'reducedEgamma', 'reducedGedGsfElectrons'), src="gedGsfElectronsFrom94XTo106X") for idmod in electron_ids: setupAllVIDIdsInModule(process, idmod, setupVIDElectronSelection, None, False, task) #VID Photon IDs process.patPhotons.addPhotonID = cms.bool(True) photon_ids = [ 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V1_TrueVtx_cff', 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V2_cff', 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V1p1_cff', 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V2_cff', 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring16_V2p2_cff', 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring16_nonTrig_V1_cff' ] switchOnVIDPhotonIdProducer(process, DataFormat.AOD, task) process.egmPhotonIDs.physicsObjectSrc = cms.InputTag( "reducedEgamma", "reducedGedPhotons") process.photonMVAValueMapProducer.src = cms.InputTag( 'reducedEgamma', 'reducedGedPhotons') for idmod in photon_ids: setupAllVIDIdsInModule(process, idmod, setupVIDPhotonSelection, None, False, task) #add the cut base IDs bitmaps of which cuts passed from RecoEgamma.EgammaTools.egammaObjectModifications_tools import makeVIDBitsModifier egamma_modifications.append( makeVIDBitsModifier(process, "egmGsfElectronIDs", "egmPhotonIDs")) #-- Adding boosted taus from RecoTauTag.Configuration.boostedHPSPFTaus_cfi import addBoostedTaus addBoostedTaus(process) process.load("RecoTauTag.Configuration.RecoPFTauTag_cff") process.load("RecoTauTag.Configuration.HPSPFTaus_cff") #-- Adding customization for 94X 2017 legacy reMniAOD _makePatTausTaskWithRetrainedMVATauID = process.makePatTausTask.copy() _makePatTausTaskWithRetrainedMVATauID.add( process.hpsPFTauBasicDiscriminatorsTask, process.hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTTask, process.hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTTask, process.hpsPFTauBasicDiscriminatorsdR03Task, process.hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTTask, process.hpsPFTauDiscriminationByMVA6rawElectronRejection, process.hpsPFTauDiscriminationByMVA6ElectronRejection, process.hpsPFTauDiscriminationByMuonRejection3) from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL (run2_miniAOD_94XFall17 | run2_miniAOD_UL).toReplaceWith( process.makePatTausTask, _makePatTausTaskWithRetrainedMVATauID) #-- Adding DeepTauID # deepTau v2p1 and v2p5 _updatedTauName = 'slimmedTausDeepIDsv2p1' _noUpdatedTauName = 'slimmedTausNoDeepIDs' import RecoTauTag.RecoTau.tools.runTauIdMVA as tauIdConfig tauIdEmbedder = tauIdConfig.TauIDEmbedder( process, debug=False, originalTauName=_noUpdatedTauName, updatedTauName=_updatedTauName, postfix='ForMini', toKeep=['deepTau2017v2p1', 'deepTau2018v2p5']) from Configuration.Eras.Modifier_phase2_common_cff import phase2_common #Phase2 Tau MVA phase2_common.toModify( tauIdEmbedder.toKeep, func=lambda t: t.append('newDMPhase2v1')) #Phase2 Tau isolation MVA phase2_common.toModify( tauIdEmbedder.toKeep, func=lambda t: t.append('againstElePhase2v1')) #Phase2 Tau anti-e MVA tauIdEmbedder.runTauID() addToProcessAndTask(_noUpdatedTauName, process.slimmedTaus.clone(), process, task) delattr(process, 'slimmedTaus') process.slimmedTaus = getattr(process, _updatedTauName).clone() process.rerunMvaIsolationTaskForMini.add(process.slimmedTaus) task.add(process.rerunMvaIsolationTaskForMini) #-- Rerun tauID against dead ECal towers to taus for the various re-MiniAOD eras # to enable default behoviour with leading track extrapolation to ECAL _makePatTausTaskWithDeadECalVeto = process.makePatTausTask.copy() _makePatTausTaskWithDeadECalVeto.add( process.hpsPFTauDiscriminationByDeadECALElectronRejection) _run2_miniAOD_ANY = (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17 | run2_miniAOD_UL) _run2_miniAOD_ANY.toReplaceWith(process.makePatTausTask, _makePatTausTaskWithDeadECalVeto) #-- Adding customization for 80X 2016 legacy reMiniAOD and 2018 heavy ions _makePatTausTaskWithTauReReco = process.makePatTausTask.copy() _makePatTausTaskWithTauReReco.add(process.PFTauTask) (run2_miniAOD_80XLegacy | pp_on_AA).toReplaceWith( process.makePatTausTask, _makePatTausTaskWithTauReReco) # Adding puppi jets process.load('CommonTools.PileupAlgos.Puppi_cff') process.load('RecoJets.JetProducers.ak4PFJets_cfi') from Configuration.Eras.Modifier_pA_2016_cff import pA_2016 _rerun_puppijets_task = task.copy() _rerun_puppijets_task.add(process.puppi, process.ak4PFJetsPuppi) (_run2_miniAOD_ANY | pA_2016 | pp_on_AA).toReplaceWith( task, _rerun_puppijets_task) from RecoJets.JetAssociationProducers.j2tParametersVX_cfi import j2tParametersVX process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer( "JetTracksAssociatorAtVertex", j2tParametersVX, jets=cms.InputTag("ak4PFJetsPuppi")) task.add(process.ak4PFJetsPuppiTracksAssociatorAtVertex) process.patJetPuppiCharge = cms.EDProducer( "JetChargeProducer", src=cms.InputTag("ak4PFJetsPuppiTracksAssociatorAtVertex"), var=cms.string('Pt'), exp=cms.double(1.0)) task.add(process.patJetPuppiCharge) def _add_jetsPuppi(process): from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection noDeepFlavourDiscriminators = [ x.value() if isinstance(x, cms.InputTag) else x for x in process.patJets.discriminatorSources if not "DeepFlavour" in str(x) ] addJetCollection(process, postfix="", labelName='Puppi', jetSource=cms.InputTag('ak4PFJetsPuppi'), jetCorrections=('AK4PFPuppi', ['L2Relative', 'L3Absolute'], ''), pfCandidates=cms.InputTag("particleFlow"), algo='AK', rParam=0.4, btagDiscriminators=noDeepFlavourDiscriminators) process.patJetGenJetMatchPuppi.matched = 'slimmedGenJets' process.patJetsPuppi.jetChargeSource = cms.InputTag( "patJetPuppiCharge") process.selectedPatJetsPuppi.cut = cms.string("pt > 10") from PhysicsTools.PatAlgos.slimming.applyDeepBtagging_cff import applyDeepBtagging applyDeepBtagging(process) process.slimmedJetsNoDeepFlavour.dropTagInfos = '0' process.updatedPatJetsTransientCorrectedSlimmedDeepFlavour.addTagInfos = True process.updatedPatJetsTransientCorrectedSlimmedDeepFlavour.tagInfoSources = [ "pixelClusterTagInfos" ] _run2_miniAOD_ANY.toModify( process.updatedPatJetsTransientCorrectedSlimmedDeepFlavour, addTagInfos=False) (~pp_on_AA).toModify(process, _add_jetsPuppi) pp_on_AA.toModify(process, func=lambda p: addToProcessAndTask( 'slimmedJetsPuppi', _dummyPatJets.clone(), p, task)) # Embed pixelClusterTagInfos in slimmedJets process.patJets.addTagInfos = True process.patJets.tagInfoSources = ["pixelClusterTagInfos"] _run2_miniAOD_ANY.toModify(process.patJets, addTagInfos=False) from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018 pp_on_AA_2018.toModify(process.patJets, tagInfoSources=cms.VInputTag([ "impactParameterTagInfos", "secondaryVertexTagInfos" ])) ## puppi met def _add_metPuppi(process): process.load('RecoMET.METProducers.pfMetPuppi_cfi') _rerun_puppimet_task = task.copy() _rerun_puppimet_task.add(process.puppiNoLep, process.pfMetPuppi) (_run2_miniAOD_ANY | pA_2016 | pp_on_AA).toReplaceWith( task, _rerun_puppimet_task) runMetCorAndUncForMiniAODProduction( process, metType="Puppi", jetCollUnskimmed="slimmedJetsPuppi", recoMetFromPFCs=True, jetFlavor="AK4PFPuppi", postfix="Puppi") (~pp_on_AA).toModify(process, _add_metPuppi) process.load('PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi') task.add(process.slimmedMETs) def _add_slimmedMETsPuppi(process): addToProcessAndTask('slimmedMETsPuppi', process.slimmedMETs.clone(), process, task) process.slimmedMETsPuppi.src = cms.InputTag("patMETsPuppi") process.slimmedMETsPuppi.rawVariation = cms.InputTag("patPFMetPuppi") process.slimmedMETsPuppi.t1Uncertainties = cms.InputTag( "patPFMetT1%sPuppi") process.slimmedMETsPuppi.t01Variation = cms.InputTag( "patPFMetT0pcT1Puppi") process.slimmedMETsPuppi.t1SmearedVarsAndUncs = cms.InputTag( "patPFMetT1Smear%sPuppi") process.slimmedMETsPuppi.tXYUncForRaw = cms.InputTag( "patPFMetTxyPuppi") process.slimmedMETsPuppi.tXYUncForT1 = cms.InputTag( "patPFMetT1TxyPuppi") process.slimmedMETsPuppi.tXYUncForT01 = cms.InputTag( "patPFMetT0pcT1TxyPuppi") process.slimmedMETsPuppi.tXYUncForT1Smear = cms.InputTag( "patPFMetT1SmearTxyPuppi") process.slimmedMETsPuppi.tXYUncForT01Smear = cms.InputTag( "patPFMetT0pcT1SmearTxyPuppi") del process.slimmedMETsPuppi.caloMET (~pp_on_AA).toModify(process, _add_slimmedMETsPuppi) def _add_deepMET(process): from RecoMET.METPUSubtraction.deepMETProducer_cff import deepMETsResolutionTune, deepMETsResponseTune addToProcessAndTask('deepMETsResolutionTune', deepMETsResolutionTune, process, task) addToProcessAndTask('deepMETsResponseTune', deepMETsResponseTune, process, task) (~pp_on_AA).toModify(process, _add_deepMET) # add DetIdAssociatorRecords to EventSetup (for isolatedTracks) process.load("TrackingTools.TrackAssociator.DetIdAssociatorESProducer_cff") # EGamma objects from HGCal are not yet in GED # so add companion collections for Phase-II MiniAOD production from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal process.load("RecoEgamma.EgammaTools.slimmedEgammaHGC_cff") phase2_hgcal.toModify(task, func=lambda t: t.add(process.slimmedEgammaHGCTask)) # L1 pre-firing weights for 2016, 2017, and 2018 from Configuration.Eras.Modifier_run2_L1prefiring_cff import run2_L1prefiring from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger from Configuration.Eras.Modifier_stage2L1Trigger_2017_cff import stage2L1Trigger_2017 from Configuration.Eras.Modifier_stage2L1Trigger_2018_cff import stage2L1Trigger_2018 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016 process.load("PhysicsTools.PatUtils.L1PrefiringWeightProducer_cff") (stage2L1Trigger & tracker_apv_vfp30_2016).toModify( process.prefiringweight, DataEraECAL="UL2016preVFP", DataEraMuon="2016preVFP") (stage2L1Trigger & ~tracker_apv_vfp30_2016).toModify( process.prefiringweight, DataEraECAL="UL2016postVFP", DataEraMuon="2016postVFP") stage2L1Trigger_2017.toModify(process.prefiringweight, DataEraECAL="UL2017BtoF", DataEraMuon="20172018") stage2L1Trigger_2018.toModify(process.prefiringweight, DataEraECAL="None", DataEraMuon="20172018") run2_L1prefiring.toModify(task, func=lambda t: t.add(process.prefiringweight)) from PhysicsTools.PatAlgos.producersHeavyIons.heavyIonJetSetup import removeL1FastJetJECs pp_on_AA.toModify(process, removeL1FastJetJECs)
#HI-specific products: needed in AOD, propagate to more inclusive tiers as well pA_2016.toModify( RecoJetsAOD.outputCommands, func=lambda outputCommands: outputCommands.extend([ 'keep recoCentrality*_pACentrality_*_*', 'keep *_hiFJGridEmptyAreaCalculator_*_*', 'keep *_hiFJRhoProducer_*_*' ])) #HI-specific products: needed in AOD, propagate to more inclusive tiers as well peripheralPbPb.toModify(RecoJetsAOD.outputCommands, func=lambda outputCommands: outputCommands.extend( ['keep recoCentrality*_pACentrality_*_*'])) pp_on_AA.toModify(RecoJetsAOD.outputCommands, func=lambda outputCommands: outputCommands.extend([ 'keep *_hiCentrality_*_*', 'keep *_hiFJRhoProducer_*_*', 'keep *_akPu3PFJets_*_*', 'keep *_akPu4PFJets_*_*', 'keep *_kt4PFJetsForRho_*_*', 'keep *_akCs4PFJets_*_*', 'keep *_akPu4CaloJets_*_*', 'drop *_caloTowers_*_*' ])) #RECO content RecoJetsRECO = cms.PSet(outputCommands=cms.untracked.vstring( 'keep *_ak4CaloJets_*_*', 'keep *_ak4PFJets_*_*', 'keep *_ak4TrackJets_*_*', 'keep recoRecoChargedRefCandidates_trackRefsForJets_*_*', 'keep *_towerMaker_*_*', 'keep *_ak4JetTracksAssociatorAtCaloFace_*_*', 'keep *_ak5CastorJets_*_*', 'keep *_ak7CastorJets_*_*', )) RecoJetsRECO.outputCommands.extend(RecoJetsAOD.outputCommands)
import FWCore.ParameterSet.Config as cms slimmedCaloJets = cms.EDProducer("CaloJetSlimmer", src=cms.InputTag("ak4CaloJets"), cut=cms.string("pt>20")) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(slimmedCaloJets, src='akPu4CaloJets')
photon_config = cms.PSet( photonIsolationHI = cms.InputTag("reducedEgamma:photonIsolationHIProducerppGED") ) ) def appendReducedEgammaEnergyScaleAndSmearingModifier(modifiers): modifiers.append(reducedEgammaEnergyScaleAndSmearingModifier) def prependEgamma8XObjectUpdateModifier(modifiers): modifiers.insert(0,egamma8XObjectUpdateModifier) def appendEgamma8XLegacyAppendableModifiers (modifiers): modifiers.append(reducedEgammaEnergyScaleAndSmearingModifier) modifiers.append(egamma8XLegacyEtScaleSysModifier) def appendEgammaHIPhotonIsolationModifier(modifiers): modifiers.append(egammaHIPhotonIsolationModifier) from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL (run2_miniAOD_94XFall17 | run2_miniAOD_UL).toModify(egamma_modifications,appendReducedEgammaEnergyScaleAndSmearingModifier) from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy #80X doesnt have the bug which prevents GsfTracks used to match conversions so set true run2_miniAOD_80XLegacy.toModify(egamma9X105XUpdateModifier,allowGsfTrackForConvs = True) run2_miniAOD_80XLegacy.toModify(egamma_modifications,appendEgamma8XLegacyAppendableModifiers) run2_miniAOD_80XLegacy.toModify(egamma_modifications,prependEgamma8XObjectUpdateModifier) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(egamma_modifications, appendEgammaHIPhotonIsolationModifier)
ak4GenJetsForPUid = cms.EDFilter("GenJetSelector", src = cms.InputTag("ak4GenJets"), cut = cms.string('pt > 8.'), filter = cms.bool(False) ) #do reco gen - reco matching from PhysicsTools.PatAlgos.mcMatchLayer0.jetMatch_cfi import patJetGenJetMatch newpatJetGenJetMatch = patJetGenJetMatch.clone( src = cms.InputTag("ak4PFJetsCHS"), matched = cms.InputTag("ak4GenJetsForPUid"), maxDeltaR = cms.double(0.25), resolveAmbiguities = cms.bool(True) ) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(newpatJetGenJetMatch, src = "akCs4PFJets") # Module execution for MC from Validation.RecoB.bTagAnalysis_cfi import * bTagValidation.jetMCSrc = 'myak4JetFlavourInfos' bTagValidation.ptRanges = cms.vdouble(0.0) bTagValidation.etaRanges = cms.vdouble(0.0) bTagValidation.doJetID = True bTagValidation.doJEC = True bTagValidation.genJetsMatched = cms.InputTag("newpatJetGenJetMatch") #to run on fastsim prebTagSequenceMC = cms.Sequence(ak4GenJetsForPUid*newpatJetGenJetMatch*selectedHadronsAndPartons*myak4JetFlavourInfos*pfDeepCSVDiscriminatorsJetTags) bTagPlotsMC = cms.Sequence(bTagValidation) ## customizations for the pp_on_AA eras (pp_on_XeXe_2017 | pp_on_AA).toModify(bTagValidation,
from CalibMuon.DTCalibration.DTCalibMuonSelection_cfi import * # AlCaReco for DT calibration ALCARECODtCalibHLTFilter = copy.deepcopy(hltHighLevel) #ALCARECODtCalibHLTFilter.andOr = True ## choose logical OR between Triggerbits #ALCARECODtCalibHLTFilter.HLTPaths = ['HLT_L1MuOpen*', 'HLT_L1Mu*'] ALCARECODtCalibHLTFilter.throw = False ## dont throw on unknown path names ALCARECODtCalibHLTFilter.eventSetupPathsKey = 'DtCalib' import RecoLocalMuon.DTSegment.dt4DSegments_CombPatternReco4D_LinearDriftFromDB_cfi as dt4DSegmentsCfiRef dt4DSegmentsNoWire = dt4DSegmentsCfiRef.dt4DSegments.clone() dt4DSegmentsNoWire.Reco4DAlgoConfig.recAlgoConfig.tTrigModeConfig.doWirePropCorrection = False dt4DSegmentsNoWire.Reco4DAlgoConfig.Reco2DAlgoConfig.recAlgoConfig.tTrigModeConfig.doWirePropCorrection = False #this is to select collisions from RecoMET.METFilters.metFilters_cff import primaryVertexFilter, noscraping seqALCARECODtCalib = cms.Sequence(primaryVertexFilter * noscraping * ALCARECODtCalibHLTFilter * DTCalibMuonSelection * dt4DSegmentsNoWire) ## customizations for the pp_on_AA eras from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(ALCARECODtCalibHLTFilter, eventSetupPathsKey='DtCalibHI') seqALCARECODtCalibHI = cms.Sequence(ALCARECODtCalibHLTFilter * dt4DSegmentsNoWire) #Specify to use HI sequence for the pp_on_AA eras pp_on_AA.toReplaceWith(seqALCARECODtCalib, seqALCARECODtCalibHI)
import FWCore.ParameterSet.Config as cms impactParameterTagInfos = cms.EDProducer( "TrackIPProducer", jetTracks=cms.InputTag("ak4JetTracksAssociatorAtVertexPF"), primaryVertex=cms.InputTag("offlinePrimaryVertices"), computeProbabilities=cms.bool(True), computeGhostTrack=cms.bool(True), ghostTrackPriorDeltaR=cms.double(0.03), minimumNumberOfPixelHits=cms.int32(2), minimumNumberOfHits=cms.int32(8), maximumTransverseImpactParameter=cms.double(0.2), minimumTransverseMomentum=cms.double(1.0), maximumChiSquared=cms.double(5.0), maximumLongitudinalImpactParameter=cms.double(17.0), jetDirectionUsingTracks=cms.bool(False), jetDirectionUsingGhostTrack=cms.bool(False), useTrackQuality=cms.bool(False)) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(impactParameterTagInfos, jetTracks="ak5JetTracksAssociatorAtVertex")
phase2_hgcal.toModify(FEVTEventContent, outputCommands = FEVTEventContent.outputCommands + TICL_FEVT.outputCommands) phase2_tracker.toModify(FEVTEventContent, outputCommands = FEVTEventContent.outputCommands + [ 'keep Phase2TrackerDigiedmDetSetVector_mix_*_*', 'keep *_TTClustersFromPhase2TrackerDigis_*_*', 'keep *_TTStubsFromPhase2TrackerDigis_*_*', 'keep *_TrackerDTC_*_*', 'keep *_*_Level1TTTracks_*']) phase2_muon.toModify(FEVTEventContent, outputCommands = FEVTEventContent.outputCommands + ['keep *_muonGEMDigis_*_*']) run2_GEM_2017.toModify(FEVTEventContent, outputCommands = FEVTEventContent.outputCommands + ['keep *_muonGEMDigis_*_*']) run3_GEM.toModify(FEVTEventContent, outputCommands = FEVTEventContent.outputCommands + ['keep *_muonGEMDigis_*_*']) pp_on_AA.toModify(FEVTEventContent, outputCommands = FEVTEventContent.outputCommands + ['keep FEDRawDataCollection_rawDataRepacker_*_*']) phase2_timing_layer.toModify(FEVTEventContent, outputCommands = FEVTEventContent.outputCommands + RecoLocalFastTimeFEVT.outputCommands) phase2_timing_layer.toModify(FEVTEventContent, outputCommands = FEVTEventContent.outputCommands + RecoMTDFEVT.outputCommands) FEVTHLTALLEventContent = cms.PSet( outputCommands = cms.untracked.vstring('drop *'), splitLevel = cms.untracked.int32(0), ) FEVTHLTALLEventContent.outputCommands.extend(FEVTEventContent.outputCommands) FEVTHLTALLEventContent.outputCommands.append('keep *_*_*_HLT') # # # FEVTSIM Data Tier definition #
b2gDiJetHLTValidation = DQMEDAnalyzer( 'B2GHadronicHLTValidation', # Directory sDir=cms.untracked.string('HLT/B2GHLTValidation/B2G/DiJet/'), # Jets sJets=cms.untracked.string('ak8PFJetsPuppi'), ptJets0=cms.untracked.double(200.), ptJets1=cms.untracked.double(200.), etaJets=cms.untracked.double(2.4), minJets=cms.untracked.uint32(2), # Trigger sTrigger=cms.untracked.string("TriggerResults"), vsPaths=cms.untracked.vstring([ 'HLT_AK8DiPFJet280_200_TrimMass30_BTagCSV_p20', 'HLT_AK8DiPFJet250_200_TrimMass30_BTagCSV_p20', 'HLT_AK8DiPFJet280_200_TrimMass30_BTagCSV_p087', 'HLT_AK8DiPFJet300_200_TrimMass30_BTagCSV_p20', 'HLT_AK8DiPFJet300_200_TrimMass30_BTagCSV_p087', 'HLT_AK8PFJet360_TrimMass30', 'HLT_AK8PFJet400_TrimMass30', 'HLT_AK8PFHT800_TrimMass50', 'HLT_AK8PFHT750_TrimMass50', 'HLT_AK8PFHT700_TrimR0p1PT0p03Mass50', 'HLT_AK8PFHT650_TrimR0p1PT0p03Mass50', 'HLT_AK8PFHT600_TrimR0p1PT0p03Mass50_BTagCSV_p20' ]), ) # puppi jets don't exist in HI wfs, use Cs jets instead from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(b2gSingleJetHLTValidation, sJets="akCs4PFJets") pp_on_AA.toModify(b2gDiJetHLTValidation, sJets="akCs4PFJets")
mva=dict(GBRForestLabel='MVASelectorDetachedQuadStep_Phase1'), src='detachedQuadStepTracks', qualityCuts=[-0.5, 0.0, 0.5]) from RecoTracker.FinalTrackSelectors.TrackTfClassifier_cfi import * from RecoTracker.FinalTrackSelectors.trackSelectionTf_cfi import * trackdnn.toReplaceWith( detachedQuadStep, TrackTfClassifier.clone( src='detachedQuadStepTracks', qualityCuts=qualityCutDictionary['DetachedQuadStep'])) highBetaStar_2018.toModify(detachedQuadStep, qualityCuts=[-0.7, 0.0, 0.5]) pp_on_AA.toModify( detachedQuadStep, mva=dict(GBRForestLabel='HIMVASelectorDetachedQuadStep_Phase1'), qualityCuts=[-0.2, 0.2, 0.5], ) fastSim.toModify(detachedQuadStep, vertices='firstStepPrimaryVerticesBeforeMixing') # For Phase2PU140 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi detachedQuadStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone( src='detachedQuadStepTracks', trackSelectors=[ RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone( name='detachedQuadStepVtxLoose', chi2n_par=1.0, res_par=(0.003, 0.001),
lowPtQuadStep = TrackMVAClassifierPrompt.clone( mva=dict(GBRForestLabel='MVASelectorLowPtQuadStep_Phase1'), src='lowPtQuadStepTracks', qualityCuts=[-0.7, -0.35, -0.15]) from RecoTracker.FinalTrackSelectors.TrackLwtnnClassifier_cfi import * from RecoTracker.FinalTrackSelectors.trackSelectionLwtnn_cfi import * trackdnn.toReplaceWith( lowPtQuadStep, TrackLwtnnClassifier.clone(src='lowPtQuadStepTracks', qualityCuts=[0.2, 0.425, 0.75])) highBetaStar_2018.toModify(lowPtQuadStep, qualityCuts=[-0.9, -0.35, -0.15]) pp_on_AA.toModify( lowPtQuadStep, mva=dict(GBRForestLabel='HIMVASelectorLowPtQuadStep_Phase1'), qualityCuts=[-0.9, -0.4, 0.3], ) fastSim.toModify(lowPtQuadStep, vertices='firstStepPrimaryVerticesBeforeMixing') # For Phase2PU140 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi lowPtQuadStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone( src='lowPtQuadStepTracks', trackSelectors=[ RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone( name='lowPtQuadStepLoose', chi2n_par=2.0, res_par=(0.003, 0.002), minNumberLayers=3,
mixedTripletStep, mixedTripletStepClassifier1.clone( mva=dict(GBRForestLabel='MVASelectorMixedTripletStep_Phase1'), qualityCuts=[-0.5, 0.0, 0.5])) from RecoTracker.FinalTrackSelectors.TrackLwtnnClassifier_cfi import * from RecoTracker.FinalTrackSelectors.trackSelectionLwtnn_cfi import * trackdnn.toReplaceWith( mixedTripletStep, TrackLwtnnClassifier.clone(src='mixedTripletStepTracks', qualityCuts=[-0.8, -0.35, 0.1])) (trackdnn & fastSim).toModify(mixedTripletStep, vertices='firstStepPrimaryVerticesBeforeMixing') highBetaStar_2018.toModify(mixedTripletStep, qualityCuts=[-0.7, 0.0, 0.5]) pp_on_AA.toModify(mixedTripletStep, qualityCuts=[-0.5, 0.0, 0.9]) # For LowPU import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi mixedTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone( src='mixedTripletStepTracks', useAnyMVA=cms.bool(False), GBRForestLabel=cms.string('MVASelectorIter4'), trackSelectors=[ RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone( name='mixedTripletStepVtxLoose', chi2n_par=1.2, res_par=(0.003, 0.001), minNumberLayers=3, maxNumberLostLayers=1, minNumber3DLayers=2,
algos=cms.VPSet( cms.PSet( etaMin=cms.vdouble(0., 2.5), etaMax=cms.vdouble(2.5, 3.5), ptMin=cms.vdouble(0., 0.), #Normally 0 MinNeutralPt=cms.vdouble(0.2, 0.2), MinNeutralPtSlope=cms.vdouble(0.015, 0.030), RMSEtaSF=cms.vdouble(1.0, 1.0), MedEtaSF=cms.vdouble(1.0, 1.0), EtaMaxExtrap=cms.double(2.0), puppiAlgos=puppiCentral), cms.PSet( etaMin=cms.vdouble(3.5), etaMax=cms.vdouble(10.0), ptMin=cms.vdouble(0.), #Normally 0 MinNeutralPt=cms.vdouble(2.0), MinNeutralPtSlope=cms.vdouble(0.08), RMSEtaSF=cms.vdouble(1.0), MedEtaSF=cms.vdouble(0.75), EtaMaxExtrap=cms.double(2.0), puppiAlgos=puppiForward))) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(puppi, algos=[]) from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X run2_miniAOD_pp_on_AA_103X.toModify( puppi, useVertexAssociation=False ) # because the association is only run on cleanedParticleFlow puppiNoLep = puppi.clone(puppiNoLep=True, PtMaxPhotons=20.)
import FWCore.ParameterSet.Config as cms slimmedGenJets = cms.EDProducer("PATGenJetSlimmer", src = cms.InputTag("ak4GenJetsNoNu"), packedGenParticles = cms.InputTag("packedGenParticles"), cut = cms.string("pt > 8"), cutLoose = cms.string(""), nLoose = cms.uint32(0), clearDaughters = cms.bool(False), #False means rekeying dropSpecific = cms.bool(False), ) slimmedGenJetsAK8 = cms.EDProducer("PATGenJetSlimmer", src = cms.InputTag("ak8GenJetsNoNu"), packedGenParticles = cms.InputTag("packedGenParticles"), cut = cms.string("pt > 80"), cutLoose = cms.string("pt > 10."), nLoose = cms.uint32(3), clearDaughters = cms.bool(False), #False means rekeying dropSpecific = cms.bool(False), ) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(slimmedGenJets, src = "ak4HiSignalGenJets") pp_on_AA.toModify(slimmedGenJetsAK8, cut = 'pt>9999', nLoose = 0) from Configuration.ProcessModifiers.genJetSubEvent_cff import genJetSubEvent genJetSubEvent.toModify(slimmedGenJets, src = "ak4HiGenJetsCleaned")
_fastSim_reducedEcalRecHitsTask = reducedEcalRecHitsTask.copyAndExclude( seldigisTask) from Configuration.Eras.Modifier_fastSim_cff import fastSim fastSim.toReplaceWith(reducedEcalRecHitsTask, _fastSim_reducedEcalRecHitsTask) _pp_on_AA_reducedEcalRecHitsTask = reducedEcalRecHitsTask.copy() _pp_on_AA_reducedEcalRecHitsTask.remove(interestingEcalDetIdOOTPFEB) _pp_on_AA_reducedEcalRecHitsTask.remove(interestingEcalDetIdOOTPFEE) _pp_on_AA_reducedEcalRecHitsTask.remove(interestingEcalDetIdOOTPFES) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toReplaceWith(reducedEcalRecHitsTask, _pp_on_AA_reducedEcalRecHitsTask) pp_on_AA.toModify( reducedEcalRecHitsEB.interestingDetIdCollections, func=lambda list: list.remove(cms.InputTag("interestingEcalDetIdOOTPFEB"))) pp_on_AA.toModify( reducedEcalRecHitsEB.interestingDetIdCollections, func=lambda list: list.remove(cms.InputTag("interestingOotGamIsoDetIdEB"))) pp_on_AA.toModify( reducedEcalRecHitsEE.interestingDetIdCollections, func=lambda list: list.remove(cms.InputTag("interestingEcalDetIdOOTPFEE"))) pp_on_AA.toModify( reducedEcalRecHitsEE.interestingDetIdCollections, func=lambda list: list.remove(cms.InputTag("interestingOotGamIsoDetIdEE"))) pp_on_AA.toModify( reducedEcalRecHitsES.interestingDetIds, func=lambda list: list.remove(cms.InputTag("interestingEcalDetIdOOTPFES"))) pp_on_AA.toModify(reducedEcalRecHitsES.interestingDetIdsNotToClean, func=lambda list: list.remove(
def applySubstructure( process, postfix="" ) : task = getPatAlgosToolsTask(process) from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection from PhysicsTools.PatAlgos.producersLayer1.jetProducer_cfi import _patJets as patJetsDefault # Configure the RECO jets from RecoJets.JetProducers.ak8PFJets_cfi import ak8PFJetsPuppi, ak8PFJetsPuppiSoftDrop, ak8PFJetsPuppiConstituents setattr(process,'ak8PFJetsPuppi'+postfix,ak8PFJetsPuppi.clone()) setattr(process,'ak8PFJetsPuppiConstituents'+postfix, ak8PFJetsPuppiConstituents.clone(cut = cms.string('pt > 170.0 && abs(rapidity()) < 2.4') )) setattr(process,'ak8PFJetsPuppiSoftDrop'+postfix, ak8PFJetsPuppiSoftDrop.clone( src = 'ak8PFJetsPuppiConstituents'+postfix+':constituents' )) from RecoJets.JetProducers.ak8PFJetsPuppi_groomingValueMaps_cfi import ak8PFJetsPuppiSoftDropMass setattr(process,'ak8PFJetsPuppiSoftDropMass'+postfix, ak8PFJetsPuppiSoftDropMass.clone()) from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL _run2_miniAOD_ANY = (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17 | run2_miniAOD_UL) from Configuration.Eras.Modifier_pA_2016_cff import pA_2016 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA if postfix=='': # Avoid recomputing the PUPPI collections that are present in AOD _rerun_puppijets_task = task.copy() _rerun_puppijets_task.add(getattr(process,'ak8PFJetsPuppi'), getattr(process,'ak8PFJetsPuppiConstituents'), getattr(process,'ak8PFJetsPuppiSoftDrop'), getattr(process,'ak8PFJetsPuppiSoftDropMass')) (_run2_miniAOD_ANY | pA_2016 | pp_on_AA).toReplaceWith(task, _rerun_puppijets_task) else: task.add(getattr(process,'ak8PFJetsPuppi'+postfix), getattr(process,'ak8PFJetsPuppiConstituents'+postfix), getattr(process,'ak8PFJetsPuppiSoftDrop'+postfix), getattr(process,'ak8PFJetsPuppiSoftDropMass'+postfix)) from RecoJets.JetProducers.ak8GenJets_cfi import ak8GenJets, ak8GenJetsSoftDrop, ak8GenJetsConstituents addToProcessAndTask('ak8GenJetsNoNuConstituents'+postfix, ak8GenJetsConstituents.clone(src='ak8GenJetsNoNu'), process, task ) addToProcessAndTask('ak8GenJetsNoNuSoftDrop'+postfix,ak8GenJetsSoftDrop.clone(src=cms.InputTag('ak8GenJetsNoNuConstituents'+postfix, 'constituents')),process,task) addToProcessAndTask('slimmedGenJetsAK8SoftDropSubJets'+postfix, cms.EDProducer("PATGenJetSlimmer", src = cms.InputTag("ak8GenJetsNoNuSoftDrop"+postfix, "SubJets"), packedGenParticles = cms.InputTag("packedGenParticles"), cut = cms.string(""), cutLoose = cms.string(""), nLoose = cms.uint32(0), clearDaughters = cms.bool(False), #False means rekeying dropSpecific = cms.bool(True), # Save space ), process, task ) pp_on_AA.toModify( getattr(process,'slimmedGenJetsAK8SoftDropSubJets'), cut = 'pt<0', nLoose = 0) ## PATify puppi soft drop fat jets addJetCollection( process, postfix=postfix, labelName = 'AK8PFPuppiSoftDrop' + postfix, jetSource = cms.InputTag('ak8PFJetsPuppiSoftDrop'+postfix), btagDiscriminators = ['None'], genJetCollection = cms.InputTag('slimmedGenJetsAK8'), jetCorrections = ('AK8PFPuppi', ['L2Relative', 'L3Absolute'], 'None'), getJetMCFlavour = False # jet flavor disabled ) ## PATify soft drop subjets addJetCollection( process, postfix=postfix, labelName = 'AK8PFPuppiSoftDropSubjets', jetSource = cms.InputTag('ak8PFJetsPuppiSoftDrop'+postfix,'SubJets'), algo = 'ak', # needed for subjet flavor clustering rParam = 0.8, # needed for subjet flavor clustering btagDiscriminators = ['pfDeepCSVJetTags:probb', 'pfDeepCSVJetTags:probbb', 'pfCombinedInclusiveSecondaryVertexV2BJetTags','pfCombinedMVAV2BJetTags'], jetCorrections = ('AK4PFPuppi', ['L2Relative', 'L3Absolute'], 'None'), explicitJTA = True, # needed for subjet b tagging svClustering = True, # needed for subjet b tagging genJetCollection = cms.InputTag('slimmedGenJetsAK8SoftDropSubJets'), fatJets=cms.InputTag('ak8PFJetsPuppi'), # needed for subjet flavor clustering groomedFatJets=cms.InputTag('ak8PFJetsPuppiSoftDrop') # needed for subjet flavor clustering ) # add groomed ECFs and N-subjettiness to soft dropped pat::Jets for fat jets and subjets process.load('RecoJets.JetProducers.ECF_cff') addToProcessAndTask('nb1AK8PuppiSoftDrop'+postfix, process.ecfNbeta1.clone(src = cms.InputTag("ak8PFJetsPuppiSoftDrop"+postfix), cuts = cms.vstring('', '', 'pt > 250')), process, task) addToProcessAndTask('nb2AK8PuppiSoftDrop'+postfix, process.ecfNbeta2.clone(src = cms.InputTag("ak8PFJetsPuppiSoftDrop"+postfix), cuts = cms.vstring('', '', 'pt > 250')), process, task) #too slow now ==> disable from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common for e in [pp_on_XeXe_2017, pp_on_AA, phase2_common]: e.toModify(getattr(process,'nb1AK8PuppiSoftDrop'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] ) e.toModify(getattr(process,'nb2AK8PuppiSoftDrop'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] ) from RecoJets.JetProducers.nJettinessAdder_cfi import Njettiness addToProcessAndTask('NjettinessAK8Subjets'+postfix, Njettiness.clone(), process, task) getattr(process,"NjettinessAK8Subjets"+postfix).src = cms.InputTag("ak8PFJetsPuppiSoftDrop"+postfix, "SubJets") getattr(process,"patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += ['nb1AK8PuppiSoftDrop'+postfix+':ecfN2','nb1AK8PuppiSoftDrop'+postfix+':ecfN3'] getattr(process,"patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += ['nb2AK8PuppiSoftDrop'+postfix+':ecfN2','nb2AK8PuppiSoftDrop'+postfix+':ecfN3'] addToProcessAndTask('nb1AK8PuppiSoftDropSubjets'+postfix, process.ecfNbeta1.clone(src = cms.InputTag("ak8PFJetsPuppiSoftDrop"+postfix, "SubJets")), process, task) addToProcessAndTask('nb2AK8PuppiSoftDropSubjets'+postfix, process.ecfNbeta2.clone(src = cms.InputTag("ak8PFJetsPuppiSoftDrop"+postfix, "SubJets")), process, task) getattr(process,"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += ['nb1AK8PuppiSoftDropSubjets'+postfix+':ecfN2','nb1AK8PuppiSoftDropSubjets'+postfix+':ecfN3'] getattr(process,"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += ['nb2AK8PuppiSoftDropSubjets'+postfix+':ecfN2','nb2AK8PuppiSoftDropSubjets'+postfix+':ecfN3'] getattr(process,"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += ['NjettinessAK8Subjets'+postfix+':tau1','NjettinessAK8Subjets'+postfix+':tau2','NjettinessAK8Subjets'+postfix+':tau3','NjettinessAK8Subjets'+postfix+':tau4'] for e in [pp_on_XeXe_2017, pp_on_AA, phase2_common]: e.toModify(getattr(process,'nb1AK8PuppiSoftDropSubjets'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] ) e.toModify(getattr(process,'nb2AK8PuppiSoftDropSubjets'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] ) # Patify AK8 PF PUPPI addJetCollection(process, postfix=postfix, labelName = 'AK8Puppi', jetSource = cms.InputTag('ak8PFJetsPuppi'+postfix), algo= 'AK', rParam = 0.8, jetCorrections = ('AK8PFPuppi', cms.vstring(['L2Relative', 'L3Absolute']), 'None'), btagDiscriminators = ([ 'pfCombinedSecondaryVertexV2BJetTags', 'pfCombinedInclusiveSecondaryVertexV2BJetTags', 'pfCombinedMVAV2BJetTags', 'pfDeepCSVJetTags:probb', 'pfDeepCSVJetTags:probc', 'pfDeepCSVJetTags:probudsg', 'pfDeepCSVJetTags:probbb', 'pfBoostedDoubleSecondaryVertexAK8BJetTags']), genJetCollection = cms.InputTag('slimmedGenJetsAK8') ) getattr(process,"patJetsAK8Puppi"+postfix).userData.userFloats.src = [] # start with empty list of user floats getattr(process,"selectedPatJetsAK8Puppi"+postfix).cut = cms.string("pt > 100") getattr(process,"selectedPatJetsAK8Puppi"+postfix).cutLoose = cms.string("pt > 30") getattr(process,"selectedPatJetsAK8Puppi"+postfix).nLoose = cms.uint32(3) from RecoJets.JetAssociationProducers.j2tParametersVX_cfi import j2tParametersVX addToProcessAndTask('ak8PFJetsPuppiTracksAssociatorAtVertex'+postfix, cms.EDProducer("JetTracksAssociatorAtVertex", j2tParametersVX.clone( coneSize = cms.double(0.8) ), jets = cms.InputTag("ak8PFJetsPuppi") ), process, task) addToProcessAndTask('patJetAK8PuppiCharge'+postfix, cms.EDProducer("JetChargeProducer", src = cms.InputTag("ak8PFJetsPuppiTracksAssociatorAtVertex"), var = cms.string('Pt'), exp = cms.double(1.0) ), process, task) ## now add AK8 groomed masses and ECF getattr(process,"patJetsAK8Puppi"+postfix).userData.userFloats.src += ['ak8PFJetsPuppiSoftDropMass'+postfix] getattr(process,"patJetsAK8Puppi"+postfix).addTagInfos = cms.bool(False) # add PUPPI Njetiness addToProcessAndTask('NjettinessAK8Puppi'+postfix, Njettiness.clone(), process, task) getattr(process,"NjettinessAK8Puppi"+postfix).src = cms.InputTag("ak8PFJetsPuppi"+postfix) getattr(process,"patJetsAK8Puppi").userData.userFloats.src += ['NjettinessAK8Puppi'+postfix+':tau1','NjettinessAK8Puppi'+postfix+':tau2','NjettinessAK8Puppi'+postfix+':tau3','NjettinessAK8Puppi'+postfix+':tau4'] addToProcessAndTask("slimmedJetsAK8PFPuppiSoftDropSubjets"+postfix, cms.EDProducer("PATJetSlimmer", src = cms.InputTag("selectedPatJetsAK8PFPuppiSoftDropSubjets"), packedPFCandidates = cms.InputTag("packedPFCandidates"), dropJetVars = cms.string("1"), dropDaughters = cms.string("0"), rekeyDaughters = cms.string("1"), dropTrackRefs = cms.string("1"), dropSpecific = cms.string("1"), dropTagInfos = cms.string("1"), modifyJets = cms.bool(True), mixedDaughters = cms.bool(False), modifierConfig = cms.PSet( modifications = cms.VPSet() ) ), process, task) ## Establish references between PATified fat jets and subjets using the BoostedJetMerger addToProcessAndTask("slimmedJetsAK8PFPuppiSoftDropPacked"+postfix, cms.EDProducer("BoostedJetMerger", jetSrc=cms.InputTag("selectedPatJetsAK8PFPuppiSoftDrop"), subjetSrc=cms.InputTag("slimmedJetsAK8PFPuppiSoftDropSubjets") ), process, task ) addToProcessAndTask("packedPatJetsAK8"+postfix, cms.EDProducer("JetSubstructurePacker", jetSrc = cms.InputTag("selectedPatJetsAK8Puppi"+postfix), distMax = cms.double(0.8), algoTags = cms.VInputTag( cms.InputTag("slimmedJetsAK8PFPuppiSoftDropPacked"+postfix) ), algoLabels = cms.vstring( 'SoftDropPuppi' ), fixDaughters = cms.bool(True), packedPFCandidates = cms.InputTag("packedPFCandidates"+postfix), ), process, task) # switch off daughter re-keying since it's done in the JetSubstructurePacker (and can't be done afterwards) process.slimmedJetsAK8.rekeyDaughters = "0" # Reconfigure the slimmedAK8 jet information to keep process.slimmedJetsAK8.dropDaughters = cms.string("pt < 170") process.slimmedJetsAK8.dropSpecific = cms.string("pt < 170") process.slimmedJetsAK8.dropTagInfos = cms.string("pt < 170")
addEfficiencies=cms.bool(False), efficiencies=cms.PSet(), # resolution addResolutions=cms.bool(False), resolutions=cms.PSet()) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify( _patJets, jetSource="akCs4PFJets", genJetMatch="patJetGenJetMatch", genPartonMatch="patJetPartonMatch", JetFlavourInfoSource="patJetFlavourAssociation", JetPartonMapSource="patJetFlavourAssociationLegacy", jetCorrFactorsSource=["patJetCorrFactors"], trackAssociationSource="ak5JetTracksAssociatorAtVertex", useLegacyJetMCFlavour=True, discriminatorSources=[ "simpleSecondaryVertexHighEffBJetTags", "simpleSecondaryVertexHighPurBJetTags", "combinedSecondaryVertexV2BJetTags", "jetBProbabilityBJetTags", "jetProbabilityBJetTags", "trackCountingHighEffBJetTags", "trackCountingHighPurBJetTags", ], addJetCharge=False, ) patJets = _patJets.clone()
'BPix1+FPix1_pos', 'BPix1+FPix1_neg', 'BPix1+FPix2_pos', 'BPix1+FPix2_neg', 'BPix2+FPix1_pos', 'BPix2+FPix1_neg', 'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg', 'FPix1_pos+FPix3_pos', 'FPix1_neg+FPix3_neg', 'FPix2_pos+FPix3_pos', 'FPix2_neg+FPix3_neg' ] trackingPhase1.toModify(pixelPairElectronSeedLayers, layerList = _layerListForPhase1) from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cff import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices pixelPairElectronTrackingRegions = _globalTrackingRegionWithVertices.clone(RegionPSet = dict( ptMin = 1.0, originRadius = 0.015, fixedError = 0.03, )) pp_on_AA.toModify(pixelPairElectronTrackingRegions, RegionPSet = dict(ptMin = 8.0)) from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer pixelPairElectronHitDoublets = _hitPairEDProducer.clone( seedingLayers = 'pixelPairElectronSeedLayers', trackingRegions = 'pixelPairElectronTrackingRegions', maxElement = 1000000, produceSeedingHitSets = True, maxElementTotal = 12000000, ) from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer pixelPairElectronSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone( seedingHitSets = 'pixelPairElectronHitDoublets', ) stripPairElectronSeedLayers = _mod.seedingLayersEDProducer.clone( layerList = ['TIB1+TIB2', 'TIB1+TID1_pos', 'TIB1+TID1_neg', 'TID2_pos+TID3_pos', 'TID2_neg+TID3_neg',
mva=dict(GBRForestLabel='MVASelectorIter2_13TeV'), qualityCuts=[-0.2, 0.0, 0.3]) trackingPhase1.toModify( pixelPairStep, mva=dict(GBRForestLabel='MVASelectorPixelPairStep_Phase1')) from RecoTracker.FinalTrackSelectors.trackTfClassifier_cfi import * from RecoTracker.FinalTrackSelectors.trackSelectionTf_cfi import * from RecoTracker.FinalTrackSelectors.trackSelectionTf_CKF_cfi import * trackdnn.toReplaceWith( pixelPairStep, trackTfClassifier.clone( src='pixelPairStepTracks', qualityCuts=qualityCutDictionary.PixelPairStep.value())) highBetaStar_2018.toModify(pixelPairStep, qualityCuts=[-0.95, 0.0, 0.3]) pp_on_AA.toModify(pixelPairStep, qualityCuts=[-0.2, 0.0, 0.98]) fastSim.toModify(pixelPairStep, vertices='firstStepPrimaryVerticesBeforeMixing') # For LowPU and Phase2PU140 import RecoTracker.IterativeTracking.LowPtTripletStep_cff import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi pixelPairStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone( src='pixelPairStepTracks', useAnyMVA=cms.bool(True), GBRForestLabel=cms.string('MVASelectorIter2'), trackSelectors=cms.VPSet( RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone( name='pixelPairStepLoose', ), #end of pset RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone( name='pixelPairStepTight',
"PixelPairStep", "PixelLessStep", "TobTecStep", ]) from RecoLocalTracker.SubCollectionProducers.trackClusterRemover_cfi import trackClusterRemover as _trackClusterRemover _trackClusterRemoverBase = _trackClusterRemover.clone( maxChi2 = 9.0, pixelClusters = "siPixelClusters", stripClusters = "siStripClusters", TrackQuality = 'highPurity', minNumberOfLayersWithMeasBeforeFiltering = 0, ) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(_trackClusterRemoverBase, TrackQuality = 'tight') #Phase2 : configuring the phase2 track Cluster Remover from RecoLocalTracker.SubCollectionProducers.phase2trackClusterRemover_cfi import phase2trackClusterRemover as _phase2trackClusterRemover _trackClusterRemoverBase_trackingPhase2PU140 = _phase2trackClusterRemover.clone( maxChi2 = 9.0, phase2pixelClusters = "siPixelClusters", phase2OTClusters = "siPhase2Clusters", TrackQuality = 'highPurity', minNumberOfLayersWithMeasBeforeFiltering = 0, ) def _modulePrefix(iteration): return iteration[0].lower()+iteration[1:] def _clusterRemover(iteration):
hitErrorRPhi=cms.double(0.0051), TTRHBuilder=cms.string('TTRHBuilderWithoutAngle4PixelPairs'), HitProducer=cms.string('siPixelRecHits'), useErrorsFromParam=cms.bool(True), skipClusters=cms.InputTag('convClusters'), ))) photonConvTrajSeedFromSingleLeg.TrackRefitter = 'generalTracks' photonConvTrajSeedFromSingleLeg.primaryVerticesTag = 'firstStepPrimaryVertices' #photonConvTrajSeedFromQuadruplets.TrackRefitter = 'generalTracks' #photonConvTrajSeedFromQuadruplets.primaryVerticesTag = 'pixelVertices' from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU trackingLowPU.toModify(photonConvTrajSeedFromSingleLeg, primaryVerticesTag='pixelVertices') from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(photonConvTrajSeedFromSingleLeg, vtxMinDoF=999999.) # TRACKER DATA CONTROL # QUALITY CUTS DURING TRACK BUILDING import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff convCkfTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone( maxLostHits=1, minimumNumberOfHits=3, minPt=0.1) import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi convStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone( ComponentName='convStepChi2Est', nSigma=3.0, MaxChi2=30.0, MaxDisplacement=100, MaxSagitta=-1.,
'keep *_packedCandidateMuonID_*_*', 'keep *_slimmedJets_pfCandidates_*', 'keep floatedmValueMap_packedPFCandidateTrackChi2_*_*', 'keep floatedmValueMap_lostTrackChi2_*_*', 'keep recoCentrality_hiCentrality_*_*', 'keep int_centralityBin_*_*', 'keep recoHFFilterInfo_hiHFfilters_*_*', 'keep recoClusterCompatibility_hiClusterCompatibility_*_*', 'keep *_offlineSlimmedPrimaryVerticesRecovery_*_*', 'keep *_hiEvtPlane_*_*', 'keep *_hiEvtPlaneFlat_*_*', 'keep QIE10DataFrameHcalDataFrameContainer_hcalDigis_ZDC_*', ] from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(MicroEventContent, outputCommands = MicroEventContent.outputCommands + _pp_on_AA_extraCommands) MicroEventContentMC = cms.PSet( outputCommands = cms.untracked.vstring(MicroEventContent.outputCommands) ) MicroEventContentMC.outputCommands += MicroEventContentGEN.outputCommands MicroEventContentMC.outputCommands += [ 'keep PileupSummaryInfos_slimmedAddPileupInfo_*_*', # RUN 'keep L1GtTriggerMenuLite_l1GtTriggerMenuLite__*' ] _pp_on_AA_MC_extraCommands = ['keep *_packedGenParticlesSignal_*_*'] pp_on_AA.toModify(MicroEventContentMC, outputCommands = MicroEventContentMC.outputCommands + _pp_on_AA_MC_extraCommands) from Configuration.Eras.Modifier_strips_vfp30_2016_cff import strips_vfp30_2016 strips_vfp30_2016.toModify(MicroEventContentMC, outputCommands = MicroEventContentMC.outputCommands + [
## as input, which needs to be specified via this additional parameter extraJPTOffset="L1FastJet", ## in case that L1Offset or L1FastJet corrections are part ## of the parameter levels add the optional parameter ## primaryVertices here to specify the primary vertex ## collection, which was used to determine the L1Offset ## or L1FastJet correction from. This parameter will ONLY ## be read out if the correction level L1Offset or ## L1FastJet is found in levels. useNPV=True, primaryVertices='offlinePrimaryVertices', ## in case that L1FastJet corrections are part of the ## parameter levels add the optional parameter rho ## here to specify the energy density parameter for ## the corresponding jet collection (this variable is ## typically taken from kt6PFJets). useRho=True, rho='fixedGridRhoFastjetAll', ) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify( patJetCorrFactors, useNPV=False, useRho=False, levels=['L2Relative', 'L3Absolute'], payload="AK4PF", src="akCs4PFJets", )
trackingPhase1.toReplaceWith( pixelLessStep, pixelLessStepClassifier1.clone( mva=dict(GBRForestLabel='MVASelectorPixelLessStep_Phase1'), qualityCuts=[-0.4, 0.0, 0.4])) from RecoTracker.FinalTrackSelectors.TrackTfClassifier_cfi import * from RecoTracker.FinalTrackSelectors.trackSelectionTf_cfi import * trackdnn.toReplaceWith( pixelLessStep, TrackTfClassifier.clone(src='pixelLessStepTracks', qualityCuts=qualityCutDictionary['PixelLessStep'])) (trackdnn & fastSim).toModify(pixelLessStep, vertices='firstStepPrimaryVerticesBeforeMixing') pp_on_AA.toModify(pixelLessStep, qualityCuts=[-0.4, 0.0, 0.8]) # For LowPU import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi pixelLessStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone( src='pixelLessStepTracks', useAnyMVA=cms.bool(False), GBRForestLabel=cms.string('MVASelectorIter5'), trackSelectors=cms.VPSet( RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone( name='pixelLessStepLoose', chi2n_par=0.5, res_par=(0.003, 0.001), minNumberLayers=4, maxNumberLostLayers=1, minNumber3DLayers=3,
) trackingPhase1.toReplaceWith(initialStep, initialStepClassifier1.clone( mva = dict(GBRForestLabel = 'MVASelectorInitialStep_Phase1'), qualityCuts = [-0.95,-0.85,-0.75] )) from RecoTracker.FinalTrackSelectors.TrackLwtnnClassifier_cfi import * from RecoTracker.FinalTrackSelectors.trackSelectionLwtnn_cfi import * trackdnn.toReplaceWith(initialStep, TrackLwtnnClassifier.clone( src = 'initialStepTracks', qualityCuts = [0.0, 0.3, 0.6] )) (trackdnn & fastSim).toModify(initialStep,vertices = 'firstStepPrimaryVerticesBeforeMixing') pp_on_AA.toModify(initialStep, mva = dict(GBRForestLabel = 'HIMVASelectorInitialStep_Phase1'), qualityCuts = [-0.9, -0.5, 0.2], ) # For LowPU and Phase2PU140 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi initialStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone( src = 'initialStepTracks', useAnyMVA = cms.bool(False), GBRForestLabel = cms.string('MVASelectorIter0'), trackSelectors = [ RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone( name = 'initialStepLoose', ), #end of pset RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone( name = 'initialStepTight', preFilterName = 'initialStepLoose',
import FWCore.ParameterSet.Config as cms # getting the ptrs from RecoParticleFlow.PFProducer.pfLinker_cff import particleFlowPtrs from CommonTools.ParticleFlow.pfPileUp_cfi import * from CommonTools.ParticleFlow.TopProjectors.pfNoPileUp_cfi import * pfPileUpIsoPFBRECO = pfPileUp.clone(PFCandidates='particleFlowPtrs') from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(pfPileUpIsoPFBRECO, enable=False) pfNoPileUpIsoPFBRECO = pfNoPileUp.clone(topCollection='pfPileUpIsoPFBRECO', bottomCollection='particleFlowPtrs') pfNoPileUpIsoPFBRECOTask = cms.Task(pfPileUpIsoPFBRECO, pfNoPileUpIsoPFBRECO) pfNoPileUpIsoPFBRECOSequence = cms.Sequence(pfNoPileUpIsoPFBRECOTask) from CommonTools.ParticleFlow.pfNoPileUpJME_cff import * pfPileUpPFBRECO = pfPileUp.clone(PFCandidates='particleFlowPtrs') pfNoPileUpPFBRECO = pfNoPileUp.clone(topCollection='pfPileUpPFBRECO', bottomCollection='particleFlowPtrs') pfNoPileUpPFBRECOTask = cms.Task(pfPileUpPFBRECO, pfNoPileUpPFBRECO) pfNoPileUpPFBRECOSequence = cms.Sequence(pfNoPileUpPFBRECOTask) from CommonTools.ParticleFlow.ParticleSelectors.pfAllNeutralHadrons_cfi import * pfAllNeutralHadronsPFBRECO = pfAllNeutralHadrons.clone( src='pfNoPileUpIsoPFBRECO') from CommonTools.ParticleFlow.ParticleSelectors.pfAllChargedHadrons_cfi import * pfAllChargedHadronsPFBRECO = pfAllChargedHadrons.clone( src='pfNoPileUpIsoPFBRECO') from CommonTools.ParticleFlow.ParticleSelectors.pfAllPhotons_cfi import *
import FWCore.ParameterSet.Config as cms softPFElectronsTagInfos = cms.EDProducer( "SoftPFElectronTagInfoProducer", primaryVertex=cms.InputTag("offlinePrimaryVertices"), jets=cms.InputTag("ak4PFJetsCHS"), electrons=cms.InputTag("gedGsfElectrons"), DeltaRElectronJet=cms.double(0.4), MaxSip3Dsig=cms.double(200)) from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA pp_on_AA.toModify(softPFElectronsTagInfos, jets="akCs4PFJets")