Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-11-01 03:33:55

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 ##########################################################################
0014 # Large impact parameter tracking using TIB/TID/TEC stereo layer seeding #
0015 ##########################################################################
0016 
0017 pixelLessStepClusters = _cfg.clusterRemoverForIter('PixelLessStep')
0018 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
0019     _era.toReplaceWith(pixelLessStepClusters, _cfg.clusterRemoverForIter('PixelLessStep', _eraName, _postfix))
0020 
0021 
0022 
0023 # SEEDING LAYERS
0024 from RecoLocalTracker.SiStripClusterizer.SiStripClusterChargeCut_cfi import *
0025 import RecoTracker.TkSeedingLayers.seedingLayersEDProducer_cfi as _mod
0026 
0027 pixelLessStepSeedLayers = _mod.seedingLayersEDProducer.clone(
0028     layerList = [
0029     #TIB
0030     'TIB1+TIB2+MTIB3','TIB1+TIB2+MTIB4',
0031     #TIB+TID
0032     'TIB1+TIB2+MTID1_pos','TIB1+TIB2+MTID1_neg',
0033     #TID
0034     'TID1_pos+TID2_pos+TID3_pos','TID1_neg+TID2_neg+TID3_neg',#ring 1-2 (matched)
0035     'TID1_pos+TID2_pos+MTID3_pos','TID1_neg+TID2_neg+MTID3_neg',#ring 3 (mono)
0036     'TID1_pos+TID2_pos+MTEC1_pos','TID1_neg+TID2_neg+MTEC1_neg',
0037     #TID+TEC RING 1-3
0038     'TID2_pos+TID3_pos+TEC1_pos','TID2_neg+TID3_neg+TEC1_neg',#ring 1-2 (matched)
0039     'TID2_pos+TID3_pos+MTEC1_pos','TID2_neg+TID3_neg+MTEC1_neg',#ring 3 (mono)
0040     #TEC RING 1-3
0041     'TEC1_pos+TEC2_pos+TEC3_pos', 'TEC1_neg+TEC2_neg+TEC3_neg',
0042     'TEC1_pos+TEC2_pos+MTEC3_pos','TEC1_neg+TEC2_neg+MTEC3_neg',
0043     'TEC1_pos+TEC2_pos+TEC4_pos', 'TEC1_neg+TEC2_neg+TEC4_neg',
0044     'TEC1_pos+TEC2_pos+MTEC4_pos','TEC1_neg+TEC2_neg+MTEC4_neg',
0045     'TEC2_pos+TEC3_pos+TEC4_pos', 'TEC2_neg+TEC3_neg+TEC4_neg',
0046     'TEC2_pos+TEC3_pos+MTEC4_pos','TEC2_neg+TEC3_neg+MTEC4_neg',
0047     'TEC2_pos+TEC3_pos+TEC5_pos', 'TEC2_neg+TEC3_neg+TEC5_neg',
0048     'TEC2_pos+TEC3_pos+TEC6_pos', 'TEC2_neg+TEC3_neg+TEC6_neg',
0049     'TEC3_pos+TEC4_pos+TEC5_pos', 'TEC3_neg+TEC4_neg+TEC5_neg',
0050     'TEC3_pos+TEC4_pos+MTEC5_pos','TEC3_neg+TEC4_neg+MTEC5_neg',
0051     'TEC3_pos+TEC5_pos+TEC6_pos', 'TEC3_neg+TEC5_neg+TEC6_neg',
0052     'TEC4_pos+TEC5_pos+TEC6_pos', 'TEC4_neg+TEC5_neg+TEC6_neg'    
0053     ],
0054     TIB = dict(
0055          TTRHBuilder    = cms.string('WithTrackAngle'), 
0056          clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0057          matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
0058          skipClusters   = cms.InputTag('pixelLessStepClusters')
0059     ),
0060     MTIB = dict(
0061          TTRHBuilder    = cms.string('WithTrackAngle'), 
0062          clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0063          skipClusters   = cms.InputTag('pixelLessStepClusters'),
0064          rphiRecHits    = cms.InputTag('siStripMatchedRecHits','rphiRecHit')
0065     ),
0066     TID = dict(
0067         matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
0068         skipClusters = cms.InputTag('pixelLessStepClusters'),
0069         useRingSlector = cms.bool(True),
0070         TTRHBuilder = cms.string('WithTrackAngle'), 
0071         clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0072         minRing = cms.int32(1),
0073         maxRing = cms.int32(2)
0074     ),
0075     MTID = dict(
0076         rphiRecHits    = cms.InputTag('siStripMatchedRecHits','rphiRecHit'),
0077         skipClusters = cms.InputTag('pixelLessStepClusters'),
0078         useRingSlector = cms.bool(True),
0079         TTRHBuilder = cms.string('WithTrackAngle'), 
0080         clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0081         minRing = cms.int32(3),
0082         maxRing = cms.int32(3)
0083     ),
0084     TEC = dict(
0085         matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
0086         skipClusters = cms.InputTag('pixelLessStepClusters'),
0087         useRingSlector = cms.bool(True),
0088         TTRHBuilder = cms.string('WithTrackAngle'), 
0089         clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0090         minRing = cms.int32(1),
0091         maxRing = cms.int32(2)
0092     ),
0093     MTEC = dict(
0094         rphiRecHits = cms.InputTag('siStripMatchedRecHits','rphiRecHit'),
0095         skipClusters = cms.InputTag('pixelLessStepClusters'),
0096         useRingSlector = cms.bool(True),
0097         TTRHBuilder = cms.string('WithTrackAngle'), 
0098         clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0099         minRing = cms.int32(3),
0100         maxRing = cms.int32(3)
0101     )
0102 )
0103 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
0104 trackingLowPU.toModify(pixelLessStepSeedLayers,
0105     layerList = [
0106         'TIB1+TIB2',
0107         'TID1_pos+TID2_pos','TID2_pos+TID3_pos',
0108         'TEC1_pos+TEC2_pos','TEC2_pos+TEC3_pos','TEC3_pos+TEC4_pos','TEC3_pos+TEC5_pos','TEC4_pos+TEC5_pos',
0109         'TID1_neg+TID2_neg','TID2_neg+TID3_neg',
0110         'TEC1_neg+TEC2_neg','TEC2_neg+TEC3_neg','TEC3_neg+TEC4_neg','TEC3_neg+TEC5_neg','TEC4_neg+TEC5_neg'
0111     ],
0112     TIB = dict(clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')),
0113     TID = dict(clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')),
0114     TEC = dict(clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')),
0115     MTIB = None,
0116     MTID = None,
0117     MTEC = None,
0118 )
0119 from Configuration.ProcessModifiers.vectorHits_cff import vectorHits
0120 vectorHits.toModify(pixelLessStepSeedLayers,
0121     layerList = [
0122         'TOB1+TOB2', 'TOB2+TOB3',
0123 #        'TOB3+TOB4', 'TOB4+TOB5', 
0124         'TID1_pos+TID2_pos', 'TID1_neg+TID2_neg'
0125     ],
0126     TOB = dict(
0127          TTRHBuilder      = cms.string('WithTrackAngle'), 
0128          clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutNone')),
0129          vectorRecHits    = cms.InputTag("siPhase2VectorHits", 'vectorHitsAccepted'),
0130          skipClusters     = cms.InputTag('pixelLessStepClusters')
0131     ),
0132     TIB = None,
0133     TID = dict(
0134          clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutNone'),
0135          vectorRecHits    = cms.InputTag("siPhase2VectorHits", 'accepted'),
0136          maxRing          = 8
0137     ),
0138     TEC  = None,
0139     MTIB = None,
0140     MTID = None,
0141     MTEC = None,
0142 )
0143 # TrackingRegion
0144 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpotFixedZ_cfi import globalTrackingRegionFromBeamSpotFixedZ as _globalTrackingRegionFromBeamSpotFixedZ
0145 pixelLessStepTrackingRegions = _globalTrackingRegionFromBeamSpotFixedZ.clone(
0146     RegionPSet = dict(
0147         ptMin            = 0.4,
0148         originHalfLength = 12.0,
0149         originRadius     = 1.0)
0150 )
0151 trackingLowPU.toModify(pixelLessStepTrackingRegions, RegionPSet = dict(
0152     ptMin            = 0.7,
0153     originHalfLength = 10.0,
0154     originRadius     = 2.0,
0155 ))
0156 
0157 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
0158 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0159 from RecoTracker.IterativeTracking.MixedTripletStep_cff import _mixedTripletStepTrackingRegionsCommon_pp_on_HI
0160 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(pixelLessStepTrackingRegions, 
0161                 _mixedTripletStepTrackingRegionsCommon_pp_on_HI.clone(RegionPSet=dict(
0162                     ptMinScaling4BigEvts = False,
0163                     fixedError           = 3.0,
0164                     ptMin                = 2.0,
0165                     originRadius         = 1.0 )
0166                 )
0167 )
0168 
0169 
0170 # seeding
0171 from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer
0172 pixelLessStepClusterShapeHitFilter = _ClusterShapeHitFilterESProducer.clone(
0173     ComponentName    = 'pixelLessStepClusterShapeHitFilter',
0174     doStripShapeCut  = cms.bool(False),
0175     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTight')
0176 )
0177 
0178 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
0179 pixelLessStepHitDoublets = _hitPairEDProducer.clone(
0180     seedingLayers   = 'pixelLessStepSeedLayers',
0181     trackingRegions = 'pixelLessStepTrackingRegions',
0182     maxElement      = 50000000,
0183     produceIntermediateHitDoublets = True,
0184 )
0185 from RecoTracker.TkSeedGenerator.multiHitFromChi2EDProducer_cfi import multiHitFromChi2EDProducer as _multiHitFromChi2EDProducer
0186 pixelLessStepHitTriplets = _multiHitFromChi2EDProducer.clone(
0187     doublets = 'pixelLessStepHitDoublets',
0188 )
0189 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
0190 from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter
0191 pixelLessStepSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(
0192     seedingHitSets = 'pixelLessStepHitTriplets',
0193     SeedComparitorPSet = dict(
0194         ComponentName = 'CombinedSeedComparitor',
0195         mode = cms.string('and'),
0196         comparitors = cms.VPSet(
0197             cms.PSet(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
0198                 ComponentName      = cms.string('PixelClusterShapeSeedComparitor'),
0199                 FilterAtHelixStage = cms.bool(True),
0200                 FilterPixelHits    = cms.bool(False),
0201                 FilterStripHits    = cms.bool(True),
0202                 ClusterShapeHitFilterName = cms.string('pixelLessStepClusterShapeHitFilter'),
0203                 ClusterShapeCacheSrc      = cms.InputTag('siPixelClusterShapeCache') # not really needed here since FilterPixelHits=False
0204             )
0205         )
0206     )
0207 )
0208 
0209 from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter
0210 from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters
0211 (~approxSiStripClusters).toModify(pixelLessStepSeeds.SeedComparitorPSet.comparitors, func = lambda list: list.append(_StripSubClusterShapeSeedFilter.clone()) )
0212 
0213 trackingLowPU.toModify(pixelLessStepHitDoublets, produceSeedingHitSets=True, produceIntermediateHitDoublets=False)
0214 trackingLowPU.toModify(pixelLessStepSeeds,
0215     seedingHitSets = 'pixelLessStepHitDoublets',
0216     SeedComparitorPSet = dict(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
0217         ComponentName      = 'PixelClusterShapeSeedComparitor',
0218         FilterAtHelixStage = cms.bool(True),
0219         FilterPixelHits    = cms.bool(False),
0220         FilterStripHits    = cms.bool(True),
0221         ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
0222         ClusterShapeCacheSrc      = cms.InputTag('siPixelClusterShapeCache') # not really needed here since FilterPixelHits=False
0223     )
0224 )
0225 #fastsim
0226 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
0227 from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet
0228 _fastSim_pixelLessStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
0229     trackingRegions = 'pixelLessStepTrackingRegions',
0230     hitMasks        = cms.InputTag('pixelLessStepMasks'),
0231     seedFinderSelector = dict( MultiHitGeneratorFactory = _hitSetProducerToFactoryPSet(pixelLessStepHitTriplets).clone(
0232                               refitHits = False),
0233                               layerList = pixelLessStepSeedLayers.layerList.value()
0234 ))
0235 fastSim.toReplaceWith(pixelLessStepSeeds,_fastSim_pixelLessStepSeeds)
0236 
0237 vectorHits.toModify(pixelLessStepHitDoublets, produceSeedingHitSets=True, produceIntermediateHitDoublets=False)
0238 vectorHits.toModify(pixelLessStepSeeds, 
0239     seedingHitSets = "pixelLessStepHitDoublets",
0240     SeedComparitorPSet = dict(
0241         ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
0242         FilterAtHelixStage = cms.bool(False),
0243         FilterStripHits = cms.bool(False),
0244     )
0245 )
0246 
0247 # QUALITY CUTS DURING TRACK BUILDING
0248 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
0249 _pixelLessStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
0250     maxLostHits         = 0,
0251     minimumNumberOfHits = 4,
0252     minPt               = 0.1
0253 )
0254 pixelLessStepTrajectoryFilter = _pixelLessStepTrajectoryFilterBase.clone(
0255     seedPairPenalty = 1,
0256 )
0257 trackingLowPU.toReplaceWith(pixelLessStepTrajectoryFilter, _pixelLessStepTrajectoryFilterBase)
0258 (pp_on_XeXe_2017 | pp_on_AA).toModify(pixelLessStepTrajectoryFilter, minPt=2.0)
0259 
0260 vectorHits.toReplaceWith(pixelLessStepTrajectoryFilter, _pixelLessStepTrajectoryFilterBase)
0261 vectorHits.toModify(pixelLessStepTrajectoryFilter, minimumNumberOfHits = 4, maxLostHits = 1)
0262 
0263 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
0264 pixelLessStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
0265     ComponentName    = 'pixelLessStepChi2Est',
0266     nSigma           = 3.0,
0267     MaxChi2          = 16.0,
0268     clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
0269 )
0270 trackingLowPU.toModify(pixelLessStepChi2Est,
0271     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
0272 )
0273 
0274 vectorHits.toModify(pixelLessStepChi2Est,
0275     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutNone'),
0276     MaxChi2 = 30.0
0277 )
0278 
0279 # TRACK BUILDING
0280 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
0281 pixelLessStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
0282     trajectoryFilter       = dict(refToPSet_ = 'pixelLessStepTrajectoryFilter'),
0283     minNrOfHitsForRebuild  = 4,
0284     maxCand                = 2,
0285     alwaysUseInvalidHits   = False,
0286     estimator              = 'pixelLessStepChi2Est',
0287     maxDPhiForLooperReconstruction = 2.0,
0288     maxPtForLooperReconstruction   = 0.7,
0289 )
0290 trackingNoLoopers.toModify(pixelLessStepTrajectoryBuilder,
0291                            maxPtForLooperReconstruction = 0.0)
0292 
0293 # MAKING OF TRACK CANDIDATES
0294 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
0295 # Give handle for CKF for HI
0296 _pixelLessStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
0297     src                   = 'pixelLessStepSeeds',
0298     clustersToSkip        = 'pixelLessStepClusters',
0299     ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
0300     numHitsForSeedCleaner = 50,
0301     #onlyPixelHitsForSeedCleaner = True,
0302     TrajectoryBuilderPSet = dict(refToPSet_ = 'pixelLessStepTrajectoryBuilder'),
0303     TrajectoryCleaner     = 'pixelLessStepTrajectoryCleanerBySharedHits',
0304 )
0305 pixelLessStepTrackCandidates = _pixelLessStepTrackCandidatesCkf.clone()
0306 
0307 from Configuration.ProcessModifiers.trackingMkFitPixelLessStep_cff import trackingMkFitPixelLessStep
0308 import RecoTracker.MkFit.mkFitSeedConverter_cfi as mkFitSeedConverter_cfi
0309 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as mkFitIterationConfigESProducer_cfi
0310 import RecoTracker.MkFit.mkFitProducer_cfi as mkFitProducer_cfi
0311 import RecoTracker.MkFit.mkFitOutputConverter_cfi as mkFitOutputConverter_cfi
0312 pixelLessStepTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
0313     seeds = 'pixelLessStepSeeds',
0314 )
0315 pixelLessStepTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
0316     ComponentName = 'pixelLessStepTrackCandidatesMkFitConfig',
0317     config = 'RecoTracker/MkFit/data/mkfit-phase1-pixelLessStep.json',
0318 )
0319 pixelLessStepTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone(
0320     seeds = 'pixelLessStepTrackCandidatesMkFitSeeds',
0321     config = ('', 'pixelLessStepTrackCandidatesMkFitConfig'),
0322     clustersToSkip = 'pixelLessStepClusters',
0323 )
0324 trackingMkFitPixelLessStep.toReplaceWith(pixelLessStepTrackCandidates, mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
0325     seeds = 'pixelLessStepSeeds',
0326     mkFitSeeds = 'pixelLessStepTrackCandidatesMkFitSeeds',
0327     tracks = 'pixelLessStepTrackCandidatesMkFit',
0328     candMVASel = False,
0329     candWP = -0.7,
0330 ))
0331 (pp_on_XeXe_2017 | pp_on_AA).toModify(pixelLessStepTrackCandidatesMkFitConfig, minPt=2.0)
0332 
0333 import FastSimulation.Tracking.TrackCandidateProducer_cfi
0334 fastSim.toReplaceWith(pixelLessStepTrackCandidates,
0335                       FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
0336         src = 'pixelLessStepSeeds',
0337         MinNumberOfCrossedLayers = 6, # ?
0338         hitMasks = cms.InputTag('pixelLessStepMasks')
0339         )
0340 )
0341 
0342 vectorHits.toModify(pixelLessStepTrackCandidates,
0343     phase2clustersToSkip = 'pixelLessStepClusters',
0344     clustersToSkip = ''
0345 )
0346 
0347 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
0348 pixelLessStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
0349     ComponentName       = 'pixelLessStepTrajectoryCleanerBySharedHits',
0350     fractionShared      = 0.11,
0351     allowSharedFirstHit = True
0352 )
0353 trackingLowPU.toModify(pixelLessStepTrajectoryCleanerBySharedHits, fractionShared = 0.19)
0354 
0355 
0356 # TRACK FITTING
0357 import RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi
0358 pixelLessStepTracks = RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi.TrackProducer.clone(
0359     src           = 'pixelLessStepTrackCandidates',
0360     AlgorithmName = 'pixelLessStep',
0361     Fitter        = 'FlexibleKFFittingSmoother'
0362 )
0363 fastSim.toModify(pixelLessStepTracks, TTRHBuilder = 'WithoutRefit')
0364 
0365 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
0366 phase2_timing_layer.toModify(pixelLessStepTracks, TrajectoryInEvent = True)
0367 
0368 # TRACK SELECTION AND QUALITY FLAG SETTING.
0369 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierPrompt_cfi import *
0370 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierDetached_cfi import *
0371 pixelLessStepClassifier1 = TrackMVAClassifierPrompt.clone(
0372     src         = 'pixelLessStepTracks',
0373     mva         = dict(GBRForestLabel = 'MVASelectorIter5_13TeV'),
0374     qualityCuts = [-0.4,0.0,0.4]
0375 )
0376 fastSim.toModify(pixelLessStepClassifier1, vertices = 'firstStepPrimaryVerticesBeforeMixing' )
0377 
0378 pixelLessStepClassifier2 = TrackMVAClassifierPrompt.clone(
0379     src         = 'pixelLessStepTracks',
0380     mva         = dict(GBRForestLabel = 'MVASelectorIter0_13TeV'),
0381     qualityCuts = [-0.0,0.0,0.0]
0382 )
0383 fastSim.toModify(pixelLessStepClassifier2, vertices = 'firstStepPrimaryVerticesBeforeMixing' )
0384 
0385 from RecoTracker.FinalTrackSelectors.ClassifierMerger_cfi import *
0386 pixelLessStep = ClassifierMerger.clone(
0387     inputClassifiers=['pixelLessStepClassifier1','pixelLessStepClassifier2']
0388 )
0389 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0390 
0391 trackingPhase1.toReplaceWith(pixelLessStep, pixelLessStepClassifier1.clone(
0392     mva         = dict(GBRForestLabel = 'MVASelectorPixelLessStep_Phase1'),
0393     qualityCuts = [-0.4,0.0,0.4]
0394 ))
0395 
0396 from RecoTracker.FinalTrackSelectors.trackTfClassifier_cfi import *
0397 from RecoTracker.FinalTrackSelectors.trackSelectionTf_cfi import *
0398 from RecoTracker.FinalTrackSelectors.trackSelectionTf_CKF_cfi import *
0399 trackdnn.toReplaceWith(pixelLessStep, trackTfClassifier.clone(
0400     mva         = dict(tfDnnLabel  = 'trackSelectionTfPLess'),
0401     src         = 'pixelLessStepTracks',
0402     qualityCuts = qualityCutDictionary.PixelLessStep.value()
0403 ))
0404 (trackdnn & fastSim).toModify(pixelLessStep,vertices = 'firstStepPrimaryVerticesBeforeMixing')
0405 
0406 ((~trackingMkFitPixelLessStep) & trackdnn).toModify(pixelLessStep, mva = dict(tfDnnLabel  = 'trackSelectionTf_CKF'),
0407                                                     qualityCuts = [-0.82, -0.61, -0.16])
0408 
0409 pp_on_AA.toModify(pixelLessStep, qualityCuts = [-0.4,0.0,0.8])
0410 
0411 # For LowPU
0412 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
0413 pixelLessStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
0414     src='pixelLessStepTracks',
0415     useAnyMVA      = cms.bool(False),
0416     GBRForestLabel = cms.string('MVASelectorIter5'),
0417     trackSelectors = cms.VPSet(
0418         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
0419             name = 'pixelLessStepLoose',
0420             chi2n_par = 0.5,
0421             res_par = ( 0.003, 0.001 ),
0422             minNumberLayers = 4,
0423             maxNumberLostLayers = 1,
0424             minNumber3DLayers = 3,
0425             d0_par1 = ( 1.3, 4.0 ),
0426             dz_par1 = ( 1.3, 4.0 ),
0427             d0_par2 = ( 1.3, 4.0 ),
0428             dz_par2 = ( 1.3, 4.0 )
0429         ),
0430         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
0431             name = 'pixelLessStepTight',
0432             preFilterName = 'pixelLessStepLoose',
0433             chi2n_par = 0.35,
0434             res_par = ( 0.003, 0.001 ),
0435             minNumberLayers = 4,
0436             maxNumberLostLayers = 0,
0437             minNumber3DLayers = 3,
0438             d0_par1 = ( 1.1, 4.0 ),
0439             dz_par1 = ( 1.1, 4.0 ),
0440             d0_par2 = ( 1.1, 4.0 ),
0441             dz_par2 = ( 1.1, 4.0 )
0442         ),
0443         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
0444             name = 'QualityMasks',
0445             preFilterName = 'pixelLessStepTight',
0446             chi2n_par = 0.2,
0447             res_par = ( 0.003, 0.001 ),
0448             minNumberLayers = 4,
0449             maxNumberLostLayers = 0,
0450             minNumber3DLayers = 3,
0451             d0_par1 = ( 0.9, 4.0 ),
0452             dz_par1 = ( 0.9, 4.0 ),
0453             d0_par2 = ( 0.9, 4.0 ),
0454             dz_par2 = ( 0.9, 4.0 )
0455         ),
0456     ),
0457     vertices = 'pixelVertices'#end of vpset
0458 ) #end of clone
0459 
0460 vectorHits.toModify(pixelLessStepSelector, 
0461     GBRForestLabel = None,
0462     useAnyMVA = None,
0463     trackSelectors= cms.VPSet(
0464         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
0465             name = 'pixelLessStepLoose',
0466             chi2n_par = 1.0,
0467             res_par = ( 0.003, 0.001 ),
0468             minNumberLayers = 0,
0469             maxNumberLostLayers = 1,
0470             minNumber3DLayers = 0,
0471             d0_par1 = ( 0.9, 4.0 ),
0472             dz_par1 = ( 0.9, 4.0 ),
0473             d0_par2 = ( 1.0, 4.0 ),
0474             dz_par2 = ( 1.0, 4.0 )
0475         ),
0476         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
0477             name = 'pixelLessStepTight',
0478             preFilterName = 'pixelLessStepLoose',
0479             chi2n_par = 0.35,
0480             res_par = ( 0.003, 0.001 ),
0481             minNumberLayers = 4,
0482             maxNumberLostLayers = 0,
0483             minNumber3DLayers = 3,
0484             d0_par1 = ( 1.1, 4.0 ),
0485             dz_par1 = ( 1.1, 4.0 ),
0486             d0_par2 = ( 1.1, 4.0 ),
0487             dz_par2 = ( 1.1, 4.0 )
0488         ),
0489         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
0490             name = 'QualityMasks',
0491             preFilterName = 'pixelLessStepTight',
0492             chi2n_par = 0.2,
0493             res_par = ( 0.003, 0.001 ),
0494             minNumberLayers = 1,
0495             maxNumberLostLayers = 2,
0496             minNumber3DLayers = 0,
0497             d0_par1 = ( 100., 4.0 ),
0498             dz_par1 = ( 100., 4.0 ),
0499             d0_par2 = ( 100., 4.0 ),
0500             dz_par2 = ( 100., 4.0 )
0501         ),
0502     ),
0503     vertices = 'firstStepPrimaryVertices'
0504 ) 
0505 
0506 vectorHits.toModify(pixelLessStepSelector.trackSelectors[2], name = 'pixelLessStep')
0507 
0508 
0509 PixelLessStepTask = cms.Task(pixelLessStepClusters,
0510                              pixelLessStepSeedLayers,
0511                              pixelLessStepTrackingRegions,
0512                              pixelLessStepHitDoublets,
0513                              pixelLessStepHitTriplets,
0514                              pixelLessStepSeeds,
0515                              pixelLessStepTrackCandidates,
0516                              pixelLessStepTracks,
0517                              pixelLessStepClassifier1,pixelLessStepClassifier2,
0518                              pixelLessStep)
0519 PixelLessStep = cms.Sequence(PixelLessStepTask)
0520 
0521 _PixelLessStepTask_trackingMkFit = PixelLessStepTask.copy()
0522 _PixelLessStepTask_trackingMkFit.add(pixelLessStepTrackCandidatesMkFitSeeds, pixelLessStepTrackCandidatesMkFit, pixelLessStepTrackCandidatesMkFit)
0523 trackingMkFitPixelLessStep.toReplaceWith(PixelLessStepTask, _PixelLessStepTask_trackingMkFit)
0524 
0525 _PixelLessStepTask_LowPU = PixelLessStepTask.copyAndExclude([pixelLessStepHitTriplets, pixelLessStepClassifier1, pixelLessStepClassifier2])
0526 _PixelLessStepTask_LowPU.replace(pixelLessStep, pixelLessStepSelector)
0527 trackingLowPU.toReplaceWith(PixelLessStepTask, _PixelLessStepTask_LowPU)
0528 #fastsim
0529 from FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi import maskProducerFromClusterRemover
0530 pixelLessStepMasks = maskProducerFromClusterRemover(pixelLessStepClusters)
0531 fastSim.toReplaceWith(PixelLessStepTask,
0532                       cms.Task(pixelLessStepMasks
0533                                    ,pixelLessStepTrackingRegions
0534                                    ,pixelLessStepSeeds
0535                                    ,pixelLessStepTrackCandidates
0536                                    ,pixelLessStepTracks
0537                                    ,pixelLessStepClassifier1,pixelLessStepClassifier2
0538                                    ,pixelLessStep                             
0539                                    )
0540 )
0541 from RecoLocalTracker.SiPhase2VectorHitBuilder.siPhase2VectorHits_cfi import *
0542 from RecoTracker.TkSeedGenerator.SeedingOTEDProducer_cfi import SeedingOTEDProducer as _SeedingOTEDProducer
0543 pixelLessStepSeeds_vectorHits = _SeedingOTEDProducer.clone()
0544 
0545 _PixelLessStepTask_vectorHits = cms.Task(siPhase2VectorHits,
0546                  pixelLessStepClusters,
0547                              pixelLessStepSeeds,
0548                              pixelLessStepTrackCandidates,
0549                              pixelLessStepTracks,
0550                              pixelLessStepSelector)
0551 _PixelLessStep_vectorHits = cms.Sequence(_PixelLessStepTask_vectorHits)
0552 vectorHits.toReplaceWith(pixelLessStepSeeds,pixelLessStepSeeds_vectorHits)
0553 vectorHits.toReplaceWith(PixelLessStepTask, _PixelLessStepTask_vectorHits)
0554 vectorHits.toReplaceWith(PixelLessStep, _PixelLessStep_vectorHits)