CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
7 from TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi import Chi2MeasurementEstimator as _Chi2MeasurementEstimator
8 duplicateTrackCandidatesChi2Est = _Chi2MeasurementEstimator.clone(
9  ComponentName = "duplicateTrackCandidatesChi2Est",
10  MaxChi2 = 100,
11 )
12 
13 duplicateTrackCandidates = DuplicateTrackMerger.clone(
14  source = "preDuplicateMergingGeneralTracks",
15  useInnermostState = True,
16  ttrhBuilderName = "WithAngleAndTemplate",
17  chi2EstimatorName = "duplicateTrackCandidatesChi2Est"
18 )
19 
21 mergedDuplicateTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
22  src = "duplicateTrackCandidates:candidates",
23  Fitter='RKFittingSmoother' # no outlier rejection!
24 )
25 
27 duplicateTrackClassifier = TrackCutClassifier.clone(
28  src='mergedDuplicateTracks',
29  mva = dict(
30  minPixelHits = [0,0,0],
31  maxChi2 = [9999.,9999.,9999.],
32  maxChi2n = [10.,1.0,0.4], # [9999.,9999.,9999.]
33  minLayers = [0,0,0],
34  min3DLayers = [0,0,0],
35  maxLostLayers = [99,99,99])
36 )
37 
38 generalTracks = DuplicateListMerger.clone(
39  originalSource = "preDuplicateMergingGeneralTracks",
40  originalMVAVals = "preDuplicateMergingGeneralTracks:MVAValues",
41  mergedSource = "mergedDuplicateTracks",
42  mergedMVAVals = "duplicateTrackClassifier:MVAValues",
43  candidateSource = "duplicateTrackCandidates:candidates",
44  candidateComponents = "duplicateTrackCandidates:candidateMap"
45 )
46 
47 generalTracksTask = cms.Task(
48  duplicateTrackCandidates,
49  mergedDuplicateTracks,
50  duplicateTrackClassifier,
51  generalTracks
52  )
53 generalTracksSequence = cms.Sequence(generalTracksTask)
54 
55 from Configuration.Eras.Modifier_fastSim_cff import fastSim
56 fastSim.toReplaceWith(generalTracksTask,
57  cms.Task(duplicateTrackCandidates,
58  mergedDuplicateTracks,
59  duplicateTrackClassifier)
60 )
61 
62 def _fastSimGeneralTracks(process):
63  from FastSimulation.Configuration.DigiAliases_cff import loadGeneralTracksAlias
64  loadGeneralTracksAlias(process)
65 modifyMergeTrackCollections_fastSimGeneralTracks = fastSim.makeProcessModifier( _fastSimGeneralTracks )
66 
68 conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
69  TrackProducers = ['convStepTracks'],
70  hasSelector = [1],
71  selectedTrackQuals = ['convStepSelector:convStep'],
72  setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(1), pQual=cms.bool(True) )
73  ),
74  copyExtras = True,
75  makeReKeyedSeeds = cms.untracked.bool(False),
76 )
77 
78 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
79 phase2_timing_layer.toModify(mergedDuplicateTracks, TrajectoryInEvent = True)
80 phase2_timing_layer.toModify(generalTracks, copyTrajectories = True)