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 = cms.vstring('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 = cms.vstring('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 hiPixelPairSeeds.RegionFactoryPSet.RegionPSet.VertexCollection=cms.InputTag("hiSelectedPixelVertex")
53 hiPixelPairSeeds.RegionFactoryPSet.RegionPSet.ptMin = 1.0
54 hiPixelPairSeeds.RegionFactoryPSet.RegionPSet.originRadius = 0.005
55 hiPixelPairSeeds.RegionFactoryPSet.RegionPSet.nSigmaZ = 4.0
56 # sigmaZVertex is only used when usedFixedError is True -Matt
57 hiPixelPairSeeds.RegionFactoryPSet.RegionPSet.sigmaZVertex = 4.0
58 hiPixelPairSeeds.RegionFactoryPSet.RegionPSet.useFixedError = cms.bool(False)
59 hiPixelPairSeeds.OrderedHitsFactoryPSet.SeedingLayers = cms.InputTag('hiPixelPairSeedLayers')
60 hiPixelPairSeeds.OrderedHitsFactoryPSet.maxElement = 5000000
61 hiPixelPairSeeds.ClusterCheckPSet.MaxNumberOfPixelClusters = 5000000
62 hiPixelPairSeeds.ClusterCheckPSet.MaxNumberOfCosmicClusters = 50000000
63 hiPixelPairSeeds.ClusterCheckPSet.MaxNumberOfCosmicClusters = 50000000
64 del hiPixelPairSeeds.ClusterCheckPSet.cut
65 
66 hiPixelPairSeeds.SeedComparitorPSet = cms.PSet(
67  ComponentName = cms.string('PixelClusterShapeSeedComparitor'),
68  FilterAtHelixStage = cms.bool(True),
69  FilterPixelHits = cms.bool(True),
70  FilterStripHits = cms.bool(False),
71  ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
72  ClusterShapeCacheSrc = cms.InputTag("siPixelClusterShapeCache")
73  )
74 
75 #rectangular tracking region around area missing BPIX2/3 in Phase 1
76 from RecoTracker.TkTrackingRegions.pointSeededTrackingRegion_cfi import pointSeededTrackingRegion as _pointSeededTrackingRegion
77 hiPixelPairStepTrackingRegionPhase1 = _pointSeededTrackingRegion.clone(
78  RegionPSet = dict(
79  ptMin = 0.9,
80  originRadius = 0.005,
81  mode = "VerticesSigma",
82  nSigmaZVertex = 4.0,
83  vertexCollection = "hiSelectedPixelVertex",
84  beamSpot = "offlineBeamSpot",
85  whereToUseMeasurementTracker = "Never",
86  deltaEta = 1.8,
87  deltaPhi = 0.5,
88  points = dict(
89  eta = [0.0],
90  phi = [3.0],
91  )
92  )
93 )
94 
95 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
96 hiPixelPairStepHitDoubletsPhase1 = _hitPairEDProducer.clone(
97  seedingLayers = "hiPixelPairSeedLayers",
98  trackingRegions = "hiPixelPairStepTrackingRegionPhase1",
99  clusterCheck = "",
100  produceSeedingHitSets = cms.bool(True),
101 )
102 
103 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
104 hiPixelPairStepSeedsPhase1 = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
105  seedingHitSets = "hiPixelPairStepHitDoubletsPhase1",
106  SeedComparitorPSet = dict(
107  ComponentName = 'PixelClusterShapeSeedComparitor',
108  FilterAtHelixStage = cms.bool(True),
109  FilterPixelHits = cms.bool(True),
110  FilterStripHits = cms.bool(False),
111  ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
112  ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache'),
113  )
114 )
115 
116 # QUALITY CUTS DURING TRACK BUILDING
118 hiPixelPairTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
119  #maxLostHits = 0,
120  minimumNumberOfHits = 6,
121  minPt = 1.0
122  )
123 
125 hiPixelPairChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
126  ComponentName = cms.string('hiPixelPairChi2Est'),
127  nSigma = cms.double(3.0),
128  MaxChi2 = cms.double(9.0)
129  )
130 
131 # TRACK BUILDING
133 hiPixelPairTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
134  MeasurementTrackerName = '',
135  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiPixelPairTrajectoryFilter')),
136  maxCand = 3,
137  estimator = cms.string('hiPixelPairChi2Est'),
138  maxDPhiForLooperReconstruction = cms.double(2.0),
139  maxPtForLooperReconstruction = cms.double(0.7)
140  )
141 
142 # MAKING OF TRACK CANDIDATES
144 hiPixelPairTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
145  src = cms.InputTag('hiPixelPairSeeds'),
146  clustersToSkip = cms.InputTag('hiPixelPairClusters'),
147  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiPixelPairTrajectoryBuilder')),
148  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
149  numHitsForSeedCleaner = cms.int32(50),
150  onlyPixelHitsForSeedCleaner = cms.bool(True),
151 
152  )
153 trackingPhase1.toModify(hiPixelPairTrackCandidates,
154  src = cms.InputTag('hiPixelPairStepSeedsPhase1')
155 )
156 
157 
158 # TRACK FITTING
160 hiPixelPairGlobalPrimTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
161  AlgorithmName = cms.string('pixelPairStep'),
162  src = 'hiPixelPairTrackCandidates',
163  Fitter = cms.string('FlexibleKFFittingSmoother')
164  )
165 
166 
167 
168 # Final selection
170 hiPixelPairStepSelector = RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiMultiTrackSelector.clone(
171  src='hiPixelPairGlobalPrimTracks',
172  useAnyMVA = cms.bool(True),
173  GBRForestLabel = cms.string('HIMVASelectorIter6'),
174  GBRForestVars = cms.vstring(['chi2perdofperlayer', 'dxyperdxyerror', 'dzperdzerror', 'nhits', 'nlayers', 'eta']),
175  trackSelectors= cms.VPSet(
176  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
177  name = 'hiPixelPairStepLoose',
178  useMVA = cms.bool(False)
179  ), #end of pset
180  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
181  name = 'hiPixelPairStepTight',
182  preFilterName = 'hiPixelPairStepLoose',
183  useMVA = cms.bool(True),
184  minMVA = cms.double(-0.58)
185  ),
186  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
187  name = 'hiPixelPairStep',
188  preFilterName = 'hiPixelPairStepTight',
189  useMVA = cms.bool(True),
190  minMVA = cms.double(0.77)
191  ),
192  ) #end of vpset
193  ) #end of clone
194 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
195 trackingPhase1.toModify(hiPixelPairStepSelector, useAnyMVA = cms.bool(False))
196 trackingPhase1.toModify(hiPixelPairStepSelector, trackSelectors= cms.VPSet(
197  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
198  name = 'hiPixelPairStepLoose',
199  useMVA = cms.bool(False)
200  ), #end of pset
201  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
202  name = 'hiPixelPairStepTight',
203  preFilterName = 'hiPixelPairStepLoose',
204  useMVA = cms.bool(False),
205  minMVA = cms.double(-0.58)
206  ),
207  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
208  name = 'hiPixelPairStep',
209  preFilterName = 'hiPixelPairStepTight',
210  useMVA = cms.bool(False),
211  minMVA = cms.double(0.77)
212  ),
213  ) #end of vpset
214 )
215 
216 
217 
218 # Final sequence
219 hiPixelPairStep = cms.Sequence(hiPixelPairClusters*
220  hiPixelPairSeedLayers*
221  hiPixelPairSeeds*
222  hiPixelPairTrackCandidates*
223  hiPixelPairGlobalPrimTracks*
224  hiPixelPairStepSelector)
225 hiPixelPairStep_Phase1 = hiPixelPairStep.copy()
226 hiPixelPairStep_Phase1.replace(hiPixelPairSeeds,hiPixelPairStepTrackingRegionPhase1*hiPixelPairStepHitDoubletsPhase1*hiPixelPairStepSeedsPhase1)
227 trackingPhase1.toReplaceWith(hiPixelPairStep, hiPixelPairStep_Phase1)