Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 from __future__ import absolute_import
0002 from RecoTracker.IterativeTracking.DetachedTripletStep_cff import *
0003 from .HIPixelTripletSeeds_cff import *
0004 from .HIPixel3PrimTracks_cfi import *
0005 
0006 hiDetachedTripletStepClusters = cms.EDProducer("HITrackClusterRemover",
0007      clusterLessSolution = cms.bool(True),
0008      trajectories = cms.InputTag("hiGlobalPrimTracks"),
0009      overrideTrkQuals = cms.InputTag('hiInitialStepSelector','hiInitialStep'),
0010      TrackQuality = cms.string('highPurity'),
0011      minNumberOfLayersWithMeasBeforeFiltering = cms.int32(0),
0012      pixelClusters = cms.InputTag("siPixelClusters"),
0013      stripClusters = cms.InputTag("siStripClusters"),
0014      Common = cms.PSet(
0015          maxChi2 = cms.double(9.0),
0016      ),
0017      Strip = cms.PSet(
0018         #Yen-Jie's mod to preserve merged clusters
0019         maxSize = cms.uint32(2),
0020         maxChi2 = cms.double(9.0)
0021      )
0022 )
0023 
0024 
0025 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0026 trackingPhase1.toModify(hiDetachedTripletStepClusters,
0027      trajectories     = "hiDetachedQuadStepTracks",
0028      overrideTrkQuals = "hiDetachedQuadStepSelector:hiDetachedQuadStep",
0029 )
0030 
0031 
0032 # SEEDING LAYERS
0033 import RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi
0034 hiDetachedTripletStepSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone(
0035     BPix = dict(skipClusters = cms.InputTag('hiDetachedTripletStepClusters')),
0036     FPix = dict(skipClusters = cms.InputTag('hiDetachedTripletStepClusters'))
0037 )
0038 
0039 # SEEDS
0040 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
0041 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
0042 from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
0043 from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import *
0044 from RecoPixelVertexing.PixelLowPtUtilities.trackCleaner_cfi import *
0045 from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjections_cfi import *
0046 from RecoHI.HiTracking.HIPixelTrackFilter_cff import *
0047 from RecoHI.HiTracking.HITrackingRegionProducer_cfi import *
0048 
0049 hiDetachedTripletStepTrackingRegions = _globalTrackingRegionWithVertices.clone(RegionPSet=dict(
0050     precise = True,
0051     useMultipleScattering = False,
0052     useFakeVertices       = False,
0053     beamSpot = "offlineBeamSpot",
0054     useFixedError = True,
0055     nSigmaZ = 4.0,
0056     sigmaZVertex = 4.0,
0057     fixedError = 0.5,
0058     VertexCollection = "hiSelectedPixelVertex",
0059     ptMin = 0.9,
0060     useFoundVertices = True,
0061     originRadius = 0.5
0062 ))
0063 hiDetachedTripletStepTracksHitDoublets = _hitPairEDProducer.clone(
0064     clusterCheck = "",
0065     seedingLayers = "hiDetachedTripletStepSeedLayers",
0066     trackingRegions = "hiDetachedTripletStepTrackingRegions",
0067     maxElement = 50000000,
0068     produceIntermediateHitDoublets = True,
0069 )
0070 from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import *
0071 hiDetachedTripletStepTracksHitTriplets = _pixelTripletHLTEDProducer.clone(
0072     doublets = "hiDetachedTripletStepTracksHitDoublets",
0073     extraHitRPhitolerance = 0.0,
0074     extraHitRZtolerance = 0.0,
0075     maxElement = 1000000,
0076     SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(),
0077     produceSeedingHitSets = True,
0078 )
0079 
0080 from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer
0081 hiDetachedTripletStepTracksHitDoubletsCA = hiDetachedTripletStepTracksHitDoublets.clone(
0082     layerPairs = [0,1]
0083 )
0084 hiDetachedTripletStepTracksHitTripletsCA = _caHitTripletEDProducer.clone(
0085     doublets = "hiDetachedTripletStepTracksHitDoubletsCA",
0086     extraHitRPhitolerance = hiDetachedTripletStepTracksHitTriplets.extraHitRPhitolerance,
0087     maxChi2 = dict(
0088         pt1    = 0.8, pt2    = 2,
0089         value1 = 300 , value2 = 10,
0090     ),
0091     useBendingCorrection = True,
0092     CAThetaCut = 0.001,
0093     CAPhiCut = 0,
0094     CAHardPtCut = 0.2,
0095 )
0096 
0097 hiDetachedTripletStepPixelTracksFilter = hiFilter.clone(
0098     nSigmaTipMaxTolerance = 0,
0099     lipMax = 1.0,
0100     tipMax = 1.0,
0101     ptMin = 0.95,
0102 )
0103 
0104 import RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi as _mod
0105 
0106 hiDetachedTripletStepPixelTracks = _mod.pixelTracks.clone(
0107     passLabel  = 'Pixel detached tracks with vertex constraint',
0108     # Ordered Hits
0109     SeedingHitSets = "hiDetachedTripletStepTracksHitTriplets",
0110     # Fitter
0111     Fitter = "pixelFitterByHelixProjections",
0112     # Filter
0113     Filter = "hiDetachedTripletStepPixelTracksFilter",
0114     # Cleaner
0115     Cleaner = "trackCleaner"
0116 )
0117 trackingPhase1.toModify(hiDetachedTripletStepPixelTracks,
0118     SeedingHitSets = "hiDetachedTripletStepTracksHitTripletsCA"
0119 )
0120 
0121 
0122 import RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi
0123 hiDetachedTripletStepSeeds = RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone(
0124         InputCollection = 'hiDetachedTripletStepPixelTracks'
0125 )
0126 
0127 # QUALITY CUTS DURING TRACK BUILDING
0128 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
0129 hiDetachedTripletStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
0130     maxLostHits = 1,
0131     minimumNumberOfHits = 6,
0132     minPt = 0.3,
0133     constantValueForLostHitsFractionFilter = 0.701
0134 )
0135 
0136 import TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi
0137 hiDetachedTripletStepChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
0138         ComponentName = 'hiDetachedTripletStepChi2Est',
0139             nSigma  = 3.0,
0140             MaxChi2 = 9.0
0141 )
0142 
0143 
0144 # TRACK BUILDING
0145 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
0146 hiDetachedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
0147     trajectoryFilter = dict(refToPSet_ = 'hiDetachedTripletStepTrajectoryFilter'),
0148     maxCand = 2,
0149     estimator = 'hiDetachedTripletStepChi2Est',
0150     maxDPhiForLooperReconstruction = 0.,
0151     maxPtForLooperReconstruction   = 0.,
0152     alwaysUseInvalidHits = False
0153 )
0154 
0155 # MAKING OF TRACK CANDIDATES
0156 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
0157 hiDetachedTripletStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
0158     src = 'hiDetachedTripletStepSeeds',
0159     ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
0160     numHitsForSeedCleaner = 50,
0161     onlyPixelHitsForSeedCleaner = True,
0162     TrajectoryBuilderPSet = dict(refToPSet_ = 'hiDetachedTripletStepTrajectoryBuilder'),
0163     clustersToSkip = 'hiDetachedTripletStepClusters',
0164     doSeedingRegionRebuilding = True,
0165     useHitsSplitting = True
0166 )
0167 
0168 
0169 # TRACK FITTING
0170 import RecoTracker.TrackProducer.TrackProducer_cfi
0171 hiDetachedTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
0172     src = 'hiDetachedTripletStepTrackCandidates',
0173     AlgorithmName = 'detachedTripletStep',
0174     Fitter = 'FlexibleKFFittingSmoother'
0175 )
0176 
0177 # Final selection
0178 import RecoHI.HiTracking.hiMultiTrackSelector_cfi
0179 hiDetachedTripletStepSelector = RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiMultiTrackSelector.clone(
0180     src = 'hiDetachedTripletStepTracks',
0181     useAnyMVA = True,
0182     GBRForestLabel = 'HIMVASelectorIter7',
0183     GBRForestVars  = ['chi2perdofperlayer', 'nhits', 'nlayers', 'eta'],
0184     trackSelectors = cms.VPSet(
0185        RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
0186            name = 'hiDetachedTripletStepLoose',
0187            applyAdaptedPVCuts = False,
0188            useMVA = False,
0189        ), #end of pset
0190        RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
0191            name = 'hiDetachedTripletStepTight',
0192            preFilterName = 'hiDetachedTripletStepLoose',
0193            applyAdaptedPVCuts = False,
0194            useMVA = True,
0195            minMVA = -0.2
0196        ),
0197        RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
0198            name = 'hiDetachedTripletStep',
0199            preFilterName = 'hiDetachedTripletStepTight',
0200            applyAdaptedPVCuts = False,
0201            useMVA = True,
0202            minMVA = -0.09
0203        ),
0204     ) #end of vpset
0205 ) #end of clone
0206 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0207 trackingPhase1.toModify(hiDetachedTripletStepSelector, useAnyMVA = False)
0208 trackingPhase1.toModify(hiDetachedTripletStepSelector, trackSelectors= cms.VPSet(
0209     RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone(
0210         name = 'hiDetachedTripletStepLoose',
0211         applyAdaptedPVCuts = False,
0212         useMVA = False,
0213     ), #end of pset
0214     RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone(
0215         name = 'hiDetachedTripletStepTight',
0216         preFilterName = 'hiDetachedTripletStepLoose',
0217         applyAdaptedPVCuts = False,
0218         useMVA = False,
0219         minMVA = -0.2
0220     ),
0221     RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone(
0222         name = 'hiDetachedTripletStep',
0223         preFilterName = 'hiDetachedTripletStepTight',
0224         applyAdaptedPVCuts = False,
0225         useMVA = False,
0226         minMVA = -0.09
0227     ),
0228   ) #end of vpset
0229 )
0230 
0231 import RecoTracker.FinalTrackSelectors.trackListMerger_cfi
0232 hiDetachedTripletStepQual = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
0233     TrackProducers = ['hiDetachedTripletStepTracks'],
0234     hasSelector = [1],
0235     selectedTrackQuals = ["hiDetachedTripletStepSelector:hiDetachedTripletStep"],
0236     copyExtras = True,
0237     makeReKeyedSeeds = cms.untracked.bool(False),
0238 )
0239 
0240 
0241 hiDetachedTripletStepTask = cms.Task(hiDetachedTripletStepClusters,
0242                                      hiDetachedTripletStepSeedLayers,
0243                                      hiDetachedTripletStepTrackingRegions,
0244                                      hiDetachedTripletStepTracksHitDoublets,  
0245                                      hiDetachedTripletStepTracksHitTriplets, 
0246                                      pixelFitterByHelixProjections,
0247                                      hiDetachedTripletStepPixelTracksFilter,
0248                                      hiDetachedTripletStepPixelTracks,
0249                                      hiDetachedTripletStepSeeds,
0250                                      hiDetachedTripletStepTrackCandidates,
0251                                      hiDetachedTripletStepTracks,
0252                                      hiDetachedTripletStepSelector,
0253                                      hiDetachedTripletStepQual)
0254 hiDetachedTripletStep = cms.Sequence(hiDetachedTripletStepTask)
0255 hiDetachedTripletStepTask_Phase1 = hiDetachedTripletStepTask.copy()
0256 hiDetachedTripletStepTask_Phase1.replace(hiDetachedTripletStepTracksHitDoublets, hiDetachedTripletStepTracksHitDoubletsCA)
0257 hiDetachedTripletStepTask_Phase1.replace(hiDetachedTripletStepTracksHitTriplets, hiDetachedTripletStepTracksHitTripletsCA)
0258 trackingPhase1.toReplaceWith(hiDetachedTripletStepTask, hiDetachedTripletStepTask_Phase1)