CMS 3D CMS Logo

Functions | Variables
customizeHLTforCMSSW Namespace Reference

Functions

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

Variables

 depths
 
 detector
 
 logWeightDenominator
 
 logWeightDenominatorHCAL2018
 

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

144 def customiseFor2017DtUnpacking(process):
145  """Adapt the HLT to run the legacy DT unpacking
146  for pre2018 data/MC workflows as the default"""
147 
148  if hasattr(process,'hltMuonDTDigis'):
149  process.hltMuonDTDigis = cms.EDProducer( "DTUnpackingModule",
150  useStandardFEDid = cms.bool( True ),
151  maxFEDid = cms.untracked.int32( 779 ),
152  inputLabel = cms.InputTag( "rawDataCollector" ),
153  minFEDid = cms.untracked.int32( 770 ),
154  dataType = cms.string( "DDU" ),
155  readOutParameters = cms.PSet(
156  localDAQ = cms.untracked.bool( False ),
157  debug = cms.untracked.bool( False ),
158  rosParameters = cms.PSet(
159  localDAQ = cms.untracked.bool( False ),
160  debug = cms.untracked.bool( False ),
161  writeSC = cms.untracked.bool( True ),
162  readDDUIDfromDDU = cms.untracked.bool( True ),
163  readingDDU = cms.untracked.bool( True ),
164  performDataIntegrityMonitor = cms.untracked.bool( False )
165  ),
166  performDataIntegrityMonitor = cms.untracked.bool( False )
167  ),
168  dqmOnly = cms.bool( False )
169  )
170 
171  return process
172 

◆ customiseFor2018Input()

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

Definition at line 197 of file customizeHLTforCMSSW.py.

197 def customiseFor2018Input(process):
198  """Customise the HLT to run on Run 2 data/MC"""
199  process = customisePixelGainForRun2Input(process)
200  process = synchronizeHCALHLTofflineRun3on2018data(process)
201 
202 
203 # CMSSW version specific customizations

References customisePixelGainForRun2Input(), and synchronizeHCALHLTofflineRun3on2018data().

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

173 def customisePixelGainForRun2Input(process):
174  """Customise the HLT to run on Run 2 data/MC using the old definition of the pixel calibrations
175  Up to 11.0.x, the pixel calibarations were fully specified in the configuration:
176  VCaltoElectronGain = 47
177  VCaltoElectronGain_L1 = 50
178  VCaltoElectronOffset = -60
179  VCaltoElectronOffset_L1 = -670
180  Starting with 11.1.x, the calibrations for Run 3 were moved to the conditions, leaving in the configuration only:
181  VCaltoElectronGain = 1
182  VCaltoElectronGain_L1 = 1
183  VCaltoElectronOffset = 0
184  VCaltoElectronOffset_L1 = 0
185  Since the conditions for Run 2 have not been updated to the new scheme, the HLT configuration needs to be reverted.
186  """
187  # revert the Pixel parameters to be compatible with the Run 2 conditions
188  for producer in producers_by_type(process, "SiPixelClusterProducer"):
189  producer.VCaltoElectronGain = 47
190  producer.VCaltoElectronGain_L1 = 50
191  producer.VCaltoElectronOffset = -60
192  producer.VCaltoElectronOffset_L1 = -670
193 
194  return process
195 
196 

References common.producers_by_type().

Referenced by customiseFor2018Input().

◆ customizeHLTforCMSSW()

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

Definition at line 204 of file customizeHLTforCMSSW.py.

204 def customizeHLTforCMSSW(process, menuType="GRun"):
205 
206  # add call to action function in proper order: newest last!
207  # process = customiseFor12718(process)
208 
209  return process

◆ synchronizeHCALHLTofflineRun2()

def customizeHLTforCMSSW.synchronizeHCALHLTofflineRun2 (   process)

Definition at line 87 of file customizeHLTforCMSSW.py.

88  # this function bring forward the sw changes of Run3 to 2018 data starting from a Run2-2018 like menu
89 
90  #-----------------------------------------------------------------------------------------------------------
91  # A) remove collapser from sequence
92  process.hltHbhereco = process.hltHbhePhase1Reco.clone()
93  process.HLTDoLocalHcalSequence = cms.Sequence( process.hltHcalDigis + process.hltHbhereco + process.hltHfprereco + process.hltHfreco + process.hltHoreco )
94  process.HLTStoppedHSCPLocalHcalReco = cms.Sequence( process.hltHcalDigis + process.hltHbhereco )
95  process.HLTDoLocalHcalWithTowerSequence = cms.Sequence( process.hltHcalDigis + process.hltHbhereco + process.hltHfprereco + process.hltHfreco + process.hltHoreco + process.hltTowerMakerForAll )
96 
97 
98  #----------------------------------------------------------------------------------------------------------
99  # B) adapt threshold following removal of the collapser
100  # note this is done only for HE
101 
102  for producer in producers_by_type(process, "PFClusterProducer"):
103  if producer.seedFinder.thresholdsByDetector[1].detector.value() == 'HCAL_ENDCAP':
104  producer.seedFinder.thresholdsByDetector[1].seedingThreshold = _seedingThresholdsHEphase1
105  producer.initialClusteringStep.thresholdsByDetector[1].gatheringThreshold = _thresholdsHEphase1
106  producer.pfClusterBuilder.recHitEnergyNorms[1].recHitEnergyNorm = _thresholdsHEphase1
107 
108  del producer.pfClusterBuilder.positionCalc.logWeightDenominator
109  producer.pfClusterBuilder.positionCalc.logWeightDenominatorByDetector = logWeightDenominatorHCAL2018
110  del producer.pfClusterBuilder.allCellsPositionCalc.logWeightDenominator
111  producer.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector = logWeightDenominatorHCAL2018
112 
113  for producer in producers_by_type(process, "PFMultiDepthClusterProducer"):
114  del producer.pfClusterBuilder.allCellsPositionCalc.logWeightDenominator
115  producer.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector = logWeightDenominatorHCAL2018
116 
117  for producer in producers_by_type(process, "PFRecHitProducer"):
118  if producer.producers[0].name.value() == 'PFHBHERecHitCreator':
119  producer.producers[0].qualityTests[0].cuts[1].threshold = _thresholdsHEphase1Rec
120 
121  for producer in producers_by_type(process, "CaloTowersCreator"):
122  producer.HcalPhase = cms.int32(1)
123  producer.HESThreshold1 = cms.double(0.1)
124  producer.HESThreshold = cms.double(0.2)
125  producer.HEDThreshold1 = cms.double(0.1)
126  producer.HEDThreshold = cms.double(0.2)
127 
128  #--------------------------------------------------------
129  # C) add arrival time following PR 26270 (emulate what we will do in Run3 at HLT)
130  # (unused HLT quantity, set to false to save CPU)
131  for producer in producers_by_type(process, "HBHEPhase1Reconstructor"):
132  producer.algorithm.calculateArrivalTime = cms.bool(False)
133 
134  #--------------------------------------------------------
135  # D) 3->8 pulse fit for PR 25469 (emulate what we will do in Run3 at HLT)
136  for producer in producers_by_type(process, "HBHEPhase1Reconstructor"):
137  producer.use8ts = cms.bool(True)
138  producer.algorithm.dynamicPed = cms.bool(False)
139  producer.algorithm.activeBXs = cms.vint32(-3, -2, -1, 0, 1, 2, 3, 4)
140 
141  return process
142 
143 

References common.producers_by_type().

◆ synchronizeHCALHLTofflineRun3on2018data()

def customizeHLTforCMSSW.synchronizeHCALHLTofflineRun3on2018data (   process)

Definition at line 45 of file customizeHLTforCMSSW.py.

46  # this function bring back the Run3 menu to a Run2-2018 like meny, for testing in data 2018
47 
48  #----------------------------------------------------------------------------------------------------------
49  # adapt threshold for HB - in 2018 only one depth
50 
51  for producer in producers_by_type(process, "PFClusterProducer"):
52  if producer.seedFinder.thresholdsByDetector[0].detector.value() == 'HCAL_BARREL1':
53  producer.seedFinder.thresholdsByDetector[0].seedingThreshold = _seedingThresholdsHB
54  producer.initialClusteringStep.thresholdsByDetector[0].gatheringThreshold = _thresholdsHB
55  producer.pfClusterBuilder.recHitEnergyNorms[0].recHitEnergyNorm = _thresholdsHB
56 
57  producer.pfClusterBuilder.positionCalc.logWeightDenominatorByDetector = logWeightDenominatorHCAL2018
58  producer.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector = logWeightDenominatorHCAL2018
59 
60  for producer in producers_by_type(process, "PFMultiDepthClusterProducer"):
61  producer.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector = logWeightDenominatorHCAL2018
62 
63  for producer in producers_by_type(process, "PFRecHitProducer"):
64  if producer.producers[0].name.value() == 'PFHBHERecHitCreator':
65  producer.producers[0].qualityTests[0].cuts[0].threshold = _thresholdsHBRec
66 
67  for producer in producers_by_type(process, "CaloTowersCreator"):
68  producer.HBThreshold1 = cms.double(0.7)
69  producer.HBThreshold2 = cms.double(0.7)
70  producer.HBThreshold = cms.double(0.7)
71 
72  #--------------------------------------------------------
73  # switch on the QI8 processing as in HB-Run2 (in Run3 we have only QIE11)
74  for producer in producers_by_type(process, "HBHEPhase1Reconstructor"):
75  producer.processQIE8 = cms.bool( True )
76  producer.setNoiseFlagsQIE8 = cms.bool( True )
77  producer.setPulseShapeFlagsQIE8 = cms.bool( True )
78 
79  #----------------------------------------------------------
80  # Use 1+8p fit (PR29617) and apply HB- correction (PR26177)
81  for producer in producers_by_type(process, "HBHEPhase1Reconstructor"):
82  producer.algorithm.applyLegacyHBMCorrection = cms.bool( True )
83  producer.algorithm.chiSqSwitch = cms.double(15.0)
84 
85  return process
86 

References common.producers_by_type().

Referenced by customiseFor2018Input().

Variable Documentation

◆ depths

customizeHLTforCMSSW.depths

◆ detector

customizeHLTforCMSSW.detector

Definition at line 32 of file customizeHLTforCMSSW.py.

◆ logWeightDenominator

customizeHLTforCMSSW.logWeightDenominator

Definition at line 33 of file customizeHLTforCMSSW.py.

◆ logWeightDenominatorHCAL2018

customizeHLTforCMSSW.logWeightDenominatorHCAL2018

Definition at line 29 of file customizeHLTforCMSSW.py.

customizeHLTforCMSSW.synchronizeHCALHLTofflineRun3on2018data
def synchronizeHCALHLTofflineRun3on2018data(process)
Definition: customizeHLTforCMSSW.py:45
customizeHLTforCMSSW.customizeHLTforCMSSW
def customizeHLTforCMSSW(process, menuType="GRun")
Definition: customizeHLTforCMSSW.py:204
customizeHLTforCMSSW.synchronizeHCALHLTofflineRun2
def synchronizeHCALHLTofflineRun2(process)
Definition: customizeHLTforCMSSW.py:87
customizeHLTforCMSSW.customiseFor2017DtUnpacking
def customiseFor2017DtUnpacking(process)
Definition: customizeHLTforCMSSW.py:144
customizeHLTforCMSSW.customisePixelGainForRun2Input
def customisePixelGainForRun2Input(process)
Definition: customizeHLTforCMSSW.py:173
customizeHLTforCMSSW.customiseFor2018Input
def customiseFor2018Input(process)
Definition: customizeHLTforCMSSW.py:197
common.producers_by_type
def producers_by_type(process, *types)
Definition: common.py:6