Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-07-31 22:58:19

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # Customization for running on testEnablesEcalHcal
0004 #   - Call from cmsDriver.py with: `--customise DPGAnalysis/HcalNanoAOD/customiseHcalCalib_cff.customiseHcalCalib`
0005 def customiseHcalCalib(process):
0006     # Add uMNio digi (special digi identifies calib event type)
0007     process.load("DPGAnalysis.HcalNanoAOD.hcalUMNioTable_cff")
0008     process.hcalNanoTask.add(process.uMNioTable)
0009     process.hcalNanoDigiTask.add(process.uMNioTable)
0010 
0011     process.load("DPGAnalysis.HcalNanoAOD.hcalUHTRTable_cff")
0012     process.hcalNanoTask.add(process.uHTRTable)
0013     process.hcalNanoDigiTask.add(process.uHTRTable)
0014 
0015     # Raw data has a different name, hltHcalCalibrationRaw instead of rawDataCollector
0016     process.hcalDigis.InputLabel = cms.InputTag('hltHcalCalibrationRaw')
0017     process.uHTRTable.InputLabel = process.hcalDigis.InputLabel
0018     
0019     # Create EDFilter for HLT_HcalCalibration
0020     # (HCAL raw data is not present in ECAL-triggered events, annoyingly. The filter stops downstream modules from throwing ProductNotFound.)
0021     process.hcalCalibHLTFilter = cms.EDFilter("TriggerResultsFilter",
0022         triggerConditions = cms.vstring(
0023           'HLT_HcalCalibration_v* / 1'),
0024         hltResults = cms.InputTag( "TriggerResults", "", "HLT" ),
0025         l1tResults = cms.InputTag( "" ),
0026         l1tIgnoreMask = cms.bool( False ),
0027         l1techIgnorePrescales = cms.bool( False ),
0028         daqPartitions = cms.uint32( 1 ),
0029         throw = cms.bool( True )
0030     )
0031 
0032     # Remove hcalDigis from normal raw2digi task, and put on a sequence after the HLT filter
0033     process.RawToDigiTask.remove(process.hcalDigis)
0034     process.hcalCalibDigiSequence = cms.Sequence(process.hcalCalibHLTFilter + process.hcalDigis)
0035     process.raw2digi_step = cms.Path(process.hcalCalibDigiSequence, process.RawToDigiTask)
0036 
0037     # Insert the HLT filter at start of user path and nanoaod endpath
0038     for path in process.paths.values()+process.endpaths.values():
0039         path.insert(0, process.hcalCalibHLTFilter)
0040 
0041     return process