From 4953746d519822199a3c1defb3fd9feec69bbb04 Mon Sep 17 00:00:00 2001
From: --add <soureek.mitra@cern.ch>
Date: Fri, 23 Jun 2023 10:14:28 +0200
Subject: [PATCH] Updating HLT paths for TopMuEGSkim

---
 DPGAnalysis/Skims/python/TopMuEGSkim_cff.py |  8 ++-
 DPGAnalysis/Skims/test/test_TopMuEG_SKIM.py | 61 +++++++++------------
 2 files changed, 32 insertions(+), 37 deletions(-)

diff --git a/DPGAnalysis/Skims/python/TopMuEGSkim_cff.py b/DPGAnalysis/Skims/python/TopMuEGSkim_cff.py
index f18b61beaca6c..dc6dc91dc3673 100755
--- a/DPGAnalysis/Skims/python/TopMuEGSkim_cff.py
+++ b/DPGAnalysis/Skims/python/TopMuEGSkim_cff.py
@@ -20,13 +20,15 @@
 
 hltBtagTopMuEGSelection = cms.EDFilter("HLTHighLevel",
      TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
-     HLTPaths = cms.vstring('HLT_Mu8_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_DZ_PFDiJet30_PFBtagDeepCSV_1p5_v*', # new (2022) MuEG trigger paths (used at DQM)
-                           'HLT_Mu8_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_DZ_CaloDiJet30_CaloBtagDeepCSV_1p5_v*'), # new (2022) MuEG trigger paths (used at DQM)
+     HLTPaths = cms.vstring(
+    'HLT_Mu8_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_DZ_PFDiJet30_PFBtagDeepJet_1p5_v*',  # DeepCSV paths not available anymore. See https://its.cern.ch/jira/browse/CMSHLT-2592 
+    'HLT_Mu8_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_DZ_PFDiJet30_PNet2BTagMean0p50_v*',  # Taken from HLTrigger/Configuration/python/HLTrigger_Datasets_GRun_cff.py
+     ), 
      eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
      andOr = cms.bool(True), # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
      throw = cms.bool(False), # throw exception on unknown path names
 #     saveTags = cms.bool(False)
- )
+)
 
 
 #####################################
diff --git a/DPGAnalysis/Skims/test/test_TopMuEG_SKIM.py b/DPGAnalysis/Skims/test/test_TopMuEG_SKIM.py
index 0f48d2d176e97..138bfc3aff33d 100644
--- a/DPGAnalysis/Skims/test/test_TopMuEG_SKIM.py
+++ b/DPGAnalysis/Skims/test/test_TopMuEG_SKIM.py
@@ -2,7 +2,7 @@
 # using: 
 # Revision: 1.19 
 # Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v 
-# with command line options: skims -s SKIM:TopMuEG --mc --dasquery=file dataset=/RelValTTbar_14TeV/CMSSW_12_1_0_pre2-PU_121X_mcRun3_2021_realistic_v1-v1/GEN-SIM-RECO -n 100 --conditions auto:phase1_2022_realistic --eventcontent=FEVTDEBUGHLT --datatier=RAW-RECO --python_filename=test_TopMuEG_SKIM.py --processName=SKIMTopMuEG --no_exec --era=Run3
+# with command line options: skims -s SKIM:TopMuEG --mc --dasquery=file dataset=/RelValTTbar_14TeV/CMSSW_13_2_0_pre1-PU_131X_mcRun3_2022_realistic_v3-v1/GEN-SIM-RECO -n 100 --conditions auto:phase1_2022_realistic --eventcontent=FEVTDEBUGHLT --datatier=RAW-RECO --python_filename=test_TopMuEG_SKIM.py --processName=SKIMTopMuEG --no_exec --era=Run3
 import FWCore.ParameterSet.Config as cms
 
 from Configuration.Eras.Era_Run3_cff import Run3
@@ -28,16 +28,10 @@
 # Input source
 process.source = cms.Source("PoolSource",
     fileNames = cms.untracked.vstring(
-        '/store/relval/CMSSW_12_1_0_pre2/RelValTTbar_14TeV/GEN-SIM-RECO/PU_121X_mcRun3_2021_realistic_v1-v1/10000/1047ae69-bff7-43ef-858e-431009bf73ba.root',
-        '/store/relval/CMSSW_12_1_0_pre2/RelValTTbar_14TeV/GEN-SIM-RECO/PU_121X_mcRun3_2021_realistic_v1-v1/10000/5c1bbaaf-797e-4843-8296-a9cbaf36a8a3.root',
-        '/store/relval/CMSSW_12_1_0_pre2/RelValTTbar_14TeV/GEN-SIM-RECO/PU_121X_mcRun3_2021_realistic_v1-v1/10000/5d7209bf-c323-4dce-a0b5-e3d2db5aba73.root',
-        '/store/relval/CMSSW_12_1_0_pre2/RelValTTbar_14TeV/GEN-SIM-RECO/PU_121X_mcRun3_2021_realistic_v1-v1/10000/63286a1c-de2a-443d-9963-03f55e6abd7c.root',
-        '/store/relval/CMSSW_12_1_0_pre2/RelValTTbar_14TeV/GEN-SIM-RECO/PU_121X_mcRun3_2021_realistic_v1-v1/10000/667f5503-d24f-4504-823a-6470c82d48e0.root',
-        '/store/relval/CMSSW_12_1_0_pre2/RelValTTbar_14TeV/GEN-SIM-RECO/PU_121X_mcRun3_2021_realistic_v1-v1/10000/b846eae8-d564-4a2d-b28c-c9b683b9bb60.root',
-        '/store/relval/CMSSW_12_1_0_pre2/RelValTTbar_14TeV/GEN-SIM-RECO/PU_121X_mcRun3_2021_realistic_v1-v1/10000/cbc44982-5d35-43fa-b010-abcc05bd9d03.root',
-        '/store/relval/CMSSW_12_1_0_pre2/RelValTTbar_14TeV/GEN-SIM-RECO/PU_121X_mcRun3_2021_realistic_v1-v1/10000/ce256d7b-603b-412b-8948-41ae64a40372.root',
-        '/store/relval/CMSSW_12_1_0_pre2/RelValTTbar_14TeV/GEN-SIM-RECO/PU_121X_mcRun3_2021_realistic_v1-v1/10000/f046bf44-514a-4061-b6b2-7890cd75071e.root'
-    ),
+    '/store/relval/CMSSW_13_0_0/RelValTTbar_14TeV/GEN-SIM-RECO/130X_mcRun3_2022_realistic_v2-v1/00000/120127ad-f806-4494-8d98-f69ef0b2a85a.root',
+    '/store/relval/CMSSW_13_0_0/RelValTTbar_14TeV/GEN-SIM-RECO/130X_mcRun3_2022_realistic_v2-v1/00000/3be6dcf5-9b42-4bd4-b437-23c9753134e0.root',
+    '/store/relval/CMSSW_13_0_0/RelValTTbar_14TeV/GEN-SIM-RECO/130X_mcRun3_2022_realistic_v2-v1/00000/545d64b5-2ee2-4cac-b3de-9123e4890b9f.root',    
+   ),
     secondaryFileNames = cms.untracked.vstring()
 )
 
@@ -46,6 +40,7 @@
     IgnoreCompletely = cms.untracked.vstring(),
     Rethrow = cms.untracked.vstring(),
     SkipEvent = cms.untracked.vstring(),
+    accelerators = cms.untracked.vstring('*'),
     allowUnscheduled = cms.obsolete.untracked.bool,
     canDeleteEarly = cms.untracked.vstring(),
     deleteNonConsumedUnscheduledModules = cms.untracked.bool(True),
@@ -59,7 +54,9 @@
     ),
     fileMode = cms.untracked.string('FULLMERGE'),
     forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
+    holdsReferencesToDeleteEarly = cms.untracked.VPSet(),
     makeTriggerResults = cms.obsolete.untracked.bool,
+    modulesToIgnoreForDeleteEarly = cms.untracked.vstring(),
     numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(0),
     numberOfConcurrentRuns = cms.untracked.uint32(1),
     numberOfStreams = cms.untracked.uint32(0),
@@ -67,7 +64,7 @@
     printDependencies = cms.untracked.bool(False),
     sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
     throwIfIllegalParameter = cms.untracked.bool(True),
-    wantSummary = cms.untracked.bool(True)
+    wantSummary = cms.untracked.bool(False)
 )
 
 # Production Info
@@ -114,12 +111,9 @@
         'keep edmTriggerResults_*_*_*',
         'keep triggerTriggerEvent_*_*_*',
         'keep *_hltFEDSelectorL1_*_*',
-        'keep *_hltScoutingCaloPacker_*_*',
         'keep *_hltScoutingEgammaPacker_*_*',
-        'keep *_hltScoutingMuonPackerCalo_*_*',
         'keep *_hltScoutingMuonPacker_*_*',
         'keep *_hltScoutingPFPacker_*_*',
-        'keep *_hltScoutingPrimaryVertexPackerCaloMuon_*_*',
         'keep *_hltScoutingPrimaryVertexPacker_*_*',
         'keep *_hltScoutingTrackPacker_*_*',
         'keep edmTriggerResults_*_*_*',
@@ -136,6 +130,8 @@
         'keep *_dt4DCosmicSegments_*_*',
         'keep *_cscSegments_*_*',
         'keep *_rpcRecHits_*_*',
+        'keep *_dt1DRecHits_*_*',
+        'keep *_csc2DRecHits_*_*',
         'keep *_gemRecHits_*_*',
         'keep *_gemSegments_*_*',
         'keep *_hbhereco_*_*',
@@ -294,6 +290,13 @@
         'keep recoMuonCosmicCompatibilityedmValueMap_muons_*_*',
         'keep uintedmValueMap_muons_*_*',
         'keep *_particleFlow_muons_*',
+        'keep recoMuons_displacedMuons_*_*',
+        'keep booledmValueMap_displacedMuons_*_*',
+        'keep doubleedmValueMap_displacedMuons_dispMuPFMean*_*',
+        'keep doubleedmValueMap_displacedMuons_dispMuPFSum*_*',
+        'keep recoMuonTimeExtraedmValueMap_displacedMuons_*_*',
+        'keep uintedmValueMap_displacedMuons_*_*',
+        'keep *_particleFlow_displacedMuons_*',
         'keep recoTracks_standAloneMuons_*_*',
         'keep recoTrackExtras_standAloneMuons_*_*',
         'keep TrackingRecHitsOwned_standAloneMuons_*_*',
@@ -318,10 +321,15 @@
         'keep recoTrackExtras_displacedStandAloneMuons_*_*',
         'keep TrackingRecHitsOwned_displacedStandAloneMuons_*_*',
         'keep *_muonReducedTrackExtras_*_*',
+        'keep *_displacedMuonReducedTrackExtras_*_*',
         'keep *_muIsoDepositTk_*_*',
         'keep *_muIsoDepositCalByAssociatorTowers_*_*',
         'keep *_muIsoDepositCalByAssociatorHits_*_*',
         'keep *_muIsoDepositJets_*_*',
+        'keep *_muIsoDepositTkDisplaced_*_*',
+        'keep *_muIsoDepositCalByAssociatorTowersDisplaced_*_*',
+        'keep *_muIsoDepositCalByAssociatorHitsDisplaced_*_*',
+        'keep *_muIsoDepositJetsDisplaced_*_*',
         'keep *_muGlobalIsoDepositCtfTk_*_*',
         'keep *_muGlobalIsoDepositCalByAssociatorTowers_*_*',
         'keep *_muGlobalIsoDepositCalByAssociatorHits_*_*',
@@ -352,7 +360,6 @@
         'keep *_pfDeepCSVJetTags_*_*',
         'keep *_pfDeepCMVAJetTags_*_*',
         'keep *_pixelClusterTagInfos_*_*',
-        'keep *_hpsPFTauDiscriminationByLooseElectronRejection_*_*',
         'keep recoRecoTauPiZeros_hpsPFTauProducer_pizeros_*',
         'keep recoPFTaus_hpsPFTauProducer_*_*',
         'keep *_hpsPFTauBasicDiscriminators_*_*',
@@ -363,13 +370,6 @@
         'keep *_hpsPFTauDiscriminationByDecayModeFindingOldDMs_*_*',
         'keep *_hpsPFTauDiscriminationByMuonRejection3_*_*',
         'keep *_hpsPFTauTransverseImpactParameters_*_*',
-        'keep *_hpsPFTauDiscriminationByMVA6ElectronRejection_*_*',
-        'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLT_*_*',
-        'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLT_*_*',
-        'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLT_*_*',
-        'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLT_*_*',
-        'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLT_*_*',
-        'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLT_*_*',
         'keep  *_offlinePrimaryVertices__*',
         'keep *_offlinePrimaryVerticesWithBS_*_*',
         'keep *_offlinePrimaryVerticesFromCosmicTracks_*_*',
@@ -507,12 +507,9 @@
         'keep edmTriggerResults_*_*_*',
         'keep triggerTriggerEvent_*_*_*',
         'keep *_hltFEDSelectorL1_*_*',
-        'keep *_hltScoutingCaloPacker_*_*',
         'keep *_hltScoutingEgammaPacker_*_*',
-        'keep *_hltScoutingMuonPackerCalo_*_*',
         'keep *_hltScoutingMuonPacker_*_*',
         'keep *_hltScoutingPFPacker_*_*',
-        'keep *_hltScoutingPrimaryVertexPackerCaloMuon_*_*',
         'keep *_hltScoutingPrimaryVertexPacker_*_*',
         'keep *_hltScoutingTrackPacker_*_*',
         'keep edmTriggerResults_*_*_*',
@@ -529,14 +526,6 @@
         'keep recoBeamSpot_onlineMetaDataDigis_*_*',
         'keep *_tcdsDigis_*_*',
         'keep *_logErrorHarvester_*_*',
-        'keep *_pfIsolatedElectronsEI_*_*',
-        'keep *_pfIsolatedMuonsEI_*_*',
-        'keep recoPFJets_pfJetsEI_*_*',
-        'keep *_pfCombinedInclusiveSecondaryVertexV2BJetTagsEI_*_*',
-        'keep recoPFTaus_pfTausEI_*_*',
-        'keep recoPFTauDiscriminator_pfTausDiscriminationByDecayModeFinding_*_*',
-        'keep recoSingleTauDiscriminatorContaineredmValueMap_pfTausDiscriminationByIsolation_*_*',
-        'keep recoPFMETs_pfMetEI_*_*',
         'keep TotemTriggerCounters_totemTriggerRawToDigi_*_*',
         'keep TotemFEDInfos_totemRPRawToDigi_*_*',
         'keep TotemRPDigiedmDetSetVector_totemRPRawToDigi_*_*',
@@ -545,11 +534,15 @@
         'keep TotemRPRecHitedmDetSetVector_totemRPRecHitProducer_*_*',
         'keep TotemRPUVPatternedmDetSetVector_totemRPUVPatternFinder_*_*',
         'keep TotemRPLocalTrackedmDetSetVector_totemRPLocalTrackFitter_*_*',
+        'keep TotemFEDInfos_totemT2Digis_*_*',
+        'keep TotemT2DigiedmNewDetSetVector_totemT2Digis_*_*',
+        'keep TotemVFATStatusedmDetSetVector_totemT2Digis_*_*',
         'keep TotemFEDInfos_ctppsDiamondRawToDigi_*_*',
         'keep CTPPSDiamondDigiedmDetSetVector_ctppsDiamondRawToDigi_*_*',
         'keep TotemVFATStatusedmDetSetVector_ctppsDiamondRawToDigi_*_*',
         'keep CTPPSDiamondRecHitedmDetSetVector_ctppsDiamondRecHits_*_*',
         'keep CTPPSDiamondLocalTrackedmDetSetVector_ctppsDiamondLocalTracks_*_*',
+        'keep TotemTimingLocalTrackedmDetSetVector_diamondSampicLocalTracks_*_*',
         'keep TotemTimingDigiedmDetSetVector_totemTimingRawToDigi_*_*',
         'keep TotemTimingRecHitedmDetSetVector_totemTimingRecHits_*_*',
         'keep TotemTimingLocalTrackedmDetSetVector_totemTimingLocalTracks_*_*',