CMS 3D CMS Logo

Functions
customizeHLTforCMSSW Namespace Reference

Functions

def customiseFor2017DtUnpacking (process)
 
def customiseFor2018Input (process)
 
def customiseHCALFor2018Input (process)
 
def customisePixelGainForRun2Input (process)
 
def customizeHLTforCMSSW (process, menuType="GRun")
 

Function Documentation

◆ customiseFor2017DtUnpacking()

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

◆ customiseFor2018Input()

def customizeHLTforCMSSW.customiseFor2018Input (   process)
Customise the HLT to run on Run 2 data/MC

Definition at line 128 of file customizeHLTforCMSSW.py.

128 def customiseFor2018Input(process):
129  """Customise the HLT to run on Run 2 data/MC"""
130  process = customisePixelGainForRun2Input(process)
131  process = customiseHCALFor2018Input(process)
132 
133  return process
134 
135 
136 # CMSSW version specific customizations

References customiseHCALFor2018Input(), and customisePixelGainForRun2Input().

◆ customiseHCALFor2018Input()

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.

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

References common.producers_by_type().

Referenced by customiseFor2018Input().

◆ customisePixelGainForRun2Input()

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.

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

References common.producers_by_type().

Referenced by customiseFor2018Input().

◆ customizeHLTforCMSSW()

def customizeHLTforCMSSW.customizeHLTforCMSSW (   process,
  menuType = "GRun" 
)

Definition at line 137 of file customizeHLTforCMSSW.py.

137 def customizeHLTforCMSSW(process, menuType="GRun"):
138 
139  # if the gpu modifier is enabled, make the Pixel, ECAL and HCAL reconstruction offloadable to a GPU
140  from HLTrigger.Configuration.customizeHLTforPatatrack import customizeHLTforPatatrack
141  gpu.makeProcessModifier(customizeHLTforPatatrack).apply(process)
142 
143  # add call to action function in proper order: newest last!
144  # process = customiseFor12718(process)
145 
146  return process

References apply().

customizeHLTforCMSSW.customizeHLTforCMSSW
def customizeHLTforCMSSW(process, menuType="GRun")
Definition: customizeHLTforCMSSW.py:137
particleFlowClusterHBHE_cfi
apply
Vec apply(Vec v, F f)
Definition: ExtVec.h:81
customizeHLTforCMSSW.customiseHCALFor2018Input
def customiseHCALFor2018Input(process)
Definition: customizeHLTforCMSSW.py:24
customizeHLTforCMSSW.customiseFor2017DtUnpacking
def customiseFor2017DtUnpacking(process)
Definition: customizeHLTforCMSSW.py:72
customizeHLTforCMSSW.customisePixelGainForRun2Input
def customisePixelGainForRun2Input(process)
Definition: customizeHLTforCMSSW.py:101
customizeHLTforCMSSW.customiseFor2018Input
def customiseFor2018Input(process)
Definition: customizeHLTforCMSSW.py:128
common.producers_by_type
def producers_by_type(process, *types)
Definition: common.py:4