CMS 3D CMS Logo

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

Functions

def customiseFor2017DtUnpacking
 
def customiseFor2018Input
 
def customiseHCALFor2018Input
 
def customisePixelGainForRun2Input
 
def customisePixelL1ClusterThresholdForRun2Input
 
def customizeHLTforCMSSW
 

Function Documentation

def customizeHLTforCMSSW.customiseFor2017DtUnpacking (   process)
Adapt the HLT to run the legacy DT unpacking
for pre2018 data/MC workflows as the default

Definition at line 72 of file customizeHLTforCMSSW.py.

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

Definition at line 138 of file customizeHLTforCMSSW.py.

References customiseHCALFor2018Input(), customisePixelGainForRun2Input(), and customisePixelL1ClusterThresholdForRun2Input().

139 def customiseFor2018Input(process):
140  """Customise the HLT to run on Run 2 data/MC"""
141  process = customisePixelGainForRun2Input(process)
143  process = customiseHCALFor2018Input(process)
144 
145  return process
146 
147 
# CMSSW version specific customizations
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 24 of file customizeHLTforCMSSW.py.

References common.producers_by_type().

Referenced by customiseFor2018Input().

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

References common.producers_by_type().

Referenced by customiseFor2018Input().

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

Definition at line 127 of file customizeHLTforCMSSW.py.

References common.producers_by_type().

Referenced by customiseFor2018Input().

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

Definition at line 148 of file customizeHLTforCMSSW.py.

References apply().

149 def customizeHLTforCMSSW(process, menuType="GRun"):
150 
151  # if the gpu modifier is enabled, make the Pixel, ECAL and HCAL reconstruction offloadable to a GPU
152  from HLTrigger.Configuration.customizeHLTforPatatrack import customizeHLTforPatatrack
153  gpu.makeProcessModifier(customizeHLTforPatatrack).apply(process)
154 
155  # add call to action function in proper order: newest last!
156  # process = customiseFor12718(process)
157 
158  return process
Vec apply(Vec v, F f)
Definition: ExtVec.h:81