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 
22 mergedDuplicateTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
23  src = "duplicateTrackCandidates:candidates",
24  Fitter='RKFittingSmoother' # no outlier rejection!
25 )
26 
28 duplicateTrackClassifier = TrackCutClassifier.clone(
29  src='mergedDuplicateTracks',
30  mva = dict(
31  minPixelHits = [0,0,0],
32  maxChi2 = [9999.,9999.,9999.],
33  maxChi2n = [10.,1.0,0.4], # [9999.,9999.,9999.]
34  minLayers = [0,0,0],
35  min3DLayers = [0,0,0],
36  maxLostLayers = [99,99,99])
37 )
38 
39 generalTracks = DuplicateListMerger.clone(
40  originalSource = "preDuplicateMergingGeneralTracks",
41  originalMVAVals = "preDuplicateMergingGeneralTracks:MVAValues",
42  mergedSource = "mergedDuplicateTracks",
43  mergedMVAVals = "duplicateTrackClassifier:MVAValues",
44  candidateSource = "duplicateTrackCandidates:candidates",
45  candidateComponents = "duplicateTrackCandidates:candidateMap"
46 )
47 
48 generalTracksTask = cms.Task(
49  duplicateTrackCandidates,
50  mergedDuplicateTracks,
51  duplicateTrackClassifier,
52  generalTracks
53  )
54 generalTracksSequence = cms.Sequence(generalTracksTask)
55 
56 from Configuration.Eras.Modifier_fastSim_cff import fastSim
57 fastSim.toReplaceWith(generalTracksTask,
58  cms.Task(duplicateTrackCandidates,
59  mergedDuplicateTracks,
60  duplicateTrackClassifier)
61 )
62 
63 def _fastSimGeneralTracks(process):
64  from FastSimulation.Configuration.DigiAliases_cff import loadGeneralTracksAlias
65  loadGeneralTracksAlias(process)
66 modifyMergeTrackCollections_fastSimGeneralTracks = fastSim.makeProcessModifier( _fastSimGeneralTracks )
67 
69 conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
70  TrackProducers = ['convStepTracks'],
71  hasSelector = [1],
72  selectedTrackQuals = ['convStepSelector:convStep'],
73  setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(1), pQual=cms.bool(True) )
74  ),
75  copyExtras = True,
76  makeReKeyedSeeds = cms.untracked.bool(False),
77 )
78 
79 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
80 phase2_timing_layer.toModify(mergedDuplicateTracks, TrajectoryInEvent = True)
81 phase2_timing_layer.toModify(generalTracks, copyTrajectories = True)
def loadGeneralTracksAlias(process)