File indexing completed on 2024-04-06 12:28:10
0001 import FWCore.ParameterSet.Config as cms
0002
0003
0004 from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
0005 from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary
0006
0007
0008 from Configuration.ProcessModifiers.trackingNoLoopers_cff import trackingNoLoopers
0009
0010
0011
0012
0013 jetsForCoreTracking = cms.EDFilter('CandPtrSelector', src = cms.InputTag('ak4CaloJetsForTrk'), cut = cms.string('pt > 100 && abs(eta) < 2.5'), filter = cms.bool(False))
0014
0015 jetsForCoreTrackingBarrel = jetsForCoreTracking.clone( cut = 'pt > 100 && abs(eta) < 1.4' )
0016 jetsForCoreTrackingEndcap = jetsForCoreTracking.clone( cut = 'pt > 100 && abs(eta) < 2.5' )
0017
0018
0019 firstStepGoodPrimaryVertices = cms.EDFilter('PrimaryVertexObjectFilter',
0020 filterParams = cms.PSet(
0021 minNdof = cms.double(25.0),
0022 maxZ = cms.double(15.0),
0023 maxRho = cms.double(2.0)
0024 ),
0025 src=cms.InputTag('firstStepPrimaryVertices')
0026 )
0027
0028 import RecoTracker.TkSeedingLayers.seedingLayersEDProducer_cfi as _mod
0029
0030
0031 jetCoreRegionalStepSeedLayers = _mod.seedingLayersEDProducer.clone(
0032 layerList = ['BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3',
0033 'BPix1+FPix1_pos', 'BPix1+FPix1_neg',
0034 'BPix2+FPix1_pos', 'BPix2+FPix1_neg',
0035 'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg',
0036
0037 'BPix3+TIB1','BPix3+TIB2'],
0038 TIB = dict(
0039 matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
0040 TTRHBuilder = cms.string('WithTrackAngle'),
0041 clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutNone'))
0042 ),
0043 BPix = dict(
0044 useErrorsFromParam = cms.bool(True),
0045 hitErrorRPhi = cms.double(0.0027),
0046 hitErrorRZ = cms.double(0.006),
0047 TTRHBuilder = cms.string('WithTrackAngle'),
0048 HitProducer = cms.string('siPixelRecHits'),
0049
0050 ),
0051 FPix = dict(
0052 useErrorsFromParam = cms.bool(True),
0053 hitErrorRPhi = cms.double(0.0051),
0054 hitErrorRZ = cms.double(0.0036),
0055 TTRHBuilder = cms.string('WithTrackAngle'),
0056 HitProducer = cms.string('siPixelRecHits'),
0057
0058 )
0059 )
0060 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0061 _layerListForPhase1 = [
0062 'BPix1+BPix2', 'BPix1+BPix3', 'BPix1+BPix4',
0063 'BPix2+BPix3', 'BPix2+BPix4',
0064 'BPix3+BPix4',
0065 'BPix1+FPix1_pos', 'BPix1+FPix1_neg',
0066 'BPix2+FPix1_pos', 'BPix2+FPix1_neg',
0067 'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg',
0068 'FPix1_pos+FPix3_pos', 'FPix1_neg+FPix3_neg',
0069 'FPix2_pos+FPix3_pos', 'FPix2_neg+FPix3_neg',
0070
0071 'BPix4+TIB1','BPix4+TIB2'
0072 ]
0073 trackingPhase1.toModify(jetCoreRegionalStepSeedLayers, layerList = _layerListForPhase1)
0074
0075
0076 from RecoTauTag.HLTProducers.tauRegionalPixelSeedTrackingRegions_cfi import tauRegionalPixelSeedTrackingRegions as _tauRegionalPixelSeedTrackingRegions
0077 jetCoreRegionalStepTrackingRegions = _tauRegionalPixelSeedTrackingRegions.clone(
0078 RegionPSet=dict(
0079 ptMin = 10,
0080 deltaPhiRegion = 0.20,
0081 deltaEtaRegion = 0.20,
0082 JetSrc = 'jetsForCoreTracking',
0083 vertexSrc = 'firstStepGoodPrimaryVertices',
0084 howToUseMeasurementTracker = 'Never')
0085 )
0086 jetCoreRegionalStepEndcapTrackingRegions = jetCoreRegionalStepTrackingRegions.clone(
0087 RegionPSet=dict(
0088 JetSrc = 'jetsForCoreTrackingEndcap')
0089 )
0090
0091
0092 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
0093 jetCoreRegionalStepHitDoublets = _hitPairEDProducer.clone(
0094 seedingLayers = 'jetCoreRegionalStepSeedLayers',
0095 trackingRegions = 'jetCoreRegionalStepTrackingRegions',
0096 produceSeedingHitSets = True,
0097 maxElementTotal = 12000000,
0098 )
0099 jetCoreRegionalStepEndcapHitDoublets = jetCoreRegionalStepHitDoublets.clone(
0100 trackingRegions = 'jetCoreRegionalStepEndcapTrackingRegions',
0101 )
0102
0103 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
0104 jetCoreRegionalStepSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
0105 seedingHitSets = 'jetCoreRegionalStepHitDoublets',
0106 forceKinematicWithRegionDirection = True
0107 )
0108 import RecoTracker.TkSeedGenerator.deepCoreSeedGenerator_cfi
0109 jetCoreRegionalStepSeedsBarrel = RecoTracker.TkSeedGenerator.deepCoreSeedGenerator_cfi.deepCoreSeedGenerator.clone(
0110 vertices = "firstStepPrimaryVertices",
0111 cores = "jetsForCoreTrackingBarrel"
0112 )
0113
0114 jetCoreRegionalStepSeedsEndcap = jetCoreRegionalStepSeeds.clone(
0115 seedingHitSets = 'jetCoreRegionalStepEndcapHitDoublets',
0116 )
0117
0118
0119 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
0120 jetCoreRegionalStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
0121 minimumNumberOfHits = 4,
0122 seedPairPenalty = 0,
0123 minPt = 0.1
0124 )
0125 jetCoreRegionalStepBarrelTrajectoryFilter = jetCoreRegionalStepTrajectoryFilter.clone(
0126 minimumNumberOfHits = 2,
0127 maxConsecLostHits = 2,
0128 maxLostHitsFraction = 1.1,
0129 seedPairPenalty = 0,
0130 minPt = 0.9
0131 )
0132 jetCoreRegionalStepEndcapTrajectoryFilter = jetCoreRegionalStepTrajectoryFilter.clone()
0133
0134
0135 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
0136 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0137 (pp_on_XeXe_2017 | pp_on_AA).toModify(jetCoreRegionalStepTrajectoryFilter, minPt=5.0)
0138
0139 import TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi
0140 jetCoreRegionalStepChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
0141 ComponentName = 'jetCoreRegionalStepChi2Est',
0142 nSigma = 3.0,
0143 MaxChi2 = 30.0
0144 )
0145
0146
0147 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
0148
0149 CkfBaseTrajectoryFilter_block = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.CkfBaseTrajectoryFilter_block
0150 jetCoreRegionalStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
0151 trajectoryFilter = dict(refToPSet_ = 'jetCoreRegionalStepTrajectoryFilter'),
0152 maxCand = 50,
0153 estimator = 'jetCoreRegionalStepChi2Est',
0154 maxDPhiForLooperReconstruction = 2.0,
0155 maxPtForLooperReconstruction = 0.7,
0156 )
0157 trackingNoLoopers.toModify(jetCoreRegionalStepTrajectoryBuilder,
0158 maxPtForLooperReconstruction = 0.0)
0159 jetCoreRegionalStepBarrelTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
0160 trajectoryFilter = dict(refToPSet_ = 'jetCoreRegionalStepBarrelTrajectoryFilter'),
0161 maxCand = 30,
0162 estimator = 'jetCoreRegionalStepChi2Est',
0163 keepOriginalIfRebuildFails = True,
0164 lockHits = False,
0165 requireSeedHitsInRebuild = False,
0166 )
0167 trackingNoLoopers.toModify(jetCoreRegionalStepBarrelTrajectoryBuilder,
0168 maxPtForLooperReconstruction = cms.double(0.0))
0169 jetCoreRegionalStepEndcapTrajectoryBuilder = jetCoreRegionalStepTrajectoryBuilder.clone(
0170 trajectoryFilter = cms.PSet(refToPSet_ = cms.string('jetCoreRegionalStepEndcapTrajectoryFilter')),
0171 maxCand = 30,
0172
0173 )
0174 trackingNoLoopers.toModify(jetCoreRegionalStepEndcapTrajectoryBuilder,
0175 maxPtForLooperReconstruction = cms.double(0.0))
0176
0177 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
0178 jetCoreRegionalStepDeepCoreTrajectoryCleaner = trajectoryCleanerBySharedHits.clone(
0179 ComponentName = 'jetCoreRegionalStepDeepCoreTrajectoryCleaner',
0180 fractionShared = 0.45
0181 )
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
0195 jetCoreRegionalStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
0196 src = 'jetCoreRegionalStepSeeds',
0197 maxSeedsBeforeCleaning = 10000,
0198 TrajectoryBuilderPSet = dict(refToPSet_ = 'jetCoreRegionalStepTrajectoryBuilder'),
0199 NavigationSchool = 'SimpleNavigationSchool',
0200
0201
0202
0203 )
0204 jetCoreRegionalStepBarrelTrackCandidates = jetCoreRegionalStepTrackCandidates.clone(
0205 src = 'jetCoreRegionalStepSeedsBarrel',
0206 TrajectoryBuilderPSet = cms.PSet( refToPSet_ = cms.string('jetCoreRegionalStepBarrelTrajectoryBuilder')),
0207
0208
0209
0210 TrajectoryCleaner = 'jetCoreRegionalStepDeepCoreTrajectoryCleaner',
0211 doSeedingRegionRebuilding = True,
0212 )
0213 jetCoreRegionalStepEndcapTrackCandidates = jetCoreRegionalStepTrackCandidates.clone(
0214 src = 'jetCoreRegionalStepSeedsEndcap',
0215 TrajectoryBuilderPSet = cms.PSet( refToPSet_ = cms.string('jetCoreRegionalStepEndcapTrajectoryBuilder')),
0216
0217
0218
0219 )
0220
0221
0222 import RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi
0223 jetCoreRegionalStepTracks = RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi.TrackProducerIterativeDefault.clone(
0224 AlgorithmName = 'jetCoreRegionalStep',
0225 src = 'jetCoreRegionalStepTrackCandidates',
0226 Fitter = 'FlexibleKFFittingSmoother'
0227 )
0228 jetCoreRegionalStepBarrelTracks = jetCoreRegionalStepTracks.clone(
0229 src = 'jetCoreRegionalStepBarrelTrackCandidates',
0230 )
0231 jetCoreRegionalStepEndcapTracks = jetCoreRegionalStepTracks.clone(
0232 src = 'jetCoreRegionalStepEndcapTrackCandidates',
0233 )
0234
0235 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0236 import RecoTracker.FinalTrackSelectors.trackListMerger_cfi
0237 _fastSim_jetCoreRegionalStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
0238 TrackProducers = [],
0239 hasSelector = [],
0240 selectedTrackQuals = [],
0241 copyExtras = True
0242 )
0243 fastSim.toReplaceWith(jetCoreRegionalStepTracks,_fastSim_jetCoreRegionalStepTracks)
0244 from Configuration.ProcessModifiers.seedingDeepCore_cff import seedingDeepCore
0245 (seedingDeepCore & fastSim).toReplaceWith(jetCoreRegionalStepBarrelTracks,_fastSim_jetCoreRegionalStepTracks)
0246 (seedingDeepCore & fastSim).toReplaceWith(jetCoreRegionalStepEndcapTracks,_fastSim_jetCoreRegionalStepTracks)
0247
0248
0249 from RecoTracker.FinalTrackSelectors.TrackCutClassifier_cff import *
0250 jetCoreRegionalStep = TrackCutClassifier.clone(
0251 src = 'jetCoreRegionalStepTracks',
0252 mva = dict(
0253 minPixelHits = [1,1,1],
0254 maxChi2 = [9999.,9999.,9999.],
0255 maxChi2n = [1.6,1.0,0.7],
0256 minLayers = [3,5,5],
0257 min3DLayers = [1,2,3],
0258 maxLostLayers = [4,3,2],
0259 maxDz = [0.5,0.35,0.2],
0260 maxDr = [0.3,0.2,0.1]
0261 ),
0262 vertices = 'firstStepGoodPrimaryVertices'
0263 )
0264 jetCoreRegionalStepBarrel = jetCoreRegionalStep.clone(
0265 src = 'jetCoreRegionalStepBarrelTracks',
0266 mva = dict(
0267
0268 min3DLayers = [1,2,2],
0269 ),
0270 )
0271
0272 from RecoTracker.FinalTrackSelectors.TrackMVAClassifierPrompt_cfi import *
0273 trackingPhase1.toReplaceWith(jetCoreRegionalStep, TrackMVAClassifierPrompt.clone(
0274 mva = dict(GBRForestLabel = 'MVASelectorJetCoreRegionalStep_Phase1'),
0275 src = 'jetCoreRegionalStepTracks',
0276 qualityCuts = [-0.2,0.0,0.4]
0277 ))
0278
0279 trackingPhase1.toReplaceWith(jetCoreRegionalStepBarrel, jetCoreRegionalStep.clone(
0280 src = 'jetCoreRegionalStepBarrelTracks',
0281 ))
0282
0283 pp_on_AA.toModify(jetCoreRegionalStep, qualityCuts = [-0.2, 0.0, 0.8])
0284 pp_on_AA.toModify(jetCoreRegionalStepBarrel, qualityCuts = [-0.2, 0.0, 0.8])
0285
0286 from RecoTracker.FinalTrackSelectors.trackTfClassifier_cfi import *
0287 from RecoTracker.FinalTrackSelectors.trackSelectionTf_cfi import *
0288 from RecoTracker.FinalTrackSelectors.trackSelectionTf_CKF_cfi import *
0289 trackdnn.toReplaceWith(jetCoreRegionalStep, trackTfClassifier.clone(
0290 src = 'jetCoreRegionalStepTracks',
0291 qualityCuts = qualityCutDictionary.JetCoreRegionalStep.value()
0292 ))
0293 trackdnn.toReplaceWith(jetCoreRegionalStepBarrel, trackTfClassifier.clone(
0294 src = 'jetCoreRegionalStepBarrelTracks',
0295 qualityCuts = qualityCutDictionary.JetCoreRegionalStep.value()
0296 ))
0297
0298 fastSim.toModify(jetCoreRegionalStep,vertices = 'firstStepPrimaryVerticesBeforeMixing')
0299
0300
0301 jetCoreRegionalStepEndcap = jetCoreRegionalStep.clone(
0302 src = 'jetCoreRegionalStepEndcapTracks',
0303 )
0304
0305
0306 JetCoreRegionalStepTask = cms.Task(jetsForCoreTracking,
0307 firstStepGoodPrimaryVertices,
0308
0309 jetCoreRegionalStepSeedLayers,
0310 jetCoreRegionalStepTrackingRegions,
0311 jetCoreRegionalStepHitDoublets,
0312 jetCoreRegionalStepSeeds,
0313 jetCoreRegionalStepTrackCandidates,
0314 jetCoreRegionalStepTracks,
0315
0316 jetCoreRegionalStep)
0317 JetCoreRegionalStep = cms.Sequence(JetCoreRegionalStepTask)
0318
0319 JetCoreRegionalStepBarrelTask = cms.Task(jetsForCoreTrackingBarrel,
0320 firstStepGoodPrimaryVertices,
0321
0322 jetCoreRegionalStepSeedLayers,
0323 jetCoreRegionalStepSeedsBarrel,
0324 jetCoreRegionalStepBarrelTrackCandidates,
0325 jetCoreRegionalStepBarrelTracks,
0326 jetCoreRegionalStepBarrel)
0327
0328 JetCoreRegionalStepEndcapTask = cms.Task(jetsForCoreTrackingEndcap,
0329 firstStepGoodPrimaryVertices,
0330
0331 jetCoreRegionalStepSeedLayers,
0332 jetCoreRegionalStepEndcapTrackingRegions,
0333 jetCoreRegionalStepEndcapHitDoublets,
0334 jetCoreRegionalStepSeedsEndcap,
0335 jetCoreRegionalStepEndcapTrackCandidates,
0336 jetCoreRegionalStepEndcapTracks,
0337 jetCoreRegionalStepEndcap)
0338
0339
0340 from RecoTracker.FinalTrackSelectors.TrackCollectionMerger_cfi import *
0341 (seedingDeepCore & ~fastSim).toReplaceWith(jetCoreRegionalStepTracks, TrackCollectionMerger.clone(
0342 trackProducers = ["jetCoreRegionalStepBarrelTracks",
0343 "jetCoreRegionalStepEndcapTracks",],
0344 inputClassifiers = ["jetCoreRegionalStepBarrel",
0345 "jetCoreRegionalStepEndcap",],
0346 foundHitBonus = 100.0,
0347 lostHitPenalty = 1.0
0348 ))
0349
0350 seedingDeepCore.toReplaceWith(jetCoreRegionalStep, jetCoreRegionalStepTracks.clone())
0351
0352 seedingDeepCore.toReplaceWith(JetCoreRegionalStepTask, cms.Task(
0353 JetCoreRegionalStepBarrelTask,
0354 JetCoreRegionalStepEndcapTask,
0355 cms.Task(jetCoreRegionalStepTracks,jetCoreRegionalStep)
0356 ))
0357
0358
0359 fastSim.toReplaceWith(JetCoreRegionalStepTask,
0360 cms.Task(jetCoreRegionalStepTracks,
0361 jetCoreRegionalStep))
0362 (seedingDeepCore & fastSim).toReplaceWith(JetCoreRegionalStepTask,
0363 cms.Task(jetCoreRegionalStepBarrelTracks, jetCoreRegionalStepEndcapTracks,
0364 jetCoreRegionalStepTracks,
0365 jetCoreRegionalStepBarrel, jetCoreRegionalStepEndcap,
0366 jetCoreRegionalStep))