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 
117 # QUALITY CUTS DURING TRACK BUILDING
119 hiPixelPairTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
120  #maxLostHits = 0,
121  minimumNumberOfHits = 6,
122  minPt = 1.0
123  )
124 
126 hiPixelPairChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
127  ComponentName = cms.string('hiPixelPairChi2Est'),
128  nSigma = cms.double(3.0),
129  MaxChi2 = cms.double(9.0)
130  )
131 
132 # TRACK BUILDING
134 hiPixelPairTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
135  MeasurementTrackerName = '',
136  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiPixelPairTrajectoryFilter')),
137  maxCand = 3,
138  estimator = cms.string('hiPixelPairChi2Est'),
139  maxDPhiForLooperReconstruction = cms.double(2.0),
140  maxPtForLooperReconstruction = cms.double(0.7)
141  )
142 
143 # MAKING OF TRACK CANDIDATES
145 hiPixelPairTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
146  src = cms.InputTag('hiPixelPairSeeds'),
147  clustersToSkip = cms.InputTag('hiPixelPairClusters'),
148  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiPixelPairTrajectoryBuilder')),
149  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
150  numHitsForSeedCleaner = cms.int32(50),
151  onlyPixelHitsForSeedCleaner = cms.bool(True),
152 
153  )
154 trackingPhase1.toModify(hiPixelPairTrackCandidates,
155  src = cms.InputTag('hiPixelPairStepSeedsPhase1')
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 
220 hiPixelPairStep = cms.Sequence(hiPixelPairClusters*
221  hiPixelPairSeedLayers*
222  hiPixelPairSeeds*
223  hiPixelPairTrackCandidates*
224  hiPixelPairGlobalPrimTracks*
225  hiPixelPairStepSelector)
226 hiPixelPairStep_Phase1 = hiPixelPairStep.copy()
227 hiPixelPairStep_Phase1.replace(hiPixelPairSeeds,hiPixelPairStepTrackingRegionPhase1*hiPixelPairStepHitDoubletsPhase1*hiPixelPairStepSeedsPhase1)
228 trackingPhase1.toReplaceWith(hiPixelPairStep, hiPixelPairStep_Phase1)