Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:21

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
0004 from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
0005 from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import *
0006 from RecoTracker.PixelLowPtUtilities.trackCleaner_cfi import *
0007 from RecoTracker.PixelTrackFitting.pixelFitterByConformalMappingAndLine_cfi import *
0008 from RecoHI.HiTracking.HIPixelTrackFilter_cff import *
0009 from RecoHI.HiTracking.HITrackingRegionProducer_cfi import *
0010 
0011 # Hit ntuplets
0012 hiConformalPixelTracksHitDoublets = _hitPairEDProducer.clone(
0013     clusterCheck    = "",
0014     seedingLayers   = "PixelLayerTriplets",
0015     trackingRegions = "hiTrackingRegionWithVertex",
0016     maxElement      = 50000000,
0017     produceIntermediateHitDoublets = True,
0018 )
0019 
0020 hiConformalPixelTracksHitTriplets = _pixelTripletHLTEDProducer.clone(
0021     doublets   = "hiConformalPixelTracksHitDoublets",
0022     maxElement = 5000000, # increase threshold for triplets in generation step (default: 100000)
0023     produceSeedingHitSets = True,
0024 )
0025 
0026 import RecoTracker.PixelTrackFitting.pixelTracks_cfi as _mod
0027 # Pixel tracks
0028 hiConformalPixelTracks = _mod.pixelTracks.clone(
0029     #passLabel  = 'Pixel triplet low-pt tracks with vertex constraint',
0030     # Ordered Hits
0031     SeedingHitSets = "hiConformalPixelTracksHitTriplets",
0032     # Fitter
0033     Fitter = 'pixelFitterByConformalMappingAndLine',
0034     # Filter
0035     Filter = "hiConformalPixelFilter",
0036     # Cleaner
0037     Cleaner = "trackCleaner"
0038 )
0039 
0040 ###Pixel Tracking -  PhaseI geometry
0041 
0042 #Tracking regions - use PV from pp tracking
0043 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import globalTrackingRegionWithVertices
0044 hiConformalPixelTracksPhase1TrackingRegions = globalTrackingRegionWithVertices.clone(
0045     RegionPSet = dict(
0046     precise = True,
0047     useMultipleScattering = False,
0048     useFakeVertices  = False,
0049     beamSpot         = "offlineBeamSpot",
0050     useFixedError    = True,
0051     nSigmaZ          = 3.0,
0052     sigmaZVertex     = 3.0,
0053     fixedError       = 0.2,
0054     VertexCollection = "offlinePrimaryVertices",
0055     ptMin            = 0.3,
0056     useFoundVertices = True,
0057     originRadius     = 0.2
0058     )
0059 )
0060 
0061 # SEEDING LAYERS
0062 # Using 4 layers layerlist
0063 from RecoTracker.IterativeTracking.LowPtQuadStep_cff import lowPtQuadStepSeedLayers
0064 hiConformalPixelTracksPhase1SeedLayers = lowPtQuadStepSeedLayers.clone(
0065     BPix = cms.PSet(
0066     HitProducer = cms.string('siPixelRecHits'),
0067         TTRHBuilder = cms.string('WithTrackAngle'),
0068     ),
0069     FPix = cms.PSet(
0070         HitProducer = cms.string('siPixelRecHits'),
0071         TTRHBuilder = cms.string('WithTrackAngle'),
0072     )
0073 )
0074 
0075 
0076 # Hit ntuplets
0077 from RecoTracker.IterativeTracking.LowPtQuadStep_cff import lowPtQuadStepHitDoublets
0078 hiConformalPixelTracksPhase1HitDoubletsCA = lowPtQuadStepHitDoublets.clone(
0079     seedingLayers   = "hiConformalPixelTracksPhase1SeedLayers",
0080     trackingRegions = "hiConformalPixelTracksPhase1TrackingRegions"
0081 )
0082 
0083 
0084 from RecoTracker.IterativeTracking.LowPtQuadStep_cff import lowPtQuadStepHitQuadruplets
0085 hiConformalPixelTracksPhase1HitQuadrupletsCA = lowPtQuadStepHitQuadruplets.clone(
0086     doublets   = "hiConformalPixelTracksPhase1HitDoubletsCA",
0087     CAPhiCut   = 0.2,
0088     CAThetaCut = 0.0012,
0089     SeedComparitorPSet = dict(
0090        ComponentName = 'none'
0091     ),
0092     extraHitRPhitolerance = 0.032,
0093     maxChi2 = dict(
0094        enabled = True,
0095        pt1     = 0.7,
0096        pt2     = 2,
0097        value1  = 200,
0098        value2  = 50
0099     )
0100 )
0101 
0102 #Filter
0103 hiConformalPixelTracksPhase1Filter = hiConformalPixelFilter.clone(
0104     VertexCollection = "offlinePrimaryVertices",
0105     chi2   = 30.0,
0106     lipMax = 999.0,
0107     nSigmaLipMaxTolerance = 3.0,
0108     nSigmaTipMaxTolerance = 3.0,
0109     ptMax  = 999999,
0110     ptMin  = 0.30,
0111     tipMax = 999.0
0112 )
0113 
0114 from RecoTracker.PixelTrackFitting.pixelNtupletsFitter_cfi import pixelNtupletsFitter
0115 
0116 from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
0117 phase1Pixel.toModify(hiConformalPixelTracks,
0118     Cleaner = 'pixelTrackCleanerBySharedHits',
0119     Filter  = "hiConformalPixelTracksPhase1Filter",
0120     Fitter  = "pixelNtupletsFitter",
0121     SeedingHitSets = "hiConformalPixelTracksPhase1HitQuadrupletsCA",
0122 )
0123 
0124 hiConformalPixelTracksTask = cms.Task(
0125     hiTrackingRegionWithVertex ,
0126     hiConformalPixelTracksHitDoublets ,
0127     hiConformalPixelTracksHitTriplets ,
0128     pixelFitterByConformalMappingAndLine ,
0129     hiConformalPixelFilter ,
0130     hiConformalPixelTracks
0131 )
0132 
0133 from Configuration.ProcessModifiers.gpu_cff import gpu
0134 from Configuration.ProcessModifiers.pixelNtupletFit_cff import pixelNtupletFit
0135 from RecoTracker.PixelTrackFitting.pixelTrackSoAFromCUDAHIonPhase1_cfi import pixelTrackSoAFromCUDAHIonPhase1 as _pixelTracksSoA
0136 from RecoTracker.PixelSeeding.caHitNtupletCUDAHIonPhase1_cfi import caHitNtupletCUDAHIonPhase1 as _pixelTracksCUDA
0137 from RecoTracker.PixelTrackFitting.pixelTrackProducerFromSoAHIonPhase1_cfi import pixelTrackProducerFromSoAHIonPhase1 as _pixelTrackProducerFromSoA
0138 
0139 from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA
0140 
0141 hiPixelTracksCUDA = _pixelTracksCUDA.clone(pixelRecHitSrc="siPixelRecHitsPreSplittingCUDA", idealConditions = False,
0142         ptmin = 0.25, z0Cut = 8.0, hardCurvCut = 0.0756, doPtCut = False,
0143         onGPU = True,
0144         dcaCutInnerTriplet = 0.05, dcaCutOuterTriplet = 0.10,
0145         CAThetaCutForward = 0.002, CAThetaCutBarrel = 0.001,
0146         phiCuts = cms.vint32(19*[900]), #19 pairs
0147         trackQualityCuts = dict(
0148           chi2MaxPt = 10,
0149           chi2Coeff = [0.9,1.8],
0150           chi2Scale = 1.8,
0151           tripletMinPt = 0.1,
0152           tripletMaxTip = 0.3,
0153           tripletMaxZip = 12,
0154           quadrupletMinPt = 0.1,
0155           quadrupletMaxTip = 0.5,
0156           quadrupletMaxZip = 12
0157         ))
0158 
0159 # SwitchProducer providing the pixel tracks in SoA format on the CPU
0160 hiPixelTracksSoA = SwitchProducerCUDA(
0161     # build pixel ntuplets and pixel tracks in SoA format on the CPU
0162     cpu = _pixelTracksCUDA.clone(
0163         pixelRecHitSrc = "siPixelRecHitsPreSplittingCPU",
0164         idealConditions = False,
0165         doPtCut = False,
0166         ptmin = 0.25,
0167         hardCurvCut = 0.0756,
0168         onGPU = False,
0169         phiCuts = cms.vint32(19*[900]), #19 pairs
0170         trackQualityCuts = dict(
0171           chi2MaxPt = 10,
0172           chi2Coeff = [0.9,1.8],
0173           chi2Scale = 8,
0174           tripletMinPt = 0.5,
0175           tripletMaxTip = 0.3,
0176           tripletMaxZip = 12,
0177           quadrupletMinPt = 0.3,
0178           quadrupletMaxTip = 0.5,
0179           quadrupletMaxZip = 12
0180         ))
0181 )
0182 
0183 gpu.toModify(hiPixelTracksSoA,
0184     # transfer the pixel tracks in SoA format to the host
0185     cuda = _pixelTracksSoA.clone(src="hiPixelTracksCUDA")
0186 )
0187 
0188 pixelNtupletFit.toReplaceWith(hiConformalPixelTracks,_pixelTrackProducerFromSoA.clone(
0189     pixelRecHitLegacySrc = "siPixelRecHitsPreSplitting",
0190     trackSrc = "hiPixelTracksSoA",
0191     minQuality = "highPurity"
0192 ))
0193 
0194 
0195 hiConformalPixelTracksTaskPhase1 = cms.Task(
0196     hiConformalPixelTracksPhase1TrackingRegions ,
0197     hiConformalPixelTracksPhase1SeedLayers ,
0198     hiConformalPixelTracksPhase1HitDoubletsCA ,
0199     hiConformalPixelTracksPhase1HitQuadrupletsCA ,
0200     pixelNtupletsFitter ,
0201     hiConformalPixelTracksPhase1Filter ,
0202     hiConformalPixelTracks
0203 )
0204 
0205 pixelNtupletFit.toReplaceWith(hiConformalPixelTracksTaskPhase1, cms.Task(
0206     # build the pixel ntuplets and the pixel tracks in SoA format on the CPU
0207     hiPixelTracksSoA,
0208     # convert the pixel tracks from SoA to legacy format
0209     hiConformalPixelTracks
0210 ))
0211 
0212 (gpu & pixelNtupletFit).toReplaceWith(hiConformalPixelTracksTaskPhase1, cms.Task(
0213     # build the pixel ntuplets and the pixel tracks in SoA format on the GPU
0214     hiPixelTracksCUDA,
0215     # just copying the task above
0216     hiConformalPixelTracksTaskPhase1.copy()
0217 ))
0218 
0219 hiConformalPixelTracksSequencePhase1 = cms.Sequence(hiConformalPixelTracksTaskPhase1)
0220 
0221 from Configuration.Eras.Modifier_run3_upc_cff import run3_upc
0222 run3_upc.toModify(hiConformalPixelTracksPhase1TrackingRegions.RegionPSet, ptMin = 0.05)
0223 run3_upc.toModify(hiConformalPixelTracksPhase1Filter, ptMin = 0.05)