Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:02:25

0001 import FWCore.ParameterSet.Config as cms
0002 import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
0003 
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 # for parabolic magnetic field
0014 from Configuration.ProcessModifiers.trackingParabolicMf_cff import trackingParabolicMf
0015 
0016 ###############################################################
0017 # Large impact parameter Tracking using mixed-triplet seeding #
0018 ###############################################################
0019 
0020 #here just for backward compatibility
0021 chargeCut2069Clusters =  cms.EDProducer('ClusterChargeMasker',
0022     oldClusterRemovalInfo = cms.InputTag(''), # to be set below
0023     pixelClusters = cms.InputTag('siPixelClusters'),
0024     stripClusters = cms.InputTag('siStripClusters'),
0025     clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
0026 )
0027 
0028 mixedTripletStepClusters = _cfg.clusterRemoverForIter('MixedTripletStep')
0029 chargeCut2069Clusters.oldClusterRemovalInfo = mixedTripletStepClusters.oldClusterRemovalInfo.value()
0030 mixedTripletStepClusters.oldClusterRemovalInfo = 'chargeCut2069Clusters'
0031 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
0032     _era.toReplaceWith(mixedTripletStepClusters, _cfg.clusterRemoverForIter('MixedTripletStep', _eraName, _postfix))
0033 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0034 trackingPhase1.toModify(chargeCut2069Clusters, oldClusterRemovalInfo = mixedTripletStepClusters.oldClusterRemovalInfo.value())
0035 trackingPhase1.toModify(mixedTripletStepClusters, oldClusterRemovalInfo='chargeCut2069Clusters')
0036 
0037 # SEEDING LAYERS
0038 from RecoLocalTracker.SiStripClusterizer.SiStripClusterChargeCut_cfi import *
0039 from RecoTracker.IterativeTracking.DetachedTripletStep_cff import detachedTripletStepSeedLayers
0040 import RecoTracker.TkSeedingLayers.seedingLayersEDProducer_cfi as _mod
0041 mixedTripletStepSeedLayersA = _mod.seedingLayersEDProducer.clone(
0042      layerList = ['BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg'],
0043 #    layerList = ['BPix1+BPix2+BPix3', 
0044 #        'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg', 
0045 #        'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg', 
0046 #        'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg'],
0047     BPix = dict(
0048         TTRHBuilder = cms.string('WithTrackAngle'),
0049         HitProducer = cms.string('siPixelRecHits'),
0050         skipClusters = cms.InputTag('mixedTripletStepClusters')
0051     ),
0052     FPix = dict(
0053         TTRHBuilder = cms.string('WithTrackAngle'),
0054         HitProducer = cms.string('siPixelRecHits'),
0055         skipClusters = cms.InputTag('mixedTripletStepClusters')
0056     ),
0057     TEC = dict(
0058         matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
0059         useRingSlector = cms.bool(True),
0060         TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0061         minRing = cms.int32(1),
0062         maxRing = cms.int32(1),
0063         skipClusters = cms.InputTag('mixedTripletStepClusters')
0064     )
0065 )
0066 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
0067 trackingLowPU.toModify(mixedTripletStepSeedLayersA,
0068     layerList = [
0069         'BPix1+BPix2+BPix3',
0070         'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
0071         'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg',
0072         'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg',
0073         'FPix1_pos+FPix2_pos+TEC1_pos', 'FPix1_neg+FPix2_neg+TEC1_neg',
0074         'FPix2_pos+TEC2_pos+TEC3_pos', 'FPix2_neg+TEC2_neg+TEC3_neg'
0075     ],
0076     TEC = dict(clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')),
0077 )
0078 from Configuration.Eras.Modifier_highBetaStar_2018_cff import highBetaStar_2018
0079 highBetaStar_2018.toModify(mixedTripletStepSeedLayersA,
0080     layerList = [
0081         'BPix1+BPix2+BPix3',
0082         'BPix1+FPix1_pos+FPix2_pos','BPix1+FPix1_neg+FPix2_neg',
0083         'BPix2+FPix1_pos+FPix2_pos','BPix2+FPix1_neg+FPix2_neg',
0084         'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
0085         'BPix1+BPix2+FPix2_pos', 'BPix1+BPix2+FPix2_neg'
0086     ]
0087 )
0088 
0089 
0090 # TrackingRegion
0091 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpotFixedZ_cfi import globalTrackingRegionFromBeamSpotFixedZ as _globalTrackingRegionFromBeamSpotFixedZ
0092 _mixedTripletStepTrackingRegionsCommon = _globalTrackingRegionFromBeamSpotFixedZ.clone(RegionPSet = dict(
0093     ptMin            = 0.4,
0094     originHalfLength = 15.0,
0095     originRadius     = 1.5
0096 ))
0097 trackingLowPU.toModify(_mixedTripletStepTrackingRegionsCommon, RegionPSet = dict(originHalfLength = 10.0))
0098 highBetaStar_2018.toModify(_mixedTripletStepTrackingRegionsCommon,RegionPSet = dict(
0099      ptMin        = 0.05,
0100      originRadius = 0.2
0101 ))
0102 
0103 mixedTripletStepTrackingRegionsA = _mixedTripletStepTrackingRegionsCommon.clone()
0104 
0105 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
0106 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0107 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cff import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
0108 _mixedTripletStepTrackingRegionsCommon_pp_on_HI = _globalTrackingRegionWithVertices.clone(
0109                 RegionPSet=dict(
0110                     fixedError             = 3.75,
0111                     ptMin                  = 0.4,
0112                     originRadius           = 1.5,
0113                     originRScaling4BigEvts = True,
0114                     ptMinScaling4BigEvts   = True,
0115                     minOriginR             = 0.,
0116                     maxPtMin               = 0.7,
0117                     scalingStartNPix       = 20000,
0118                     scalingEndNPix         = 35000
0119                 )
0120 )
0121 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(mixedTripletStepTrackingRegionsA,_mixedTripletStepTrackingRegionsCommon_pp_on_HI)
0122 
0123 
0124 # seeding
0125 from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer
0126 mixedTripletStepClusterShapeHitFilter  = _ClusterShapeHitFilterESProducer.clone(
0127     ComponentName    = 'mixedTripletStepClusterShapeHitFilter',
0128     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTight')
0129 )
0130 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
0131 mixedTripletStepHitDoubletsA = _hitPairEDProducer.clone(
0132     seedingLayers   = 'mixedTripletStepSeedLayersA',
0133     trackingRegions = 'mixedTripletStepTrackingRegionsA',
0134     maxElement      = 50000000,
0135     produceIntermediateHitDoublets = True,
0136 )
0137 from RecoTracker.PixelSeeding.pixelTripletLargeTipEDProducer_cfi import pixelTripletLargeTipEDProducer as _pixelTripletLargeTipEDProducer
0138 from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import *
0139 mixedTripletStepHitTripletsA = _pixelTripletLargeTipEDProducer.clone(
0140     doublets              = 'mixedTripletStepHitDoubletsA',
0141     produceSeedingHitSets = True,
0142 )
0143 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
0144 _mixedTripletStepSeedsACommon = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(
0145     seedingHitSets     = 'mixedTripletStepHitTripletsA',
0146     SeedComparitorPSet = dict(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
0147         ComponentName = 'PixelClusterShapeSeedComparitor',
0148         FilterAtHelixStage = cms.bool(False),
0149         FilterPixelHits = cms.bool(True),
0150         FilterStripHits = cms.bool(True),
0151         ClusterShapeHitFilterName = cms.string('mixedTripletStepClusterShapeHitFilter'),
0152         ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache')
0153     ),
0154 )
0155 trackingLowPU.toModify(_mixedTripletStepSeedsACommon,
0156     SeedComparitorPSet = dict(ClusterShapeHitFilterName = 'ClusterShapeHitFilter')
0157 )
0158 mixedTripletStepSeedsA = _mixedTripletStepSeedsACommon.clone()
0159 
0160 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
0161 from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet
0162 _fastSim_mixedTripletStepSeedsA = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
0163     trackingRegions = 'mixedTripletStepTrackingRegionsA',
0164     hitMasks        = cms.InputTag('mixedTripletStepMasks'),
0165     seedFinderSelector = dict(pixelTripletGeneratorFactory = _hitSetProducerToFactoryPSet(mixedTripletStepHitTripletsA),
0166                               layerList = mixedTripletStepSeedLayersA.layerList.value())
0167 )
0168 fastSim.toReplaceWith(mixedTripletStepSeedsA,_fastSim_mixedTripletStepSeedsA)
0169 
0170 # SEEDING LAYERS
0171 mixedTripletStepSeedLayersB = _mod.seedingLayersEDProducer.clone(
0172     layerList = ['BPix2+BPix3+TIB1'],
0173     BPix = dict(
0174         TTRHBuilder = cms.string('WithTrackAngle'),
0175         HitProducer = cms.string('siPixelRecHits'),
0176         skipClusters = cms.InputTag('mixedTripletStepClusters')
0177     ),
0178     TIB = dict(
0179         matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
0180         TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0181         skipClusters = cms.InputTag('mixedTripletStepClusters')
0182     )
0183 )
0184 trackingLowPU.toModify(mixedTripletStepSeedLayersB,
0185     layerList = ['BPix2+BPix3+TIB1', 'BPix2+BPix3+TIB2'],
0186     TIB = dict(clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')),
0187 )
0188 trackingPhase1.toModify(mixedTripletStepSeedLayersB, layerList = ['BPix3+BPix4+TIB1'])
0189 
0190 # TrackingRegion
0191 mixedTripletStepTrackingRegionsB = _mixedTripletStepTrackingRegionsCommon.clone(RegionPSet = dict(ptMin=0.6, originHalfLength=10.0))
0192 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(mixedTripletStepTrackingRegionsB, 
0193                 _mixedTripletStepTrackingRegionsCommon_pp_on_HI.clone(RegionPSet=dict(
0194                     fixedError = 2.5,
0195                     ptMin      = 0.6,)
0196                 )
0197 )
0198 highBetaStar_2018.toReplaceWith(mixedTripletStepTrackingRegionsB, _mixedTripletStepTrackingRegionsCommon.clone())
0199 
0200 # seeding
0201 mixedTripletStepHitDoubletsB = mixedTripletStepHitDoubletsA.clone(
0202     seedingLayers   = 'mixedTripletStepSeedLayersB',
0203     trackingRegions = 'mixedTripletStepTrackingRegionsB',
0204 )
0205 mixedTripletStepHitTripletsB = mixedTripletStepHitTripletsA.clone(doublets = 'mixedTripletStepHitDoubletsB')
0206 mixedTripletStepSeedsB = _mixedTripletStepSeedsACommon.clone(seedingHitSets = 'mixedTripletStepHitTripletsB')
0207 #fastsim
0208 _fastSim_mixedTripletStepSeedsB = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
0209     trackingRegions = 'mixedTripletStepTrackingRegionsB',
0210     hitMasks        = cms.InputTag('mixedTripletStepMasks'),
0211     seedFinderSelector = dict(pixelTripletGeneratorFactory = _hitSetProducerToFactoryPSet(mixedTripletStepHitTripletsB),
0212                               layerList = mixedTripletStepSeedLayersB.layerList.value())
0213 )
0214 fastSim.toReplaceWith(mixedTripletStepSeedsB,_fastSim_mixedTripletStepSeedsB)
0215 
0216 
0217 import RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi
0218 mixedTripletStepSeeds = RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi.globalCombinedSeeds.clone(
0219     seedCollections = ['mixedTripletStepSeedsA',
0220                        'mixedTripletStepSeedsB']
0221 )
0222 # QUALITY CUTS DURING TRACK BUILDING
0223 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
0224 _mixedTripletStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
0225 #    maxLostHits = 0,
0226     minimumNumberOfHits = 3,
0227     minPt               = 0.1
0228 )
0229 highBetaStar_2018.toModify(_mixedTripletStepTrajectoryFilterBase,minPt = 0.05)
0230 
0231 mixedTripletStepTrajectoryFilter = _mixedTripletStepTrajectoryFilterBase.clone(
0232     constantValueForLostHitsFractionFilter = 1.4,
0233 )
0234 trackingLowPU.toReplaceWith(mixedTripletStepTrajectoryFilter, _mixedTripletStepTrajectoryFilterBase.clone(
0235     maxLostHits = 0,
0236 ))
0237 
0238 (pp_on_XeXe_2017 | pp_on_AA).toModify(mixedTripletStepTrajectoryFilter, minPt=0.4)
0239 
0240 # Propagator taking into account momentum uncertainty in multiple scattering calculation.
0241 import TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff
0242 import TrackingTools.MaterialEffects.MaterialPropagator_cfi
0243 mixedTripletStepPropagator = TrackingTools.MaterialEffects.MaterialPropagator_cfi.MaterialPropagator.clone(
0244 #mixedTripletStepPropagator = TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff.MaterialPropagatorParabolicMF.clone(
0245     ComponentName = 'mixedTripletStepPropagator',
0246     ptMin         = 0.1
0247 )
0248 trackingParabolicMf.toModify(mixedTripletStepPropagator, SimpleMagneticField = 'ParabolicMf')
0249 for e in [pp_on_XeXe_2017, pp_on_AA]:
0250     e.toModify(mixedTripletStepPropagator, ptMin=0.4)
0251 highBetaStar_2018.toModify(mixedTripletStepPropagator,ptMin = 0.05)
0252 
0253 import TrackingTools.MaterialEffects.OppositeMaterialPropagator_cfi
0254 mixedTripletStepPropagatorOpposite = TrackingTools.MaterialEffects.OppositeMaterialPropagator_cfi.OppositeMaterialPropagator.clone(
0255 #mixedTripletStepPropagatorOpposite = TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff.OppositeMaterialPropagatorParabolicMF.clone(
0256     ComponentName = 'mixedTripletStepPropagatorOpposite',
0257     ptMin         = 0.1
0258 )
0259 trackingParabolicMf.toModify(mixedTripletStepPropagatorOpposite, SimpleMagneticField = 'ParabolicMf')
0260 for e in [pp_on_XeXe_2017, pp_on_AA]:
0261     e.toModify(mixedTripletStepPropagatorOpposite, ptMin=0.4)
0262 highBetaStar_2018.toModify(mixedTripletStepPropagatorOpposite,ptMin = 0.05)
0263 
0264 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
0265 mixedTripletStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
0266     ComponentName    = 'mixedTripletStepChi2Est',
0267     nSigma           = 3.0,
0268     MaxChi2          = 16.0,
0269     clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
0270 )
0271 trackingLowPU.toModify(mixedTripletStepChi2Est,
0272     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
0273 )
0274 
0275 # TRACK BUILDING
0276 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
0277 mixedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
0278     trajectoryFilter       = dict(refToPSet_ = 'mixedTripletStepTrajectoryFilter'),
0279     propagatorAlong        = 'mixedTripletStepPropagator',
0280     propagatorOpposite     = 'mixedTripletStepPropagatorOpposite',
0281     maxCand                = 2,
0282     estimator              = 'mixedTripletStepChi2Est',
0283     maxDPhiForLooperReconstruction = 2.0,
0284     maxPtForLooperReconstruction = 0.7,
0285 )
0286 trackingNoLoopers.toModify(mixedTripletStepTrajectoryBuilder,
0287                            maxPtForLooperReconstruction = 0.0)
0288 # MAKING OF TRACK CANDIDATES
0289 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
0290 # Give handle for CKF for HI
0291 _mixedTripletStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
0292     src            = 'mixedTripletStepSeeds',
0293     clustersToSkip = 'mixedTripletStepClusters',
0294     ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
0295     numHitsForSeedCleaner     = 50,
0296     #onlyPixelHitsForSeedCleaner = True,
0297     TrajectoryBuilderPSet     = dict(refToPSet_ = 'mixedTripletStepTrajectoryBuilder'),
0298     doSeedingRegionRebuilding = True,
0299     useHitsSplitting          = True,
0300     TrajectoryCleaner         = 'mixedTripletStepTrajectoryCleanerBySharedHits',
0301 )
0302 mixedTripletStepTrackCandidates = _mixedTripletStepTrackCandidatesCkf.clone()
0303 
0304 from Configuration.ProcessModifiers.trackingMkFitMixedTripletStep_cff import trackingMkFitMixedTripletStep
0305 import RecoTracker.MkFit.mkFitSeedConverter_cfi as mkFitSeedConverter_cfi
0306 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as mkFitIterationConfigESProducer_cfi
0307 import RecoTracker.MkFit.mkFitProducer_cfi as mkFitProducer_cfi
0308 import RecoTracker.MkFit.mkFitOutputConverter_cfi as mkFitOutputConverter_cfi
0309 mixedTripletStepTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
0310     seeds = 'mixedTripletStepSeeds',
0311 )
0312 mixedTripletStepTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
0313     ComponentName = 'mixedTripletStepTrackCandidatesMkFitConfig',
0314     config = 'RecoTracker/MkFit/data/mkfit-phase1-mixedTripletStep.json',
0315 )
0316 mixedTripletStepTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone(
0317     seeds = 'mixedTripletStepTrackCandidatesMkFitSeeds',
0318     config = ('', 'mixedTripletStepTrackCandidatesMkFitConfig'),
0319     clustersToSkip = 'mixedTripletStepClusters',
0320 )
0321 trackingMkFitMixedTripletStep.toReplaceWith(mixedTripletStepTrackCandidates, mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
0322     seeds = 'mixedTripletStepSeeds',
0323     mkFitSeeds = 'mixedTripletStepTrackCandidatesMkFitSeeds',
0324     tracks = 'mixedTripletStepTrackCandidatesMkFit',
0325 ))
0326 (pp_on_XeXe_2017 | pp_on_AA).toModify(mixedTripletStepTrackCandidatesMkFitConfig, minPt=0.4)
0327 
0328 import FastSimulation.Tracking.TrackCandidateProducer_cfi
0329 fastSim.toReplaceWith(mixedTripletStepTrackCandidates,
0330                       FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
0331         src = 'mixedTripletStepSeeds',
0332         MinNumberOfCrossedLayers = 3,
0333         hitMasks = cms.InputTag('mixedTripletStepMasks'),
0334         )
0335 )
0336 
0337 
0338 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
0339 mixedTripletStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
0340         ComponentName       = 'mixedTripletStepTrajectoryCleanerBySharedHits',
0341         fractionShared      = 0.11,
0342         allowSharedFirstHit = True
0343 )
0344 trackingLowPU.toModify(mixedTripletStepTrajectoryCleanerBySharedHits, fractionShared = 0.19)
0345 
0346 
0347 # TRACK FITTING
0348 import RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi
0349 mixedTripletStepTracks = RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi.TrackProducerIterativeDefault.clone(
0350     AlgorithmName = 'mixedTripletStep',
0351     src           = 'mixedTripletStepTrackCandidates',
0352     Fitter        = 'FlexibleKFFittingSmoother'
0353 )
0354 fastSim.toModify(mixedTripletStepTracks, TTRHBuilder = 'WithoutRefit')
0355 
0356 # TRACK SELECTION AND QUALITY FLAG SETTING.
0357 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierPrompt_cfi import *
0358 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierDetached_cfi import *
0359 mixedTripletStepClassifier1 = TrackMVAClassifierDetached.clone(
0360      src         = 'mixedTripletStepTracks',
0361      mva         = dict(GBRForestLabel = 'MVASelectorIter4_13TeV'),
0362      qualityCuts = [-0.5,0.0,0.5]
0363 )
0364 fastSim.toModify(mixedTripletStepClassifier1, vertices = 'firstStepPrimaryVerticesBeforeMixing')
0365 
0366 mixedTripletStepClassifier2 = TrackMVAClassifierPrompt.clone(
0367     src         = 'mixedTripletStepTracks',
0368     mva         = dict(GBRForestLabel = 'MVASelectorIter0_13TeV'),
0369     qualityCuts = [-0.2,-0.2,-0.2]
0370 )
0371 fastSim.toModify(mixedTripletStepClassifier2,vertices = 'firstStepPrimaryVerticesBeforeMixing')
0372 
0373 from RecoTracker.FinalTrackSelectors.ClassifierMerger_cfi import *
0374 mixedTripletStep = ClassifierMerger.clone(
0375     inputClassifiers=['mixedTripletStepClassifier1','mixedTripletStepClassifier2']
0376 )
0377 trackingPhase1.toReplaceWith(mixedTripletStep, mixedTripletStepClassifier1.clone(
0378     mva = dict(GBRForestLabel = 'MVASelectorMixedTripletStep_Phase1'),
0379     qualityCuts = [-0.5,0.0,0.5]
0380 ))
0381 
0382 from RecoTracker.FinalTrackSelectors.trackTfClassifier_cfi import *
0383 from RecoTracker.FinalTrackSelectors.trackSelectionTf_cfi import *
0384 from RecoTracker.FinalTrackSelectors.trackSelectionTf_CKF_cfi import *
0385 trackdnn.toReplaceWith(mixedTripletStep, trackTfClassifier.clone(
0386     src = 'mixedTripletStepTracks',
0387     qualityCuts = qualityCutDictionary.MixedTripletStep.value()
0388 ))
0389 (trackdnn & fastSim).toModify(mixedTripletStep,vertices = 'firstStepPrimaryVerticesBeforeMixing')
0390 
0391 highBetaStar_2018.toModify(mixedTripletStep,qualityCuts = [-0.7,0.0,0.5])
0392 pp_on_AA.toModify(mixedTripletStep, qualityCuts = [-0.5,0.0,0.9])
0393 
0394 # For LowPU
0395 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
0396 mixedTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
0397     src            = 'mixedTripletStepTracks',
0398     useAnyMVA      = cms.bool(False),
0399     GBRForestLabel = cms.string('MVASelectorIter4'),
0400     trackSelectors = [
0401         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
0402             name = 'mixedTripletStepVtxLoose',
0403             chi2n_par = 1.2,
0404             res_par = ( 0.003, 0.001 ),
0405             minNumberLayers = 3,
0406             maxNumberLostLayers = 1,
0407             minNumber3DLayers = 2,
0408             d0_par1 = ( 1.2, 3.0 ),
0409             dz_par1 = ( 1.2, 3.0 ),
0410             d0_par2 = ( 1.3, 3.0 ),
0411             dz_par2 = ( 1.3, 3.0 )
0412         ),
0413         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
0414             name = 'mixedTripletStepTrkLoose',
0415             chi2n_par = 0.6,
0416             res_par = ( 0.003, 0.001 ),
0417             minNumberLayers = 4,
0418             maxNumberLostLayers = 1,
0419             minNumber3DLayers = 3,
0420             d0_par1 = ( 1.2, 4.0 ),
0421             dz_par1 = ( 1.2, 4.0 ),
0422             d0_par2 = ( 1.2, 4.0 ),
0423             dz_par2 = ( 1.2, 4.0 )
0424         ),
0425         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
0426             name = 'mixedTripletStepVtxTight',
0427             preFilterName = 'mixedTripletStepVtxLoose',
0428             chi2n_par = 0.6,
0429             res_par = ( 0.003, 0.001 ),
0430             minNumberLayers = 3,
0431             maxNumberLostLayers = 1,
0432             minNumber3DLayers = 3,
0433             d0_par1 = ( 1.1, 3.0 ),
0434             dz_par1 = ( 1.1, 3.0 ),
0435             d0_par2 = ( 1.2, 3.0 ),
0436             dz_par2 = ( 1.2, 3.0 )
0437         ),
0438         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
0439             name = 'mixedTripletStepTrkTight',
0440             preFilterName = 'mixedTripletStepTrkLoose',
0441             chi2n_par = 0.4,
0442             res_par = ( 0.003, 0.001 ),
0443             minNumberLayers = 5,
0444             maxNumberLostLayers = 1,
0445             minNumber3DLayers = 4,
0446             d0_par1 = ( 1.1, 4.0 ),
0447             dz_par1 = ( 1.1, 4.0 ),
0448             d0_par2 = ( 1.1, 4.0 ),
0449             dz_par2 = ( 1.1, 4.0 )
0450         ),
0451         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
0452             name = 'mixedTripletStepVtx',
0453             preFilterName = 'mixedTripletStepVtxTight',
0454             chi2n_par = 0.4,
0455             res_par = ( 0.003, 0.001 ),
0456             minNumberLayers = 3,
0457             maxNumberLostLayers = 1,
0458             minNumber3DLayers = 3,
0459             d0_par1 = ( 1.1, 3.0 ),
0460             dz_par1 = ( 1.1, 3.0 ),
0461             d0_par2 = ( 1.2, 3.0 ),
0462             dz_par2 = ( 1.2, 3.0 )
0463         ),
0464         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
0465             name = 'mixedTripletStepTrk',
0466             preFilterName = 'mixedTripletStepTrkTight',
0467             chi2n_par = 0.3,
0468             res_par = ( 0.003, 0.001 ),
0469             minNumberLayers = 5,
0470             maxNumberLostLayers = 0,
0471             minNumber3DLayers = 4,
0472             d0_par1 = ( 0.9, 4.0 ),
0473             dz_par1 = ( 0.9, 4.0 ),
0474             d0_par2 = ( 0.9, 4.0 ),
0475             dz_par2 = ( 0.9, 4.0 )
0476         )
0477     ] #end of vpset
0478 ) #end of clone
0479 
0480 
0481 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi import trackAlgoPriorityOrder
0482 import RecoTracker.FinalTrackSelectors.trackListMerger_cfi
0483 _trackListMergerBase = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
0484     TrackProducers     = ['mixedTripletStepTracks',
0485                           'mixedTripletStepTracks'],
0486     hasSelector        = [1,1],
0487     selectedTrackQuals = ['mixedTripletStepSelector:mixedTripletStepVtx',
0488                           'mixedTripletStepSelector:mixedTripletStepTrk'],
0489     setsToMerge        = [cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(True) )],
0490     writeOnlyTrkQuals  = True
0491 )
0492 trackingLowPU.toReplaceWith(mixedTripletStep, _trackListMergerBase)
0493 
0494 
0495 
0496 MixedTripletStepTask = cms.Task(chargeCut2069Clusters,mixedTripletStepClusters,
0497                                 mixedTripletStepSeedLayersA,
0498                                 mixedTripletStepTrackingRegionsA,
0499                                 mixedTripletStepHitDoubletsA,
0500                                 mixedTripletStepHitTripletsA,
0501                                 mixedTripletStepSeedsA,
0502                                 mixedTripletStepSeedLayersB,
0503                                 mixedTripletStepTrackingRegionsB,
0504                                 mixedTripletStepHitDoubletsB,
0505                                 mixedTripletStepHitTripletsB,
0506                                 mixedTripletStepSeedsB,
0507                                 mixedTripletStepSeeds,
0508                                 mixedTripletStepTrackCandidates,
0509                                 mixedTripletStepTracks,
0510                                 mixedTripletStepClassifier1,mixedTripletStepClassifier2,
0511                                 mixedTripletStep)
0512 MixedTripletStep = cms.Sequence(MixedTripletStepTask)
0513 
0514 _MixedTripletStepTask_trackingMkFit = MixedTripletStepTask.copy()
0515 _MixedTripletStepTask_trackingMkFit.add(mixedTripletStepTrackCandidatesMkFitSeeds, mixedTripletStepTrackCandidatesMkFit, mixedTripletStepTrackCandidatesMkFitConfig)
0516 trackingMkFitMixedTripletStep.toReplaceWith(MixedTripletStepTask, _MixedTripletStepTask_trackingMkFit)
0517 
0518 _MixedTripletStepTask_LowPU = MixedTripletStepTask.copyAndExclude([chargeCut2069Clusters, mixedTripletStepClassifier1])
0519 _MixedTripletStepTask_LowPU.replace(mixedTripletStepClassifier2, mixedTripletStepSelector)
0520 trackingLowPU.toReplaceWith(MixedTripletStepTask, _MixedTripletStepTask_LowPU)
0521 
0522 #fastsim
0523 import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
0524 mixedTripletStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(mixedTripletStepClusters)
0525 mixedTripletStepMasks.oldHitRemovalInfo = cms.InputTag('pixelPairStepMasks')
0526 
0527 fastSim.toReplaceWith(MixedTripletStepTask,
0528                       cms.Task(mixedTripletStepMasks
0529                                    ,mixedTripletStepTrackingRegionsA
0530                                    ,mixedTripletStepSeedsA
0531                                    ,mixedTripletStepTrackingRegionsB
0532                                    ,mixedTripletStepSeedsB
0533                                    ,mixedTripletStepSeeds
0534                                    ,mixedTripletStepTrackCandidates
0535                                    ,mixedTripletStepTracks
0536                                    ,mixedTripletStepClassifier1,mixedTripletStepClassifier2
0537                                    ,mixedTripletStep                                 
0538                                    )
0539 )