|
41 | 41 | hcalDetIdTableTask, |
42 | 42 | hbheRecHitTable, |
43 | 43 | ) |
44 | | - |
45 | | -# Customization for running on testEnablesEcalHcal |
46 | | -# - Call from cmsDriver.py with: `--customise DPGAnalysis/HcalNanoAOD/hcalNano_cff.customiseHcalCalib` |
47 | | -def customiseHcalCalib(process): |
48 | | - # Add uMNio digi (special digi identifies calib event type) |
49 | | - process.load("DPGAnalysis.HcalNanoAOD.hcalUMNioTable_cff") |
50 | | - process.hcalNanoTask.add(process.uMNioTable) |
51 | | - process.hcalNanoDigiTask.add(process.uMNioTable) |
52 | | - |
53 | | - # Raw data has a different name, hltHcalCalibrationRaw instead of rawDataCollector |
54 | | - process.hcalDigis.InputLabel = cms.InputTag('hltHcalCalibrationRaw') |
55 | | - |
56 | | - # Create EDFilter for HLT_HcalCalibration |
57 | | - # (HCAL raw data is not present in ECAL-triggered events, annoyingly. The filter stops downstream modules from throwing ProductNotFound.) |
58 | | - process.hcalCalibHLTFilter = cms.EDFilter("TriggerResultsFilter", |
59 | | - triggerConditions = cms.vstring( |
60 | | - 'HLT_HcalCalibration_v* / 1'), |
61 | | - hltResults = cms.InputTag( "TriggerResults", "", "HLT" ), |
62 | | - l1tResults = cms.InputTag( "" ), |
63 | | - l1tIgnoreMask = cms.bool( False ), |
64 | | - l1techIgnorePrescales = cms.bool( False ), |
65 | | - daqPartitions = cms.uint32( 1 ), |
66 | | - throw = cms.bool( True ) |
67 | | - ) |
68 | | - |
69 | | - # Remove hcalDigis from normal raw2digi task, and put on a sequence after the HLT filter |
70 | | - process.RawToDigiTask.remove(process.hcalDigis) |
71 | | - process.hcalCalibDigiSequence = cms.Sequence(process.hcalCalibHLTFilter + process.hcalDigis) |
72 | | - process.raw2digi_step = cms.Path(process.hcalCalibDigiSequence, process.RawToDigiTask) |
73 | | - |
74 | | - # Insert the HLT filter at start of user path and nanoaod endpath |
75 | | - process.nanoAOD_step.insert(0, process.hcalCalibHLTFilter) |
76 | | - process.NANOAODoutput_step.insert(0, process.hcalCalibHLTFilter) |
77 | | - |
78 | | - return process |
79 | | - |
80 | | -# Customization for running on HCAL local run data |
81 | | -# - Call from cmsDriver.py with: `--customise DPGAnalysis/HcalNanoAOD/customise_hcalLocal_cff.customiseHcalLocal` |
82 | | -def customiseHcalLocal(process): |
83 | | - input_files = process.source.fileNames |
84 | | - max_events = process.maxEvents.input |
85 | | - process.source = cms.Source("HcalTBSource", |
86 | | - fileNames = input_files, |
87 | | - maxEvents = max_events, |
88 | | - firstLuminosityBlockForEachRun = cms.untracked.VLuminosityBlockID([]), |
89 | | - ) |
90 | | - process.hcalDigis.InputLabel = cms.InputTag('source') |
91 | | - |
92 | | - # Uncomment if ZDC digis (QIE10, nTS=10) are causing problems |
93 | | - #process.hcalDigis.saveQIE10DataNSamples = cms.untracked.vint32(10) |
94 | | - #process.hcalDigis.saveQIE10DataTags = cms.untracked.vstring("ZDC") |
95 | | - |
96 | | - if hasattr(process, "hcalDigiSortedTableTask"): |
97 | | - process.hcalDigiSortedTable.nTS_HB = cms.untracked.uint32(8) |
98 | | - process.hcalDigiSortedTable.nTS_HE = cms.untracked.uint32(8) |
99 | | - process.hcalDigiSortedTable.nTS_HF = cms.untracked.uint32(6) |
100 | | - process.hcalDigiSortedTable.nTS_HO = cms.untracked.uint32(10) |
101 | | - |
102 | | - process.load("DPGAnalysis.HcalNanoAOD.hcalUMNioTable_cff") |
103 | | - if hasattr(process, "hcalNanoTask"): |
104 | | - process.hcalNanoTask.add(process.uMNioTable) |
105 | | - if hasattr(process, "hcalNanoDigiTask"): |
106 | | - process.hcalNanoDigiTask.add(process.uMNioTable) |
107 | | - |
108 | | - return process |
0 commit comments