CMS 3D CMS Logo

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