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 
25 
26 # SEEDING LAYERS
28 hiDetachedTripletStepSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone()
29 hiDetachedTripletStepSeedLayers.BPix.skipClusters = cms.InputTag('hiDetachedTripletStepClusters')
30 hiDetachedTripletStepSeedLayers.FPix.skipClusters = cms.InputTag('hiDetachedTripletStepClusters')
31 
32 # SEEDS
33 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
34 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
35 from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
41 
42 hiDetachedTripletStepTrackingRegions = _globalTrackingRegionWithVertices.clone(RegionPSet=dict(
43  precise = True,
44  useMultipleScattering = False,
45  useFakeVertices = False,
46  beamSpot = "offlineBeamSpot",
47  useFixedError = True,
48  nSigmaZ = 4.0,
49  sigmaZVertex = 4.0,
50  fixedError = 0.5,
51  VertexCollection = "hiSelectedPixelVertex",
52  ptMin = 0.9,
53  useFoundVertices = True,
54  originRadius = 0.5
55 ))
56 hiDetachedTripletStepTracksHitDoublets = _hitPairEDProducer.clone(
57  clusterCheck = "",
58  seedingLayers = "hiDetachedTripletStepSeedLayers",
59  trackingRegions = "hiDetachedTripletStepTrackingRegions",
60  maxElement = 0,
61  produceIntermediateHitDoublets = True,
62 )
64 hiDetachedTripletStepTracksHitTriplets = _pixelTripletHLTEDProducer.clone(
65  doublets = "hiDetachedTripletStepTracksHitDoublets",
66  extraHitRPhitolerance = 0.0,
67  extraHitRZtolerance = 0.0,
68  maxElement = 1000000,
69  SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(),
70  produceSeedingHitSets = True,
71 )
72 
73 from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer
74 hiDetachedTripletStepTracksHitDoubletsCA = hiDetachedTripletStepTracksHitDoublets.clone()
75 hiDetachedTripletStepTracksHitDoubletsCA.layerPairs = [0,1]
76 
77 hiDetachedTripletStepTracksHitTripletsCA = _caHitTripletEDProducer.clone(
78  doublets = "hiDetachedTripletStepTracksHitDoubletsCA",
79  extraHitRPhitolerance = hiDetachedTripletStepTracksHitTriplets.extraHitRPhitolerance,
80  maxChi2 = dict(
81  pt1 = 0.8, pt2 = 2,
82  value1 = 300 , value2 = 10,
83  ),
84  useBendingCorrection = True,
85  CAThetaCut = 0.001,
86  CAPhiCut = 0,
87  CAHardPtCut = 0.2,
88 )
89 
90 hiDetachedTripletStepPixelTracksFilter = hiFilter.clone(
91  nSigmaTipMaxTolerance = 0,
92  lipMax = 1.0,
93  tipMax = 1.0,
94  ptMin = 0.95,
95 )
96 hiDetachedTripletStepPixelTracks = cms.EDProducer("PixelTrackProducer",
97 
98  passLabel = cms.string('Pixel detached tracks with vertex constraint'),
99 
100  # Ordered Hits
101  SeedingHitSets = cms.InputTag("hiDetachedTripletStepTracksHitTriplets"),
102 
103  # Fitter
104  Fitter = cms.InputTag("pixelFitterByHelixProjections"),
105 
106  # Filter
107  Filter = cms.InputTag("hiDetachedTripletStepPixelTracksFilter"),
108 
109  # Cleaner
110  Cleaner = cms.string("trackCleaner")
111 )
112 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
113 trackingPhase1.toModify(hiDetachedTripletStepPixelTracks,
114  SeedingHitSets = cms.InputTag("hiDetachedTripletStepTracksHitTripletsCA")
115 )
116 
117 
118 import RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi
119 hiDetachedTripletStepSeeds = RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone(
120  InputCollection = 'hiDetachedTripletStepPixelTracks'
121  )
122 
123 # QUALITY CUTS DURING TRACK BUILDING
125 hiDetachedTripletStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
126  maxLostHits = 1,
127  minimumNumberOfHits = 6,
128  minPt = cms.double(0.3),
129  constantValueForLostHitsFractionFilter = cms.double(0.701)
130  )
131 
133 hiDetachedTripletStepChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
134  ComponentName = cms.string('hiDetachedTripletStepChi2Est'),
135  nSigma = cms.double(3.0),
136  MaxChi2 = cms.double(9.0)
137  )
138 
139 
140 # TRACK BUILDING
142 hiDetachedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
143  MeasurementTrackerName = '',
144  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiDetachedTripletStepTrajectoryFilter')),
145  maxCand = 2,
146  estimator = cms.string('hiDetachedTripletStepChi2Est'),
147  maxDPhiForLooperReconstruction = cms.double(0),
148  maxPtForLooperReconstruction = cms.double(0),
149  alwaysUseInvalidHits = cms.bool(False)
150  )
151 
152 # MAKING OF TRACK CANDIDATES
154 hiDetachedTripletStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
155  src = cms.InputTag('hiDetachedTripletStepSeeds'),
156  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
157  numHitsForSeedCleaner = cms.int32(50),
158  onlyPixelHitsForSeedCleaner = cms.bool(True),
159  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiDetachedTripletStepTrajectoryBuilder')),
160  TrajectoryBuilder = cms.string('hiDetachedTripletStepTrajectoryBuilder'),
161  clustersToSkip = cms.InputTag('hiDetachedTripletStepClusters'),
162  doSeedingRegionRebuilding = True,
163  useHitsSplitting = True
164  )
165 
166 
167 # TRACK FITTING
169 hiDetachedTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
170  src = 'hiDetachedTripletStepTrackCandidates',
171  AlgorithmName = cms.string('detachedTripletStep'),
172  Fitter=cms.string('FlexibleKFFittingSmoother')
173  )
174 
175 # Final selection
177 hiDetachedTripletStepSelector = RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiMultiTrackSelector.clone(
178  src='hiDetachedTripletStepTracks',
179  useAnyMVA = cms.bool(True),
180  GBRForestLabel = cms.string('HIMVASelectorIter7'),
181  GBRForestVars = cms.vstring(['chi2perdofperlayer', 'nhits', 'nlayers', 'eta']),
182  trackSelectors= cms.VPSet(
183  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
184  name = 'hiDetachedTripletStepLoose',
185  applyAdaptedPVCuts = cms.bool(False),
186  useMVA = cms.bool(False),
187  ), #end of pset
188  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
189  name = 'hiDetachedTripletStepTight',
190  preFilterName = 'hiDetachedTripletStepLoose',
191  applyAdaptedPVCuts = cms.bool(False),
192  useMVA = cms.bool(True),
193  minMVA = cms.double(-0.2)
194  ),
195  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
196  name = 'hiDetachedTripletStep',
197  preFilterName = 'hiDetachedTripletStepTight',
198  applyAdaptedPVCuts = cms.bool(False),
199  useMVA = cms.bool(True),
200  minMVA = cms.double(-0.09)
201  ),
202  ) #end of vpset
203  ) #end of clone
204 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
205 trackingPhase1.toModify(hiDetachedTripletStepSelector, useAnyMVA = cms.bool(False))
206 trackingPhase1.toModify(hiDetachedTripletStepSelector, trackSelectors= cms.VPSet(
207  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
208  name = 'hiDetachedTripletStepLoose',
209  applyAdaptedPVCuts = cms.bool(False),
210  useMVA = cms.bool(False),
211  ), #end of pset
212  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
213  name = 'hiDetachedTripletStepTight',
214  preFilterName = 'hiDetachedTripletStepLoose',
215  applyAdaptedPVCuts = cms.bool(False),
216  useMVA = cms.bool(False),
217  minMVA = cms.double(-0.2)
218  ),
219  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
220  name = 'hiDetachedTripletStep',
221  preFilterName = 'hiDetachedTripletStepTight',
222  applyAdaptedPVCuts = cms.bool(False),
223  useMVA = cms.bool(False),
224  minMVA = cms.double(-0.09)
225  ),
226  ) #end of vpset
227 )
228 
230 hiDetachedTripletStepQual = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
231  TrackProducers=cms.VInputTag(cms.InputTag('hiDetachedTripletStepTracks')),
232  hasSelector=cms.vint32(1),
233  selectedTrackQuals = cms.VInputTag(cms.InputTag("hiDetachedTripletStepSelector","hiDetachedTripletStep")),
234  copyExtras = True,
235  makeReKeyedSeeds = cms.untracked.bool(False),
236  )
237 
238 
239 hiDetachedTripletStep = cms.Sequence(hiDetachedTripletStepClusters*
240  hiDetachedTripletStepSeedLayers*
241  hiDetachedTripletStepTrackingRegions*
242  hiDetachedTripletStepTracksHitDoublets*
243  hiDetachedTripletStepTracksHitTriplets*
244  pixelFitterByHelixProjections*
245  hiDetachedTripletStepPixelTracksFilter*
246  hiDetachedTripletStepPixelTracks*
247  hiDetachedTripletStepSeeds*
248  hiDetachedTripletStepTrackCandidates*
249  hiDetachedTripletStepTracks*
250  hiDetachedTripletStepSelector*
251  hiDetachedTripletStepQual)
252 hiDetachedTripletStep_Phase1 = hiDetachedTripletStep.copy()
253 hiDetachedTripletStep_Phase1.replace(hiDetachedTripletStepTracksHitDoublets, hiDetachedTripletStepTracksHitDoubletsCA)
254 hiDetachedTripletStep_Phase1.replace(hiDetachedTripletStepTracksHitTriplets, hiDetachedTripletStepTracksHitTripletsCA)
255 trackingPhase1.toReplaceWith(hiDetachedTripletStep, hiDetachedTripletStep_Phase1)
256 
COSMIC RUN SETTING.
pp iterative tracking modified for hiOffline reco (the vertex is the one reconstructed in HI) 3rd ste...