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 69 of file customizeHLTforCMSSW.py.

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

◆ customiseFor2018Input()

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

Definition at line 125 of file customizeHLTforCMSSW.py.

125 def customiseFor2018Input(process):
126  """Customise the HLT to run on Run 2 data/MC"""
127  process = customisePixelGainForRun2Input(process)
128  process = customiseHCALFor2018Input(process)
129 
130  return process
131 
132 
133 # 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 21 of file customizeHLTforCMSSW.py.

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
67 
68 

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 98 of file customizeHLTforCMSSW.py.

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

References common.producers_by_type().

Referenced by customiseFor2018Input().

◆ customizeHLTforCMSSW()

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

Definition at line 134 of file customizeHLTforCMSSW.py.

134 def customizeHLTforCMSSW(process, menuType="GRun"):
135 
136  # add call to action function in proper order: newest last!
137  # process = customiseFor12718(process)
138 
139  return process
customizeHLTforCMSSW.customizeHLTforCMSSW
def customizeHLTforCMSSW(process, menuType="GRun")
Definition: customizeHLTforCMSSW.py:134
particleFlowClusterHBHE_cfi
customizeHLTforCMSSW.customiseHCALFor2018Input
def customiseHCALFor2018Input(process)
Definition: customizeHLTforCMSSW.py:21
customizeHLTforCMSSW.customiseFor2017DtUnpacking
def customiseFor2017DtUnpacking(process)
Definition: customizeHLTforCMSSW.py:69
customizeHLTforCMSSW.customisePixelGainForRun2Input
def customisePixelGainForRun2Input(process)
Definition: customizeHLTforCMSSW.py:98
customizeHLTforCMSSW.customiseFor2018Input
def customiseFor2018Input(process)
Definition: customizeHLTforCMSSW.py:125
common.producers_by_type
def producers_by_type(process, *types)
Definition: common.py:5