Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-11 23:32:45

0001 import FWCore.ParameterSet.Config as cms
0002 import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
0003 
0004 #----------------------------------------- NEW CLUSTERS (remove previously used clusters)
0005 displacedGeneralStepClusters = _cfg.clusterRemoverForIter("DisplacedGeneralStep")
0006 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
0007     _era.toReplaceWith(displacedGeneralStepClusters, _cfg.clusterRemoverForIter("DisplacedGeneralStep", _eraName, _postfix))
0008 
0009 #----------------------------------------- SEEDING LAYERS
0010 import RecoTracker.TkSeedingLayers.DisplacedGeneralLayerTriplet_cfi
0011 displacedGeneralStepSeedLayers = RecoTracker.TkSeedingLayers.DisplacedGeneralLayerTriplet_cfi.DisplacedGeneralLayerTriplet.clone()
0012 
0013 
0014 #----------------------------------------- TrackingRegion
0015 from RecoTracker.TkTrackingRegions.globalTrackingRegion_cfi import globalTrackingRegion as _globalTrackingRegion
0016 displacedGeneralStepTrackingRegions = _globalTrackingRegion.clone(
0017    RegionPSet = dict(
0018      precise = True,
0019      useMultipleScattering = True,
0020      originHalfLength = 55,
0021      originRadius = 10,
0022      ptMin = 1
0023    )
0024 )
0025 
0026 
0027 
0028 
0029 #----------------------------------------- Triplet seeding
0030 
0031 from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer
0032 displacedGeneralStepClusterShapeHitFilter = _ClusterShapeHitFilterESProducer.clone(
0033     ComponentName = 'displacedGeneralStepClusterShapeHitFilter',
0034     doStripShapeCut = cms.bool(False),
0035     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTight')
0036 )
0037 
0038 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
0039 displacedGeneralStepHitDoublets = _hitPairEDProducer.clone(
0040     seedingLayers = "displacedGeneralStepSeedLayers",
0041     trackingRegions = "displacedGeneralStepTrackingRegions",
0042     maxElement = 50000000,
0043     produceIntermediateHitDoublets = True,
0044 )
0045 
0046 from RecoTracker.TkSeedGenerator.multiHitFromChi2EDProducer_cfi import multiHitFromChi2EDProducer as _multiHitFromChi2EDProducer
0047 displacedGeneralStepHitTriplets = _multiHitFromChi2EDProducer.clone(
0048     doublets = "displacedGeneralStepHitDoublets",
0049     extraPhiKDBox = 0.01,
0050 )
0051 
0052 
0053 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
0054 from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter
0055 displacedGeneralStepSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(
0056     seedingHitSets = "displacedGeneralStepHitTriplets",
0057     SeedComparitorPSet = dict(
0058         ComponentName = 'CombinedSeedComparitor',
0059         mode = cms.string("and"),
0060         comparitors = cms.VPSet(
0061             cms.PSet(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
0062                 ComponentName = cms.string('PixelClusterShapeSeedComparitor'),
0063                 FilterAtHelixStage = cms.bool(True),
0064                 FilterPixelHits = cms.bool(False),
0065                 FilterStripHits = cms.bool(True),
0066                 ClusterShapeHitFilterName = cms.string('displacedGeneralStepClusterShapeHitFilter'),
0067                 ClusterShapeCacheSrc = cms.InputTag("siPixelClusterShapeCache") # not really needed here since FilterPixelHits=False
0068             ), 
0069             _StripSubClusterShapeSeedFilter.clone()
0070         )
0071     )
0072 )
0073 
0074 
0075 
0076 #----------------------------------------- QUALITY CUTS DURING TRACK BUILDING
0077 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff as _TrajectoryFilter_cff
0078 _displacedGeneralStepTrajectoryFilterBase = _TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
0079     maxLostHits = 1,
0080     minimumNumberOfHits = 4,
0081     minPt = 1,
0082 )
0083 
0084 displacedGeneralStepTrajectoryFilter = _displacedGeneralStepTrajectoryFilterBase.clone(
0085     seedPairPenalty = 1,
0086 )
0087 
0088 
0089 displacedGeneralStepTrajectoryFilterInOut = displacedGeneralStepTrajectoryFilter.clone()
0090 
0091 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
0092 displacedGeneralStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
0093     ComponentName = 'displacedGeneralStepChi2Est',
0094     nSigma = 3.0,
0095     MaxChi2 = 10.0,
0096     clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
0097 )
0098 
0099 
0100 
0101 #----------------------------------------- TRACK BUILDING
0102 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
0103 displacedGeneralStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
0104     trajectoryFilter = dict(refToPSet_ = 'displacedGeneralStepTrajectoryFilter'),
0105     inOutTrajectoryFilter = dict(refToPSet_ = 'displacedGeneralStepTrajectoryFilterInOut'),
0106     useSameTrajFilter = False,
0107     minNrOfHitsForRebuild = 4,
0108     maxCand = 2,
0109     estimator = 'displacedGeneralStepChi2Est'
0110 )
0111 
0112 
0113 
0114 #----------------------------------------- MAKING OF TRACK CANDIDATES
0115 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
0116 displacedGeneralStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
0117     src = 'displacedGeneralStepSeeds',
0118     TrajectoryCleaner = 'displacedGeneralStepTrajectoryCleanerBySharedHits',
0119     ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
0120     numHitsForSeedCleaner = 50,
0121     onlyPixelHitsForSeedCleaner = False,
0122     TrajectoryBuilderPSet = dict(refToPSet_ = 'displacedGeneralStepTrajectoryBuilder'),
0123     clustersToSkip = 'displacedGeneralStepClusters',
0124     doSeedingRegionRebuilding = True,
0125     useHitsSplitting = True,
0126     cleanTrajectoryAfterInOut = True
0127 )
0128 
0129 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
0130 displacedGeneralStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
0131     ComponentName = 'displacedGeneralStepTrajectoryCleanerBySharedHits',
0132     fractionShared = 0.25,
0133     allowSharedFirstHit = True
0134 )
0135 
0136 
0137 
0138 
0139 
0140 # ----------------------------------------- TRACK FITTING AND SMOOTHING OPTIONS
0141 import TrackingTools.TrackFitters.RungeKuttaFitters_cff
0142 displacedGeneralStepFitterSmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.KFFittingSmootherWithOutliersRejectionAndRK.clone(
0143     ComponentName = 'displacedGeneralStepFitterSmoother',
0144     EstimateCut = 30,
0145     MinNumberOfHits = 8,
0146     Fitter = 'displacedGeneralStepRKFitter',
0147     Smoother = 'displacedGeneralStepRKSmoother'
0148 )
0149 
0150 
0151 
0152 # Also necessary to specify minimum number of hits after final track fit
0153 displacedGeneralStepRKTrajectoryFitter = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectoryFitter.clone(
0154     ComponentName = 'displacedGeneralStepRKFitter',
0155     minHits = 8
0156 )
0157 
0158 
0159 
0160 displacedGeneralStepRKTrajectorySmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectorySmoother.clone(
0161     ComponentName = 'displacedGeneralStepRKSmoother',
0162     errorRescaling = 10.0,
0163     minHits = 8
0164 )
0165 
0166 
0167 
0168 import TrackingTools.TrackFitters.FlexibleKFFittingSmoother_cfi
0169 generalDisplacedFlexibleKFFittingSmoother = TrackingTools.TrackFitters.FlexibleKFFittingSmoother_cfi.FlexibleKFFittingSmoother.clone(
0170     ComponentName = 'generalDisplacedFlexibleKFFittingSmoother',
0171     standardFitter = 'displacedGeneralStepFitterSmoother',
0172 )
0173 
0174 
0175 
0176 
0177 import RecoTracker.TrackProducer.TrackProducer_cfi
0178 displacedGeneralStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
0179     src = 'displacedGeneralStepTrackCandidates',
0180     AlgorithmName = 'displacedGeneralStep',
0181     Fitter = 'generalDisplacedFlexibleKFFittingSmoother',
0182 )
0183 
0184 
0185 #---------------------------------------- TRACK SELECTION AND QUALITY FLAG SETTING.
0186 
0187 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierPrompt_cfi import *
0188 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierDetached_cfi import *
0189 displacedGeneralStepClassifier1 = TrackMVAClassifierDetached.clone(
0190   src = 'displacedGeneralStepTracks',
0191   mva = dict(GBRForestLabel = 'MVASelectorIter6_13TeV'),
0192   qualityCuts = [-0.6,-0.45,-0.3]
0193 )
0194 displacedGeneralStepClassifier2 = TrackMVAClassifierPrompt.clone(
0195 src = 'displacedGeneralStepTracks',
0196   mva = dict(GBRForestLabel = 'MVASelectorIter0_13TeV'),
0197   qualityCuts = [0.0,0.0,0.0]
0198 )
0199 
0200 from RecoTracker.FinalTrackSelectors.ClassifierMerger_cfi import *
0201 displacedGeneralStep = ClassifierMerger.clone(
0202   inputClassifiers=['displacedGeneralStepClassifier1','displacedGeneralStepClassifier2']
0203 )
0204 
0205 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0206 trackingPhase1.toReplaceWith(displacedGeneralStep, displacedGeneralStepClassifier1.clone(
0207     mva = dict(GBRForestLabel = 'MVASelectorTobTecStep_Phase1'),
0208     qualityCuts = [-0.6,-0.45,-0.3],
0209 ))
0210 
0211 
0212 
0213 DisplacedGeneralStepTask = cms.Task(displacedGeneralStepClusters,
0214                           displacedGeneralStepSeedLayers,
0215                           displacedGeneralStepTrackingRegions,
0216                           displacedGeneralStepHitDoublets,
0217                           displacedGeneralStepHitTriplets,
0218                           displacedGeneralStepSeeds,
0219                           displacedGeneralStepTrackCandidates,
0220                           displacedGeneralStepTracks,
0221                           displacedGeneralStepClassifier1,displacedGeneralStepClassifier2,
0222                           displacedGeneralStep)
0223 
0224 DisplacedGeneralStep = cms.Sequence(DisplacedGeneralStepTask)