CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
customizeHLTforCMSSW Namespace Reference

Functions

def customiseBeamSpotFor2018Input
 
def customiseCTPPSFor2018Input
 
def customiseEGammaRecoFor2018Input
 
def customiseFor2017DtUnpacking
 
def customiseFor2018Input
 
def customiseForOffline
 
def customiseHCALFor2018Input
 
def customisePixelGainForRun2Input
 
def customisePixelL1ClusterThresholdForRun2Input
 
def customizeHLTforCMSSW
 

Function Documentation

def customizeHLTforCMSSW.customiseBeamSpotFor2018Input (   process)

Definition at line 154 of file customizeHLTforCMSSW.py.

References common.esproducers_by_type(), and common.producers_by_type().

Referenced by customiseFor2018Input().

155 def customiseBeamSpotFor2018Input(process):
156  # For Run-2 data, disable the use of the BS transient record, to read the BS record from SCAL.
157  # Additionally, remove all instances of OnlineBeamSpotESProducer (not needed if useTransientRecord=False).
158  # See CMSHLT-2271 and CMSHLT-2300 for further details.
159  for prod in producers_by_type(process, 'BeamSpotOnlineProducer'):
160  prod.useTransientRecord = False
161  onlineBeamSpotESPLabels = [prod.label_() for prod in esproducers_by_type(process, 'OnlineBeamSpotESProducer')]
162  for espLabel in onlineBeamSpotESPLabels:
163  delattr(process, espLabel)
164 
165  return process
def esproducers_by_type
Definition: common.py:21
def producers_by_type
Definition: common.py:4
def customizeHLTforCMSSW.customiseCTPPSFor2018Input (   process)

Definition at line 139 of file customizeHLTforCMSSW.py.

References common.producers_by_type().

Referenced by customiseFor2018Input().

140 def customiseCTPPSFor2018Input(process):
141  for prod in producers_by_type(process, 'CTPPSGeometryESModule'):
142  prod.isRun2 = True
143  for prod in producers_by_type(process, 'CTPPSPixelRawToDigi'):
144  prod.isRun3 = False
145 
146  return process
def producers_by_type
Definition: common.py:4
def customizeHLTforCMSSW.customiseEGammaRecoFor2018Input (   process)

Definition at line 147 of file customizeHLTforCMSSW.py.

References common.producers_by_type().

Referenced by customiseFor2018Input().

149  for prod in producers_by_type(process, 'PFECALSuperClusterProducer'):
150  if hasattr(prod, 'regressionConfig'):
151  prod.regressionConfig.regTrainedWithPS = cms.bool(False)
152 
153  return process
def producers_by_type
Definition: common.py:4
def customizeHLTforCMSSW.customiseFor2017DtUnpacking (   process)
Adapt the HLT to run the legacy DT unpacking
for pre2018 data/MC workflows as the default

Definition at line 67 of file customizeHLTforCMSSW.py.

67 
68 def customiseFor2017DtUnpacking(process):
69  """Adapt the HLT to run the legacy DT unpacking
70  for pre2018 data/MC workflows as the default"""
71 
72  if hasattr(process,'hltMuonDTDigis'):
73  process.hltMuonDTDigis = cms.EDProducer( "DTUnpackingModule",
74  useStandardFEDid = cms.bool( True ),
75  maxFEDid = cms.untracked.int32( 779 ),
76  inputLabel = cms.InputTag( "rawDataCollector" ),
77  minFEDid = cms.untracked.int32( 770 ),
78  dataType = cms.string( "DDU" ),
79  readOutParameters = cms.PSet(
80  localDAQ = cms.untracked.bool( False ),
81  debug = cms.untracked.bool( False ),
82  rosParameters = cms.PSet(
83  localDAQ = cms.untracked.bool( False ),
84  debug = cms.untracked.bool( False ),
85  writeSC = cms.untracked.bool( True ),
86  readDDUIDfromDDU = cms.untracked.bool( True ),
87  readingDDU = cms.untracked.bool( True ),
88  performDataIntegrityMonitor = cms.untracked.bool( False )
89  ),
90  performDataIntegrityMonitor = cms.untracked.bool( False )
91  ),
92  dqmOnly = cms.bool( False )
93  )
94 
95  return process
def customizeHLTforCMSSW.customiseFor2018Input (   process)
Customise the HLT to run on Run 2 data/MC

Definition at line 166 of file customizeHLTforCMSSW.py.

References customiseBeamSpotFor2018Input(), customiseCTPPSFor2018Input(), customiseEGammaRecoFor2018Input(), customiseHCALFor2018Input(), customisePixelGainForRun2Input(), and customisePixelL1ClusterThresholdForRun2Input().

167 def customiseFor2018Input(process):
168  """Customise the HLT to run on Run 2 data/MC"""
169  process = customisePixelGainForRun2Input(process)
171  process = customiseHCALFor2018Input(process)
172  process = customiseCTPPSFor2018Input(process)
173  process = customiseEGammaRecoFor2018Input(process)
174  process = customiseBeamSpotFor2018Input(process)
175 
176  return process
177 
def customizeHLTforCMSSW.customiseForOffline (   process)

Definition at line 178 of file customizeHLTforCMSSW.py.

References common.esproducers_by_type().

Referenced by customizeHLTforCMSSW().

179 def customiseForOffline(process):
180 
181  # For running HLT offline on Run-3 Data, use "(OnlineBeamSpotESProducer).timeThreshold = 1e6",
182  # in order to pick the beamspot that was actually used by the HLT (instead of a "fake" beamspot).
183  # These same settings can be used offline for Run-3 Data and Run-3 MC alike.
184  # Note: the products of the OnlineBeamSpotESProducer are used only
185  # if the configuration uses "(BeamSpotOnlineProducer).useTransientRecord = True".
186  # See CMSHLT-2271 and CMSHLT-2300 for further details.
187  for prod in esproducers_by_type(process, 'OnlineBeamSpotESProducer'):
188  prod.timeThreshold = int(1e6)
189 
190  return process
191 
192 
# CMSSW version specific customizations
def esproducers_by_type
Definition: common.py:21
def customizeHLTforCMSSW.customiseHCALFor2018Input (   process)
Customise the HLT to run on Run 2 data/MC using the old readout for the HCAL barel

Definition at line 20 of file customizeHLTforCMSSW.py.

References common.producers_by_type().

Referenced by customiseFor2018Input().

20 
21 def customiseHCALFor2018Input(process):
22  """Customise the HLT to run on Run 2 data/MC using the old readout for the HCAL barel"""
23 
24  for producer in producers_by_type(process, "HBHEPhase1Reconstructor"):
25  # switch on the QI8 processing for 2018 HCAL barrel
26  producer.processQIE8 = True
27 
28  # adapt CaloTowers threshold for 2018 HCAL barrel with only one depth
29  for producer in producers_by_type(process, "CaloTowersCreator"):
30  producer.HBThreshold1 = 0.7
31  producer.HBThreshold2 = 0.7
32  producer.HBThreshold = 0.7
33 
34  # adapt Particle Flow threshold for 2018 HCAL barrel with only one depth
35  from RecoParticleFlow.PFClusterProducer.particleFlowClusterHBHE_cfi import _thresholdsHB, _thresholdsHEphase1, _seedingThresholdsHB
36 
37  logWeightDenominatorHCAL2018 = cms.VPSet(
38  cms.PSet(
39  depths = cms.vint32(1, 2, 3, 4),
40  detector = cms.string('HCAL_BARREL1'),
41  logWeightDenominator = _thresholdsHB
42  ),
43  cms.PSet(
44  depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
45  detector = cms.string('HCAL_ENDCAP'),
46  logWeightDenominator = _thresholdsHEphase1
47  )
48  )
49 
50  for producer in producers_by_type(process, "PFRecHitProducer"):
51  if producer.producers[0].name.value() == 'PFHBHERecHitCreator':
52  producer.producers[0].qualityTests[0].cuts[0].threshold = _thresholdsHB
53 
54  for producer in producers_by_type(process, "PFClusterProducer"):
55  if producer.seedFinder.thresholdsByDetector[0].detector.value() == 'HCAL_BARREL1':
56  producer.seedFinder.thresholdsByDetector[0].seedingThreshold = _seedingThresholdsHB
57  producer.initialClusteringStep.thresholdsByDetector[0].gatheringThreshold = _thresholdsHB
58  producer.pfClusterBuilder.recHitEnergyNorms[0].recHitEnergyNorm = _thresholdsHB
59  producer.pfClusterBuilder.positionCalc.logWeightDenominatorByDetector = logWeightDenominatorHCAL2018
60  producer.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector = logWeightDenominatorHCAL2018
61 
62  for producer in producers_by_type(process, "PFMultiDepthClusterProducer"):
63  producer.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector = logWeightDenominatorHCAL2018
64 
65  # done
66  return process
def producers_by_type
Definition: common.py:4
def customizeHLTforCMSSW.customisePixelGainForRun2Input (   process)
Customise the HLT to run on Run 2 data/MC using the old definition of the pixel calibrations

Up to 11.0.x, the pixel calibarations were fully specified in the configuration:
    VCaltoElectronGain      =   47
    VCaltoElectronGain_L1   =   50
    VCaltoElectronOffset    =  -60
    VCaltoElectronOffset_L1 = -670

Starting with 11.1.x, the calibrations for Run 3 were moved to the conditions, leaving in the configuration only:
    VCaltoElectronGain      =    1
    VCaltoElectronGain_L1   =    1
    VCaltoElectronOffset    =    0
    VCaltoElectronOffset_L1 =    0

Since the conditions for Run 2 have not been updated to the new scheme, the HLT configuration needs to be reverted.

Definition at line 96 of file customizeHLTforCMSSW.py.

References common.producers_by_type().

Referenced by customiseFor2018Input().

96 
98  """Customise the HLT to run on Run 2 data/MC using the old definition of the pixel calibrations
99 
100  Up to 11.0.x, the pixel calibarations were fully specified in the configuration:
101  VCaltoElectronGain = 47
102  VCaltoElectronGain_L1 = 50
103  VCaltoElectronOffset = -60
104  VCaltoElectronOffset_L1 = -670
105 
106  Starting with 11.1.x, the calibrations for Run 3 were moved to the conditions, leaving in the configuration only:
107  VCaltoElectronGain = 1
108  VCaltoElectronGain_L1 = 1
109  VCaltoElectronOffset = 0
110  VCaltoElectronOffset_L1 = 0
111 
112  Since the conditions for Run 2 have not been updated to the new scheme, the HLT configuration needs to be reverted.
113  """
114  # revert the Pixel parameters to be compatible with the Run 2 conditions
115  for producer in producers_by_type(process, "SiPixelClusterProducer"):
116  producer.VCaltoElectronGain = 47
117  producer.VCaltoElectronGain_L1 = 50
118  producer.VCaltoElectronOffset = -60
119  producer.VCaltoElectronOffset_L1 = -670
120 
121  for producer in producers_by_type(process, "SiPixelRawToClusterCUDA"):
122  producer.isRun2 = True
123 
124  return process
def producers_by_type
Definition: common.py:4
def customizeHLTforCMSSW.customisePixelL1ClusterThresholdForRun2Input (   process)

Definition at line 125 of file customizeHLTforCMSSW.py.

References common.producers_by_type().

Referenced by customiseFor2018Input().

127  # revert the pixel Layer 1 cluster threshold to be compatible with Run2:
128  for producer in producers_by_type(process, "SiPixelClusterProducer"):
129  if hasattr(producer,"ClusterThreshold_L1"):
130  producer.ClusterThreshold_L1 = 2000
131  for producer in producers_by_type(process, "SiPixelRawToClusterCUDA"):
132  if hasattr(producer,"clusterThreshold_layer1"):
133  producer.clusterThreshold_layer1 = 2000
134  for producer in producers_by_type(process, "SiPixelDigisClustersFromSoA"):
135  if hasattr(producer,"clusterThreshold_layer1"):
136  producer.clusterThreshold_layer1 = 2000
137 
138  return process
def producers_by_type
Definition: common.py:4
def customizeHLTforCMSSW.customizeHLTforCMSSW (   process,
  menuType = "GRun" 
)

Definition at line 193 of file customizeHLTforCMSSW.py.

References customiseForOffline().

194 def customizeHLTforCMSSW(process, menuType="GRun"):
195 
196  process = customiseForOffline(process)
197 
198  # add call to action function in proper order: newest last!
199  # process = customiseFor12718(process)
200 
201  return process