Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-21 23:14:05

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 
0007 from TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi import Chi2MeasurementEstimator as _Chi2MeasurementEstimator
0008 duplicateTrackCandidatesChi2Est = _Chi2MeasurementEstimator.clone(
0009     ComponentName = "duplicateTrackCandidatesChi2Est",
0010     MaxChi2 = 100,
0011 )
0012 
0013 duplicateTrackCandidates = DuplicateTrackMerger.clone(
0014     source = "preDuplicateMergingGeneralTracks",
0015     useInnermostState  = True,
0016     ttrhBuilderName   = "WithAngleAndTemplate",
0017     chi2EstimatorName = "duplicateTrackCandidatesChi2Est"
0018 )
0019 
0020 import RecoTracker.TrackProducer.TrackProducer_cfi
0021 mergedDuplicateTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
0022     src = "duplicateTrackCandidates:candidates",
0023     Fitter='RKFittingSmoother' # no outlier rejection!
0024 )
0025 
0026 from RecoTracker.FinalTrackSelectors.TrackCutClassifier_cff import *
0027 duplicateTrackClassifier = TrackCutClassifier.clone(
0028     src='mergedDuplicateTracks',
0029     mva = dict(
0030     minPixelHits = [0,0,0],
0031     maxChi2 = [9999.,9999.,9999.],
0032     maxChi2n = [10.,1.0,0.4],  # [9999.,9999.,9999.]
0033     minLayers = [0,0,0],
0034     min3DLayers = [0,0,0],
0035     maxLostLayers = [99,99,99])
0036 )
0037 
0038 generalTracks = DuplicateListMerger.clone(
0039     originalSource      = "preDuplicateMergingGeneralTracks",
0040     originalMVAVals     = "preDuplicateMergingGeneralTracks:MVAValues",
0041     mergedSource        = "mergedDuplicateTracks",
0042     mergedMVAVals       = "duplicateTrackClassifier:MVAValues",
0043     candidateSource     = "duplicateTrackCandidates:candidates",
0044     candidateComponents = "duplicateTrackCandidates:candidateMap"
0045 )
0046 
0047 generalTracksTask = cms.Task(
0048     duplicateTrackCandidates,
0049     mergedDuplicateTracks,
0050     duplicateTrackClassifier,
0051     generalTracks
0052     )
0053 generalTracksSequence = cms.Sequence(generalTracksTask)
0054 
0055 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0056 fastSim.toReplaceWith(generalTracksTask, 
0057                       cms.Task(duplicateTrackCandidates,
0058                                mergedDuplicateTracks,
0059                                duplicateTrackClassifier)
0060 )
0061 
0062 def _fastSimGeneralTracks(process):
0063     from FastSimulation.Configuration.DigiAliases_cff import loadGeneralTracksAlias
0064     loadGeneralTracksAlias(process)
0065 modifyMergeTrackCollections_fastSimGeneralTracks = fastSim.makeProcessModifier( _fastSimGeneralTracks )
0066 
0067 import RecoTracker.FinalTrackSelectors.trackListMerger_cfi
0068 conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
0069     TrackProducers     = ['convStepTracks'],
0070     hasSelector        = [1],
0071     selectedTrackQuals = ['convStepSelector:convStep'],
0072     setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(1), pQual=cms.bool(True) )
0073                              ),
0074     copyExtras = True,
0075     makeReKeyedSeeds = cms.untracked.bool(False),
0076 )
0077 
0078 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
0079 phase2_timing_layer.toModify(mergedDuplicateTracks, TrajectoryInEvent = True)
0080 phase2_timing_layer.toModify(generalTracks, copyTrajectories = True)