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 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016 as _tracker_apv_vfp30_2016
0003 
0004 ### STEP 0 ###
0005 
0006 # hit building
0007 from RecoLocalTracker.SiPixelRecHits.PixelCPEESProducers_cff import *
0008 from RecoTracker.TransientTrackingRecHit.TTRHBuilders_cff import *
0009 
0010 from RecoTracker.TkSeedGenerator.trackerClusterCheck_cfi import trackerClusterCheck as _trackerClusterCheck
0011 trackerClusterCheckPreSplitting = _trackerClusterCheck.clone(
0012     PixelClusterCollectionLabel = 'siPixelClustersPreSplitting'
0013 )
0014 
0015 # SEEDING LAYERS
0016 import RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi
0017 import RecoTracker.TkSeedingLayers.PixelLayerQuadruplets_cfi
0018 initialStepSeedLayersPreSplitting = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone(
0019     FPix = dict(HitProducer = 'siPixelRecHitsPreSplitting'),
0020     BPix = dict(HitProducer = 'siPixelRecHitsPreSplitting')
0021 )
0022 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0023 trackingPhase1.toModify(initialStepSeedLayersPreSplitting,
0024     layerList = RecoTracker.TkSeedingLayers.PixelLayerQuadruplets_cfi.PixelLayerQuadruplets.layerList.value()
0025 )
0026 
0027 # TrackingRegion
0028 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpot_cfi import globalTrackingRegionFromBeamSpot as _globalTrackingRegionFromBeamSpot
0029 initialStepTrackingRegionsPreSplitting = _globalTrackingRegionFromBeamSpot.clone(RegionPSet = dict(
0030     ptMin        = 0.6,
0031     originRadius = 0.02,
0032     nSigmaZ      = 4.0
0033 ))
0034 trackingPhase1.toModify(initialStepTrackingRegionsPreSplitting, RegionPSet = dict(ptMin = 0.5))
0035 
0036 # seeding
0037 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
0038 initialStepHitDoubletsPreSplitting = _hitPairEDProducer.clone(
0039     seedingLayers   = 'initialStepSeedLayersPreSplitting',
0040     trackingRegions = 'initialStepTrackingRegionsPreSplitting',
0041     clusterCheck    = 'trackerClusterCheckPreSplitting',
0042     maxElement      = 50000000,
0043     produceIntermediateHitDoublets = True,
0044 )
0045 from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
0046 from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import *
0047 import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
0048 initialStepHitTripletsPreSplitting = _pixelTripletHLTEDProducer.clone(
0049     doublets              = 'initialStepHitDoubletsPreSplitting',
0050     produceSeedingHitSets = True,
0051     SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(
0052         clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting'
0053     ),
0054 )
0055 from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer
0056 trackingPhase1.toModify(initialStepHitDoubletsPreSplitting, layerPairs = [0,1,2]) # layer pairs (0,1), (1,2), (2,3)
0057 initialStepHitQuadrupletsPreSplitting = _caHitQuadrupletEDProducer.clone(
0058     doublets = 'initialStepHitDoubletsPreSplitting',
0059     extraHitRPhitolerance = initialStepHitTripletsPreSplitting.extraHitRPhitolerance,
0060     SeedComparitorPSet = initialStepHitTripletsPreSplitting.SeedComparitorPSet,
0061     maxChi2 = dict(
0062         pt1    = 0.7, pt2    = 2,
0063         value1 = 200, value2 = 50,
0064     ),
0065     useBendingCorrection = True,
0066     fitFastCircle        = True,
0067     fitFastCircleChi2Cut = True,
0068     CAThetaCut           = 0.0012,
0069     CAPhiCut             = 0.2,
0070 )
0071 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
0072 initialStepSeedsPreSplitting = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
0073     seedingHitSets = 'initialStepHitTripletsPreSplitting',
0074 )
0075 trackingPhase1.toModify(initialStepSeedsPreSplitting, seedingHitSets = 'initialStepHitQuadrupletsPreSplitting')
0076 
0077 
0078 # building
0079 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
0080 initialStepTrajectoryFilterBasePreSplitting = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
0081     minimumNumberOfHits = 4,
0082     minPt               = 0.2,
0083     maxCCCLostHits      = 0,
0084     minGoodStripCharge  = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose'))
0085 )
0086 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
0087 _tracker_apv_vfp30_2016.toModify(initialStepTrajectoryFilterBasePreSplitting, maxCCCLostHits = 2)
0088 import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
0089 initialStepTrajectoryFilterShapePreSplitting = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
0090 initialStepTrajectoryFilterPreSplitting = cms.PSet(
0091     ComponentType = cms.string('CompositeTrajectoryFilter'),
0092     filters = cms.VPSet(
0093         cms.PSet( refToPSet_ = cms.string('initialStepTrajectoryFilterBasePreSplitting')),
0094         cms.PSet( refToPSet_ = cms.string('initialStepTrajectoryFilterShapePreSplitting'))),
0095 )
0096 
0097 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
0098 initialStepChi2EstPreSplitting = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
0099     ComponentName = 'initialStepChi2EstPreSplitting',
0100     nSigma        = 3.0,
0101     MaxChi2       = 16.0,
0102     clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose')),
0103 )
0104 _tracker_apv_vfp30_2016.toModify(initialStepChi2EstPreSplitting,
0105     clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
0106 )
0107 
0108 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
0109 initialStepTrajectoryBuilderPreSplitting = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
0110     trajectoryFilter = dict(refToPSet_ = 'initialStepTrajectoryFilterPreSplitting'),
0111     alwaysUseInvalidHits = True,
0112     maxCand   = 3,
0113     estimator = 'initialStepChi2Est',
0114 )
0115 
0116 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
0117 initialStepTrackCandidatesPreSplitting = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
0118     src = 'initialStepSeedsPreSplitting',
0119     ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
0120     numHitsForSeedCleaner = 50,
0121     onlyPixelHitsForSeedCleaner = True,
0122     TrajectoryBuilderPSet = dict(refToPSet_ = 'initialStepTrajectoryBuilderPreSplitting'),
0123     doSeedingRegionRebuilding = True,
0124     useHitsSplitting = True,
0125 )
0126 initialStepTrackCandidatesPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
0127 
0128 from Configuration.ProcessModifiers.trackingMkFitInitialStepPreSplitting_cff import trackingMkFitInitialStepPreSplitting
0129 from RecoTracker.MkFit.mkFitGeometryESProducer_cfi import mkFitGeometryESProducer
0130 import RecoTracker.MkFit.mkFitSiPixelHitConverter_cfi as _mkFitSiPixelHitConverter_cfi
0131 import RecoTracker.MkFit.mkFitSiStripHitConverter_cfi as _mkFitSiStripHitConverter_cfi
0132 import RecoTracker.MkFit.mkFitEventOfHitsProducer_cfi as _mkFitEventOfHitsProducer_cfi
0133 import RecoTracker.MkFit.mkFitSeedConverter_cfi as _mkFitSeedConverter_cfi
0134 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as _mkFitIterationConfigESProducer_cfi
0135 import RecoTracker.MkFit.mkFitProducer_cfi as _mkFitProducer_cfi
0136 import RecoTracker.MkFit.mkFitOutputConverter_cfi as _mkFitOutputConverter_cfi
0137 mkFitSiPixelHitsPreSplitting = _mkFitSiPixelHitConverter_cfi.mkFitSiPixelHitConverter.clone(
0138     hits = 'siPixelRecHitsPreSplitting'
0139 )
0140 mkFitSiStripHits = _mkFitSiStripHitConverter_cfi.mkFitSiStripHitConverter.clone() # TODO: figure out better place for this module?
0141 mkFitEventOfHitsPreSplitting = _mkFitEventOfHitsProducer_cfi.mkFitEventOfHitsProducer.clone(
0142     pixelHits = 'mkFitSiPixelHitsPreSplitting'
0143 )
0144 initialStepTrackCandidatesMkFitSeedsPreSplitting = _mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
0145     seeds = 'initialStepSeedsPreSplitting',
0146 )
0147 # TODO: or try to re-use the ESProducer of initialStep?
0148 initialStepTrackCandidatesMkFitConfigPreSplitting = _mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
0149     ComponentName = 'initialStepTrackCandidatesMkFitConfigPreSplitting',
0150     config = 'RecoTracker/MkFit/data/mkfit-phase1-initialStep.json',
0151 )
0152 initialStepTrackCandidatesMkFitPreSplitting = _mkFitProducer_cfi.mkFitProducer.clone(
0153     pixelHits = 'mkFitSiPixelHitsPreSplitting',
0154     eventOfHits = 'mkFitEventOfHitsPreSplitting',
0155     seeds = 'initialStepTrackCandidatesMkFitSeedsPreSplitting',
0156     config = ('', 'initialStepTrackCandidatesMkFitConfigPreSplitting'),
0157 )
0158 trackingMkFitInitialStepPreSplitting.toReplaceWith(initialStepTrackCandidatesPreSplitting, _mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
0159     mkFitPixelHits = 'mkFitSiPixelHitsPreSplitting',
0160     mkFitEventOfHits = 'mkFitEventOfHitsPreSplitting',
0161     seeds = 'initialStepSeedsPreSplitting',
0162     mkFitSeeds = 'initialStepTrackCandidatesMkFitSeedsPreSplitting',
0163     tracks = 'initialStepTrackCandidatesMkFitPreSplitting',
0164 ))
0165 
0166 # fitting
0167 import RecoTracker.TrackProducer.TrackProducer_cfi
0168 initialStepTracksPreSplitting = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
0169     src              = 'initialStepTrackCandidatesPreSplitting',
0170     AlgorithmName    = 'initialStep',
0171     Fitter           = 'FlexibleKFFittingSmoother',
0172     NavigationSchool = '',
0173     MeasurementTrackerEvent = ''
0174 )
0175 initialStepTracksPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
0176 
0177 #vertices
0178 from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices as _offlinePrimaryVertices
0179 firstStepPrimaryVerticesPreSplitting = _offlinePrimaryVertices.clone(
0180     TrackLabel = 'initialStepTracksPreSplitting',
0181     vertexCollections = [_offlinePrimaryVertices.vertexCollections[0].clone()]
0182 )
0183 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
0184 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0185 (pp_on_XeXe_2017 | pp_on_AA).toModify(firstStepPrimaryVerticesPreSplitting, TkFilterParameters = dict(trackQuality = 'any'))
0186 
0187 #Jet Core emulation to identify jet-tracks
0188 from RecoTracker.IterativeTracking.InitialStep_cff import initialStepTrackRefsForJets, caloTowerForTrk, ak4CaloJetsForTrk
0189 from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import jetsForCoreTracking
0190 initialStepTrackRefsForJetsPreSplitting = initialStepTrackRefsForJets.clone(
0191     src = 'initialStepTracksPreSplitting'
0192 )
0193 caloTowerForTrkPreSplitting = caloTowerForTrk.clone()
0194 ak4CaloJetsForTrkPreSplitting = ak4CaloJetsForTrk.clone(
0195     src    = 'caloTowerForTrkPreSplitting',
0196     srcPVs = 'firstStepPrimaryVerticesPreSplitting'
0197 )
0198 jetsForCoreTrackingPreSplitting = jetsForCoreTracking.clone(
0199     src    = 'ak4CaloJetsForTrkPreSplitting'
0200 )
0201 
0202 #Cluster Splitting
0203 from RecoLocalTracker.SubCollectionProducers.jetCoreClusterSplitter_cfi import jetCoreClusterSplitter
0204 siPixelClusters = jetCoreClusterSplitter.clone(
0205     pixelClusters = 'siPixelClustersPreSplitting',
0206     vertices      = 'firstStepPrimaryVerticesPreSplitting',
0207     cores         = 'jetsForCoreTrackingPreSplitting'
0208 )
0209 
0210 # Final sequence
0211 from RecoLocalTracker.SiPixelRecHits.SiPixelRecHits_cfi import siPixelRecHits
0212 from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import MeasurementTrackerEvent
0213 from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import *
0214 InitialStepPreSplittingTask = cms.Task(trackerClusterCheckPreSplitting,
0215                                        initialStepSeedLayersPreSplitting,
0216                                        initialStepTrackingRegionsPreSplitting,
0217                                        initialStepHitDoubletsPreSplitting,
0218                                        initialStepHitTripletsPreSplitting,
0219                                        initialStepSeedsPreSplitting,
0220                                        initialStepTrackCandidatesPreSplitting,
0221                                        initialStepTracksPreSplitting,
0222                                        firstStepPrimaryVerticesPreSplitting,
0223                                        initialStepTrackRefsForJetsPreSplitting,
0224                                        caloTowerForTrkPreSplitting,
0225                                        ak4CaloJetsForTrkPreSplitting,
0226                                        jetsForCoreTrackingPreSplitting,
0227                                        siPixelClusters,
0228                                        siPixelRecHits,
0229                                        MeasurementTrackerEvent,
0230                                        siPixelClusterShapeCache)
0231 InitialStepPreSplitting = cms.Sequence(InitialStepPreSplittingTask)
0232 _InitialStepPreSplittingTask_trackingPhase1 = InitialStepPreSplittingTask.copy()
0233 _InitialStepPreSplittingTask_trackingPhase1.replace(initialStepHitTripletsPreSplitting, cms.Task(initialStepHitTripletsPreSplitting,initialStepHitQuadrupletsPreSplitting))
0234 trackingPhase1.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingPhase1.copyAndExclude([initialStepHitTripletsPreSplitting]))
0235 
0236 from Configuration.ProcessModifiers.trackingMkFitCommon_cff import trackingMkFitCommon
0237 _InitialStepPreSplittingTask_trackingMkFitCommon = InitialStepPreSplittingTask.copy()
0238 _InitialStepPreSplittingTask_trackingMkFitCommon.add(mkFitSiStripHits, mkFitGeometryESProducer)
0239 trackingMkFitCommon.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingMkFitCommon)
0240 _InitialStepPreSplittingTask_trackingMkFit = InitialStepPreSplittingTask.copy()
0241 _InitialStepPreSplittingTask_trackingMkFit.add(mkFitSiPixelHitsPreSplitting, mkFitEventOfHitsPreSplitting, initialStepTrackCandidatesMkFitSeedsPreSplitting, initialStepTrackCandidatesMkFitPreSplitting, initialStepTrackCandidatesMkFitConfigPreSplitting)
0242 trackingMkFitInitialStepPreSplitting.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingMkFit)
0243 
0244 
0245 # Although InitialStepPreSplitting is not really part of LowPU/Run1/Phase2PU140
0246 # tracking, we use it to get siPixelClusters and siPixelRecHits
0247 # collections for non-splitted pixel clusters. All modules before
0248 # iterTracking sequence use siPixelClustersPreSplitting and
0249 # siPixelRecHitsPreSplitting for that purpose.
0250 #
0251 # If siPixelClusters would be defined in
0252 # RecoLocalTracker.Configuration.RecoLocalTracker_cff, we would have a
0253 # situation where
0254 # - LowPU/Phase2PU140 has siPixelClusters defined in RecoLocalTracker_cff
0255 # - everything else has siPixelClusters defined here
0256 # and this leads to a mess. The way it is done here we have only
0257 # one place (within Reconstruction_cff) where siPixelClusters
0258 # module is defined.
0259 from RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizer_cfi import siPixelClusters as _siPixelClusters
0260 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
0261 trackingLowPU.toReplaceWith(siPixelClusters, _siPixelClusters)
0262 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
0263 trackingPhase2PU140.toReplaceWith(siPixelClusters, _siPixelClusters)
0264 _InitialStepPreSplittingTask_LowPU_Phase2PU140 = cms.Task(
0265     siPixelClusters ,
0266     siPixelRecHits ,
0267     MeasurementTrackerEvent ,
0268     siPixelClusterShapeCache
0269 )
0270 trackingLowPU.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_LowPU_Phase2PU140)
0271 trackingPhase2PU140.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_LowPU_Phase2PU140)