diff --git a/DPGAnalysis/HcalNanoAOD/python/customiseHcalCalib_cff.py b/DPGAnalysis/HcalNanoAOD/python/customiseHcalCalib_cff.py index 833028e4886d8..e6c896ae3e4b5 100644 --- a/DPGAnalysis/HcalNanoAOD/python/customiseHcalCalib_cff.py +++ b/DPGAnalysis/HcalNanoAOD/python/customiseHcalCalib_cff.py @@ -35,25 +35,7 @@ def customiseHcalCalib(process): process.raw2digi_step = cms.Path(process.hcalCalibDigiSequence, process.RawToDigiTask) # Insert the HLT filter at start of user path and nanoaod endpath - process.user_step.insert(0, process.hcalCalibHLTFilter) - process.NANOAODoutput_step.insert(0, process.hcalCalibHLTFilter) - - - #process.raw2digi_step = cms.Path(process.hcalCalibHLTFilter + process.RawToDigi) - #process.raw2digi_step.replace(process.hcalDigis, process.hcalCalibDigis) - #process.hcalDigiSortedTableTask.add(process.hcalCalibDigis) - #process.hcalDigiSortedTableSeq.add(process.hcalCalibDigis) - - #process.options.SkipEvent.append('ProductNotFound') - - #process.hcalDigiSortedTable.tagQIE11 = cms.untracked.InputTag("hcalCalibDigis") - #process.hcalDigiSortedTable.tagQIE10 = cms.untracked.InputTag("hcalCalibDigis") - #process.hcalDigiSortedTable.tagHO = cms.untracked.InputTag("hcalCalibDigis") - - process.load("FWCore.MessageService.MessageLogger_cfi") - process.MessageLogger.cout.threshold = "DEBUG" - process.MessageLogger.cerr.threshold = "DEBUG" - # enable LogDebug messages only for specific modules - process.MessageLogger.debugModules = ["*"] + for path in process.paths.values()+process.endpaths.values(): + path.insert(0, process.hcalCalibHLTFilter) return process diff --git a/DPGAnalysis/HcalNanoAOD/python/customiseHcalLocal_cff.py b/DPGAnalysis/HcalNanoAOD/python/customiseHcalLocal_cff.py index 92dd3ce058fb3..67fa3ff8b0271 100644 --- a/DPGAnalysis/HcalNanoAOD/python/customiseHcalLocal_cff.py +++ b/DPGAnalysis/HcalNanoAOD/python/customiseHcalLocal_cff.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms # Customization for running on HCAL local run data -# - Call from cmsDriver.py with: `--customise DPGAnalysis/HcalNanoAOD/customise_hcalLocal_cff.customiseHcalLocal` +# - Call from cmsDriver.py with: `--customise DPGAnalysis/HcalNanoAOD/customiseHcalLocal_cff.customiseHcalLocal` def customiseHcalLocal(process): input_files = process.source.fileNames max_events = process.maxEvents.input @@ -11,6 +11,8 @@ def customiseHcalLocal(process): firstLuminosityBlockForEachRun = cms.untracked.VLuminosityBlockID([]), ) process.hcalDigis.InputLabel = cms.InputTag('source') + + # Uncomment if ZDC digis (QIE10, nTS=10) are causing problems #process.hcalDigis.saveQIE10DataNSamples = cms.untracked.vint32(10) #process.hcalDigis.saveQIE10DataTags = cms.untracked.vstring("ZDC") diff --git a/DPGAnalysis/HcalNanoAOD/python/hcalNano_cff.py b/DPGAnalysis/HcalNanoAOD/python/hcalNano_cff.py index b9a83af36e977..be6df37b971f1 100644 --- a/DPGAnalysis/HcalNanoAOD/python/hcalNano_cff.py +++ b/DPGAnalysis/HcalNanoAOD/python/hcalNano_cff.py @@ -41,68 +41,3 @@ hcalDetIdTableTask, hbheRecHitTable, ) - -# Customization for running on testEnablesEcalHcal -# - Call from cmsDriver.py with: `--customise DPGAnalysis/HcalNanoAOD/hcalNano_cff.customiseHcalCalib` -def customiseHcalCalib(process): - # Add uMNio digi (special digi identifies calib event type) - process.load("DPGAnalysis.HcalNanoAOD.hcalUMNioTable_cff") - process.hcalNanoTask.add(process.uMNioTable) - process.hcalNanoDigiTask.add(process.uMNioTable) - - # Raw data has a different name, hltHcalCalibrationRaw instead of rawDataCollector - process.hcalDigis.InputLabel = cms.InputTag('hltHcalCalibrationRaw') - - # Create EDFilter for HLT_HcalCalibration - # (HCAL raw data is not present in ECAL-triggered events, annoyingly. The filter stops downstream modules from throwing ProductNotFound.) - process.hcalCalibHLTFilter = cms.EDFilter("TriggerResultsFilter", - triggerConditions = cms.vstring( - 'HLT_HcalCalibration_v* / 1'), - hltResults = cms.InputTag( "TriggerResults", "", "HLT" ), - l1tResults = cms.InputTag( "" ), - l1tIgnoreMask = cms.bool( False ), - l1techIgnorePrescales = cms.bool( False ), - daqPartitions = cms.uint32( 1 ), - throw = cms.bool( True ) - ) - - # Remove hcalDigis from normal raw2digi task, and put on a sequence after the HLT filter - process.RawToDigiTask.remove(process.hcalDigis) - process.hcalCalibDigiSequence = cms.Sequence(process.hcalCalibHLTFilter + process.hcalDigis) - process.raw2digi_step = cms.Path(process.hcalCalibDigiSequence, process.RawToDigiTask) - - # Insert the HLT filter at start of user path and nanoaod endpath - process.nanoAOD_step.insert(0, process.hcalCalibHLTFilter) - process.NANOAODoutput_step.insert(0, process.hcalCalibHLTFilter) - - return process - -# Customization for running on HCAL local run data -# - Call from cmsDriver.py with: `--customise DPGAnalysis/HcalNanoAOD/customise_hcalLocal_cff.customiseHcalLocal` -def customiseHcalLocal(process): - input_files = process.source.fileNames - max_events = process.maxEvents.input - process.source = cms.Source("HcalTBSource", - fileNames = input_files, - maxEvents = max_events, - firstLuminosityBlockForEachRun = cms.untracked.VLuminosityBlockID([]), - ) - process.hcalDigis.InputLabel = cms.InputTag('source') - - # Uncomment if ZDC digis (QIE10, nTS=10) are causing problems - #process.hcalDigis.saveQIE10DataNSamples = cms.untracked.vint32(10) - #process.hcalDigis.saveQIE10DataTags = cms.untracked.vstring("ZDC") - - if hasattr(process, "hcalDigiSortedTableTask"): - process.hcalDigiSortedTable.nTS_HB = cms.untracked.uint32(8) - process.hcalDigiSortedTable.nTS_HE = cms.untracked.uint32(8) - process.hcalDigiSortedTable.nTS_HF = cms.untracked.uint32(6) - process.hcalDigiSortedTable.nTS_HO = cms.untracked.uint32(10) - - process.load("DPGAnalysis.HcalNanoAOD.hcalUMNioTable_cff") - if hasattr(process, "hcalNanoTask"): - process.hcalNanoTask.add(process.uMNioTable) - if hasattr(process, "hcalNanoDigiTask"): - process.hcalNanoDigiTask.add(process.uMNioTable) - - return process diff --git a/PhysicsTools/NanoAOD/python/autoNANO.py b/PhysicsTools/NanoAOD/python/autoNANO.py index 062a5478956ed..ccc4ac843427a 100644 --- a/PhysicsTools/NanoAOD/python/autoNANO.py +++ b/PhysicsTools/NanoAOD/python/autoNANO.py @@ -54,7 +54,7 @@ def expandNanoMapping(seqList, mapping, key): # HCAL flavors: 'HCAL': {'sequence': 'DPGAnalysis/HcalNanoAOD/hcalNano_cff.hcalNanoTask'}, 'HCALCalib': {'sequence': 'DPGAnalysis/HcalNanoAOD/hcalNano_cff.hcalNanoTask', - 'customize': 'DPGAnalysis/HcalNanoAOD/hcalNano_cff.customiseHcalCalib'}, + 'customize': 'DPGAnalysis/HcalNanoAOD/customiseHcalCalib_cff.customiseHcalCalib'}, # EGM flavours: add variables through customize 'EGM': {'sequence': '@PHYS', 'customize': '@PHYS+PhysicsTools/NanoAOD/egamma_custom_cff.addExtraEGammaVarsCustomize'},