Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-22 22:47:29

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 import RecoTracker.MkFit.mkFitGeometryESProducer_cfi as mkFitGeometryESProducer_cfi
0004 import RecoTracker.MkFit.mkFitSiPixelHitConverter_cfi as mkFitSiPixelHitConverter_cfi
0005 import RecoTracker.MkFit.mkFitSiStripHitConverter_cfi as mkFitSiStripHitConverter_cfi
0006 import RecoTracker.MkFit.mkFitEventOfHitsProducer_cfi as mkFitEventOfHitsProducer_cfi
0007 import RecoTracker.MkFit.mkFitSeedConverter_cfi as mkFitSeedConverter_cfi
0008 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as mkFitIterationConfigESProducer_cfi
0009 import RecoTracker.MkFit.mkFitProducer_cfi as mkFitProducer_cfi
0010 import RecoTracker.MkFit.mkFitOutputConverter_cfi as mkFitOutputConverter_cfi
0011 import RecoLocalTracker.SiStripRecHitConverter.SiStripRecHitConverter_cfi as SiStripRecHitConverter_cfi
0012 
0013 def customizeHLTIter0ToMkFit(process):
0014     # mkFit needs all clusters, so switch off the on-demand mode
0015     process.hltSiStripRawToClustersFacility.onDemand = False
0016 
0017     process.hltSiStripRecHits = SiStripRecHitConverter_cfi.siStripMatchedRecHits.clone(
0018         ClusterProducer = "hltSiStripRawToClustersFacility",
0019         StripCPE = "hltESPStripCPEfromTrackAngle:hltESPStripCPEfromTrackAngle",
0020         doMatching = False,
0021     )
0022 
0023     # Use fourth hit if one is available
0024     process.hltIter0PFLowPixelSeedsFromPixelTracks.includeFourthHit = cms.bool(True)
0025 
0026     process.hltMkFitGeometryESProducer = mkFitGeometryESProducer_cfi.mkFitGeometryESProducer.clone()
0027 
0028     process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits = mkFitSiPixelHitConverter_cfi.mkFitSiPixelHitConverter.clone(
0029         hits = "hltSiPixelRecHits",
0030         ttrhBuilder = ":hltESPTTRHBWithTrackAngle",
0031     )
0032     process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits = mkFitSiStripHitConverter_cfi.mkFitSiStripHitConverter.clone(
0033         rphiHits = "hltSiStripRecHits:rphiRecHit",
0034         stereoHits = "hltSiStripRecHits:stereoRecHit",
0035         ttrhBuilder = ":hltESPTTRHBWithTrackAngle",
0036         minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutLoose'),
0037     )
0038     process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits = mkFitEventOfHitsProducer_cfi.mkFitEventOfHitsProducer.clone(
0039         beamSpot  = "hltOnlineBeamSpot",
0040         pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits",
0041         stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits",
0042     )
0043     process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
0044         seeds = "hltIter0PFLowPixelSeedsFromPixelTracks",
0045         ttrhBuilder = ":hltESPTTRHBWithTrackAngle",
0046     )
0047     process.hltIter0PFlowTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
0048         ComponentName = 'hltIter0PFlowTrackCandidatesMkFitConfig',
0049         config = 'RecoTracker/MkFit/data/mkfit-phase1-initialStep.json',
0050     )
0051     process.hltIter0PFlowCkfTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone(
0052         pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits",
0053         stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits",
0054         eventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits",
0055         seeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds",
0056         config = ('', 'hltIter0PFlowTrackCandidatesMkFitConfig'),
0057         minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutLoose'),
0058     )
0059     process.hltIter0PFlowCkfTrackCandidates = mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
0060         seeds = "hltIter0PFLowPixelSeedsFromPixelTracks",
0061         mkFitEventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits",
0062         mkFitPixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits",
0063         mkFitStripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits",
0064         mkFitSeeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds",
0065         tracks = "hltIter0PFlowCkfTrackCandidatesMkFit",
0066         ttrhBuilder = ":hltESPTTRHBWithTrackAngle",
0067         propagatorAlong = ":PropagatorWithMaterialParabolicMf",
0068         propagatorOpposite = ":PropagatorWithMaterialParabolicMfOpposite",
0069     )
0070 
0071     process.HLTDoLocalStripSequence += process.hltSiStripRecHits
0072 
0073     replaceWith = (process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits + 
0074                    process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits + 
0075                    process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits + 
0076                    process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds + 
0077                    process.hltIter0PFlowCkfTrackCandidatesMkFit + 
0078                    process.hltIter0PFlowCkfTrackCandidates)
0079 
0080     process.HLTIterativeTrackingIteration0.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith)
0081 
0082     for path in process.paths_().values():
0083       if not path.contains(process.HLTIterativeTrackingIteration0) and path.contains(process.hltIter0PFlowCkfTrackCandidates):
0084         path.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith)
0085 
0086     return process