CMS 3D CMS Logo

MergeTrackCollections_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi import trackAlgoPriorityOrder
6 from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer
7 
8 from TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi import Chi2MeasurementEstimator as _Chi2MeasurementEstimator
9 duplicateTrackCandidatesChi2Est = _Chi2MeasurementEstimator.clone(
10  ComponentName = "duplicateTrackCandidatesChi2Est",
11  MaxChi2 = 100,
12 )
13 
14 duplicateTrackCandidates = DuplicateTrackMerger.clone(
15  source = "preDuplicateMergingGeneralTracks",
16  useInnermostState = True,
17  ttrhBuilderName = "WithAngleAndTemplate",
18  chi2EstimatorName = "duplicateTrackCandidatesChi2Est"
19 )
20 from Configuration.ProcessModifiers.trackingIters01_cff import trackingIters01
21 trackingIters01.toModify(duplicateTrackCandidates, source = "earlyGeneralTracks")
22 
24 mergedDuplicateTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
25  src = "duplicateTrackCandidates:candidates",
26  Fitter='RKFittingSmoother' # no outlier rejection!
27 )
28 
30 duplicateTrackClassifier = TrackCutClassifier.clone(
31  src='mergedDuplicateTracks',
32  mva = dict(
33  minPixelHits = [0,0,0],
34  maxChi2 = [9999.,9999.,9999.],
35  maxChi2n = [10.,1.0,0.4], # [9999.,9999.,9999.]
36  minLayers = [0,0,0],
37  min3DLayers = [0,0,0],
38  maxLostLayers = [99,99,99])
39 )
40 
41 generalTracks = DuplicateListMerger.clone(
42  originalSource = "preDuplicateMergingGeneralTracks",
43  originalMVAVals = "preDuplicateMergingGeneralTracks:MVAValues",
44  mergedSource = "mergedDuplicateTracks",
45  mergedMVAVals = "duplicateTrackClassifier:MVAValues",
46  candidateSource = "duplicateTrackCandidates:candidates",
47  candidateComponents = "duplicateTrackCandidates:candidateMap"
48 )
49 trackingIters01.toModify(generalTracks,
50  originalSource = "earlyGeneralTracks",
51  originalMVAVals = "earlyGeneralTracks:MVAValues"
52 )
53 
54 generalTracksTask = cms.Task(
55  duplicateTrackCandidates,
56  mergedDuplicateTracks,
57  duplicateTrackClassifier,
58  generalTracks
59  )
60 generalTracksSequence = cms.Sequence(generalTracksTask)
61 
62 from Configuration.Eras.Modifier_fastSim_cff import fastSim
63 fastSim.toReplaceWith(generalTracksTask,
64  cms.Task(duplicateTrackCandidates,
65  mergedDuplicateTracks,
66  duplicateTrackClassifier)
67 )
68 
69 def _fastSimGeneralTracks(process):
70  from FastSimulation.Configuration.DigiAliases_cff import loadGeneralTracksAlias
71  loadGeneralTracksAlias(process)
72 modifyMergeTrackCollections_fastSimGeneralTracks = fastSim.makeProcessModifier( _fastSimGeneralTracks )
73 
75 conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
76  TrackProducers = ['convStepTracks'],
77  hasSelector = [1],
78  selectedTrackQuals = ['convStepSelector:convStep'],
79  setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(1), pQual=cms.bool(True) )
80  ),
81  copyExtras = True,
82  makeReKeyedSeeds = cms.untracked.bool(False),
83 )
84 
85 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
86 phase2_timing_layer.toModify(mergedDuplicateTracks, TrajectoryInEvent = True)
87 phase2_timing_layer.toModify(generalTracks, copyTrajectories = True)
def loadGeneralTracksAlias(process)