CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
hiDetachedTripletStep_cff.py
Go to the documentation of this file.
1 from __future__ import absolute_import
3 from .HIPixelTripletSeeds_cff import *
4 from .HIPixel3PrimTracks_cfi import *
5 
6 hiDetachedTripletStepClusters = cms.EDProducer("HITrackClusterRemover",
7  clusterLessSolution = cms.bool(True),
8  trajectories = cms.InputTag("hiGlobalPrimTracks"),
9  overrideTrkQuals = cms.InputTag('hiInitialStepSelector','hiInitialStep'),
10  TrackQuality = cms.string('highPurity'),
11  minNumberOfLayersWithMeasBeforeFiltering = cms.int32(0),
12  pixelClusters = cms.InputTag("siPixelClusters"),
13  stripClusters = cms.InputTag("siStripClusters"),
14  Common = cms.PSet(
15  maxChi2 = cms.double(9.0),
16  ),
17  Strip = cms.PSet(
18  #Yen-Jie's mod to preserve merged clusters
19  maxSize = cms.uint32(2),
20  maxChi2 = cms.double(9.0)
21  )
22 )
23 
24 
25 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
26 trackingPhase1.toModify(hiDetachedTripletStepClusters,
27  trajectories = "hiDetachedQuadStepTracks",
28  overrideTrkQuals = "hiDetachedQuadStepSelector:hiDetachedQuadStep",
29 )
30 
31 
32 # SEEDING LAYERS
34 hiDetachedTripletStepSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone(
35  BPix = dict(skipClusters = cms.InputTag('hiDetachedTripletStepClusters')),
36  FPix = dict(skipClusters = cms.InputTag('hiDetachedTripletStepClusters'))
37 )
38 
39 # SEEDS
40 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
41 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
42 from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
48 
49 hiDetachedTripletStepTrackingRegions = _globalTrackingRegionWithVertices.clone(RegionPSet=dict(
50  precise = True,
51  useMultipleScattering = False,
52  useFakeVertices = False,
53  beamSpot = "offlineBeamSpot",
54  useFixedError = True,
55  nSigmaZ = 4.0,
56  sigmaZVertex = 4.0,
57  fixedError = 0.5,
58  VertexCollection = "hiSelectedPixelVertex",
59  ptMin = 0.9,
60  useFoundVertices = True,
61  originRadius = 0.5
62 ))
63 hiDetachedTripletStepTracksHitDoublets = _hitPairEDProducer.clone(
64  clusterCheck = "",
65  seedingLayers = "hiDetachedTripletStepSeedLayers",
66  trackingRegions = "hiDetachedTripletStepTrackingRegions",
67  maxElement = 50000000,
68  produceIntermediateHitDoublets = True,
69 )
71 hiDetachedTripletStepTracksHitTriplets = _pixelTripletHLTEDProducer.clone(
72  doublets = "hiDetachedTripletStepTracksHitDoublets",
73  extraHitRPhitolerance = 0.0,
74  extraHitRZtolerance = 0.0,
75  maxElement = 1000000,
76  SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(),
77  produceSeedingHitSets = True,
78 )
79 
80 from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer
81 hiDetachedTripletStepTracksHitDoubletsCA = hiDetachedTripletStepTracksHitDoublets.clone(
82  layerPairs = [0,1]
83 )
84 hiDetachedTripletStepTracksHitTripletsCA = _caHitTripletEDProducer.clone(
85  doublets = "hiDetachedTripletStepTracksHitDoubletsCA",
86  extraHitRPhitolerance = hiDetachedTripletStepTracksHitTriplets.extraHitRPhitolerance,
87  maxChi2 = dict(
88  pt1 = 0.8, pt2 = 2,
89  value1 = 300 , value2 = 10,
90  ),
91  useBendingCorrection = True,
92  CAThetaCut = 0.001,
93  CAPhiCut = 0,
94  CAHardPtCut = 0.2,
95 )
96 
97 hiDetachedTripletStepPixelTracksFilter = hiFilter.clone(
98  nSigmaTipMaxTolerance = 0,
99  lipMax = 1.0,
100  tipMax = 1.0,
101  ptMin = 0.95,
102 )
103 
104 import RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi as _mod
105 
106 hiDetachedTripletStepPixelTracks = _mod.pixelTracks.clone(
107  passLabel = 'Pixel detached tracks with vertex constraint',
108  # Ordered Hits
109  SeedingHitSets = "hiDetachedTripletStepTracksHitTriplets",
110  # Fitter
111  Fitter = "pixelFitterByHelixProjections",
112  # Filter
113  Filter = "hiDetachedTripletStepPixelTracksFilter",
114  # Cleaner
115  Cleaner = "trackCleaner"
116 )
117 trackingPhase1.toModify(hiDetachedTripletStepPixelTracks,
118  SeedingHitSets = "hiDetachedTripletStepTracksHitTripletsCA"
119 )
120 
121 
122 import RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi
123 hiDetachedTripletStepSeeds = RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone(
124  InputCollection = 'hiDetachedTripletStepPixelTracks'
125 )
126 
127 # QUALITY CUTS DURING TRACK BUILDING
129 hiDetachedTripletStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
130  maxLostHits = 1,
131  minimumNumberOfHits = 6,
132  minPt = 0.3,
133  constantValueForLostHitsFractionFilter = 0.701
134 )
135 
137 hiDetachedTripletStepChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
138  ComponentName = 'hiDetachedTripletStepChi2Est',
139  nSigma = 3.0,
140  MaxChi2 = 9.0
141 )
142 
143 
144 # TRACK BUILDING
146 hiDetachedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
147  MeasurementTrackerName = '',
148  trajectoryFilter = dict(refToPSet_ = 'hiDetachedTripletStepTrajectoryFilter'),
149  maxCand = 2,
150  estimator = 'hiDetachedTripletStepChi2Est',
151  maxDPhiForLooperReconstruction = cms.double(0),
152  maxPtForLooperReconstruction = cms.double(0),
153  alwaysUseInvalidHits = False
154 )
155 
156 # MAKING OF TRACK CANDIDATES
158 hiDetachedTripletStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
159  src = 'hiDetachedTripletStepSeeds',
160  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
161  numHitsForSeedCleaner = cms.int32(50),
162  onlyPixelHitsForSeedCleaner = cms.bool(True),
163  TrajectoryBuilderPSet = dict(refToPSet_ = 'hiDetachedTripletStepTrajectoryBuilder'),
164  TrajectoryBuilder = 'hiDetachedTripletStepTrajectoryBuilder',
165  clustersToSkip = cms.InputTag('hiDetachedTripletStepClusters'),
166  doSeedingRegionRebuilding = True,
167  useHitsSplitting = True
168 )
169 
170 
171 # TRACK FITTING
173 hiDetachedTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
174  src = 'hiDetachedTripletStepTrackCandidates',
175  AlgorithmName = 'detachedTripletStep',
176  Fitter = 'FlexibleKFFittingSmoother'
177 )
178 
179 # Final selection
181 hiDetachedTripletStepSelector = RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiMultiTrackSelector.clone(
182  src = 'hiDetachedTripletStepTracks',
183  useAnyMVA = True,
184  GBRForestLabel = 'HIMVASelectorIter7',
185  GBRForestVars = ['chi2perdofperlayer', 'nhits', 'nlayers', 'eta'],
186  trackSelectors = cms.VPSet(
187  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
188  name = 'hiDetachedTripletStepLoose',
189  applyAdaptedPVCuts = False,
190  useMVA = False,
191  ), #end of pset
192  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
193  name = 'hiDetachedTripletStepTight',
194  preFilterName = 'hiDetachedTripletStepLoose',
195  applyAdaptedPVCuts = False,
196  useMVA = True,
197  minMVA = -0.2
198  ),
199  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
200  name = 'hiDetachedTripletStep',
201  preFilterName = 'hiDetachedTripletStepTight',
202  applyAdaptedPVCuts = False,
203  useMVA = True,
204  minMVA = -0.09
205  ),
206  ) #end of vpset
207 ) #end of clone
208 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
209 trackingPhase1.toModify(hiDetachedTripletStepSelector, useAnyMVA = False)
210 trackingPhase1.toModify(hiDetachedTripletStepSelector, trackSelectors= cms.VPSet(
211  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
212  name = 'hiDetachedTripletStepLoose',
213  applyAdaptedPVCuts = False,
214  useMVA = False,
215  ), #end of pset
216  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
217  name = 'hiDetachedTripletStepTight',
218  preFilterName = 'hiDetachedTripletStepLoose',
219  applyAdaptedPVCuts = False,
220  useMVA = False,
221  minMVA = -0.2
222  ),
223  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
224  name = 'hiDetachedTripletStep',
225  preFilterName = 'hiDetachedTripletStepTight',
226  applyAdaptedPVCuts = False,
227  useMVA = False,
228  minMVA = -0.09
229  ),
230  ) #end of vpset
231 )
232 
234 hiDetachedTripletStepQual = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
235  TrackProducers = ['hiDetachedTripletStepTracks'],
236  hasSelector = [1],
237  selectedTrackQuals = ["hiDetachedTripletStepSelector:hiDetachedTripletStep"],
238  copyExtras = True,
239  makeReKeyedSeeds = cms.untracked.bool(False),
240 )
241 
242 
243 hiDetachedTripletStepTask = cms.Task(hiDetachedTripletStepClusters,
244  hiDetachedTripletStepSeedLayers,
245  hiDetachedTripletStepTrackingRegions,
246  hiDetachedTripletStepTracksHitDoublets,
247  hiDetachedTripletStepTracksHitTriplets,
248  pixelFitterByHelixProjections,
249  hiDetachedTripletStepPixelTracksFilter,
250  hiDetachedTripletStepPixelTracks,
251  hiDetachedTripletStepSeeds,
252  hiDetachedTripletStepTrackCandidates,
253  hiDetachedTripletStepTracks,
254  hiDetachedTripletStepSelector,
255  hiDetachedTripletStepQual)
256 hiDetachedTripletStep = cms.Sequence(hiDetachedTripletStepTask)
257 hiDetachedTripletStepTask_Phase1 = hiDetachedTripletStepTask.copy()
258 hiDetachedTripletStepTask_Phase1.replace(hiDetachedTripletStepTracksHitDoublets, hiDetachedTripletStepTracksHitDoubletsCA)
259 hiDetachedTripletStepTask_Phase1.replace(hiDetachedTripletStepTracksHitTriplets, hiDetachedTripletStepTracksHitTripletsCA)
260 trackingPhase1.toReplaceWith(hiDetachedTripletStepTask, hiDetachedTripletStepTask_Phase1)
261 
COSMIC RUN SETTING.
pp iterative tracking modified for hiOffline reco (the vertex is the one reconstructed in HI) 3rd ste...