CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  MeasurementTrackerName = '',
141  trajectoryFilter = dict(refToPSet_ = 'hiPixelPairTrajectoryFilter'),
142  maxCand = 3,
143  estimator = 'hiPixelPairChi2Est',
144  maxDPhiForLooperReconstruction = cms.double(2.0),
145  maxPtForLooperReconstruction = cms.double(0.7)
146 )
147 
148 # MAKING OF TRACK CANDIDATES
150 hiPixelPairTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
151  src = 'hiPixelPairSeeds',
152  clustersToSkip = cms.InputTag('hiPixelPairClusters'),
153  TrajectoryBuilderPSet = dict(refToPSet_ = 'hiPixelPairTrajectoryBuilder'),
154  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
155  numHitsForSeedCleaner = cms.int32(50),
156  onlyPixelHitsForSeedCleaner = cms.bool(True),
157 )
158 trackingPhase1.toModify(hiPixelPairTrackCandidates,
159  src = 'hiPixelPairStepSeedsPhase1'
160 )
161 
162 # TRACK FITTING
164 hiPixelPairGlobalPrimTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
165  AlgorithmName = 'pixelPairStep',
166  src = 'hiPixelPairTrackCandidates',
167  Fitter = 'FlexibleKFFittingSmoother'
168 )
169 
170 
171 
172 
173 # Final selection
175 hiPixelPairStepSelector = RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiMultiTrackSelector.clone(
176  src = 'hiPixelPairGlobalPrimTracks',
177  useAnyMVA = True,
178  GBRForestLabel = 'HIMVASelectorIter6',
179  GBRForestVars = ['chi2perdofperlayer', 'dxyperdxyerror', 'dzperdzerror', 'nhits', 'nlayers', 'eta'],
180  trackSelectors= cms.VPSet(
181  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
182  name = 'hiPixelPairStepLoose',
183  useMVA = False
184  ), #end of pset
185  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
186  name = 'hiPixelPairStepTight',
187  preFilterName = 'hiPixelPairStepLoose',
188  useMVA = True,
189  minMVA = -0.58
190  ),
191  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
192  name = 'hiPixelPairStep',
193  preFilterName = 'hiPixelPairStepTight',
194  useMVA = True,
195  minMVA = 0.77
196  ),
197  ) #end of vpset
198 ) #end of clone
199 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
200 trackingPhase1.toModify(hiPixelPairStepSelector,
201  useAnyMVA = False,
202  trackSelectors= cms.VPSet(
203  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
204  name = 'hiPixelPairStepLoose',
205  useMVA = False
206  ), #end of pset
207  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
208  name = 'hiPixelPairStepTight',
209  preFilterName = 'hiPixelPairStepLoose',
210  useMVA = False,
211  minMVA = -0.58
212  ),
213  RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
214  name = 'hiPixelPairStep',
215  preFilterName = 'hiPixelPairStepTight',
216  useMVA = False,
217  minMVA = 0.77
218  ),
219  ) #end of vpset
220 )
221 
222 # Final sequence
223 hiPixelPairStepTask = cms.Task(hiPixelPairClusters,
224  hiPixelPairSeedLayers,
225  hiPixelPairSeeds,
226  hiPixelPairTrackCandidates,
227  hiPixelPairGlobalPrimTracks,
228  hiPixelPairStepSelector)
229 hiPixelPairStep = cms.Sequence(hiPixelPairStepTask)
230 hiPixelPairStep_Phase1 = hiPixelPairStepTask.copy()
231 hiPixelPairStep_Phase1.replace(hiPixelPairSeeds, cms.Task(hiPixelPairStepTrackingRegionPhase1,hiPixelPairStepHitDoubletsPhase1,hiPixelPairStepSeedsPhase1) )
232 trackingPhase1.toReplaceWith(hiPixelPairStepTask, hiPixelPairStep_Phase1)