Skip to content

Commit

Permalink
add customizeHLTFor2023_v5_fromFile
Browse files Browse the repository at this point in the history
  • Loading branch information
silviodonato committed Apr 27, 2023
1 parent bf4d06d commit bb6a516
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 41 deletions.
47 changes: 6 additions & 41 deletions HLTrigger/Configuration/python/README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,12 @@
### HLT customization functions for 2023 Run-3 studies

customizeHLTFor2023_v4 includes:
- new 2023 HCAL PF rechits thresholds
- new 2023 HCAL rechits thresholds in all calo towers (not only hltTowerMakerForAll)
- new 2023 PF hadron calibration
- new 2023 Jet Energy Correction for PF jets (AK4PFHLT, AK8PFHLT)
- new 2022 Jet Energy Correction for Calo jets (AK4CaloHLT, AK8CaloHLT)

customizeHLTFor2023_v4 is similar to customizeHLTFor2023_v3_fromCondDb but
- it extends the new HCAL rechits threshold to all calo towers (not only hltTowerMakerForAll)
- update the PF hadron calibration and Jet Energy Correction after the fix presented at TSG meeting on April 13. This fix should give a **small** effect.


The OBSOLETE customization functions are as follows.

customizeHLTFor2023_v3_fromCondDb includes:
- new 2023 HCAL PF rechits thresholds
- new 2023 HCAL rechits thresholds in CaloJets (hltTowerMakerForAll)
- previous 2023 PF hadron calibration
- previous 2023 Jet Energy Correction for PF jets (AK4PFHLT, AK8PFHLT)
- previous 2022 Jet Energy Correction for Calo jets (AK4CaloHLT, AK8CaloHLT)

customizeHLTFor2023_v3_NoCaloJEC:
- new 2023 HCAL PF rechits thresholds
- new 2023 HCAL rechits thresholds in CaloJets (hltTowerMakerForAll)
- previous 2023 PF hadron calibration
- previous 2023 Jet Energy Correction for PF jets (AK4PFHLT, AK8PFHLT)
- old 2022 Jet Energy Correction for Calo jets (AK4CaloHLT, AK8CaloHLT) --> to be updated

customizeHLTFor2023_v2:
- new 2023 HCAL PF rechits thresholds
- old 2022 HCAL rechits thresholds in CaloJets (hltTowerMakerForAll) --> WRONG!
- previous 2023 PF hadron calibration
- previous 2023 Jet Energy Correction for PF jets (AK4PFHLT, AK8PFHLT)
- bugged 2023 Jet Energy Correction for Calo jets (AK4CaloHLT, AK8CaloHLT) obtained with the old 2022 HCAL rechits thresholds in CaloJets --> WRONG!

customizeJECFor2023_noAK8CaloHLT:
- new 2023 HCAL PF rechits thresholds
- old 2022 HCAL rechits thresholds in CaloJets (hltTowerMakerForAll) --> WRONG!
- previous 2023 PF hadron calibration
- previous 2023 Jet Energy Correction for PF jets (AK4PFHLT, AK8PFHLT)
- bugged 2023 Jet Energy Correction for Calo jets obtained with the old 2022 HCAL rechits thresholds in CaloJets, only for AK4CaloHLT --> WRONG!
customizeHLTFor2023_v5 includes:
- customizeHLTFor2023_onlyHCALrechits <---- apply the new HCAL rechits to all PF and calo jet modules.
- customizeJECFor2023_v5_fromFile <---- load the latest JEC obtained on April 27
- customizePFHadronCalibrationFor2023_v5_fromFile <---- load the latest JEC obtained on April 27 for both PF and calo jets

All previous JEC and PF hadron calibration are wrong because of the ECAL bug.
To get the fixed ECAL tag please use 126X_mcRun3_2023_forPU65_v4

```
cmsrel CMSSW_13_0_0
Expand Down
68 changes: 68 additions & 0 deletions HLTrigger/Configuration/python/customizeHLTFor2023.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,63 @@ def customizeHCALinCaloJetsFor2022_v4(process):
return customizeHCALinCaloJets_v4(process, HCAL_PFrechits_2022)


def customizePFHadronCalibrationFor2023_v5_fromFile(process):
if hasattr(process, "GlobalTag") and hasattr(process.GlobalTag, "toGet"):
process.GlobalTag.toGet.append(
cms.PSet(
record = cms.string("PFCalibrationRcd"),
label = cms.untracked.string('HLT'),
connect = cms.string("sqlite_file:/afs/cern.ch/work/s/sdonato/public/TSG2023/PFCalibration_v5.db"),
tag = cms.string('PFCalibration_CMSSW_13_0_0_HLT_126X_fixEE_mcRun3_2023'),
snapshotTime = cms.string('9999-12-31 23:59:59.000'),
)
)
else:
raise Exception("Warning process.GlobalTag not found. customizePFHadronCalibration will not be applied.")
return process

def customizeJECFor2023_v5_fromFile(process):
if hasattr(process, "GlobalTag") and hasattr(process.GlobalTag, "toGet"):
process.GlobalTag.toGet.append(
cms.PSet(
record = cms.string("JetCorrectionsRecord"),
label = cms.untracked.string('AK4CaloHLT'),
connect = cms.string("sqlite_file:/afs/cern.ch/work/s/sdonato/public/TSG2023/Run3Winter23Digi_v5.db"),
tag = cms.string('JetCorrectorParametersCollection_Run3Winter23Digi_AK4CaloHLT'),
snapshotTime = cms.string('9999-12-31 23:59:59.000'),
)
)
process.GlobalTag.toGet.append(
cms.PSet(
record = cms.string("JetCorrectionsRecord"),
label = cms.untracked.string('AK4PFHLT'),
connect = cms.string("sqlite_file:/afs/cern.ch/work/s/sdonato/public/TSG2023/Run3Winter23Digi_v5.db"),
tag = cms.string('JetCorrectorParametersCollection_Run3Winter23Digi_AK4PFHLT'),
snapshotTime = cms.string('9999-12-31 23:59:59.000'),
)
)
process.GlobalTag.toGet.append(
cms.PSet(
record = cms.string("JetCorrectionsRecord"),
label = cms.untracked.string('AK8CaloHLT'),
connect = cms.string("sqlite_file:/afs/cern.ch/work/s/sdonato/public/TSG2023/Run3Winter23Digi_v5.db"),
tag = cms.string('JetCorrectorParametersCollection_Run3Winter23Digi_AK8CaloHLT'),
snapshotTime = cms.string('9999-12-31 23:59:59.000'),
)
)
process.GlobalTag.toGet.append(
cms.PSet(
record = cms.string("JetCorrectionsRecord"),
label = cms.untracked.string('AK8PFHLT'),
connect = cms.string("sqlite_file:/afs/cern.ch/work/s/sdonato/public/TSG2023/Run3Winter23Digi_v5.db"),
tag = cms.string('JetCorrectorParametersCollection_Run3Winter23Digi_AK8PFHLT'),
snapshotTime = cms.string('9999-12-31 23:59:59.000'),
)
)
else:
raise Exception("Warning process.GlobalTag not found. customizePFHadronCalibration will not be applied.")
return process

def customizePFHadronCalibrationFor2023(process):
if hasattr(process, "GlobalTag") and hasattr(process.GlobalTag, "toGet"):
process.GlobalTag.toGet.append(
Expand Down Expand Up @@ -379,6 +436,17 @@ def customizeHLTFor2023_v4(process):
process = customizeHCALinCaloJetsFor2023_v4(process)
return process

def customizeHLTFor2023_onlyHCALrechits(process):
process = customizeHCALFor2023(process)
process = customizeHCALinCaloJetsFor2023_v4(process)
return process

def customizeHLTFor2023_v5_fromFile(process):
process = customizeHLTFor2023_onlyHCALrechits(process)
process = customizeJECFor2023_v5_fromFile(process)
process = customizePFHadronCalibrationFor2023_v5_fromFile(process)
return process


def customizeHLTFor2022L1TMenu(process):

Expand Down

0 comments on commit bb6a516

Please sign in to comment.