Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-21 23:14:06

0001 import FWCore.ParameterSet.Config as cms
0002 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016 as _tracker_apv_vfp30_2016
0003 import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
0004 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0005 
0006 #for dnn classifier
0007 from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
0008 from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary
0009 
0010 # for no-loopers
0011 from Configuration.ProcessModifiers.trackingNoLoopers_cff import trackingNoLoopers
0012 
0013 # NEW CLUSTERS (remove previously used clusters)
0014 pixelPairStepClusters = _cfg.clusterRemoverForIter('PixelPairStep')
0015 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
0016     _era.toReplaceWith(pixelPairStepClusters, _cfg.clusterRemoverForIter('PixelPairStep', _eraName, _postfix))
0017 
0018 import RecoTracker.TkSeedingLayers.seedingLayersEDProducer_cfi as _mod
0019 
0020 # SEEDING LAYERS
0021 pixelPairStepSeedLayers = _mod.seedingLayersEDProducer.clone(
0022     layerList = ['BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3', 
0023                  'BPix1+FPix1_pos', 'BPix1+FPix1_neg', 
0024                  'BPix2+FPix1_pos', 'BPix2+FPix1_neg', 
0025                  'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg'],
0026     BPix = dict(
0027         TTRHBuilder = cms.string('WithTrackAngle'),
0028         HitProducer = cms.string('siPixelRecHits'),
0029         skipClusters = cms.InputTag('pixelPairStepClusters')
0030     ),
0031     FPix = dict(
0032         TTRHBuilder = cms.string('WithTrackAngle'),
0033         HitProducer = cms.string('siPixelRecHits'),
0034         skipClusters = cms.InputTag('pixelPairStepClusters')
0035     )
0036 )
0037 # layers covering the region not covered by quadruplets (so it is
0038 # just acting as backup of triplets)
0039 _layerListForPhase1 = [
0040     'BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3',
0041     'BPix1+FPix1_pos', 'BPix1+FPix1_neg',
0042     'BPix2+FPix1_pos', 'BPix2+FPix1_neg',
0043 ]
0044 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0045 trackingPhase1.toModify(pixelPairStepSeedLayers, layerList = _layerListForPhase1)
0046 
0047 # only layers covering the region not covered by quadruplets
0048 # (so it is just acting as backup of triplets)
0049 _layerListForPhase2 = [
0050         'BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3',
0051         'BPix1+FPix1_pos', 'BPix1+FPix1_neg',
0052         'BPix2+FPix1_pos', 'BPix2+FPix1_neg'
0053 ]
0054 # modifing these errors seems to make no difference
0055 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
0056 trackingPhase2PU140.toModify(pixelPairStepSeedLayers, 
0057     layerList = _layerListForPhase2,
0058     BPix = dict(
0059         useErrorsFromParam = cms.bool(True),
0060         hitErrorRPhi = cms.double(0.0016),
0061         hitErrorRZ   = cms.double(0.0035),
0062         TTRHBuilder  = 'TTRHBuilderWithoutAngle4PixelPairs',
0063     ),
0064     FPix = dict(
0065         useErrorsFromParam = cms.bool(True),
0066         hitErrorRPhi = cms.double(0.0030),
0067         hitErrorRZ   = cms.double(0.0020),
0068         TTRHBuilder  = 'TTRHBuilderWithoutAngle4PixelPairs',
0069     )
0070 )
0071 
0072 # TrackingRegion
0073 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cff import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
0074 pixelPairStepTrackingRegions = _globalTrackingRegionWithVertices.clone(
0075     RegionPSet = dict(
0076         ptMin        = 0.6,
0077         originRadius = 0.015,
0078         fixedError   = 0.03,
0079         useMultipleScattering = True)
0080 )
0081 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
0082 trackingLowPU.toModify(pixelPairStepTrackingRegions, RegionPSet=dict(useMultipleScattering=False))
0083 _region_Phase1 = dict(
0084     useMultipleScattering = False,
0085     maxNVertices = 5,
0086 )
0087 trackingPhase1.toModify(pixelPairStepTrackingRegions, RegionPSet=_region_Phase1)
0088 trackingPhase2PU140.toModify(pixelPairStepTrackingRegions, RegionPSet=_region_Phase1)
0089 from Configuration.Eras.Modifier_highBetaStar_2018_cff import highBetaStar_2018
0090 highBetaStar_2018.toModify(pixelPairStepTrackingRegions,RegionPSet = dict(
0091      ptMin        = 0.05,
0092      originRadius = 0.2,
0093      fixedError   = 4.
0094 ))
0095 fastSim.toModify(pixelPairStepTrackingRegions, RegionPSet=dict(VertexCollection = 'firstStepPrimaryVerticesBeforeMixing'))
0096 
0097 # SEEDS
0098 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
0099 pixelPairStepHitDoublets = _hitPairEDProducer.clone(
0100     seedingLayers         = 'pixelPairStepSeedLayers',
0101     trackingRegions       = 'pixelPairStepTrackingRegions',
0102     produceSeedingHitSets = True,
0103     maxElementTotal       = 12000000,
0104 )
0105 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
0106 pixelPairStepSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
0107     seedingHitSets = 'pixelPairStepHitDoublets',
0108     SeedComparitorPSet = dict(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
0109         ComponentName      = 'PixelClusterShapeSeedComparitor',
0110         FilterAtHelixStage = cms.bool(True),
0111         FilterPixelHits    = cms.bool(True),
0112         FilterStripHits    = cms.bool(False),
0113         ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
0114         ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache'),
0115     )
0116 )
0117 
0118 # Clone for the phase1 recovery mode
0119 pixelPairStepSeedsA = pixelPairStepSeeds.clone()
0120 
0121 #have to do it after making pixelPairStepSeedsA since pixelPairStepSeedsB clones A
0122 # and then modifies it
0123 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
0124 fastSim.toReplaceWith(pixelPairStepSeeds,
0125                       FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
0126         trackingRegions    = 'pixelPairStepTrackingRegions',
0127         hitMasks           = cms.InputTag('pixelPairStepMasks'),
0128         seedFinderSelector = dict(layerList = pixelPairStepSeedLayers.layerList.value())
0129         )
0130 )
0131 
0132 # Recovery for regions with 2 inactive layers
0133 from RecoTracker.TkTrackingRegions.pixelInactiveAreaTrackingRegionsAndSeedingLayers_cfi import pixelInactiveAreaTrackingRegionsAndSeedingLayers as _pixelInactiveAreaTrackingRegionsAndSeedingLayers
0134 pixelPairStepTrackingRegionsSeedLayersB = _pixelInactiveAreaTrackingRegionsAndSeedingLayers.clone(
0135     layerList = [
0136 # Commented ones are already included in the global seeds (A), but are
0137 # included below for completenees
0138 #
0139 #        'BPix1+BPix2',
0140 #        'BPix1+BPix3',
0141         'BPix1+BPix4',
0142 #        'BPix2+BPix3',
0143         'BPix2+BPix4',
0144         'BPix3+BPix4',
0145 #        'BPix1+FPix1_pos'    , 'BPix1+FPix1_neg',
0146         'BPix1+FPix2_pos'    , 'BPix1+FPix2_neg',
0147         'BPix1+FPix3_pos'    , 'BPix1+FPix3_neg',
0148 #        'BPix2+FPix1_pos'    , 'BPix2+FPix1_neg',
0149         'BPix2+FPix2_pos'    , 'BPix2+FPix2_neg',
0150         'BPix3+FPix1_pos'    , 'BPix3+FPix1_neg',
0151         'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg',
0152         'FPix1_pos+FPix3_pos', 'FPix1_neg+FPix3_neg',
0153         'FPix2_pos+FPix3_pos', 'FPix2_neg+FPix3_neg',
0154     ],
0155     BPix = dict(
0156         TTRHBuilder  = cms.string('WithTrackAngle'),
0157         HitProducer  = cms.string('siPixelRecHits'),
0158         skipClusters = cms.InputTag('pixelPairStepClusters')
0159     ),
0160     FPix = dict(
0161         TTRHBuilder  = cms.string('WithTrackAngle'),
0162         HitProducer  = cms.string('siPixelRecHits'),
0163         skipClusters = cms.InputTag('pixelPairStepClusters')
0164     ),
0165     RegionPSet = dict(
0166         ptMin         = 0.6,
0167         originRadius  = 0.015,
0168         operationMode = 'VerticesFixed',
0169         zErrorVertex  = 0.03,
0170         maxNVertices  = 5,
0171     ),
0172     ignoreSingleFPixPanelModules = True,
0173 )
0174 highBetaStar_2018.toModify(pixelPairStepTrackingRegionsSeedLayersB,RegionPSet = dict(
0175      ptMin        = 0.05,
0176      originRadius = 0.2,
0177 ))
0178 #include commented lines from above in pp_on_XY eras; global seeds (A) are not used in this era b/c timing
0179 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
0180 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0181 (pp_on_XeXe_2017 | pp_on_AA).toModify(pixelPairStepTrackingRegionsSeedLayersB, layerList = [
0182       'BPix1+BPix2', 'BPix1+BPix3', 'BPix1+BPix4', 'BPix2+BPix3', 'BPix2+BPix4','BPix3+BPix4',
0183       'BPix1+FPix1_pos'    , 'BPix1+FPix1_neg',
0184       'BPix1+FPix2_pos'    , 'BPix1+FPix2_neg',
0185       'BPix1+FPix3_pos'    , 'BPix1+FPix3_neg',
0186       'BPix2+FPix1_pos'    , 'BPix2+FPix1_neg',
0187       'BPix2+FPix2_pos'    , 'BPix2+FPix2_neg',
0188       'BPix3+FPix1_pos'    , 'BPix3+FPix1_neg',
0189       'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg',
0190       'FPix1_pos+FPix3_pos', 'FPix1_neg+FPix3_neg',
0191       'FPix2_pos+FPix3_pos', 'FPix2_neg+FPix3_neg' 
0192    ])
0193 
0194 pixelPairStepHitDoubletsB = pixelPairStepHitDoublets.clone(
0195     seedingLayers   = '',
0196     trackingRegions = '',
0197     trackingRegionsSeedingLayers = 'pixelPairStepTrackingRegionsSeedLayersB',
0198 )
0199 pixelPairStepSeedsB = pixelPairStepSeedsA.clone(seedingHitSets = 'pixelPairStepHitDoubletsB')
0200 
0201 
0202 # Merge
0203 from RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi import globalCombinedSeeds as _globalCombinedSeeds
0204 _pixelPairStepSeedsMerged = _globalCombinedSeeds.clone(
0205     seedCollections = ['pixelPairStepSeedsA', 'pixelPairStepSeedsB'],
0206 )
0207 (trackingPhase1 & ~fastSim).toReplaceWith(pixelPairStepSeeds, _pixelPairStepSeedsMerged)
0208 
0209 #only use region B for pp_on_XY era for timing reasons
0210 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(pixelPairStepSeeds, pixelPairStepSeedsB)
0211 
0212 # QUALITY CUTS DURING TRACK BUILDING
0213 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
0214 _pixelPairStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
0215     minimumNumberOfHits = 3,
0216     minPt               = 0.1,
0217 )
0218 pixelPairStepTrajectoryFilterBase = _pixelPairStepTrajectoryFilterBase.clone(
0219     seedPairPenalty = 0,
0220     maxCCCLostHits  = 0,
0221     minGoodStripCharge = dict(refToPSet_ = 'SiStripClusterChargeCutLoose')
0222 )
0223 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
0224 _tracker_apv_vfp30_2016.toModify(pixelPairStepTrajectoryFilterBase, maxCCCLostHits = 2)
0225 trackingLowPU.toReplaceWith(pixelPairStepTrajectoryFilterBase, _pixelPairStepTrajectoryFilterBase)
0226 trackingPhase1.toModify(pixelPairStepTrajectoryFilterBase, minimumNumberOfHits = 4)
0227 trackingPhase2PU140.toReplaceWith(pixelPairStepTrajectoryFilterBase, _pixelPairStepTrajectoryFilterBase.clone(
0228     minimumNumberOfHits = 4,
0229     maxLostHitsFraction = 1./10.,
0230     constantValueForLostHitsFractionFilter = 0.701,
0231 ))
0232 highBetaStar_2018.toModify(pixelPairStepTrajectoryFilterBase, minPt = 0.05)
0233 
0234 import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
0235 pixelPairStepTrajectoryFilterShape = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
0236 pixelPairStepTrajectoryFilter = cms.PSet(
0237     ComponentType = cms.string('CompositeTrajectoryFilter'),
0238     filters = cms.VPSet(
0239         cms.PSet( refToPSet_ = cms.string('pixelPairStepTrajectoryFilterBase')),
0240     #    cms.PSet( refToPSet_ = cms.string('pixelPairStepTrajectoryFilterShape'))
0241     ),
0242 )
0243 from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import *
0244 trackingPhase2PU140.toModify(pixelPairStepTrajectoryFilter,
0245     filters = pixelPairStepTrajectoryFilter.filters + [cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))]
0246 )
0247 
0248 
0249 
0250 pixelPairStepTrajectoryFilterInOut = pixelPairStepTrajectoryFilterBase.clone(
0251     minimumNumberOfHits = 4,
0252     seedExtension       = 1,
0253     strictSeedExtension = False, # allow inactive
0254     pixelSeedExtension  = False,
0255 )
0256 
0257 
0258 
0259 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
0260 pixelPairStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
0261     ComponentName    = 'pixelPairStepChi2Est',
0262     nSigma           = 3.0,
0263     MaxChi2          = 9.0,
0264     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutLoose'),
0265     pTChargeCutThreshold = 15.
0266 )
0267 _tracker_apv_vfp30_2016.toModify(pixelPairStepChi2Est,
0268     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
0269 )
0270 trackingLowPU.toModify(pixelPairStepChi2Est,
0271     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny'),
0272 )
0273 highBetaStar_2018.toModify(pixelPairStepChi2Est, MaxChi2 = 30)
0274 
0275 # TRACK BUILDING
0276 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
0277 pixelPairStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
0278     trajectoryFilter       = dict(refToPSet_ = 'pixelPairStepTrajectoryFilter'),
0279     maxCand                = 3,
0280     estimator              = 'pixelPairStepChi2Est',
0281     maxDPhiForLooperReconstruction = 2.0,
0282     maxPtForLooperReconstruction = 0.7,
0283 )
0284 trackingNoLoopers.toModify(pixelPairStepTrajectoryBuilder,
0285                            maxPtForLooperReconstruction = 0.0)
0286 trackingLowPU.toModify(pixelPairStepTrajectoryBuilder, maxCand = 2)
0287 _seedExtension = dict(
0288     inOutTrajectoryFilter = dict(refToPSet_ = 'pixelPairStepTrajectoryFilterInOut'),
0289     useSameTrajFilter     = False,
0290 )
0291 trackingPhase1.toModify(pixelPairStepTrajectoryBuilder, **_seedExtension)
0292 trackingPhase2PU140.toModify(pixelPairStepTrajectoryBuilder, **_seedExtension)
0293 
0294 
0295 
0296 
0297 # MAKING OF TRACK CANDIDATES
0298 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
0299 # Give handle for CKF for HI
0300 _pixelPairStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
0301     src = 'pixelPairStepSeeds',
0302     clustersToSkip = 'pixelPairStepClusters',
0303     TrajectoryBuilderPSet = dict(refToPSet_ = 'pixelPairStepTrajectoryBuilder'),
0304     ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
0305     numHitsForSeedCleaner = 50,
0306     onlyPixelHitsForSeedCleaner = True,
0307 )
0308 pixelPairStepTrackCandidates = _pixelPairStepTrackCandidatesCkf.clone()
0309 
0310 from Configuration.ProcessModifiers.trackingMkFitPixelPairStep_cff import trackingMkFitPixelPairStep
0311 import RecoTracker.MkFit.mkFitSeedConverter_cfi as _mkFitSeedConverter_cfi
0312 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as _mkFitIterationConfigESProducer_cfi
0313 import RecoTracker.MkFit.mkFitProducer_cfi as _mkFitProducer_cfi
0314 import RecoTracker.MkFit.mkFitOutputConverter_cfi as _mkFitOutputConverter_cfi
0315 pixelPairStepTrackCandidatesMkFitSeeds = _mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
0316     seeds = 'pixelPairStepSeeds',
0317 )
0318 pixelPairStepTrackCandidatesMkFitConfig = _mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
0319     ComponentName = 'pixelPairStepTrackCandidatesMkFitConfig',
0320     config = 'RecoTracker/MkFit/data/mkfit-phase1-pixelPairStep.json',
0321 )
0322 pixelPairStepTrackCandidatesMkFit = _mkFitProducer_cfi.mkFitProducer.clone(
0323     seeds = 'pixelPairStepTrackCandidatesMkFitSeeds',
0324     config = ('', 'pixelPairStepTrackCandidatesMkFitConfig'),
0325     clustersToSkip = 'pixelPairStepClusters',
0326 )
0327 trackingMkFitPixelPairStep.toReplaceWith(pixelPairStepTrackCandidates, _mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
0328     seeds = 'pixelPairStepSeeds',
0329     mkFitSeeds = 'pixelPairStepTrackCandidatesMkFitSeeds',
0330     tracks = 'pixelPairStepTrackCandidatesMkFit',
0331 ))
0332 
0333 trackingPhase2PU140.toModify(pixelPairStepTrackCandidates,
0334     clustersToSkip = '',
0335     phase2clustersToSkip = 'pixelPairStepClusters',
0336     TrajectoryCleaner = 'pixelPairStepTrajectoryCleanerBySharedHits'
0337 )
0338 import FastSimulation.Tracking.TrackCandidateProducer_cfi
0339 fastSim.toReplaceWith(pixelPairStepTrackCandidates,
0340                       FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
0341         src = 'pixelPairStepSeeds',
0342         MinNumberOfCrossedLayers = 2, # ?
0343         hitMasks = cms.InputTag('pixelPairStepMasks')
0344         )
0345 )
0346 
0347 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits as _trajectoryCleanerBySharedHits
0348 pixelPairStepTrajectoryCleanerBySharedHits = _trajectoryCleanerBySharedHits.clone(
0349     ComponentName       = 'pixelPairStepTrajectoryCleanerBySharedHits',
0350     fractionShared      = 0.095,
0351     allowSharedFirstHit = True
0352 )
0353 trackingPhase2PU140.toModify(pixelPairStepTrajectoryCleanerBySharedHits, fractionShared = 0.09)
0354 
0355 # TRACK FITTING
0356 import RecoTracker.TrackProducer.TrackProducer_cfi
0357 pixelPairStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
0358     AlgorithmName = 'pixelPairStep',
0359     src           = 'pixelPairStepTrackCandidates',
0360     Fitter        = 'FlexibleKFFittingSmoother'
0361 )
0362 fastSim.toModify(pixelPairStepTracks, TTRHBuilder = 'WithoutRefit')
0363 
0364 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
0365 phase2_timing_layer.toModify(pixelPairStepTracks, TrajectoryInEvent = True)
0366 
0367 # Final selection
0368 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierPrompt_cfi import *
0369 pixelPairStep =  TrackMVAClassifierPrompt.clone(
0370     src         = 'pixelPairStepTracks',
0371     mva         = dict(GBRForestLabel = 'MVASelectorIter2_13TeV'),
0372     qualityCuts = [-0.2,0.0,0.3]
0373 )
0374 trackingPhase1.toModify(pixelPairStep, mva=dict(GBRForestLabel = 'MVASelectorPixelPairStep_Phase1'))
0375 
0376 from RecoTracker.FinalTrackSelectors.trackTfClassifier_cfi import *
0377 from RecoTracker.FinalTrackSelectors.trackSelectionTf_cfi import *
0378 from RecoTracker.FinalTrackSelectors.trackSelectionTf_CKF_cfi import *
0379 trackdnn.toReplaceWith(pixelPairStep, trackTfClassifier.clone(
0380     src='pixelPairStepTracks',
0381     qualityCuts=qualityCutDictionary.PixelPairStep.value()
0382 ))
0383 
0384 highBetaStar_2018.toModify(pixelPairStep,qualityCuts = [-0.95,0.0,0.3])
0385 pp_on_AA.toModify(pixelPairStep, qualityCuts = [-0.2, 0.0, 0.98])
0386 fastSim.toModify(pixelPairStep, vertices = 'firstStepPrimaryVerticesBeforeMixing')
0387 
0388 # For LowPU and Phase2PU140
0389 import RecoTracker.IterativeTracking.LowPtTripletStep_cff
0390 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
0391 pixelPairStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
0392     src            = 'pixelPairStepTracks',
0393     useAnyMVA      = cms.bool(True),
0394     GBRForestLabel = cms.string('MVASelectorIter2'),
0395     trackSelectors = cms.VPSet(
0396         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
0397             name = 'pixelPairStepLoose',
0398         ), #end of pset
0399         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
0400             name = 'pixelPairStepTight',
0401             preFilterName = 'pixelPairStepLoose',
0402         ),
0403         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
0404             name = 'QualityMasks',
0405             preFilterName = 'pixelPairStepTight',
0406         ),
0407     ),
0408     vertices = 'pixelVertices' #end of vpset
0409 ) #end of clone
0410 trackingPhase2PU140.toModify(pixelPairStepSelector,
0411     useAnyMVA      = None,
0412     GBRForestLabel = None,
0413     trackSelectors = cms.VPSet(
0414         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
0415             name = 'pixelPairStepLoose',
0416             chi2n_par = 0.7,
0417             res_par = ( 0.003, 0.002 ),
0418             minNumberLayers = 3,
0419             maxNumberLostLayers = 2,
0420             minNumber3DLayers = 3,
0421             d0_par1 = ( 0.4, 4.0 ),
0422             dz_par1 = ( 0.4, 4.0 ),
0423             d0_par2 = ( 0.6, 4.0 ),
0424             dz_par2 = ( 0.45, 4.0 )
0425             ), #end of pset
0426         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
0427             name = 'pixelPairStepTight',
0428             preFilterName = 'pixelPairStepLoose',
0429             chi2n_par = 0.6,
0430             res_par = ( 0.003, 0.002 ),
0431             minNumberLayers = 4,
0432             maxNumberLostLayers = 2,
0433             minNumber3DLayers = 3,
0434             d0_par1 = ( 0.35, 4.0 ),
0435             dz_par1 = ( 0.35, 4.0 ),
0436             d0_par2 = ( 0.5, 4.0 ),
0437             dz_par2 = ( 0.4, 4.0 )
0438             ),
0439         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
0440             name = 'pixelPairStep',
0441             preFilterName = 'pixelPairStepTight',
0442 #            min_eta = -4.0, # useless, the eta distribution does not even reach |eta| = 3 (!)
0443 #            max_eta = 4.0,
0444             chi2n_par = 0.5,
0445             res_par = ( 0.003, 0.001 ),
0446             minNumberLayers = 5,
0447             maxNumberLostLayers = 2,
0448             minNumber3DLayers = 4,
0449             d0_par1 = ( 0.3, 4.0 ),
0450             dz_par1 = ( 0.3, 4.0 ),
0451             d0_par2 = ( 0.45, 4.0 ),
0452             dz_par2 = ( 0.35, 4.0 )
0453             ),
0454         ), #end of vpset
0455     vertices = 'firstStepPrimaryVertices'
0456 ) #end of clone
0457 
0458 from Configuration.ProcessModifiers.vectorHits_cff import vectorHits
0459 vectorHits.toModify(pixelPairStepSelector.trackSelectors[2], minNumberLayers = 3, minNumber3DLayers = 3)
0460 
0461 # Final sequence
0462 PixelPairStepTask = cms.Task(pixelPairStepClusters,
0463                          pixelPairStepSeedLayers,
0464                          pixelPairStepTrackingRegions,
0465                          pixelPairStepHitDoublets,
0466                          pixelPairStepSeeds,
0467                          pixelPairStepTrackCandidates,
0468                          pixelPairStepTracks,
0469                          pixelPairStep)
0470 PixelPairStep = cms.Sequence(PixelPairStepTask)
0471 
0472 _PixelPairStepTask_trackingMkFit = PixelPairStepTask.copy()
0473 _PixelPairStepTask_trackingMkFit.add(pixelPairStepTrackCandidatesMkFitSeeds, pixelPairStepTrackCandidatesMkFit, pixelPairStepTrackCandidatesMkFit)
0474 trackingMkFitPixelPairStep.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_trackingMkFit)
0475 
0476 _PixelPairStepTask_LowPU_Phase2PU140 = PixelPairStepTask.copy()
0477 _PixelPairStepTask_LowPU_Phase2PU140.replace(pixelPairStep, pixelPairStepSelector)
0478 trackingLowPU.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_LowPU_Phase2PU140)
0479 trackingPhase2PU140.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_LowPU_Phase2PU140)
0480 
0481 _PixelPairStepTask_Phase1 = PixelPairStepTask.copy()
0482 _PixelPairStepTask_pp_on_AA = PixelPairStepTask.copy()
0483 _PixelPairStepTask_Phase1.replace(pixelPairStepSeeds,cms.Task(
0484                               pixelPairStepSeedsA ,
0485                               pixelPairStepTrackingRegionsSeedLayersB,pixelPairStepHitDoubletsB,pixelPairStepSeedsB,
0486                               pixelPairStepSeeds))
0487 trackingPhase1.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_Phase1)
0488 
0489 _PixelPairStepTask_pp_on_AA.replace(pixelPairStepHitDoublets, cms.Task(pixelPairStepTrackingRegionsSeedLayersB,pixelPairStepHitDoubletsB))
0490 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(PixelPairStepTask, _PixelPairStepTask_pp_on_AA)
0491 
0492 #fastSim
0493 import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
0494 pixelPairStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(pixelPairStepClusters)
0495 fastSim.toReplaceWith(PixelPairStepTask,
0496                       cms.Task(pixelPairStepMasks
0497                                    ,pixelPairStepTrackingRegions
0498                                    ,pixelPairStepSeeds
0499                                    ,pixelPairStepTrackCandidates
0500                                    ,pixelPairStepTracks
0501                                    ,pixelPairStep 
0502                                    )
0503 )