Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-22 22:55:56

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 
0005 #for fastsim
0006 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0007 from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet
0008 
0009 #for dnn classifier
0010 from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
0011 from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary
0012 
0013 # for no-loopers
0014 from Configuration.ProcessModifiers.trackingNoLoopers_cff import trackingNoLoopers
0015 
0016 ###############################################
0017 # Low pT and detached tracks from pixel triplets
0018 ###############################################
0019 
0020 # REMOVE HITS ASSIGNED TO GOOD TRACKS FROM PREVIOUS ITERATIONS
0021 detachedTripletStepClusters = _cfg.clusterRemoverForIter('DetachedTripletStep')
0022 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
0023     _era.toReplaceWith(detachedTripletStepClusters, _cfg.clusterRemoverForIter('DetachedTripletStep', _eraName, _postfix))
0024 
0025 # SEEDING LAYERS
0026 import RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi
0027 detachedTripletStepSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone(
0028     BPix = dict(skipClusters = cms.InputTag('detachedTripletStepClusters')),
0029     FPix = dict(skipClusters = cms.InputTag('detachedTripletStepClusters'))
0030 )
0031 _phase1LayerList = [
0032         'BPix1+BPix2+BPix3',
0033         'BPix2+BPix3+BPix4',
0034 #        'BPix1+BPix3+BPix4', # has 'hole', not tested
0035 #        'BPix1+BPix2+BPix4', # has 'hole', not tested
0036         'BPix2+BPix3+FPix1_pos', 'BPix2+BPix3+FPix1_neg',
0037 #        'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg', # mostly fake tracks, lots of seeds
0038 #        'BPix1+BPix3+FPix1_pos', 'BPix1+BPix3+FPix1_neg',  # has 'hole', not tested
0039         'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg',
0040 #        'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg', # mostly fake tracks, lots of seeds
0041 #        'BPix1+BPix2+FPix2_pos', 'BPix1+BPix2+FPix2_neg',  # has 'hole', not tested
0042         'FPix1_pos+FPix2_pos+FPix3_pos', 'FPix1_neg+FPix2_neg+FPix3_neg',
0043 #        'BPix1+FPix2_pos+FPix3_pos', 'BPix1+FPix2_neg+FPix3_neg',  # has 'hole', not tested
0044 #        'BPix1+FPix1_pos+FPix3_pos', 'BPix1+FPix1_neg+FPix3_neg'  # has 'hole', not tested
0045     ]
0046 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0047 trackingPhase1.toModify(detachedTripletStepSeedLayers, layerList=_phase1LayerList)
0048 
0049 # TrackingRegion
0050 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpotFixedZ_cfi import globalTrackingRegionFromBeamSpotFixedZ as _globalTrackingRegionFromBeamSpotFixedZ
0051 detachedTripletStepTrackingRegions = _globalTrackingRegionFromBeamSpotFixedZ.clone(RegionPSet = dict(
0052     ptMin            = 0.3,
0053     originHalfLength = 15.0,
0054     originRadius     = 1.5
0055 ))
0056 trackingPhase1.toModify(detachedTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.25))
0057 
0058 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
0059 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0060 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cff import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
0061 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(detachedTripletStepTrackingRegions, 
0062                 _globalTrackingRegionWithVertices.clone(RegionPSet=dict(
0063                     fixedError   = 2.5,
0064                     ptMin        = 0.9,
0065                     originRadius = 1.5)
0066                 )
0067 )
0068 from Configuration.Eras.Modifier_highBetaStar_2018_cff import highBetaStar_2018
0069 highBetaStar_2018.toModify(detachedTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.05))
0070 
0071 # seeding
0072 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
0073 detachedTripletStepHitDoublets = _hitPairEDProducer.clone(
0074     seedingLayers   = 'detachedTripletStepSeedLayers',
0075     trackingRegions = 'detachedTripletStepTrackingRegions',
0076     maxElement      = 50000000,
0077     produceIntermediateHitDoublets = True,
0078 )
0079 from RecoPixelVertexing.PixelTriplets.pixelTripletLargeTipEDProducer_cfi import pixelTripletLargeTipEDProducer as _pixelTripletLargeTipEDProducer
0080 from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import *
0081 detachedTripletStepHitTriplets = _pixelTripletLargeTipEDProducer.clone(
0082     doublets = 'detachedTripletStepHitDoublets',
0083     produceSeedingHitSets = True,
0084 )
0085 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
0086 detachedTripletStepSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(
0087     seedingHitSets = 'detachedTripletStepHitTriplets',
0088     SeedComparitorPSet = dict(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
0089         ComponentName      = 'PixelClusterShapeSeedComparitor',
0090         FilterAtHelixStage = cms.bool(False),
0091         FilterPixelHits    = cms.bool(True),
0092         FilterStripHits    = cms.bool(False),
0093         ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
0094         ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache')
0095     ),
0096 )
0097 
0098 from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer
0099 trackingPhase1.toModify(detachedTripletStepHitDoublets, layerPairs = [0,1]) # layer pairs (0,1), (1,2)
0100 trackingPhase1.toReplaceWith(detachedTripletStepHitTriplets, _caHitTripletEDProducer.clone(
0101     doublets = 'detachedTripletStepHitDoublets',
0102     extraHitRPhitolerance = detachedTripletStepHitTriplets.extraHitRPhitolerance,
0103     maxChi2 = dict(
0104         pt1    = 0.8, pt2    = 2,
0105         value1 = 300, value2 = 10,
0106     ),
0107     useBendingCorrection = True,
0108     CAThetaCut           = 0.001,
0109     CAPhiCut             = 0,
0110     CAHardPtCut          = 0.2,
0111 ))
0112 highBetaStar_2018.toModify(detachedTripletStepHitTriplets,CAThetaCut = 0.002,CAPhiCut = 0.1,CAHardPtCut = 0)
0113 
0114 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
0115 _fastSim_detachedTripletStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
0116     trackingRegions = 'detachedTripletStepTrackingRegions',
0117     hitMasks        = cms.InputTag('detachedTripletStepMasks'),
0118     seedFinderSelector = dict( pixelTripletGeneratorFactory = _hitSetProducerToFactoryPSet(detachedTripletStepHitTriplets),
0119                                layerList = detachedTripletStepSeedLayers.layerList.value())
0120 )#new for phase1
0121 trackingPhase1.toModify(_fastSim_detachedTripletStepSeeds, seedFinderSelector = dict(
0122         pixelTripletGeneratorFactory = None,
0123         CAHitTripletGeneratorFactory = _hitSetProducerToFactoryPSet(detachedTripletStepHitTriplets),
0124         #new parameters required for phase1 seeding
0125         BPix = dict(
0126             TTRHBuilder = 'WithoutRefit',
0127             HitProducer = 'TrackingRecHitProducer',
0128             ),
0129         FPix = dict(
0130             TTRHBuilder = 'WithoutRefit',
0131             HitProducer = 'TrackingRecHitProducer',
0132             ),
0133         layerPairs = detachedTripletStepHitDoublets.layerPairs.value()
0134         )
0135 )
0136 fastSim.toReplaceWith(detachedTripletStepSeeds,_fastSim_detachedTripletStepSeeds)
0137 
0138 # QUALITY CUTS DURING TRACK BUILDING
0139 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
0140 _detachedTripletStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
0141 #    maxLostHitsFraction = cms.double(1./10.),
0142 #    constantValueForLostHitsFractionFilter = cms.double(0.701),
0143     minimumNumberOfHits = 3,
0144     minPt               = 0.075,
0145 )
0146 detachedTripletStepTrajectoryFilterBase = _detachedTripletStepTrajectoryFilterBase.clone(
0147     maxCCCLostHits = 0,
0148     minGoodStripCharge = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose'))
0149 )
0150 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
0151 _tracker_apv_vfp30_2016.toModify(detachedTripletStepTrajectoryFilterBase, maxCCCLostHits = 2)
0152 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
0153 trackingLowPU.toReplaceWith(detachedTripletStepTrajectoryFilterBase, _detachedTripletStepTrajectoryFilterBase.clone(
0154     maxLostHitsFraction = 1./10.,
0155     constantValueForLostHitsFractionFilter = 0.701,
0156 ))
0157 
0158 (pp_on_XeXe_2017 | pp_on_AA).toModify(detachedTripletStepTrajectoryFilterBase, minPt=0.9)
0159 
0160 import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
0161 detachedTripletStepTrajectoryFilterShape = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
0162 detachedTripletStepTrajectoryFilter = cms.PSet(
0163     ComponentType = cms.string('CompositeTrajectoryFilter'),
0164     filters = cms.VPSet(
0165         cms.PSet( refToPSet_ = cms.string('detachedTripletStepTrajectoryFilterBase')),
0166 #        cms.PSet( refToPSet_ = cms.string('detachedTripletStepTrajectoryFilterShape'))
0167     ),
0168 )
0169 
0170 
0171 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
0172 detachedTripletStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
0173     ComponentName = 'detachedTripletStepChi2Est',
0174     nSigma        = 3.0,
0175     MaxChi2       = 9.0,
0176     clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0177 )
0178 _tracker_apv_vfp30_2016.toModify(detachedTripletStepChi2Est,
0179     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
0180 )
0181 
0182 # TRACK BUILDING
0183 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
0184 detachedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
0185     trajectoryFilter = dict(refToPSet_ = 'detachedTripletStepTrajectoryFilter'),
0186     maxCand = 3,
0187     alwaysUseInvalidHits = True,
0188     estimator = 'detachedTripletStepChi2Est',
0189     maxDPhiForLooperReconstruction = 2.0,
0190     maxPtForLooperReconstruction = 0.7,
0191 )
0192 trackingNoLoopers.toModify(detachedTripletStepTrajectoryBuilder,
0193                            maxPtForLooperReconstruction = 0.0)
0194 trackingLowPU.toModify(detachedTripletStepTrajectoryBuilder,
0195     maxCand = 2,
0196     alwaysUseInvalidHits = False,
0197 )
0198 
0199 # MAKING OF TRACK CANDIDATES
0200 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
0201 # Give handle for CKF for HI
0202 _detachedTripletStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
0203     src = 'detachedTripletStepSeeds',
0204     clustersToSkip = 'detachedTripletStepClusters',
0205     ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
0206     numHitsForSeedCleaner = 50,
0207     onlyPixelHitsForSeedCleaner = True,
0208     TrajectoryBuilderPSet = dict(refToPSet_ = 'detachedTripletStepTrajectoryBuilder'),
0209     doSeedingRegionRebuilding = True,
0210     useHitsSplitting = True
0211 )
0212 detachedTripletStepTrackCandidates = _detachedTripletStepTrackCandidatesCkf.clone()
0213 
0214 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
0215 detachedTripletStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
0216     ComponentName       = 'detachedTripletStepTrajectoryCleanerBySharedHits',
0217     fractionShared      = 0.13,
0218     allowSharedFirstHit = True
0219 )
0220 detachedTripletStepTrackCandidates.TrajectoryCleaner = 'detachedTripletStepTrajectoryCleanerBySharedHits'
0221 trackingLowPU.toModify(detachedTripletStepTrajectoryCleanerBySharedHits, fractionShared = 0.19)
0222 
0223 from Configuration.ProcessModifiers.trackingMkFitDetachedTripletStep_cff import trackingMkFitDetachedTripletStep
0224 import RecoTracker.MkFit.mkFitSeedConverter_cfi as mkFitSeedConverter_cfi
0225 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as mkFitIterationConfigESProducer_cfi
0226 import RecoTracker.MkFit.mkFitProducer_cfi as mkFitProducer_cfi
0227 import RecoTracker.MkFit.mkFitOutputConverter_cfi as mkFitOutputConverter_cfi
0228 detachedTripletStepTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
0229     seeds = 'detachedTripletStepSeeds',
0230 )
0231 detachedTripletStepTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
0232     ComponentName = 'detachedTripletStepTrackCandidatesMkFitConfig',
0233     config = 'RecoTracker/MkFit/data/mkfit-phase1-detachedTripletStep.json',
0234 )
0235 detachedTripletStepTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone(
0236     seeds = 'detachedTripletStepTrackCandidatesMkFitSeeds',
0237     config = ('', 'detachedTripletStepTrackCandidatesMkFitConfig'),
0238     clustersToSkip = 'detachedTripletStepClusters',
0239 )
0240 trackingMkFitDetachedTripletStep.toReplaceWith(detachedTripletStepTrackCandidates, mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
0241     seeds = 'detachedTripletStepSeeds',
0242     mkFitSeeds = 'detachedTripletStepTrackCandidatesMkFitSeeds',
0243     tracks = 'detachedTripletStepTrackCandidatesMkFit',
0244 ))
0245 (pp_on_XeXe_2017 | pp_on_AA).toModify(detachedTripletStepTrackCandidatesMkFitConfig, minPt=0.9)
0246 
0247 import FastSimulation.Tracking.TrackCandidateProducer_cfi
0248 _fastSim_detachedTripletStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
0249     src = 'detachedTripletStepSeeds',
0250     MinNumberOfCrossedLayers = 3,
0251     hitMasks = cms.InputTag('detachedTripletStepMasks')
0252 )
0253 fastSim.toReplaceWith(detachedTripletStepTrackCandidates,_fastSim_detachedTripletStepTrackCandidates)
0254 
0255 
0256 # TRACK FITTING
0257 import RecoTracker.TrackProducer.TrackProducer_cfi
0258 detachedTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
0259     AlgorithmName = 'detachedTripletStep',
0260     src           = 'detachedTripletStepTrackCandidates',
0261     Fitter        = 'FlexibleKFFittingSmoother'
0262 )
0263 fastSim.toModify(detachedTripletStepTracks,TTRHBuilder = 'WithoutRefit')
0264 
0265 # TRACK SELECTION AND QUALITY FLAG SETTING.
0266 
0267 
0268 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierPrompt_cfi import *
0269 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierDetached_cfi import *
0270 detachedTripletStepClassifier1 = TrackMVAClassifierDetached.clone(
0271     src = 'detachedTripletStepTracks',
0272     mva = dict(GBRForestLabel = 'MVASelectorIter3_13TeV'),
0273     qualityCuts = [-0.5,0.0,0.5]
0274 )
0275 fastSim.toModify(detachedTripletStepClassifier1,vertices = 'firstStepPrimaryVerticesBeforeMixing')
0276 
0277 detachedTripletStepClassifier2 = TrackMVAClassifierPrompt.clone(
0278     src = 'detachedTripletStepTracks',
0279     mva = dict(GBRForestLabel = 'MVASelectorIter0_13TeV'),
0280     qualityCuts = [-0.2,0.0,0.4]
0281 )
0282 fastSim.toModify(detachedTripletStepClassifier2,vertices = 'firstStepPrimaryVerticesBeforeMixing')
0283 
0284 from RecoTracker.FinalTrackSelectors.ClassifierMerger_cfi import *
0285 detachedTripletStep = ClassifierMerger.clone(
0286     inputClassifiers=['detachedTripletStepClassifier1','detachedTripletStepClassifier2']
0287 )
0288 trackingPhase1.toReplaceWith(detachedTripletStep, detachedTripletStepClassifier1.clone(
0289     mva = dict(GBRForestLabel = 'MVASelectorDetachedTripletStep_Phase1'),
0290     qualityCuts = [-0.2,0.3,0.8]
0291 ))
0292 
0293 from RecoTracker.FinalTrackSelectors.trackTfClassifier_cfi import *
0294 from RecoTracker.FinalTrackSelectors.trackSelectionTf_cfi import *
0295 from RecoTracker.FinalTrackSelectors.trackSelectionTf_CKF_cfi import *
0296 trackdnn.toReplaceWith(detachedTripletStep, trackTfClassifier.clone(
0297      src = 'detachedTripletStepTracks',
0298      qualityCuts = qualityCutDictionary.DetachedTripletStep.value()
0299 ))
0300 (trackdnn & fastSim).toModify(detachedTripletStep,vertices = 'firstStepPrimaryVerticesBeforeMixing')
0301 
0302 highBetaStar_2018.toModify(detachedTripletStep,qualityCuts = [-0.5,0.0,0.5])
0303 pp_on_AA.toModify(detachedTripletStep, 
0304         mva = dict(GBRForestLabel = 'HIMVASelectorDetachedTripletStep_Phase1'),
0305         qualityCuts = [-0.2, 0.4, 0.85],
0306 )
0307 
0308 # For LowPU
0309 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
0310 detachedTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
0311     src = 'detachedTripletStepTracks',
0312     useAnyMVA = cms.bool(False),
0313     GBRForestLabel = cms.string('MVASelectorIter3'),
0314     trackSelectors = [
0315         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
0316             name = 'detachedTripletStepVtxLoose',
0317             chi2n_par = 1.6,
0318             res_par = ( 0.003, 0.001 ),
0319             minNumberLayers = 3,
0320             d0_par1 = ( 1.2, 3.0 ),
0321             dz_par1 = ( 1.2, 3.0 ),
0322             d0_par2 = ( 1.3, 3.0 ),
0323             dz_par2 = ( 1.3, 3.0 )
0324         ),
0325         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
0326             name = 'detachedTripletStepTrkLoose',
0327             chi2n_par = 0.7,
0328             res_par = ( 0.003, 0.001 ),
0329             minNumberLayers = 3,
0330             d0_par1 = ( 1.6, 4.0 ),
0331             dz_par1 = ( 1.6, 4.0 ),
0332             d0_par2 = ( 1.6, 4.0 ),
0333             dz_par2 = ( 1.6, 4.0 )
0334         ),
0335         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
0336             name = 'detachedTripletStepVtxTight',
0337             preFilterName = 'detachedTripletStepVtxLoose',
0338             chi2n_par = 0.7,
0339             res_par = ( 0.003, 0.001 ),
0340             minNumberLayers = 3,
0341             maxNumberLostLayers = 1,
0342             minNumber3DLayers = 3,
0343             d0_par1 = ( 0.95, 3.0 ),
0344             dz_par1 = ( 0.9, 3.0 ),
0345             d0_par2 = ( 1.0, 3.0 ),
0346             dz_par2 = ( 1.0, 3.0 )
0347         ),
0348         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
0349             name = 'detachedTripletStepTrkTight',
0350             preFilterName = 'detachedTripletStepTrkLoose',
0351             chi2n_par = 0.5,
0352             res_par = ( 0.003, 0.001 ),
0353             minNumberLayers = 5,
0354             maxNumberLostLayers = 1,
0355             minNumber3DLayers = 3,
0356             d0_par1 = ( 1.1, 4.0 ),
0357             dz_par1 = ( 1.1, 4.0 ),
0358             d0_par2 = ( 1.1, 4.0 ),
0359             dz_par2 = ( 1.1, 4.0 )
0360         ),
0361         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
0362             name = 'detachedTripletStepVtx',
0363             preFilterName = 'detachedTripletStepVtxTight',
0364             chi2n_par = 0.7,
0365             res_par = ( 0.003, 0.001 ),
0366             minNumberLayers = 3,
0367             maxNumberLostLayers = 1,
0368             minNumber3DLayers = 3,
0369             d0_par1 = ( 0.85, 3.0 ),
0370             dz_par1 = ( 0.8, 3.0 ),
0371             d0_par2 = ( 0.9, 3.0 ),
0372             dz_par2 = ( 0.9, 3.0 )
0373         ),
0374         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
0375             name = 'detachedTripletStepTrk',
0376             preFilterName = 'detachedTripletStepTrkTight',
0377             chi2n_par = 0.4,
0378             res_par = ( 0.003, 0.001 ),
0379             minNumberLayers = 5,
0380             maxNumberLostLayers = 1,
0381             minNumber3DLayers = 4,
0382             d0_par1 = ( 1.0, 4.0 ),
0383             dz_par1 = ( 1.0, 4.0 ),
0384             d0_par2 = ( 1.0, 4.0 ),
0385             dz_par2 = ( 1.0, 4.0 )
0386         )
0387     ] #end of vpset
0388 ) #end of clone
0389 
0390 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi import trackAlgoPriorityOrder
0391 import RecoTracker.FinalTrackSelectors.trackListMerger_cfi
0392 trackingLowPU.toReplaceWith(detachedTripletStep, RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
0393     TrackProducers     = ['detachedTripletStepTracks',
0394                           'detachedTripletStepTracks'],
0395     hasSelector        = [1,1],
0396     selectedTrackQuals = ['detachedTripletStepSelector:detachedTripletStepVtx',
0397                           'detachedTripletStepSelector:detachedTripletStepTrk'],
0398     setsToMerge        = [cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(True) )],
0399     writeOnlyTrkQuals  = True
0400 ))
0401 
0402 DetachedTripletStepTask = cms.Task(detachedTripletStepClusters,
0403                                    detachedTripletStepSeedLayers,
0404                                    detachedTripletStepTrackingRegions,
0405                                    detachedTripletStepHitDoublets,
0406                                    detachedTripletStepHitTriplets,
0407                                    detachedTripletStepSeeds,
0408                                    detachedTripletStepTrackCandidates,
0409                                    detachedTripletStepTracks,
0410                                    detachedTripletStepClassifier1,detachedTripletStepClassifier2,
0411                                    detachedTripletStep)
0412 DetachedTripletStep = cms.Sequence(DetachedTripletStepTask)
0413 
0414 _DetachedTripletStepTask_trackingMkFit = DetachedTripletStepTask.copy()
0415 _DetachedTripletStepTask_trackingMkFit.add(detachedTripletStepTrackCandidatesMkFitSeeds, detachedTripletStepTrackCandidatesMkFit, detachedTripletStepTrackCandidatesMkFitConfig)
0416 trackingMkFitDetachedTripletStep.toReplaceWith(DetachedTripletStepTask, _DetachedTripletStepTask_trackingMkFit)
0417 
0418 _DetachedTripletStepTask_LowPU = DetachedTripletStepTask.copyAndExclude([detachedTripletStepClassifier2])
0419 _DetachedTripletStepTask_LowPU.replace(detachedTripletStepClassifier1, detachedTripletStepSelector)
0420 trackingLowPU.toReplaceWith(DetachedTripletStepTask, _DetachedTripletStepTask_LowPU)
0421 
0422 # fast tracking mask producer
0423 from FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi import maskProducerFromClusterRemover
0424 detachedTripletStepMasks = maskProducerFromClusterRemover(detachedTripletStepClusters)
0425 fastSim.toReplaceWith(DetachedTripletStepTask,
0426                       cms.Task(detachedTripletStepMasks
0427                                    ,detachedTripletStepTrackingRegions
0428                                    ,detachedTripletStepSeeds
0429                                    ,detachedTripletStepTrackCandidates
0430                                    ,detachedTripletStepTracks
0431                                    ,detachedTripletStepClassifier1,detachedTripletStepClassifier2
0432                                    ,detachedTripletStep
0433                                    ) )