CMS 3D CMS Logo

DisplacedGeneralStep_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
3 
4 #----------------------------------------- NEW CLUSTERS (remove previously used clusters)
5 displacedGeneralStepClusters = _cfg.clusterRemoverForIter("DisplacedGeneralStep")
6 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
7  _era.toReplaceWith(displacedGeneralStepClusters, _cfg.clusterRemoverForIter("DisplacedGeneralStep", _eraName, _postfix))
8 
9 #----------------------------------------- SEEDING LAYERS
10 import RecoTracker.TkSeedingLayers.DisplacedGeneralLayerTriplet_cfi
11 displacedGeneralStepSeedLayers = RecoTracker.TkSeedingLayers.DisplacedGeneralLayerTriplet_cfi.DisplacedGeneralLayerTriplet.clone()
12 
13 
14 #----------------------------------------- TrackingRegion
15 from RecoTracker.TkTrackingRegions.globalTrackingRegion_cfi import globalTrackingRegion as _globalTrackingRegion
16 displacedGeneralStepTrackingRegions = _globalTrackingRegion.clone(
17  RegionPSet = dict(
18  precise = True,
19  useMultipleScattering = True,
20  originHalfLength = 55,
21  originRadius = 10,
22  ptMin = 1
23  )
24 )
25 
26 
27 
28 
29 #----------------------------------------- Triplet seeding
30 
31 from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer
32 displacedGeneralStepClusterShapeHitFilter = _ClusterShapeHitFilterESProducer.clone(
33  ComponentName = 'displacedGeneralStepClusterShapeHitFilter',
34  doStripShapeCut = cms.bool(False),
35  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTight')
36 )
37 
38 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
39 displacedGeneralStepHitDoublets = _hitPairEDProducer.clone(
40  seedingLayers = "displacedGeneralStepSeedLayers",
41  trackingRegions = "displacedGeneralStepTrackingRegions",
42  maxElement = 50000000,
43  produceIntermediateHitDoublets = True,
44 )
45 
46 from RecoTracker.TkSeedGenerator.multiHitFromChi2EDProducer_cfi import multiHitFromChi2EDProducer as _multiHitFromChi2EDProducer
47 displacedGeneralStepHitTriplets = _multiHitFromChi2EDProducer.clone(
48  doublets = "displacedGeneralStepHitDoublets",
49  extraPhiKDBox = 0.01,
50 )
51 
52 
53 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
54 from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter
55 displacedGeneralStepSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(
56  seedingHitSets = "displacedGeneralStepHitTriplets",
57  SeedComparitorPSet = dict(
58  ComponentName = 'CombinedSeedComparitor',
59  mode = cms.string("and"),
60  comparitors = cms.VPSet(
61  cms.PSet(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
62  ComponentName = cms.string('PixelClusterShapeSeedComparitor'),
63  FilterAtHelixStage = cms.bool(True),
64  FilterPixelHits = cms.bool(False),
65  FilterStripHits = cms.bool(True),
66  ClusterShapeHitFilterName = cms.string('displacedGeneralStepClusterShapeHitFilter'),
67  ClusterShapeCacheSrc = cms.InputTag("siPixelClusterShapeCache") # not really needed here since FilterPixelHits=False
68  ),
69  _StripSubClusterShapeSeedFilter.clone()
70  )
71  )
72 )
73 
74 
75 
76 #----------------------------------------- QUALITY CUTS DURING TRACK BUILDING
77 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff as _TrajectoryFilter_cff
78 _displacedGeneralStepTrajectoryFilterBase = _TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
79  maxLostHits = 1,
80  minimumNumberOfHits = 4,
81  minPt = 1,
82 )
83 
84 displacedGeneralStepTrajectoryFilter = _displacedGeneralStepTrajectoryFilterBase.clone(
85  seedPairPenalty = 1,
86 )
87 
88 
89 displacedGeneralStepTrajectoryFilterInOut = displacedGeneralStepTrajectoryFilter.clone()
90 
91 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
92 displacedGeneralStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
93  ComponentName = 'displacedGeneralStepChi2Est',
94  nSigma = 3.0,
95  MaxChi2 = 10.0,
96  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
97 )
98 
99 
100 
101 #----------------------------------------- TRACK BUILDING
103 displacedGeneralStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
104  MeasurementTrackerName = '',
105  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('displacedGeneralStepTrajectoryFilter')),
106  inOutTrajectoryFilter = cms.PSet(refToPSet_ = cms.string('displacedGeneralStepTrajectoryFilterInOut')),
107  useSameTrajFilter = False,
108  minNrOfHitsForRebuild = 4,
109  maxCand = 2,
110  estimator = 'displacedGeneralStepChi2Est'
111  )
112 
113 
114 
115 #----------------------------------------- MAKING OF TRACK CANDIDATES
117 displacedGeneralStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
118  src = 'displacedGeneralStepSeeds',
119  TrajectoryCleaner = 'displacedGeneralStepTrajectoryCleanerBySharedHits',
120 
121  numHitsForSeedCleaner = cms.int32(50),
122  onlyPixelHitsForSeedCleaner = cms.bool(False),
123 
124  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('displacedGeneralStepTrajectoryBuilder')),
125  clustersToSkip = cms.InputTag('displacedGeneralStepClusters'),
126  doSeedingRegionRebuilding = True,
127  useHitsSplitting = True,
128  cleanTrajectoryAfterInOut = True
129 )
130 
131 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
132 displacedGeneralStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
133  ComponentName = 'displacedGeneralStepTrajectoryCleanerBySharedHits',
134  fractionShared = 0.25,
135  allowSharedFirstHit = True
136 )
137 
138 
139 
140 
141 
142 # ----------------------------------------- TRACK FITTING AND SMOOTHING OPTIONS
144 displacedGeneralStepFitterSmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.KFFittingSmootherWithOutliersRejectionAndRK.clone(
145  ComponentName = 'displacedGeneralStepFitterSmoother',
146  EstimateCut = 30,
147  MinNumberOfHits = 8,
148  Fitter = 'displacedGeneralStepRKFitter',
149  Smoother = 'displacedGeneralStepRKSmoother'
150  )
151 
152 
153 
154 # Also necessary to specify minimum number of hits after final track fit
155 displacedGeneralStepRKTrajectoryFitter = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectoryFitter.clone(
156  ComponentName = 'displacedGeneralStepRKFitter',
157  minHits = 8
158 )
159 
160 
161 
162 displacedGeneralStepRKTrajectorySmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectorySmoother.clone(
163  ComponentName = 'displacedGeneralStepRKSmoother',
164  errorRescaling = 10.0,
165  minHits = 8
166 )
167 
168 
169 
171 generalDisplacedFlexibleKFFittingSmoother = TrackingTools.TrackFitters.FlexibleKFFittingSmoother_cfi.FlexibleKFFittingSmoother.clone(
172  ComponentName = 'generalDisplacedFlexibleKFFittingSmoother',
173  standardFitter = 'displacedGeneralStepFitterSmoother',
174 )
175 
176 
177 
178 
180 displacedGeneralStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
181  src = 'displacedGeneralStepTrackCandidates',
182  AlgorithmName = 'displacedGeneralStep',
183  Fitter = 'generalDisplacedFlexibleKFFittingSmoother',
184  )
185 
186 
187 #---------------------------------------- TRACK SELECTION AND QUALITY FLAG SETTING.
188 
191 displacedGeneralStepClassifier1 = TrackMVAClassifierDetached.clone(
192  src = 'displacedGeneralStepTracks',
193  mva = dict(GBRForestLabel = 'MVASelectorIter6_13TeV'),
194  qualityCuts = [-0.6,-0.45,-0.3]
195 )
196 displacedGeneralStepClassifier2 = TrackMVAClassifierPrompt.clone(
197 src = 'displacedGeneralStepTracks',
198  mva = dict(GBRForestLabel = 'MVASelectorIter0_13TeV'),
199  qualityCuts = [0.0,0.0,0.0]
200 )
201 
203 displacedGeneralStep = ClassifierMerger.clone(
204  inputClassifiers=['displacedGeneralStepClassifier1','displacedGeneralStepClassifier2']
205 )
206 
207 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
208 trackingPhase1.toReplaceWith(displacedGeneralStep, displacedGeneralStepClassifier1.clone(
209  mva = dict(GBRForestLabel = 'MVASelectorTobTecStep_Phase1'),
210  qualityCuts = [-0.6,-0.45,-0.3],
211 ))
212 
213 
214 
215 DisplacedGeneralStepTask = cms.Task(displacedGeneralStepClusters,
216  displacedGeneralStepSeedLayers,
217  displacedGeneralStepTrackingRegions,
218  displacedGeneralStepHitDoublets,
219  displacedGeneralStepHitTriplets,
220  displacedGeneralStepSeeds,
221  displacedGeneralStepTrackCandidates,
222  displacedGeneralStepTracks,
223  displacedGeneralStepClassifier1,displacedGeneralStepClassifier2,
224  displacedGeneralStep)
225 
226 DisplacedGeneralStep = cms.Sequence(DisplacedGeneralStepTask)
TrajectoryFilter_cff
GroupedCkfTrajectoryBuilder_cfi
FlexibleKFFittingSmoother_cfi
ClusterShapeHitFilterESProducer_cfi
TrackMVAClassifierDetached_cfi
ClassifierMerger_cfi
TrackProducer_cfi
TrackMVAClassifierPrompt_cfi
RungeKuttaFitters_cff
TrajectoryCleanerBySharedHits_cfi
CkfTrackCandidates_cfi