File indexing completed on 2024-11-19 23:20:19
0001 import FWCore.ParameterSet.Config as cms
0002
0003 from RecoTracker.FinalTrackSelectors.DuplicateTrackMerger_cfi import *
0004 from RecoTracker.FinalTrackSelectors.DuplicateListMerger_cfi import *
0005 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi import trackAlgoPriorityOrder
0006 from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer
0007
0008 from TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi import Chi2MeasurementEstimator as _Chi2MeasurementEstimator
0009 duplicateTrackCandidatesChi2Est = _Chi2MeasurementEstimator.clone(
0010 ComponentName = "duplicateTrackCandidatesChi2Est",
0011 MaxChi2 = 100,
0012 )
0013
0014 duplicateTrackCandidates = DuplicateTrackMerger.clone(
0015 source = "preDuplicateMergingGeneralTracks",
0016 useInnermostState = True,
0017 ttrhBuilderName = "WithAngleAndTemplate",
0018 chi2EstimatorName = "duplicateTrackCandidatesChi2Est"
0019 )
0020 from Configuration.ProcessModifiers.trackingIters01_cff import trackingIters01
0021 trackingIters01.toModify(duplicateTrackCandidates, source = "earlyGeneralTracks")
0022
0023 import RecoTracker.TrackProducer.TrackProducer_cfi
0024 mergedDuplicateTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
0025 src = "duplicateTrackCandidates:candidates",
0026 Fitter='RKFittingSmoother'
0027 )
0028
0029 from RecoTracker.FinalTrackSelectors.TrackCutClassifier_cff import *
0030 duplicateTrackClassifier = TrackCutClassifier.clone(
0031 src='mergedDuplicateTracks',
0032 mva = dict(
0033 minPixelHits = [0,0,0],
0034 maxChi2 = [9999.,9999.,9999.],
0035 maxChi2n = [10.,1.0,0.4],
0036 minLayers = [0,0,0],
0037 min3DLayers = [0,0,0],
0038 maxLostLayers = [99,99,99])
0039 )
0040
0041 generalTracks = DuplicateListMerger.clone(
0042 originalSource = "preDuplicateMergingGeneralTracks",
0043 originalMVAVals = "preDuplicateMergingGeneralTracks:MVAValues",
0044 mergedSource = "mergedDuplicateTracks",
0045 mergedMVAVals = "duplicateTrackClassifier:MVAValues",
0046 candidateSource = "duplicateTrackCandidates:candidates",
0047 candidateComponents = "duplicateTrackCandidates:candidateMap"
0048 )
0049 trackingIters01.toModify(generalTracks,
0050 originalSource = "earlyGeneralTracks",
0051 originalMVAVals = "earlyGeneralTracks:MVAValues"
0052 )
0053
0054 generalTracksTask = cms.Task(
0055 duplicateTrackCandidates,
0056 mergedDuplicateTracks,
0057 duplicateTrackClassifier,
0058 generalTracks
0059 )
0060 generalTracksSequence = cms.Sequence(generalTracksTask)
0061
0062 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0063 fastSim.toReplaceWith(generalTracksTask,
0064 cms.Task(duplicateTrackCandidates,
0065 mergedDuplicateTracks,
0066 duplicateTrackClassifier)
0067 )
0068
0069 def _fastSimGeneralTracks(process):
0070 from FastSimulation.Configuration.DigiAliases_cff import loadGeneralTracksAlias
0071 loadGeneralTracksAlias(process)
0072 modifyMergeTrackCollections_fastSimGeneralTracks = fastSim.makeProcessModifier( _fastSimGeneralTracks )
0073
0074 import RecoTracker.FinalTrackSelectors.trackListMerger_cfi
0075 conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
0076 TrackProducers = ['convStepTracks'],
0077 hasSelector = [1],
0078 selectedTrackQuals = ['convStepSelector:convStep'],
0079 setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(1), pQual=cms.bool(True) )
0080 ),
0081 copyExtras = True,
0082 makeReKeyedSeeds = cms.untracked.bool(False),
0083 )
0084
0085 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
0086 phase2_timing_layer.toModify(mergedDuplicateTracks, TrajectoryInEvent = True)
0087 phase2_timing_layer.toModify(generalTracks, copyTrajectories = True)