Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-10-05 02:13: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.TrackProducerIterativeDefault_cfi
0168 initialStepTracksPreSplitting = RecoTracker.TrackProducer.TrackProducerIterativeDefault_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, 
0186     TkFilterParameters = dict(
0187         trackQuality = 'any',
0188         maxNumTracksThreshold = 2**31-1
0189     ) 
0190 )
0191 
0192 #Jet Core emulation to identify jet-tracks
0193 from RecoTracker.IterativeTracking.InitialStep_cff import initialStepTrackRefsForJets, caloTowerForTrk, ak4CaloJetsForTrk
0194 from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import jetsForCoreTracking
0195 initialStepTrackRefsForJetsPreSplitting = initialStepTrackRefsForJets.clone(
0196     src = 'initialStepTracksPreSplitting'
0197 )
0198 caloTowerForTrkPreSplitting = caloTowerForTrk.clone()
0199 ak4CaloJetsForTrkPreSplitting = ak4CaloJetsForTrk.clone(
0200     src    = 'caloTowerForTrkPreSplitting',
0201     srcPVs = 'firstStepPrimaryVerticesPreSplitting'
0202 )
0203 jetsForCoreTrackingPreSplitting = jetsForCoreTracking.clone(
0204     src    = 'ak4CaloJetsForTrkPreSplitting'
0205 )
0206 
0207 #Cluster Splitting
0208 from RecoLocalTracker.SubCollectionProducers.jetCoreClusterSplitter_cfi import jetCoreClusterSplitter
0209 siPixelClusters = jetCoreClusterSplitter.clone(
0210     pixelClusters = 'siPixelClustersPreSplitting',
0211     vertices      = 'firstStepPrimaryVerticesPreSplitting',
0212     cores         = 'jetsForCoreTrackingPreSplitting'
0213 )
0214 
0215 # Final sequence
0216 from RecoLocalTracker.SiPixelRecHits.SiPixelRecHits_cfi import siPixelRecHits
0217 from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import MeasurementTrackerEvent
0218 from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import *
0219 InitialStepPreSplittingTask = cms.Task(trackerClusterCheckPreSplitting,
0220                                        initialStepSeedLayersPreSplitting,
0221                                        initialStepTrackingRegionsPreSplitting,
0222                                        initialStepHitDoubletsPreSplitting,
0223                                        initialStepHitTripletsPreSplitting,
0224                                        initialStepSeedsPreSplitting,
0225                                        initialStepTrackCandidatesPreSplitting,
0226                                        initialStepTracksPreSplitting,
0227                                        firstStepPrimaryVerticesPreSplitting,
0228                                        initialStepTrackRefsForJetsPreSplitting,
0229                                        caloTowerForTrkPreSplitting,
0230                                        ak4CaloJetsForTrkPreSplitting,
0231                                        jetsForCoreTrackingPreSplitting,
0232                                        siPixelClusters,
0233                                        siPixelRecHits,
0234                                        MeasurementTrackerEvent,
0235                                        siPixelClusterShapeCache)
0236 InitialStepPreSplitting = cms.Sequence(InitialStepPreSplittingTask)
0237 _InitialStepPreSplittingTask_trackingPhase1 = InitialStepPreSplittingTask.copy()
0238 _InitialStepPreSplittingTask_trackingPhase1.replace(initialStepHitTripletsPreSplitting, cms.Task(initialStepHitTripletsPreSplitting,initialStepHitQuadrupletsPreSplitting))
0239 trackingPhase1.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingPhase1.copyAndExclude([initialStepHitTripletsPreSplitting]))
0240 
0241 from Configuration.ProcessModifiers.trackingMkFitCommon_cff import trackingMkFitCommon
0242 _InitialStepPreSplittingTask_trackingMkFitCommon = InitialStepPreSplittingTask.copy()
0243 _InitialStepPreSplittingTask_trackingMkFitCommon.add(mkFitSiStripHits, mkFitGeometryESProducer)
0244 trackingMkFitCommon.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingMkFitCommon)
0245 _InitialStepPreSplittingTask_trackingMkFit = InitialStepPreSplittingTask.copy()
0246 _InitialStepPreSplittingTask_trackingMkFit.add(mkFitSiPixelHitsPreSplitting, mkFitEventOfHitsPreSplitting, initialStepTrackCandidatesMkFitSeedsPreSplitting, initialStepTrackCandidatesMkFitPreSplitting, initialStepTrackCandidatesMkFitConfigPreSplitting)
0247 trackingMkFitInitialStepPreSplitting.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingMkFit)
0248 
0249 
0250 # Although InitialStepPreSplitting is not really part of LowPU/Run1/Phase2PU140
0251 # tracking, we use it to get siPixelClusters and siPixelRecHits
0252 # collections for non-splitted pixel clusters. All modules before
0253 # iterTracking sequence use siPixelClustersPreSplitting and
0254 # siPixelRecHitsPreSplitting for that purpose.
0255 #
0256 # If siPixelClusters would be defined in
0257 # RecoLocalTracker.Configuration.RecoLocalTracker_cff, we would have a
0258 # situation where
0259 # - LowPU/Phase2PU140 has siPixelClusters defined in RecoLocalTracker_cff
0260 # - everything else has siPixelClusters defined here
0261 # and this leads to a mess. The way it is done here we have only
0262 # one place (within Reconstruction_cff) where siPixelClusters
0263 # module is defined.
0264 from RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizer_cfi import siPixelClusters as _siPixelClusters
0265 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
0266 trackingLowPU.toReplaceWith(siPixelClusters, _siPixelClusters)
0267 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
0268 trackingPhase2PU140.toReplaceWith(siPixelClusters, _siPixelClusters)
0269 _InitialStepPreSplittingTask_LowPU_Phase2PU140 = cms.Task(
0270     siPixelClusters ,
0271     siPixelRecHits ,
0272     MeasurementTrackerEvent ,
0273     siPixelClusterShapeCache
0274 )
0275 trackingLowPU.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_LowPU_Phase2PU140)
0276 trackingPhase2PU140.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_LowPU_Phase2PU140)