Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-10-22 22:52:34

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from PhysicsTools.PatAlgos.slimming.packedPFCandidates_cff import *
0004 from PhysicsTools.PatAlgos.slimming.isolatedTracks_cfi import *
0005 from PhysicsTools.PatAlgos.slimming.lostTracks_cfi import *
0006 from PhysicsTools.PatAlgos.slimming.offlineSlimmedPrimaryVertices_cfi import *
0007 from PhysicsTools.PatAlgos.slimming.offlineSlimmedPrimaryVertices4D_cfi import *
0008 from PhysicsTools.PatAlgos.slimming.offlineSlimmedPrimaryVerticesWithBS_cfi import *
0009 from CommonTools.RecoAlgos.primaryVertexAssociation_cfi import *
0010 from CommonTools.ParticleFlow.pfEGammaToCandidateRemapper_cfi import *
0011 from PhysicsTools.PatAlgos.slimming.genParticles_cff import *
0012 from PhysicsTools.PatAlgos.slimming.genParticleAssociation_cff import *
0013 from PhysicsTools.PatAlgos.slimming.selectedPatTrigger_cfi import *
0014 from PhysicsTools.PatAlgos.slimming.slimmedPatTrigger_cfi import *
0015 from PhysicsTools.PatAlgos.slimming.slimmedJets_cfi      import *
0016 from PhysicsTools.PatAlgos.slimming.slimmedCaloJets_cfi  import *
0017 from PhysicsTools.PatAlgos.slimming.slimmedJPTJets_cfi  import *
0018 from PhysicsTools.PatAlgos.slimming.slimmedGenJets_cfi   import *
0019 from PhysicsTools.PatAlgos.slimming.slimmedElectrons_cfi import *
0020 from PhysicsTools.PatAlgos.slimming.slimmedLowPtElectrons_cff import *
0021 from PhysicsTools.PatAlgos.slimming.slimmedTrackExtras_cff import *
0022 from PhysicsTools.PatAlgos.slimming.slimmedMuons_cfi     import *
0023 from PhysicsTools.PatAlgos.slimming.slimmedDisplacedMuons_cfi     import *
0024 from PhysicsTools.PatAlgos.slimming.slimmedPhotons_cfi   import *
0025 from PhysicsTools.PatAlgos.slimming.slimmedOOTPhotons_cff import *
0026 from PhysicsTools.PatAlgos.slimming.slimmedTaus_cfi      import *
0027 from PhysicsTools.PatAlgos.slimming.slimmedSecondaryVertices_cfi      import *
0028 from PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi      import *
0029 from PhysicsTools.PatAlgos.slimming.slimmedV0s_cff      import *
0030 from PhysicsTools.PatAlgos.slimming.metFilterPaths_cff   import *
0031 from PhysicsTools.PatAlgos.slimming.MicroEventContent_cff import *
0032 from RecoEgamma.EgammaPhotonProducers.reducedEgamma_cfi  import *
0033 from RecoLuminosity.LumiProducer.bunchSpacingProducer_cfi import bunchSpacingProducer
0034 from HeavyFlavorAnalysis.Onia2MuMu.OniaPhotonConversionProducer_cfi import PhotonCandidates as oniaPhotonCandidates
0035 from RecoLocalCalo.HcalRecProducers.HcalHitSelection_cfi import *
0036 
0037 slimmingTask = cms.Task(
0038     packedPFCandidatesTask,
0039     lostTracks,
0040     isolatedTracks,
0041     offlineSlimmedPrimaryVertices,
0042     offlineSlimmedPrimaryVerticesWithBS,
0043     primaryVertexAssociation,
0044     primaryVertexWithBSAssociation,
0045     genParticlesTask,
0046     packedCandidateToGenAssociationTask,
0047     selectedPatTrigger,
0048     slimmedPatTrigger,
0049     slimmedCaloJets,
0050     slimmedJPTJets,
0051     slimmedJets,
0052     slimmedJetsAK8,
0053     slimmedGenJets,
0054     slimmedGenJetsAK8,
0055     slimmedElectrons,
0056     slimmedLowPtElectronsTask,
0057     slimmedMuonTrackExtras,
0058     slimmedMuons,
0059     slimmedDisplacedMuonTrackExtras,
0060     slimmedDisplacedMuons,
0061     slimmedPhotons,
0062     slimmedOOTPhotons,
0063     slimmedTaus,
0064     slimmedSecondaryVertices,
0065     slimmedKshortVertices,
0066     slimmedLambdaVertices,
0067     slimmedMETs,
0068     metFilterPathsTask,
0069     superClusterMerger,
0070     reducedEgamma,
0071     slimmedHcalRecHits,
0072     bunchSpacingProducer,
0073     oniaPhotonCandidates
0074 )
0075 
0076 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0077 pp_on_AA.toReplaceWith(slimmingTask, slimmingTask.copyAndExclude([slimmedOOTPhotons]))
0078 pp_on_AA.toReplaceWith(slimmingTask, slimmingTask.copyAndExclude([slimmedJPTJets]))
0079 
0080 (pp_on_AA).toReplaceWith(slimmingTask,
0081                          slimmingTask.copyAndExclude([slimmedLowPtElectronsTask]))
0082 
0083 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
0084 from Configuration.Eras.Era_Run2_2016_HIPM_cff import Run2_2016_HIPM
0085 (pp_on_AA | run2_miniAOD_UL | Run2_2016_HIPM).toReplaceWith(slimmingTask,
0086                                                    slimmingTask.copyAndExclude([slimmedDisplacedMuons, slimmedDisplacedMuonTrackExtras]))
0087 
0088 from PhysicsTools.PatAlgos.slimming.hiPixelTracks_cfi import hiPixelTracks
0089 from RecoHI.HiEvtPlaneAlgos.HiEvtPlane_cfi import hiEvtPlane
0090 from RecoHI.HiEvtPlaneAlgos.hiEvtPlaneFlat_cfi import hiEvtPlaneFlat
0091 pp_on_AA.toReplaceWith(slimmingTask, cms.Task(slimmingTask.copy(), hiPixelTracks, hiEvtPlane, hiEvtPlaneFlat))
0092 
0093 from PhysicsTools.PatAlgos.packedCandidateMuonID_cfi import packedCandidateMuonID
0094 from PhysicsTools.PatAlgos.packedPFCandidateTrackChi2_cfi import packedPFCandidateTrackChi2
0095 from RecoHI.HiCentralityAlgos.CentralityBin_cfi import centralityBin
0096 from RecoHI.HiCentralityAlgos.hiHFfilters_cfi import hiHFfilters
0097 lostTrackChi2 = packedPFCandidateTrackChi2.clone(candidates = "lostTracks", doLostTracks = True)
0098 
0099 pp_on_AA.toReplaceWith(
0100     slimmingTask,
0101     cms.Task(slimmingTask.copy(), packedCandidateMuonID, packedPFCandidateTrackChi2, lostTrackChi2, centralityBin, hiHFfilters))
0102 from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
0103 run2_miniAOD_pp_on_AA_103X.toReplaceWith(slimmingTask,cms.Task(primaryVertexAssociationCleaned,slimmingTask.copy()))
0104 run2_miniAOD_pp_on_AA_103X.toReplaceWith(slimmingTask,cms.Task(primaryVertexWithBSAssociationCleaned,slimmingTask.copy()))
0105 run2_miniAOD_pp_on_AA_103X.toReplaceWith(slimmingTask,cms.Task(pfEGammaToCandidateRemapperCleaned,slimmingTask.copy()))
0106 
0107 from RecoHI.HiTracking.miniAODVertexRecovery_cff import offlinePrimaryVerticesRecovery, offlineSlimmedPrimaryVerticesRecovery
0108 run2_miniAOD_pp_on_AA_103X.toReplaceWith(
0109     slimmingTask,
0110     cms.Task(slimmingTask.copy(), offlinePrimaryVerticesRecovery, offlineSlimmedPrimaryVerticesRecovery))
0111 
0112 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0113 fastSim.toReplaceWith(slimmingTask, slimmingTask.copyAndExclude([slimmedDisplacedMuons, slimmedDisplacedMuonTrackExtras]))
0114 
0115 from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
0116 _phase2_timing_slimmingTask = cms.Task(slimmingTask.copy(),
0117                                        offlineSlimmedPrimaryVertices4D)
0118 phase2_timing.toReplaceWith(slimmingTask,_phase2_timing_slimmingTask)
0119 
0120 from PhysicsTools.PatAlgos.slimming.patPhotonDRNCorrector_cfi import patPhotonsDRN
0121 from Configuration.ProcessModifiers.photonDRN_cff import _photonDRN
0122 _photonDRN.toReplaceWith(slimmingTask, cms.Task(slimmingTask.copy(), patPhotonsDRN))
0123 
0124 from Configuration.Eras.Modifier_run3_upc_cff import run3_upc
0125 from PhysicsTools.PatAlgos.modules import DeDxEstimatorRekeyer
0126 dedxEstimator = DeDxEstimatorRekeyer()
0127 from Configuration.Eras.Modifier_run3_egamma_2023_cff import run3_egamma_2023
0128 run3_upc.toModify(dedxEstimator, dedxEstimators = ["dedxHarmonic2", "dedxPixelHarmonic2", "dedxPixelLikelihood", "dedxStripLikelihood", "dedxAllLikelihood"])
0129 run3_upc.toReplaceWith(slimmingTask, cms.Task(slimmingTask.copy(), hiPixelTracks, packedPFCandidateTrackChi2, lostTrackChi2, dedxEstimator))
0130 
0131 from Configuration.Eras.Modifier_ppRef_2024_cff import ppRef_2024
0132 ppRef_2024.toReplaceWith(slimmingTask, cms.Task(slimmingTask.copy(), packedPFCandidateTrackChi2, lostTrackChi2))