Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-30 23:17:18

0001 import FWCore.ParameterSet.Config as cms
0002 import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
0003 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0004 
0005 #for dnn classifier
0006 from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
0007 from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary
0008 
0009 # for no-loopers
0010 from Configuration.ProcessModifiers.trackingNoLoopers_cff import trackingNoLoopers
0011 
0012 #######################################################################
0013 # Very large impact parameter tracking using TOB + TEC ring 5 seeding #
0014 #######################################################################
0015 
0016 tobTecStepClusters = _cfg.clusterRemoverForIter('TobTecStep')
0017 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
0018     _era.toReplaceWith(tobTecStepClusters, _cfg.clusterRemoverForIter('TobTecStep', _eraName, _postfix))
0019 
0020 # TRIPLET SEEDING LAYERS
0021 from RecoLocalTracker.SiStripClusterizer.SiStripClusterChargeCut_cfi import *
0022 import RecoTracker.TkSeedingLayers.seedingLayersEDProducer_cfi as _mod
0023 
0024 tobTecStepSeedLayersTripl = _mod.seedingLayersEDProducer.clone(
0025     layerList = [
0026     #TOB
0027     'TOB1+TOB2+MTOB3','TOB1+TOB2+MTOB4',
0028     #TOB+MTEC
0029     'TOB1+TOB2+MTEC1_pos','TOB1+TOB2+MTEC1_neg',
0030     ],
0031     TOB = dict(
0032          TTRHBuilder      = cms.string('WithTrackAngle'), 
0033          clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0034          matchedRecHits   = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
0035          skipClusters     = cms.InputTag('tobTecStepClusters')
0036     ),
0037     MTOB = dict(
0038          TTRHBuilder      = cms.string('WithTrackAngle'), 
0039          clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0040          skipClusters     = cms.InputTag('tobTecStepClusters'),
0041          rphiRecHits      = cms.InputTag('siStripMatchedRecHits','rphiRecHit')
0042     ),
0043     MTEC = dict(
0044         rphiRecHits      = cms.InputTag('siStripMatchedRecHits','rphiRecHit'),
0045         skipClusters     = cms.InputTag('tobTecStepClusters'),
0046         useRingSlector   = cms.bool(True),
0047         TTRHBuilder      = cms.string('WithTrackAngle'), 
0048         clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0049         minRing          = cms.int32(6),
0050         maxRing          = cms.int32(7)
0051     )
0052 )
0053 
0054 # Triplet TrackingRegion
0055 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpotFixedZ_cfi import globalTrackingRegionFromBeamSpotFixedZ as _globalTrackingRegionFromBeamSpotFixedZ
0056 tobTecStepTrackingRegionsTripl = _globalTrackingRegionFromBeamSpotFixedZ.clone(
0057     RegionPSet = dict(
0058         ptMin            = 0.55,
0059         originHalfLength = 20.0,
0060         originRadius     = 3.5)
0061 )
0062 
0063 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
0064 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0065 from RecoTracker.IterativeTracking.MixedTripletStep_cff import _mixedTripletStepTrackingRegionsCommon_pp_on_HI
0066 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(tobTecStepTrackingRegionsTripl, 
0067                 _mixedTripletStepTrackingRegionsCommon_pp_on_HI.clone(RegionPSet=dict(
0068                     ptMinScaling4BigEvts = False,
0069                     fixedError           = 5.0,
0070                     ptMin                = 2.0,
0071                     originRadius         = 3.5
0072                 )                                                                      )
0073 )
0074 
0075 # Triplet seeding
0076 from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer
0077 tobTecStepClusterShapeHitFilter = _ClusterShapeHitFilterESProducer.clone(
0078     ComponentName    = 'tobTecStepClusterShapeHitFilter',
0079     doStripShapeCut  = cms.bool(False),
0080     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTight')
0081 )
0082 
0083 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
0084 tobTecStepHitDoubletsTripl = _hitPairEDProducer.clone(
0085     seedingLayers   = 'tobTecStepSeedLayersTripl',
0086     trackingRegions = 'tobTecStepTrackingRegionsTripl',
0087     maxElement      = 50000000,
0088     produceIntermediateHitDoublets = True,
0089 )
0090 from RecoTracker.TkSeedGenerator.multiHitFromChi2EDProducer_cfi import multiHitFromChi2EDProducer as _multiHitFromChi2EDProducer
0091 tobTecStepHitTripletsTripl = _multiHitFromChi2EDProducer.clone(
0092     doublets      = 'tobTecStepHitDoubletsTripl',
0093     extraPhiKDBox = 0.01,
0094 )
0095 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
0096 _tobTecStepSeedComparitorPSet = dict(
0097     ComponentName = 'CombinedSeedComparitor',
0098     mode          = cms.string('and'),
0099     comparitors   = cms.VPSet(
0100         cms.PSet(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
0101             ComponentName      = cms.string('PixelClusterShapeSeedComparitor'),
0102             FilterAtHelixStage = cms.bool(True),
0103             FilterPixelHits    = cms.bool(False),
0104             FilterStripHits    = cms.bool(True),
0105             ClusterShapeHitFilterName = cms.string('tobTecStepClusterShapeHitFilter'),
0106             ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache') # not really needed here since FilterPixelHits=False
0107         )
0108     )
0109 )
0110 
0111 tobTecStepSeedsTripl = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(#empirically better than 'SeedFromConsecutiveHitsTripletOnlyCreator'
0112     seedingHitSets     = 'tobTecStepHitTripletsTripl',
0113     SeedComparitorPSet = _tobTecStepSeedComparitorPSet,
0114 )
0115 
0116 from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter
0117 from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters
0118 (~approxSiStripClusters).toModify(tobTecStepSeedsTripl.SeedComparitorPSet.comparitors, func = lambda list: list.append(_StripSubClusterShapeSeedFilter.clone()) )
0119 
0120 #fastsim
0121 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
0122 from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet
0123 _fastSim_tobTecStepSeedsTripl = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
0124     trackingRegions = 'tobTecStepTrackingRegionsTripl',
0125     hitMasks        = cms.InputTag('tobTecStepMasks'),
0126     seedFinderSelector = dict(MultiHitGeneratorFactory = _hitSetProducerToFactoryPSet(tobTecStepHitTripletsTripl).clone(
0127                               SeedComparitorPSet = cms.PSet(ComponentName = cms.string('none')), 
0128                               refitHits          = False),
0129                               layerList = tobTecStepSeedLayersTripl.layerList.value()
0130                               )
0131 )
0132 fastSim.toReplaceWith(tobTecStepSeedsTripl,_fastSim_tobTecStepSeedsTripl)
0133 
0134 # PAIR SEEDING LAYERS
0135 tobTecStepSeedLayersPair = _mod.seedingLayersEDProducer.clone( 
0136     layerList = ['TOB1+TEC1_pos','TOB1+TEC1_neg', 
0137                  'TEC1_pos+TEC2_pos','TEC1_neg+TEC2_neg', 
0138                  'TEC2_pos+TEC3_pos','TEC2_neg+TEC3_neg', 
0139                  'TEC3_pos+TEC4_pos','TEC3_neg+TEC4_neg', 
0140                  'TEC4_pos+TEC5_pos','TEC4_neg+TEC5_neg', 
0141                  'TEC5_pos+TEC6_pos','TEC5_neg+TEC6_neg', 
0142                  'TEC6_pos+TEC7_pos','TEC6_neg+TEC7_neg'],
0143     TOB = dict(
0144          TTRHBuilder    = cms.string('WithTrackAngle'),
0145          clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0146          matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
0147          skipClusters   = cms.InputTag('tobTecStepClusters')
0148     ),
0149     TEC = dict(
0150         matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
0151         skipClusters = cms.InputTag('tobTecStepClusters'),
0152         useRingSlector = cms.bool(True),
0153         TTRHBuilder = cms.string('WithTrackAngle'), 
0154         clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0155         minRing = cms.int32(5),
0156         maxRing = cms.int32(5)
0157     )
0158 )
0159 # Pair TrackingRegion
0160 tobTecStepTrackingRegionsPair = _globalTrackingRegionFromBeamSpotFixedZ.clone(
0161     RegionPSet = dict(
0162         ptMin            = 0.6,
0163         originHalfLength = 30.0,
0164         originRadius     = 6.0)
0165 )
0166 
0167 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(tobTecStepTrackingRegionsPair, 
0168                 _mixedTripletStepTrackingRegionsCommon_pp_on_HI.clone(RegionPSet = dict(
0169                     ptMinScaling4BigEvts = False,
0170                     fixedError           = 7.5,
0171                     ptMin                = 2.0,
0172                     originRadius         = 6.0
0173                 )                                                                      )
0174 )
0175 
0176 
0177 # Pair seeds
0178 tobTecStepHitDoubletsPair = _hitPairEDProducer.clone(
0179     seedingLayers         = 'tobTecStepSeedLayersPair',
0180     trackingRegions       = 'tobTecStepTrackingRegionsPair',
0181     produceSeedingHitSets = True,
0182     maxElementTotal       = 12000000,
0183 )
0184 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
0185 tobTecStepSeedsPair = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
0186     seedingHitSets     = 'tobTecStepHitDoubletsPair',
0187     SeedComparitorPSet = _tobTecStepSeedComparitorPSet,
0188 )
0189 #fastsim
0190 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
0191 fastSim.toReplaceWith(tobTecStepSeedsPair,
0192                       FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
0193         trackingRegions = 'tobTecStepTrackingRegionsPair',
0194         hitMasks        = cms.InputTag('tobTecStepMasks'),
0195         seedFinderSelector = dict(layerList = tobTecStepSeedLayersPair.layerList.value())
0196         )
0197 )
0198 
0199 
0200 # Combined seeds
0201 import RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi
0202 tobTecStepSeeds = RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi.globalCombinedSeeds.clone(
0203     seedCollections = ['tobTecStepSeedsTripl', 'tobTecStepSeedsPair']
0204 )
0205 # LowPU
0206 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
0207 trackingLowPU.toModify(tobTecStepHitDoubletsPair, seedingLayers = 'tobTecStepSeedLayers')
0208 trackingLowPU.toReplaceWith(tobTecStepSeeds, _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
0209     seedingHitSets = 'tobTecStepHitDoubletsPair',
0210 ))
0211 
0212 
0213 # QUALITY CUTS DURING TRACK BUILDING (for inwardss and outwards track building steps)
0214 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
0215 _tobTecStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
0216     maxLostHits         = 0,
0217     minimumNumberOfHits = 5,
0218     minPt               = 0.1,
0219     minHitsMinPt        = 3
0220 )
0221 tobTecStepTrajectoryFilter = _tobTecStepTrajectoryFilterBase.clone(
0222     seedPairPenalty = 1,
0223 )
0224 trackingLowPU.toReplaceWith(tobTecStepTrajectoryFilter, _tobTecStepTrajectoryFilterBase.clone(
0225     minimumNumberOfHits = 6,
0226 ))
0227 
0228 (pp_on_XeXe_2017 | pp_on_AA).toModify(tobTecStepTrajectoryFilter, minPt=2.0)
0229 
0230 tobTecStepInOutTrajectoryFilter = tobTecStepTrajectoryFilter.clone(
0231     minimumNumberOfHits = 4,
0232 )
0233 
0234 
0235 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
0236 tobTecStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
0237     ComponentName    = 'tobTecStepChi2Est',
0238     nSigma           = 3.0,
0239     MaxChi2          = 16.0,
0240     clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
0241 )
0242 trackingLowPU.toModify(tobTecStepChi2Est,
0243     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
0244 )
0245 
0246 # TRACK BUILDING
0247 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
0248 tobTecStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
0249     trajectoryFilter       = dict(refToPSet_ = 'tobTecStepTrajectoryFilter'),
0250     inOutTrajectoryFilter  = dict(refToPSet_ = 'tobTecStepInOutTrajectoryFilter'),
0251     useSameTrajFilter      = False,
0252     minNrOfHitsForRebuild  = 4,
0253     alwaysUseInvalidHits   = False,
0254     maxCand                = 2,
0255     estimator              = 'tobTecStepChi2Est',
0256     #startSeedHitsInRebuild = True,
0257     maxDPhiForLooperReconstruction = 2.0,
0258     maxPtForLooperReconstruction   = 0.7,
0259 )
0260 trackingNoLoopers.toModify(tobTecStepTrajectoryBuilder,
0261                            maxPtForLooperReconstruction = 0.0)
0262 # Important note for LowPU: in RunI_TobTecStep the
0263 # inOutTrajectoryFilter parameter is spelled as
0264 # inOutTrajectoryFilterName, and I suspect it has no effect there. I
0265 # chose to 'fix' the behaviour here, so the era is not fully
0266 # equivalent to the customize. To restore the customize behaviour,
0267 # uncomment the following lines
0268 #trackingLowPU.toModify(tobTecStepTrajectoryBuilder,
0269 #    inOutTrajectoryFilter = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.inOutTrajectoryFilter.clone(),
0270 #    inOutTrajectoryFilterName = cms.PSet(refToPSet_ = cms.string('tobTecStepInOutTrajectoryFilter'))
0271 #)
0272 
0273 # MAKING OF TRACK CANDIDATES
0274 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
0275 # Give handle for CKF for HI
0276 _tobTecStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
0277     src = 'tobTecStepSeeds',
0278     clustersToSkip              = 'tobTecStepClusters',
0279     ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
0280     numHitsForSeedCleaner       = 50,
0281     onlyPixelHitsForSeedCleaner = False,
0282     TrajectoryBuilderPSet       = dict(refToPSet_ = 'tobTecStepTrajectoryBuilder'),
0283     doSeedingRegionRebuilding   = True,
0284     useHitsSplitting            = True,
0285     cleanTrajectoryAfterInOut   = True,
0286     TrajectoryCleaner = 'tobTecStepTrajectoryCleanerBySharedHits',
0287 )
0288 tobTecStepTrackCandidates = _tobTecStepTrackCandidatesCkf.clone()
0289 
0290 from Configuration.ProcessModifiers.trackingMkFitTobTecStep_cff import trackingMkFitTobTecStep
0291 import RecoTracker.MkFit.mkFitSeedConverter_cfi as mkFitSeedConverter_cfi
0292 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as mkFitIterationConfigESProducer_cfi
0293 import RecoTracker.MkFit.mkFitProducer_cfi as mkFitProducer_cfi
0294 import RecoTracker.MkFit.mkFitOutputConverter_cfi as mkFitOutputConverter_cfi
0295 tobTecStepTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
0296     seeds = 'tobTecStepSeeds',
0297 )
0298 tobTecStepTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
0299     ComponentName = 'tobTecStepTrackCandidatesMkFitConfig',
0300     config = 'RecoTracker/MkFit/data/mkfit-phase1-tobTecStep.json',
0301 )
0302 tobTecStepTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone(
0303     seeds = 'tobTecStepTrackCandidatesMkFitSeeds',
0304     config = ('', 'tobTecStepTrackCandidatesMkFitConfig'),
0305     clustersToSkip = 'tobTecStepClusters',
0306 )
0307 trackingMkFitTobTecStep.toReplaceWith(tobTecStepTrackCandidates, mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
0308     seeds = 'tobTecStepSeeds',
0309     mkFitSeeds = 'tobTecStepTrackCandidatesMkFitSeeds',
0310     tracks = 'tobTecStepTrackCandidatesMkFit',
0311 ))
0312 (pp_on_XeXe_2017 | pp_on_AA).toModify(tobTecStepTrackCandidatesMkFitConfig, minPt=2.0)
0313 
0314 import FastSimulation.Tracking.TrackCandidateProducer_cfi
0315 fastSim.toReplaceWith(tobTecStepTrackCandidates,
0316                       FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
0317         MinNumberOfCrossedLayers = 3,
0318         src      = 'tobTecStepSeeds',
0319         hitMasks = cms.InputTag('tobTecStepMasks')
0320         )
0321 )
0322 
0323 
0324 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
0325 tobTecStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
0326     ComponentName       = 'tobTecStepTrajectoryCleanerBySharedHits',
0327     fractionShared      = 0.09,
0328     allowSharedFirstHit = True
0329 )
0330 trackingLowPU.toModify(tobTecStepTrajectoryCleanerBySharedHits, fractionShared = 0.19)
0331 
0332 # TRACK FITTING AND SMOOTHING OPTIONS
0333 import TrackingTools.TrackFitters.RungeKuttaFitters_cff
0334 tobTecStepFitterSmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.KFFittingSmootherWithOutliersRejectionAndRK.clone(
0335     ComponentName   = 'tobTecStepFitterSmoother',
0336     EstimateCut     = 30,
0337     MinNumberOfHits = 7,
0338     Fitter          = 'tobTecStepRKFitter',
0339     Smoother        = 'tobTecStepRKSmoother'
0340 )
0341 trackingLowPU.toModify(tobTecStepFitterSmoother, MinNumberOfHits = 8)
0342 
0343 tobTecStepFitterSmootherForLoopers = tobTecStepFitterSmoother.clone(
0344     ComponentName = 'tobTecStepFitterSmootherForLoopers',
0345     Fitter        = 'tobTecStepRKFitterForLoopers',
0346     Smoother      = 'tobTecStepRKSmootherForLoopers'
0347 )
0348 
0349 # Also necessary to specify minimum number of hits after final track fit
0350 tobTecStepRKTrajectoryFitter = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectoryFitter.clone(
0351     ComponentName = 'tobTecStepRKFitter',
0352     minHits       = 7
0353 )
0354 trackingLowPU.toModify(tobTecStepRKTrajectoryFitter, minHits = 8)
0355 
0356 tobTecStepRKTrajectoryFitterForLoopers = tobTecStepRKTrajectoryFitter.clone(
0357     ComponentName = 'tobTecStepRKFitterForLoopers',
0358     Propagator    = 'PropagatorWithMaterialForLoopers',
0359 )
0360 
0361 tobTecStepRKTrajectorySmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectorySmoother.clone(
0362     ComponentName  = 'tobTecStepRKSmoother',
0363     errorRescaling = 10.0,
0364     minHits        = 7
0365 )
0366 trackingLowPU.toModify(tobTecStepRKTrajectorySmoother, minHits = 8)
0367 
0368 tobTecStepRKTrajectorySmootherForLoopers = tobTecStepRKTrajectorySmoother.clone(
0369     ComponentName = 'tobTecStepRKSmootherForLoopers',
0370     Propagator    = 'PropagatorWithMaterialForLoopers',
0371 )
0372 
0373 import TrackingTools.TrackFitters.FlexibleKFFittingSmoother_cfi
0374 tobTecFlexibleKFFittingSmoother = TrackingTools.TrackFitters.FlexibleKFFittingSmoother_cfi.FlexibleKFFittingSmoother.clone(
0375     ComponentName  = 'tobTecFlexibleKFFittingSmoother',
0376     standardFitter = 'tobTecStepFitterSmoother',
0377     looperFitter   = 'tobTecStepFitterSmootherForLoopers',
0378 )
0379 
0380 
0381 # TRACK FITTING
0382 import RecoTracker.TrackProducer.TrackProducer_cfi
0383 tobTecStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
0384     src           = 'tobTecStepTrackCandidates',
0385     AlgorithmName = 'tobTecStep',
0386     #Fitter = 'tobTecStepFitterSmoother',
0387     Fitter        = 'tobTecFlexibleKFFittingSmoother',
0388 )
0389 fastSim.toModify(tobTecStepTracks, TTRHBuilder = 'WithoutRefit')
0390 
0391 
0392 # TRACK SELECTION AND QUALITY FLAG SETTING.
0393 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierPrompt_cfi import *
0394 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierDetached_cfi import *
0395 tobTecStepClassifier1 = TrackMVAClassifierDetached.clone(
0396     src         = 'tobTecStepTracks',
0397     mva         = dict(GBRForestLabel = 'MVASelectorIter6_13TeV'),
0398     qualityCuts = [-0.6,-0.45,-0.3]
0399 )
0400 fastSim.toModify(tobTecStepClassifier1, vertices = 'firstStepPrimaryVerticesBeforeMixing')
0401 
0402 tobTecStepClassifier2 = TrackMVAClassifierPrompt.clone(
0403     src         = 'tobTecStepTracks',
0404     mva         = dict(GBRForestLabel = 'MVASelectorIter0_13TeV'),
0405     qualityCuts = [0.0,0.0,0.0]
0406 )
0407 fastSim.toModify(tobTecStepClassifier2,vertices = 'firstStepPrimaryVerticesBeforeMixing')
0408 
0409 from RecoTracker.FinalTrackSelectors.ClassifierMerger_cfi import *
0410 tobTecStep = ClassifierMerger.clone(
0411     inputClassifiers = ['tobTecStepClassifier1','tobTecStepClassifier2']
0412 )
0413 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0414 trackingPhase1.toReplaceWith(tobTecStep, tobTecStepClassifier1.clone(
0415      mva = dict(GBRForestLabel = 'MVASelectorTobTecStep_Phase1'),
0416      qualityCuts = [-0.6,-0.45,-0.3]
0417 ))
0418 
0419 from RecoTracker.FinalTrackSelectors.trackTfClassifier_cfi import *
0420 from RecoTracker.FinalTrackSelectors.trackSelectionTf_cfi import *
0421 from RecoTracker.FinalTrackSelectors.trackSelectionTf_CKF_cfi import *
0422 trackdnn.toReplaceWith(tobTecStep, trackTfClassifier.clone(
0423      src         = 'tobTecStepTracks',
0424      qualityCuts = qualityCutDictionary.TobTecStep.value()
0425 ))
0426 (trackdnn & fastSim).toModify(tobTecStep,vertices = 'firstStepPrimaryVerticesBeforeMixing')
0427 
0428 pp_on_AA.toModify(tobTecStep, qualityCuts = [-0.6,-0.3,0.7])
0429 
0430 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
0431 trackingLowPU.toReplaceWith(tobTecStep, RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
0432     src            = 'tobTecStepTracks',
0433     useAnyMVA      = cms.bool(False),
0434     GBRForestLabel = cms.string('MVASelectorIter6'),
0435     trackSelectors = [
0436         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
0437             name = 'tobTecStepLoose',
0438             chi2n_par = 0.4,
0439             res_par = ( 0.003, 0.001 ),
0440             minNumberLayers = 5,
0441             maxNumberLostLayers = 1,
0442             minNumber3DLayers = 2,
0443             d0_par1 = ( 2.0, 4.0 ),
0444             dz_par1 = ( 1.8, 4.0 ),
0445             d0_par2 = ( 2.0, 4.0 ),
0446             dz_par2 = ( 1.8, 4.0 )
0447         ),
0448         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
0449             name = 'tobTecStepTight',
0450             preFilterName = 'tobTecStepLoose',
0451             chi2n_par = 0.3,
0452             res_par = ( 0.003, 0.001 ),
0453             minNumberLayers = 5,
0454             maxNumberLostLayers = 0,
0455             minNumber3DLayers = 2,
0456             d0_par1 = ( 1.5, 4.0 ),
0457             dz_par1 = ( 1.4, 4.0 ),
0458             d0_par2 = ( 1.5, 4.0 ),
0459             dz_par2 = ( 1.4, 4.0 )
0460         ),
0461         RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
0462             name = 'QualityMasks',
0463             preFilterName = 'tobTecStepTight',
0464             chi2n_par = 0.2,
0465             res_par = ( 0.003, 0.001 ),
0466             minNumberLayers = 5,
0467             maxNumberLostLayers = 0,
0468             minNumber3DLayers = 2,
0469             d0_par1 = ( 1.4, 4.0 ),
0470             dz_par1 = ( 1.3, 4.0 ),
0471             d0_par2 = ( 1.4, 4.0 ),
0472             dz_par2 = ( 1.3, 4.0 )
0473         ),
0474     ] #end of vpset
0475 )) #end of clone
0476 
0477 
0478 
0479 TobTecStepTask = cms.Task(tobTecStepClusters,
0480                           tobTecStepSeedLayersTripl,
0481                           tobTecStepTrackingRegionsTripl,
0482                           tobTecStepHitDoubletsTripl,
0483                           tobTecStepHitTripletsTripl,
0484                           tobTecStepSeedsTripl,
0485                           tobTecStepSeedLayersPair,
0486                           tobTecStepTrackingRegionsPair,
0487                           tobTecStepHitDoubletsPair,
0488                           tobTecStepSeedsPair,
0489                           tobTecStepSeeds,
0490                           tobTecStepTrackCandidates,
0491                           tobTecStepTracks,
0492                           tobTecStepClassifier1,tobTecStepClassifier2,
0493                           tobTecStep)
0494 TobTecStep = cms.Sequence(TobTecStepTask)
0495 
0496 _TobTecStepTask_trackingMkFit = TobTecStepTask.copy()
0497 _TobTecStepTask_trackingMkFit.add(tobTecStepTrackCandidatesMkFitSeeds, tobTecStepTrackCandidatesMkFit, tobTecStepTrackCandidatesMkFitConfig)
0498 trackingMkFitTobTecStep.toReplaceWith(TobTecStepTask, _TobTecStepTask_trackingMkFit)
0499 
0500 ### Following are specific for LowPU, they're collected here to
0501 ### not to interfere too much with the default configuration
0502 # SEEDING LAYERS
0503 tobTecStepSeedLayers = _mod.seedingLayersEDProducer.clone(
0504     layerList = ['TOB1+TOB2', 
0505         'TOB1+TEC1_pos', 'TOB1+TEC1_neg', 
0506         'TEC1_pos+TEC2_pos', 'TEC2_pos+TEC3_pos', 
0507         'TEC3_pos+TEC4_pos', 'TEC4_pos+TEC5_pos', 
0508         'TEC5_pos+TEC6_pos', 'TEC6_pos+TEC7_pos', 
0509         'TEC1_neg+TEC2_neg', 'TEC2_neg+TEC3_neg', 
0510         'TEC3_neg+TEC4_neg', 'TEC4_neg+TEC5_neg', 
0511         'TEC5_neg+TEC6_neg', 'TEC6_neg+TEC7_neg'],
0512     TOB = dict(
0513         matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
0514         skipClusters = cms.InputTag('tobTecStepClusters'),
0515         TTRHBuilder = cms.string('WithTrackAngle'), 
0516         clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTiny'))
0517     ),
0518     TEC = dict(
0519         matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
0520         skipClusters = cms.InputTag('tobTecStepClusters'),
0521         #    untracked bool useSimpleRphiHitsCleaner = false
0522         useRingSlector = cms.bool(True),
0523         TTRHBuilder = cms.string('WithTrackAngle'), 
0524         clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTiny')),
0525         minRing = cms.int32(5),
0526         maxRing = cms.int32(5)
0527     )
0528 )
0529 
0530 trackingLowPU.toReplaceWith(TobTecStepTask, 
0531     cms.Task(
0532     tobTecStepClusters,
0533     tobTecStepSeedLayers,
0534     tobTecStepTrackingRegionsPair,
0535     tobTecStepHitDoubletsPair,
0536     tobTecStepSeeds,
0537     tobTecStepTrackCandidates,
0538     tobTecStepTracks,
0539     tobTecStep
0540     )
0541 )
0542 
0543 #fastsim
0544 import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
0545 tobTecStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(tobTecStepClusters)
0546 fastSim.toReplaceWith(TobTecStepTask,
0547                       cms.Task(tobTecStepMasks
0548                                    ,tobTecStepTrackingRegionsTripl
0549                                    ,tobTecStepSeedsTripl
0550                                    ,tobTecStepTrackingRegionsPair
0551                                    ,tobTecStepSeedsPair
0552                                    ,tobTecStepSeeds
0553                                    ,tobTecStepTrackCandidates
0554                                    ,tobTecStepTracks
0555                                    ,tobTecStepClassifier1,tobTecStepClassifier2
0556                                    ,tobTecStep
0557                                    )
0558 )