|
12 | 12 |
|
13 | 13 | def customizeHLTIter0ToMkFit(process): |
14 | 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 | | - clusters = "hltSiPixelClusters", |
43 | | - ttrhBuilder = ":hltESPTTRHBWithTrackAngle", |
44 | | - ) |
45 | | - process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits = mkFitSiStripHitConverter_cfi.mkFitSiStripHitConverter.clone( |
46 | | - rphiHits = "hltSiStripRecHits:rphiRecHit", |
47 | | - stereoHits = "hltSiStripRecHits:stereoRecHit", |
48 | | - clusters = "hltSiStripRawToClustersFacility", |
49 | | - ttrhBuilder = ":hltESPTTRHBWithTrackAngle", |
50 | | - minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutLoose'), |
51 | | - ) |
52 | | - process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits = mkFitEventOfHitsProducer_cfi.mkFitEventOfHitsProducer.clone( |
53 | | - beamSpot = "hltOnlineBeamSpot", |
54 | | - pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", |
55 | | - stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", |
56 | | - ) |
57 | | - process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone( |
58 | | - seeds = "hltIter0PFLowPixelSeedsFromPixelTracks", |
59 | | - ttrhBuilder = ":hltESPTTRHBWithTrackAngle", |
60 | | - ) |
61 | | - process.hltIter0PFlowTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone( |
62 | | - ComponentName = 'hltIter0PFlowTrackCandidatesMkFitConfig', |
63 | | - config = 'RecoTracker/MkFit/data/mkfit-phase1-initialStep.json', |
64 | | - ) |
65 | | - process.hltIter0PFlowCkfTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone( |
66 | | - pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", |
67 | | - stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", |
68 | | - eventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits", |
69 | | - seeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds", |
70 | | - config = ('', 'hltIter0PFlowTrackCandidatesMkFitConfig'), |
71 | | - minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutNone'), |
72 | | - ) |
73 | | - process.hltIter0PFlowCkfTrackCandidates = mkFitOutputConverter_cfi.mkFitOutputConverter.clone( |
74 | | - seeds = "hltIter0PFLowPixelSeedsFromPixelTracks", |
75 | | - mkFitEventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits", |
76 | | - mkFitPixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", |
77 | | - mkFitStripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", |
78 | | - mkFitSeeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds", |
79 | | - tracks = "hltIter0PFlowCkfTrackCandidatesMkFit", |
80 | | - ttrhBuilder = ":hltESPTTRHBWithTrackAngle", |
81 | | - propagatorAlong = ":PropagatorWithMaterialParabolicMf", |
82 | | - propagatorOpposite = ":PropagatorWithMaterialParabolicMfOpposite", |
83 | | - ) |
84 | | - |
85 | | - process.HLTDoLocalStripSequence += process.hltSiStripRecHits |
86 | | - |
87 | | - replaceWith = (process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits + |
88 | | - process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits + |
89 | | - process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits + |
90 | | - process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds + |
91 | | - process.hltIter0PFlowCkfTrackCandidatesMkFit + |
92 | | - process.hltIter0PFlowCkfTrackCandidates) |
93 | | - |
94 | | - process.HLTIterativeTrackingIteration0.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith) |
95 | | - |
96 | | - for path in process.paths_().values(): |
97 | | - if not path.contains(process.HLTIterativeTrackingIteration0) and path.contains(process.hltIter0PFlowCkfTrackCandidates): |
98 | | - path.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith) |
99 | | - |
100 | | - return process |
101 | | - |
102 | | -def customizeHLTIter0ToMkFitFor2025(process): |
103 | | - |
104 | 15 | # if any of the following objects does not exist, do not apply any customisation |
105 | 16 | for objLabel in [ |
106 | 17 | 'hltSiStripRawToClustersFacility', |
|
0 commit comments