CMS 3D CMS Logo

Functions
customizeHLTIter0ToMkFit Namespace Reference

Functions

def customizeHLTIter0ToMkFit (process)
 

Function Documentation

◆ customizeHLTIter0ToMkFit()

def customizeHLTIter0ToMkFit.customizeHLTIter0ToMkFit (   process)

Definition at line 13 of file customizeHLTIter0ToMkFit.py.

References print(), and contentValuesCheck.values.

13 def customizeHLTIter0ToMkFit(process):
14 
15  # if any of the following objects does not exist, do not apply any customisation
16  for objLabel in [
17  'hltSiStripRawToClustersFacility',
18  'HLTDoLocalStripSequence',
19  'HLTIterativeTrackingIteration0',
20  'hltIter0PFlowCkfTrackCandidates',
21  ]:
22  if not hasattr(process, objLabel):
23  print(f'# WARNING: customizeHLTIter0ToMkFit failed (object with label "{objLabel}" not found) - no customisation applied !')
24  return process
25 
26  # mkFit needs all clusters, so switch off the on-demand mode
27  process.hltSiStripRawToClustersFacility.onDemand = False
28 
29  process.hltSiStripRecHits = SiStripRecHitConverter_cfi.siStripMatchedRecHits.clone(
30  ClusterProducer = "hltSiStripRawToClustersFacility",
31  StripCPE = "hltESPStripCPEfromTrackAngle:hltESPStripCPEfromTrackAngle",
32  doMatching = False,
33  )
34 
35  # Use fourth hit if one is available
36  process.hltIter0PFLowPixelSeedsFromPixelTracks.includeFourthHit = cms.bool(True)
37 
38  process.hltMkFitGeometryESProducer = mkFitGeometryESProducer_cfi.mkFitGeometryESProducer.clone()
39 
40  process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits = mkFitSiPixelHitConverter_cfi.mkFitSiPixelHitConverter.clone(
41  hits = "hltSiPixelRecHits",
42  ttrhBuilder = ":hltESPTTRHBWithTrackAngle",
43  )
44  process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits = mkFitSiStripHitConverter_cfi.mkFitSiStripHitConverter.clone(
45  rphiHits = "hltSiStripRecHits:rphiRecHit",
46  stereoHits = "hltSiStripRecHits:stereoRecHit",
47  ttrhBuilder = ":hltESPTTRHBWithTrackAngle",
48  minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutLoose'),
49  )
50  process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits = mkFitEventOfHitsProducer_cfi.mkFitEventOfHitsProducer.clone(
51  beamSpot = "hltOnlineBeamSpot",
52  pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits",
53  stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits",
54  )
55  process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
56  seeds = "hltIter0PFLowPixelSeedsFromPixelTracks",
57  ttrhBuilder = ":hltESPTTRHBWithTrackAngle",
58  )
59  process.hltIter0PFlowTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
60  ComponentName = 'hltIter0PFlowTrackCandidatesMkFitConfig',
61  config = 'RecoTracker/MkFit/data/mkfit-phase1-initialStep.json',
62  )
63  process.hltIter0PFlowCkfTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone(
64  pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits",
65  stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits",
66  eventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits",
67  seeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds",
68  config = ('', 'hltIter0PFlowTrackCandidatesMkFitConfig'),
69  minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutLoose'),
70  )
71  process.hltIter0PFlowCkfTrackCandidates = mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
72  seeds = "hltIter0PFLowPixelSeedsFromPixelTracks",
73  mkFitEventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits",
74  mkFitPixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits",
75  mkFitStripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits",
76  mkFitSeeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds",
77  tracks = "hltIter0PFlowCkfTrackCandidatesMkFit",
78  ttrhBuilder = ":hltESPTTRHBWithTrackAngle",
79  propagatorAlong = ":PropagatorWithMaterialParabolicMf",
80  propagatorOpposite = ":PropagatorWithMaterialParabolicMfOpposite",
81  )
82 
83  process.HLTDoLocalStripSequence += process.hltSiStripRecHits
84 
85  replaceWith = (process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits +
86  process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits +
87  process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits +
88  process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds +
89  process.hltIter0PFlowCkfTrackCandidatesMkFit +
90  process.hltIter0PFlowCkfTrackCandidates)
91 
92  process.HLTIterativeTrackingIteration0.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith)
93 
94  for path in process.paths_().values():
95  if not path.contains(process.HLTIterativeTrackingIteration0) and path.contains(process.hltIter0PFlowCkfTrackCandidates):
96  path.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith)
97 
98  return process
99 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47