Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-22 01:41:33

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             _StripSubClusterShapeSeedFilter.clone()
0206         )
0207     )
0208 )
0209 trackingLowPU.toModify(pixelLessStepHitDoublets, produceSeedingHitSets=True, produceIntermediateHitDoublets=False)
0210 trackingLowPU.toModify(pixelLessStepSeeds,
0211     seedingHitSets = 'pixelLessStepHitDoublets',
0212     SeedComparitorPSet = dict(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
0213         ComponentName      = 'PixelClusterShapeSeedComparitor',
0214         FilterAtHelixStage = cms.bool(True),
0215         FilterPixelHits    = cms.bool(False),
0216         FilterStripHits    = cms.bool(True),
0217         ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
0218         ClusterShapeCacheSrc      = cms.InputTag('siPixelClusterShapeCache') # not really needed here since FilterPixelHits=False
0219     )
0220 )
0221 #fastsim
0222 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
0223 from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet
0224 _fastSim_pixelLessStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
0225     trackingRegions = 'pixelLessStepTrackingRegions',
0226     hitMasks        = cms.InputTag('pixelLessStepMasks'),
0227     seedFinderSelector = dict( MultiHitGeneratorFactory = _hitSetProducerToFactoryPSet(pixelLessStepHitTriplets).clone(
0228                               refitHits = False),
0229                               layerList = pixelLessStepSeedLayers.layerList.value()
0230 ))
0231 fastSim.toReplaceWith(pixelLessStepSeeds,_fastSim_pixelLessStepSeeds)
0232 
0233 vectorHits.toModify(pixelLessStepHitDoublets, produceSeedingHitSets=True, produceIntermediateHitDoublets=False)
0234 vectorHits.toModify(pixelLessStepSeeds, 
0235     seedingHitSets = "pixelLessStepHitDoublets",
0236     SeedComparitorPSet = dict(
0237         ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
0238         FilterAtHelixStage = cms.bool(False),
0239         FilterStripHits = cms.bool(False),
0240     )
0241 )
0242 
0243 # QUALITY CUTS DURING TRACK BUILDING
0244 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
0245 _pixelLessStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
0246     maxLostHits         = 0,
0247     minimumNumberOfHits = 4,
0248     minPt               = 0.1
0249 )
0250 pixelLessStepTrajectoryFilter = _pixelLessStepTrajectoryFilterBase.clone(
0251     seedPairPenalty = 1,
0252 )
0253 trackingLowPU.toReplaceWith(pixelLessStepTrajectoryFilter, _pixelLessStepTrajectoryFilterBase)
0254 (pp_on_XeXe_2017 | pp_on_AA).toModify(pixelLessStepTrajectoryFilter, minPt=2.0)
0255 
0256 vectorHits.toReplaceWith(pixelLessStepTrajectoryFilter, _pixelLessStepTrajectoryFilterBase)
0257 vectorHits.toModify(pixelLessStepTrajectoryFilter, minimumNumberOfHits = 4, maxLostHits = 1)
0258 
0259 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
0260 pixelLessStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
0261     ComponentName    = 'pixelLessStepChi2Est',
0262     nSigma           = 3.0,
0263     MaxChi2          = 16.0,
0264     clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
0265 )
0266 trackingLowPU.toModify(pixelLessStepChi2Est,
0267     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
0268 )
0269 
0270 vectorHits.toModify(pixelLessStepChi2Est,
0271     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutNone'),
0272     MaxChi2 = 30.0
0273 )
0274 
0275 # TRACK BUILDING
0276 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
0277 pixelLessStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
0278     trajectoryFilter       = dict(refToPSet_ = 'pixelLessStepTrajectoryFilter'),
0279     minNrOfHitsForRebuild  = 4,
0280     maxCand                = 2,
0281     alwaysUseInvalidHits   = False,
0282     estimator              = 'pixelLessStepChi2Est',
0283     maxDPhiForLooperReconstruction = 2.0,
0284     maxPtForLooperReconstruction   = 0.7,
0285 )
0286 trackingNoLoopers.toModify(pixelLessStepTrajectoryBuilder,
0287                            maxPtForLooperReconstruction = 0.0)
0288 
0289 # MAKING OF TRACK CANDIDATES
0290 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
0291 # Give handle for CKF for HI
0292 _pixelLessStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
0293     src                   = 'pixelLessStepSeeds',
0294     clustersToSkip        = 'pixelLessStepClusters',
0295     ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
0296     numHitsForSeedCleaner = 50,
0297     #onlyPixelHitsForSeedCleaner = True,
0298     TrajectoryBuilderPSet = dict(refToPSet_ = 'pixelLessStepTrajectoryBuilder'),
0299     TrajectoryCleaner     = 'pixelLessStepTrajectoryCleanerBySharedHits',
0300 )
0301 pixelLessStepTrackCandidates = _pixelLessStepTrackCandidatesCkf.clone()
0302 
0303 from Configuration.ProcessModifiers.trackingMkFitPixelLessStep_cff import trackingMkFitPixelLessStep
0304 import RecoTracker.MkFit.mkFitSeedConverter_cfi as mkFitSeedConverter_cfi
0305 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as mkFitIterationConfigESProducer_cfi
0306 import RecoTracker.MkFit.mkFitProducer_cfi as mkFitProducer_cfi
0307 import RecoTracker.MkFit.mkFitOutputConverter_cfi as mkFitOutputConverter_cfi
0308 pixelLessStepTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
0309     seeds = 'pixelLessStepSeeds',
0310 )
0311 pixelLessStepTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
0312     ComponentName = 'pixelLessStepTrackCandidatesMkFitConfig',
0313     config = 'RecoTracker/MkFit/data/mkfit-phase1-pixelLessStep.json',
0314 )
0315 pixelLessStepTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone(
0316     seeds = 'pixelLessStepTrackCandidatesMkFitSeeds',
0317     config = ('', 'pixelLessStepTrackCandidatesMkFitConfig'),
0318     clustersToSkip = 'pixelLessStepClusters',
0319 )
0320 trackingMkFitPixelLessStep.toReplaceWith(pixelLessStepTrackCandidates, mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
0321     seeds = 'pixelLessStepSeeds',
0322     mkFitSeeds = 'pixelLessStepTrackCandidatesMkFitSeeds',
0323     tracks = 'pixelLessStepTrackCandidatesMkFit',
0324     candMVASel = True,
0325     candWP = -0.7,
0326 ))
0327 (pp_on_XeXe_2017 | pp_on_AA).toModify(pixelLessStepTrackCandidatesMkFitConfig, minPt=2.0)
0328 
0329 import FastSimulation.Tracking.TrackCandidateProducer_cfi
0330 fastSim.toReplaceWith(pixelLessStepTrackCandidates,
0331                       FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
0332         src = 'pixelLessStepSeeds',
0333         MinNumberOfCrossedLayers = 6, # ?
0334         hitMasks = cms.InputTag('pixelLessStepMasks')
0335         )
0336 )
0337 
0338 vectorHits.toModify(pixelLessStepTrackCandidates,
0339     phase2clustersToSkip = 'pixelLessStepClusters',
0340     clustersToSkip = ''
0341 )
0342 
0343 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
0344 pixelLessStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
0345     ComponentName       = 'pixelLessStepTrajectoryCleanerBySharedHits',
0346     fractionShared      = 0.11,
0347     allowSharedFirstHit = True
0348 )
0349 trackingLowPU.toModify(pixelLessStepTrajectoryCleanerBySharedHits, fractionShared = 0.19)
0350 
0351 
0352 # TRACK FITTING
0353 import RecoTracker.TrackProducer.TrackProducer_cfi
0354 pixelLessStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
0355     src           = 'pixelLessStepTrackCandidates',
0356     AlgorithmName = 'pixelLessStep',
0357     Fitter        = 'FlexibleKFFittingSmoother'
0358 )
0359 fastSim.toModify(pixelLessStepTracks, TTRHBuilder = 'WithoutRefit')
0360 
0361 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
0362 phase2_timing_layer.toModify(pixelLessStepTracks, TrajectoryInEvent = True)
0363 
0364 # TRACK SELECTION AND QUALITY FLAG SETTING.
0365 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierPrompt_cfi import *
0366 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierDetached_cfi import *
0367 pixelLessStepClassifier1 = TrackMVAClassifierPrompt.clone(
0368     src         = 'pixelLessStepTracks',
0369     mva         = dict(GBRForestLabel = 'MVASelectorIter5_13TeV'),
0370     qualityCuts = [-0.4,0.0,0.4]
0371 )
0372 fastSim.toModify(pixelLessStepClassifier1, vertices = 'firstStepPrimaryVerticesBeforeMixing' )
0373 
0374 pixelLessStepClassifier2 = TrackMVAClassifierPrompt.clone(
0375     src         = 'pixelLessStepTracks',
0376     mva         = dict(GBRForestLabel = 'MVASelectorIter0_13TeV'),
0377     qualityCuts = [-0.0,0.0,0.0]
0378 )
0379 fastSim.toModify(pixelLessStepClassifier2, vertices = 'firstStepPrimaryVerticesBeforeMixing' )
0380 
0381 from RecoTracker.FinalTrackSelectors.ClassifierMerger_cfi import *
0382 pixelLessStep = ClassifierMerger.clone(
0383     inputClassifiers=['pixelLessStepClassifier1','pixelLessStepClassifier2']
0384 )
0385 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0386 
0387 trackingPhase1.toReplaceWith(pixelLessStep, pixelLessStepClassifier1.clone(
0388     mva         = dict(GBRForestLabel = 'MVASelectorPixelLessStep_Phase1'),
0389     qualityCuts = [-0.4,0.0,0.4]
0390 ))
0391 
0392 from RecoTracker.FinalTrackSelectors.trackTfClassifier_cfi import *
0393 from RecoTracker.FinalTrackSelectors.trackSelectionTf_cfi import *
0394 from RecoTracker.FinalTrackSelectors.trackSelectionTf_CKF_cfi import *
0395 trackdnn.toReplaceWith(pixelLessStep, trackTfClassifier.clone(
0396     src         = 'pixelLessStepTracks',
0397     qualityCuts = qualityCutDictionary.PixelLessStep.value()
0398 ))
0399 (trackdnn & fastSim).toModify(pixelLessStep,vertices = 'firstStepPrimaryVerticesBeforeMixing')
0400 
0401 ((~trackingMkFitPixelLessStep) & trackdnn).toModify(pixelLessStep, mva = dict(tfDnnLabel  = 'trackSelectionTf_CKF'),
0402                                                     qualityCuts = [-0.81, -0.61, -0.17])
0403 
0404 pp_on_AA.toModify(pixelLessStep, qualityCuts = [-0.4,0.0,0.8])
0405 
0406 # For LowPU
0407 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
0408 pixelLessStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
0409     src='pixelLessStepTracks',
0410     useAnyMVA      = cms.bool(False),
0411     GBRForestLabel = cms.string('MVASelectorIter5'),
0412     trackSelectors = cms.VPSet(
0413         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
0414             name = 'pixelLessStepLoose',
0415             chi2n_par = 0.5,
0416             res_par = ( 0.003, 0.001 ),
0417             minNumberLayers = 4,
0418             maxNumberLostLayers = 1,
0419             minNumber3DLayers = 3,
0420             d0_par1 = ( 1.3, 4.0 ),
0421             dz_par1 = ( 1.3, 4.0 ),
0422             d0_par2 = ( 1.3, 4.0 ),
0423             dz_par2 = ( 1.3, 4.0 )
0424         ),
0425         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
0426             name = 'pixelLessStepTight',
0427             preFilterName = 'pixelLessStepLoose',
0428             chi2n_par = 0.35,
0429             res_par = ( 0.003, 0.001 ),
0430             minNumberLayers = 4,
0431             maxNumberLostLayers = 0,
0432             minNumber3DLayers = 3,
0433             d0_par1 = ( 1.1, 4.0 ),
0434             dz_par1 = ( 1.1, 4.0 ),
0435             d0_par2 = ( 1.1, 4.0 ),
0436             dz_par2 = ( 1.1, 4.0 )
0437         ),
0438         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
0439             name = 'QualityMasks',
0440             preFilterName = 'pixelLessStepTight',
0441             chi2n_par = 0.2,
0442             res_par = ( 0.003, 0.001 ),
0443             minNumberLayers = 4,
0444             maxNumberLostLayers = 0,
0445             minNumber3DLayers = 3,
0446             d0_par1 = ( 0.9, 4.0 ),
0447             dz_par1 = ( 0.9, 4.0 ),
0448             d0_par2 = ( 0.9, 4.0 ),
0449             dz_par2 = ( 0.9, 4.0 )
0450         ),
0451     ),
0452     vertices = 'pixelVertices'#end of vpset
0453 ) #end of clone
0454 
0455 vectorHits.toModify(pixelLessStepSelector, 
0456     GBRForestLabel = None,
0457     useAnyMVA = None,
0458     trackSelectors= cms.VPSet(
0459         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
0460             name = 'pixelLessStepLoose',
0461             chi2n_par = 1.0,
0462             res_par = ( 0.003, 0.001 ),
0463             minNumberLayers = 0,
0464             maxNumberLostLayers = 1,
0465             minNumber3DLayers = 0,
0466             d0_par1 = ( 0.9, 4.0 ),
0467             dz_par1 = ( 0.9, 4.0 ),
0468             d0_par2 = ( 1.0, 4.0 ),
0469             dz_par2 = ( 1.0, 4.0 )
0470         ),
0471         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
0472             name = 'pixelLessStepTight',
0473             preFilterName = 'pixelLessStepLoose',
0474             chi2n_par = 0.35,
0475             res_par = ( 0.003, 0.001 ),
0476             minNumberLayers = 4,
0477             maxNumberLostLayers = 0,
0478             minNumber3DLayers = 3,
0479             d0_par1 = ( 1.1, 4.0 ),
0480             dz_par1 = ( 1.1, 4.0 ),
0481             d0_par2 = ( 1.1, 4.0 ),
0482             dz_par2 = ( 1.1, 4.0 )
0483         ),
0484         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
0485             name = 'QualityMasks',
0486             preFilterName = 'pixelLessStepTight',
0487             chi2n_par = 0.2,
0488             res_par = ( 0.003, 0.001 ),
0489             minNumberLayers = 1,
0490             maxNumberLostLayers = 2,
0491             minNumber3DLayers = 0,
0492             d0_par1 = ( 100., 4.0 ),
0493             dz_par1 = ( 100., 4.0 ),
0494             d0_par2 = ( 100., 4.0 ),
0495             dz_par2 = ( 100., 4.0 )
0496         ),
0497     ),
0498     vertices = 'firstStepPrimaryVertices'
0499 ) 
0500 
0501 vectorHits.toModify(pixelLessStepSelector.trackSelectors[2], name = 'pixelLessStep')
0502 
0503 
0504 PixelLessStepTask = cms.Task(pixelLessStepClusters,
0505                              pixelLessStepSeedLayers,
0506                              pixelLessStepTrackingRegions,
0507                              pixelLessStepHitDoublets,
0508                              pixelLessStepHitTriplets,
0509                              pixelLessStepSeeds,
0510                              pixelLessStepTrackCandidates,
0511                              pixelLessStepTracks,
0512                              pixelLessStepClassifier1,pixelLessStepClassifier2,
0513                              pixelLessStep)
0514 PixelLessStep = cms.Sequence(PixelLessStepTask)
0515 
0516 _PixelLessStepTask_trackingMkFit = PixelLessStepTask.copy()
0517 _PixelLessStepTask_trackingMkFit.add(pixelLessStepTrackCandidatesMkFitSeeds, pixelLessStepTrackCandidatesMkFit, pixelLessStepTrackCandidatesMkFit)
0518 trackingMkFitPixelLessStep.toReplaceWith(PixelLessStepTask, _PixelLessStepTask_trackingMkFit)
0519 
0520 _PixelLessStepTask_LowPU = PixelLessStepTask.copyAndExclude([pixelLessStepHitTriplets, pixelLessStepClassifier1, pixelLessStepClassifier2])
0521 _PixelLessStepTask_LowPU.replace(pixelLessStep, pixelLessStepSelector)
0522 trackingLowPU.toReplaceWith(PixelLessStepTask, _PixelLessStepTask_LowPU)
0523 #fastsim
0524 from FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi import maskProducerFromClusterRemover
0525 pixelLessStepMasks = maskProducerFromClusterRemover(pixelLessStepClusters)
0526 fastSim.toReplaceWith(PixelLessStepTask,
0527                       cms.Task(pixelLessStepMasks
0528                                    ,pixelLessStepTrackingRegions
0529                                    ,pixelLessStepSeeds
0530                                    ,pixelLessStepTrackCandidates
0531                                    ,pixelLessStepTracks
0532                                    ,pixelLessStepClassifier1,pixelLessStepClassifier2
0533                                    ,pixelLessStep                             
0534                                    )
0535 )
0536 from RecoLocalTracker.SiPhase2VectorHitBuilder.siPhase2VectorHits_cfi import *
0537 from RecoTracker.TkSeedGenerator.SeedingOTEDProducer_cfi import SeedingOTEDProducer as _SeedingOTEDProducer
0538 pixelLessStepSeeds_vectorHits = _SeedingOTEDProducer.clone()
0539 
0540 _PixelLessStepTask_vectorHits = cms.Task(siPhase2VectorHits,
0541                  pixelLessStepClusters,
0542                              pixelLessStepSeeds,
0543                              pixelLessStepTrackCandidates,
0544                              pixelLessStepTracks,
0545                              pixelLessStepSelector)
0546 _PixelLessStep_vectorHits = cms.Sequence(_PixelLessStepTask_vectorHits)
0547 vectorHits.toReplaceWith(pixelLessStepSeeds,pixelLessStepSeeds_vectorHits)
0548 vectorHits.toReplaceWith(PixelLessStepTask, _PixelLessStepTask_vectorHits)
0549 vectorHits.toReplaceWith(PixelLessStep, _PixelLessStep_vectorHits)