CMS 3D CMS Logo

customizeHLTforCMSSW.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # helper fuctions
5 
6 # add one customisation function per PR
7 # - put the PR number into the name of the function
8 # - add a short comment
9 # for example:
10 
11 # CCCTF tuning
12 # def customiseFor12718(process):
13 # for pset in process._Process__psets.values():
14 # if hasattr(pset,'ComponentType'):
15 # if (pset.ComponentType == 'CkfBaseTrajectoryFilter'):
16 # if not hasattr(pset,'minGoodStripCharge'):
17 # pset.minGoodStripCharge = cms.PSet(refToPSet_ = cms.string('HLTSiStripClusterChargeCutNone'))
18 # return process
19 
20 # Add new parameters to RecoTrackRefSelector
21 def customiseFor19029(process):
22  for producer in producers_by_type(process, "RecoTrackRefSelector"):
23  if not hasattr(producer, "minPhi"):
24  producer.minPhi = cms.double(-3.2)
25  producer.maxPhi = cms.double(3.2)
26  return process
27 
28 def customiseFor20269(process) :
29  for producer in esproducers_by_type(process, "ClusterShapeHitFilterESProducer"):
30  producer.PixelShapeFile = cms.string('RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_noL1.par')
31  producer.PixelShapeFileL1 = cms.string('RecoPixelVertexing/PixelLowPtUtilities/data/pixelShapePhase1_loose.par')
32  return process
33 
34 # Migrate uGT non-CondDB parameters to new cff: remove StableParameters dependence in favour of GlobalParameters
35 def customiseFor19989(process):
36  if hasattr(process,'StableParametersRcdSource'):
37  delattr(process,'StableParametersRcdSource')
38  if hasattr(process,'StableParameters'):
39  delattr(process,'StableParameters')
40  if not hasattr(process,'GlobalParameters'):
41  from L1Trigger.L1TGlobal.GlobalParameters_cff import GlobalParameters
42  process.GlobalParameters = GlobalParameters
43  return process
44 
45 # new parameter for HCAL method 2 reconstruction
46 def customiseFor20422(process):
47  from RecoLocalCalo.HcalRecProducers.HBHEMethod2Parameters_cfi import m2Parameters
48  for producer in producers_by_type(process, "HBHEPhase1Reconstructor"):
49  producer.algorithm.applyDCConstraint = m2Parameters.applyDCConstraint
50  for producer in producers_by_type(process, "HcalHitReconstructor"):
51  producer.applyDCConstraint = m2Parameters.applyDCConstraint
52  return process
53 
54 # CMSSW version specific customizations
55 def customizeHLTforCMSSW(process, menuType="GRun"):
56 
57  # add call to action function in proper order: newest last!
58  # process = customiseFor12718(process)
59 
60  process = customiseFor19029(process)
61  process = customiseFor20269(process)
62  process = customiseFor19989(process)
63  process = customiseFor20422(process)
64 
65  return process
def customizeHLTforCMSSW(process, menuType="GRun")
def producers_by_type(process, types)
Definition: common.py:5
def esproducers_by_type(process, types)
Definition: common.py:17