CMS 3D CMS Logo

hiPixelPairStep_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
4 
5 # NEW CLUSTERS (remove previously used clusters)
6 hiPixelPairClusters = cms.EDProducer("HITrackClusterRemover",
7  clusterLessSolution= cms.bool(True),
8  oldClusterRemovalInfo = cms.InputTag("hiLowPtTripletStepClusters"),
9  trajectories = cms.InputTag("hiLowPtTripletStepTracks"),
10  overrideTrkQuals = cms.InputTag('hiLowPtTripletStepSelector','hiLowPtTripletStep'),
11  TrackQuality = cms.string('highPurity'),
12  minNumberOfLayersWithMeasBeforeFiltering = cms.int32(0),
13  pixelClusters = cms.InputTag("siPixelClusters"),
14  stripClusters = cms.InputTag("siStripClusters"),
15  Common = cms.PSet(
16  maxChi2 = cms.double(9.0),
17  ),
18  Strip = cms.PSet(
19  maxChi2 = cms.double(9.0),
20  #Yen-Jie's mod to preserve merged clusters
21  maxSize = cms.uint32(2)
22  )
23  )
24 
25 
26 # SEEDING LAYERS
28 hiPixelPairSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerPairs_cfi.PixelLayerPairs.clone(
29  layerList = ['BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3',
30  'BPix1+FPix1_pos', 'BPix1+FPix1_neg',
31  'BPix2+FPix1_pos', 'BPix2+FPix1_neg',
32  'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg'],
33  BPix = cms.PSet(
34  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
35  HitProducer = cms.string('siPixelRecHits'),
36  skipClusters = cms.InputTag('hiPixelPairClusters')
37  ),
38  FPix = cms.PSet(
39  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
40  HitProducer = cms.string('siPixelRecHits'),
41  skipClusters = cms.InputTag('hiPixelPairClusters')
42  )
43 )
44 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
45 trackingPhase1.toModify(hiPixelPairSeedLayers,
46  layerList = ['BPix1+BPix4','BPix1+FPix1_pos','BPix1+FPix1_neg'] #only use first and fourth barrel layers or first barrel and first forward layer around area where BPIX2+3 are inactive
47 )
48 
49 # SEEDS
51 hiPixelPairSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromPairsWithVertices_cff.globalSeedsFromPairsWithVertices.clone(
52  RegionFactoryPSet = dict(
53  RegionPSet = dict(
54  VertexCollection = "hiSelectedPixelVertex",
55  ptMin = 1.0,
56  originRadius = 0.005,
57  nSigmaZ = 4.0,
58  # sigmaZVertex is only used when usedFixedError is True -Matt
59  sigmaZVertex = 4.0,
60  useFixedError = False
61  )
62  ),
63  OrderedHitsFactoryPSet = dict(
64  SeedingLayers = 'hiPixelPairSeedLayers',
65  maxElement = 5000000
66  ),
67  ClusterCheckPSet = dict(
68  MaxNumberOfPixelClusters = 5000000,
69  MaxNumberOfCosmicClusters = 50000000,
70  cut = ""
71  ),
72  SeedComparitorPSet = cms.PSet(
73  ComponentName = cms.string('PixelClusterShapeSeedComparitor'),
74  FilterAtHelixStage = cms.bool(True),
75  FilterPixelHits = cms.bool(True),
76  FilterStripHits = cms.bool(False),
77  ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
78  ClusterShapeCacheSrc = cms.InputTag("siPixelClusterShapeCache")
79  )
80 )
81 #rectangular tracking region around area missing BPIX2/3 in Phase 1
82 from RecoTracker.TkTrackingRegions.pointSeededTrackingRegion_cfi import pointSeededTrackingRegion as _pointSeededTrackingRegion
83 hiPixelPairStepTrackingRegionPhase1 = _pointSeededTrackingRegion.clone(
84  RegionPSet = dict(
85  ptMin = 0.9,
86  originRadius = 0.005,
87  mode = "VerticesSigma",
88  nSigmaZVertex = 4.0,
89  vertexCollection = "hiSelectedPixelVertex",
90  beamSpot = "offlineBeamSpot",
91  whereToUseMeasurementTracker = "Never",
92  deltaEta = 1.8,
93  deltaPhi = 0.5,
94  points = dict(
95  eta = [0.0],
96  phi = [3.0],
97  )
98  )
99 )
100 
101 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
102 hiPixelPairStepHitDoubletsPhase1 = _hitPairEDProducer.clone(
103  seedingLayers = "hiPixelPairSeedLayers",
104  trackingRegions = "hiPixelPairStepTrackingRegionPhase1",
105  clusterCheck = "",
106  produceSeedingHitSets = True,
107 )
108 
109 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
110 hiPixelPairStepSeedsPhase1 = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
111  seedingHitSets = "hiPixelPairStepHitDoubletsPhase1",
112  SeedComparitorPSet = dict(
113  ComponentName = 'PixelClusterShapeSeedComparitor',
114  FilterAtHelixStage = cms.bool(True),
115  FilterPixelHits = cms.bool(True),
116  FilterStripHits = cms.bool(False),
117  ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
118  ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache'),
119  )
120 )
121 
122 # QUALITY CUTS DURING TRACK BUILDING
124 hiPixelPairTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
125  #maxLostHits = 0,
126  minimumNumberOfHits = 6,
127  minPt = 1.0
128 )
129 
131 hiPixelPairChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
132  ComponentName = 'hiPixelPairChi2Est',
133  nSigma = 3.0,
134  MaxChi2 = 9.0
135 )
136 
137 # TRACK BUILDING
139 hiPixelPairTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
140  trajectoryFilter = dict(refToPSet_ = 'hiPixelPairTrajectoryFilter'),
141  maxCand = 3,
142  estimator = 'hiPixelPairChi2Est',
143  maxDPhiForLooperReconstruction = 2.0,
144  maxPtForLooperReconstruction = 0.7,
145 )
146 
147 # MAKING OF TRACK CANDIDATES
149 hiPixelPairTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
150  src = 'hiPixelPairSeeds',
151  clustersToSkip = 'hiPixelPairClusters',
152  TrajectoryBuilderPSet = dict(refToPSet_ = 'hiPixelPairTrajectoryBuilder'),
153 
154  numHitsForSeedCleaner = 50,
155  onlyPixelHitsForSeedCleaner = True,
156 )
157 trackingPhase1.toModify(hiPixelPairTrackCandidates,
158  src = 'hiPixelPairStepSeedsPhase1'
159 )
160 
161 # TRACK FITTING
163 hiPixelPairGlobalPrimTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
164  AlgorithmName = 'pixelPairStep',
165  src = 'hiPixelPairTrackCandidates',
166  Fitter = 'FlexibleKFFittingSmoother'
167 )
168 
169 
170 
171 
172 # Final selection
174 hiPixelPairStepSelector = RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiMultiTrackSelector.clone(
175  src = 'hiPixelPairGlobalPrimTracks',
176  useAnyMVA = True,
177  GBRForestLabel = 'HIMVASelectorIter6',
178  GBRForestVars = ['chi2perdofperlayer', 'dxyperdxyerror', 'dzperdzerror', 'nhits', 'nlayers', 'eta'],
179  trackSelectors= cms.VPSet(
180  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
181  name = 'hiPixelPairStepLoose',
182  useMVA = False
183  ), #end of pset
184  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
185  name = 'hiPixelPairStepTight',
186  preFilterName = 'hiPixelPairStepLoose',
187  useMVA = True,
188  minMVA = -0.58
189  ),
190  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
191  name = 'hiPixelPairStep',
192  preFilterName = 'hiPixelPairStepTight',
193  useMVA = True,
194  minMVA = 0.77
195  ),
196  ) #end of vpset
197 ) #end of clone
198 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
199 trackingPhase1.toModify(hiPixelPairStepSelector,
200  useAnyMVA = False,
201  trackSelectors= cms.VPSet(
202  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
203  name = 'hiPixelPairStepLoose',
204  useMVA = False
205  ), #end of pset
206  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
207  name = 'hiPixelPairStepTight',
208  preFilterName = 'hiPixelPairStepLoose',
209  useMVA = False,
210  minMVA = -0.58
211  ),
212  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
213  name = 'hiPixelPairStep',
214  preFilterName = 'hiPixelPairStepTight',
215  useMVA = False,
216  minMVA = 0.77
217  ),
218  ) #end of vpset
219 )
220 
221 # Final sequence
222 hiPixelPairStepTask = cms.Task(hiPixelPairClusters,
223  hiPixelPairSeedLayers,
224  hiPixelPairSeeds,
225  hiPixelPairTrackCandidates,
226  hiPixelPairGlobalPrimTracks,
227  hiPixelPairStepSelector)
228 hiPixelPairStep = cms.Sequence(hiPixelPairStepTask)
229 hiPixelPairStep_Phase1 = hiPixelPairStepTask.copy()
230 hiPixelPairStep_Phase1.replace(hiPixelPairSeeds, cms.Task(hiPixelPairStepTrackingRegionPhase1,hiPixelPairStepHitDoubletsPhase1,hiPixelPairStepSeedsPhase1) )
231 trackingPhase1.toReplaceWith(hiPixelPairStepTask, hiPixelPairStep_Phase1)