Пример #1
0
initialStepSeedLayersPreSplitting = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone(
)
initialStepSeedLayersPreSplitting.FPix.HitProducer = 'siPixelRecHitsPreSplitting'
initialStepSeedLayersPreSplitting.BPix.HitProducer = 'siPixelRecHitsPreSplitting'
eras.trackingPhase1.toModify(
    initialStepSeedLayersPreSplitting,
    layerList=RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff.
    PixelSeedMergerQuadruplets.layerList.value())

# seeding
from RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff import *
from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock
from RecoPixelVertexing.PixelTriplets.PixelQuadrupletGenerator_cfi import PixelQuadrupletGenerator as _PixelQuadrupletGenerator
initialStepSeedsPreSplitting = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone(
    RegionFactoryPSet=RegionPsetFomBeamSpotBlock.clone(
        ComponentName=cms.string('GlobalRegionProducerFromBeamSpot'),
        RegionPSet=RegionPsetFomBeamSpotBlock.RegionPSet.clone(
            ptMin=0.6, originRadius=0.02, nSigmaZ=4.0)))
initialStepSeedsPreSplitting.OrderedHitsFactoryPSet.SeedingLayers = 'initialStepSeedLayersPreSplitting'
from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import *
import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
initialStepSeedsPreSplitting.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(
)
initialStepSeedsPreSplitting.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet.clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting'
initialStepSeedsPreSplitting.ClusterCheckPSet.PixelClusterCollectionLabel = 'siPixelClustersPreSplitting'

eras.trackingPhase1.toModify(
    initialStepSeedsPreSplitting,
    OrderedHitsFactoryPSet=cms.PSet(
        ComponentName=cms.string("CombinedHitQuadrupletGenerator"),
        GeneratorPSet=_PixelQuadrupletGenerator.clone(
            extraHitRZtolerance=initialStepSeedsPreSplitting.
Пример #2
0
from RecoLocalTracker.SiPixelRecHits.PixelCPEESProducers_cff import *
from RecoTracker.TransientTrackingRecHit.TTRHBuilders_cff import *

# SEEDING LAYERS
import RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi
initialStepSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone()

# seeding
from RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff import *
from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock
from RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff import *
initialStepSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone(
    RegionFactoryPSet = RegionPsetFomBeamSpotBlock.clone(
        ComponentName = cms.string('GlobalRegionProducerFromBeamSpot'),
        RegionPSet = RegionPsetFomBeamSpotBlock.RegionPSet.clone(
            ptMin = 0.7,
            originRadius = 0.02,
            nSigmaZ = 4.0
            )
    ),
    SeedMergerPSet = cms.PSet(
        layerList = cms.PSet(refToPSet_ = cms.string("PixelSeedMergerQuadruplets")),
	addRemainingTriplets = cms.bool(False),
	mergeTriplets = cms.bool(True),
	ttrhBuilderLabel = cms.string('PixelTTRHBuilderWithoutAngle')
    )
)
initialStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = 'initialStepSeedLayers'
initialStepSeeds.SeedCreatorPSet.magneticField = ''
initialStepSeeds.SeedCreatorPSet.propagator = 'PropagatorWithMaterial'

from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import *
# SEEDS
import RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff
from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock
hiLowPtTripletStepSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone(
    RegionFactoryPSet=RegionPsetFomBeamSpotBlock.clone(
        ComponentName=cms.string('GlobalRegionProducerFromBeamSpot'),
        RegionPSet=RegionPsetFomBeamSpotBlock.RegionPSet.clone(

            # Default
            ptMin=cms.double(0.2),
            #Playing around
            #    ptMin = 0.25,
            #    ptMin = 0.30,
            #    ptMin = 1.0,

            # Default
            originRadius=cms.double(0.02),
            #Playing around
            #    originRadius = cms.double(0.01),
            #    originRadius = cms.double(0.005),
            #    originRadius = 0.001,

            # Default
            nSigmaZ=cms.double(4.0),
        )))

hiLowPtTripletStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = 'hiLowPtTripletStepSeedLayers'

#Added by pawan
# to avoid 'too many clusters'
Пример #4
0
        InputCollection = 'hiSecondPixelTracks'
  )



import RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff
from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock
hiSecondPixelTripletSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone(
    RegionFactoryPSet = RegionPsetFomBeamSpotBlock.clone(
    ComponentName = cms.string('GlobalTrackingRegionWithVerticesProducer'),
	RegionPSet = cms.PSet(
            precise = cms.bool(True),
            beamSpot = cms.InputTag("offlineBeamSpot"),
            useFixedError = cms.bool(False), #def value True
            nSigmaZ = cms.double(4.0),
            sigmaZVertex = cms.double(4.0), #def value 3
            fixedError = cms.double(0.2),
            VertexCollection = cms.InputTag("hiSelectedVertex"),
            ptMin = cms.double(0.4),
            useFoundVertices = cms.bool(True),
            originRadius = cms.double(0.02)
        )
    )
)

hiSecondPixelTripletSeeds.OrderedHitsFactoryPSet.SeedingLayers = 'hiSecondPixelTripletSeedLayers'
hiSecondPixelTripletSeeds.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = 5000000
hiSecondPixelTripletSeeds.ClusterCheckPSet.MaxNumberOfPixelClusters = 5000000
hiSecondPixelTripletSeeds.ClusterCheckPSet.MaxNumberOfCosmicClusters = 50000000
del hiSecondPixelTripletSeeds.ClusterCheckPSet.cut
Пример #5
0
    BPix = dict(skipClusters = cms.InputTag('lowPtForwardTripletStepClusters')),
    FPix = dict(skipClusters = cms.InputTag('lowPtForwardTripletStepClusters')),
    layerList = ['BPix1+BPix2+FPix1_pos', 
                 'BPix1+BPix2+FPix1_neg', 
                 'BPix1+FPix1_pos+FPix2_pos', 
                 'BPix1+FPix1_neg+FPix2_neg']
)

# SEEDS
import RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff
from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock
lowPtForwardTripletStepSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone(
    RegionFactoryPSet = RegionPsetFomBeamSpotBlock.clone(
	ComponentName     = 'GlobalRegionProducerFromBeamSpot',
	RegionPSet = RegionPsetFomBeamSpotBlock.RegionPSet.clone(
	ptMin        = 0.2,
	originRadius = 0.03,
	nSigmaZ      = 4.0)
    ),
    OrderedHitsFactoryPSet = dict(
	SeedingLayers = 'lowPtForwardTripletStepSeedLayers'
    )
)

from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import *
import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
lowPtForwardTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor

# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
lowPtForwardTripletStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
Пример #6
0
def customise_Reco(process):
    # Need this line to stop error about missing siPixelDigis.
    process.MeasurementTracker.inactivePixelDetectorLabels = cms.VInputTag()
    # Next line is only in for the moment for debugging
    #process.load('Configuration.StandardSequences.Reconstruction_cff')
    #
    process.load("RecoTracker.IterativeTracking.HighPtTripletStep_cff")

    # new layer list (3/4 pixel seeding) in stepZero
    process.pixellayertriplets.layerList = cms.vstring( 'BPix1+BPix2+BPix3',
                                                        'BPix2+BPix3+BPix4',
                                                        'BPix1+BPix3+BPix4',
                                                        'BPix1+BPix2+BPix4',
                                                        'BPix2+BPix3+FPix1_pos',
                                                        'BPix2+BPix3+FPix1_neg',
                                                        'BPix1+BPix2+FPix1_pos',
                                                        'BPix1+BPix2+FPix1_neg',
                                                        'BPix2+FPix1_pos+FPix2_pos',
                                                        'BPix2+FPix1_neg+FPix2_neg',
                                                        'BPix1+FPix1_pos+FPix2_pos',
                                                        'BPix1+FPix1_neg+FPix2_neg',
                                                        'FPix1_pos+FPix2_pos+FPix3_pos',
                                                        'FPix1_neg+FPix2_neg+FPix3_neg' )

    process.highPtTripletStepSeedLayers.layerList = cms.vstring('BPix1+BPix2+BPix3',
                                            'BPix2+BPix3+BPix4',
                                            'BPix1+BPix3+BPix4',
                                            'BPix1+BPix2+BPix4',
                                            'BPix2+BPix3+FPix1_pos', 
					    'BPix2+BPix3+FPix1_neg',
                                            'BPix1+BPix2+FPix1_pos', 
					    'BPix1+BPix2+FPix1_neg',
                                            'BPix1+BPix3+FPix1_pos', 
					    'BPix1+BPix3+FPix1_neg',
                                            'BPix2+FPix1_pos+FPix2_pos', 
					    'BPix2+FPix1_neg+FPix2_neg',
                                            'BPix1+FPix1_pos+FPix2_pos', 
					    'BPix1+FPix1_neg+FPix2_neg',
                                            'BPix1+BPix2+FPix2_pos', 
					    'BPix1+BPix2+FPix2_neg',
                                            'FPix1_pos+FPix2_pos+FPix3_pos', 
					    'FPix1_neg+FPix2_neg+FPix3_neg',
                                            'BPix1+FPix2_pos+FPix3_pos', 
					    'BPix1+FPix2_neg+FPix3_neg',
                                            'BPix1+FPix1_pos+FPix3_pos', 
					    'BPix1+FPix1_neg+FPix3_neg' )
						 
    process.lowPtTripletStepSeedLayers.layerList = cms.vstring( 'BPix1+BPix2+BPix3',
	    						'BPix2+BPix3+BPix4',
	    						'BPix1+BPix3+BPix4',
	    						'BPix1+BPix2+BPix4',
	    						'BPix2+BPix3+FPix1_pos',
	    						'BPix2+BPix3+FPix1_neg',
	    						'BPix1+BPix2+FPix1_pos',
	    						'BPix1+BPix2+FPix1_neg',
	    						'BPix2+FPix1_pos+FPix2_pos',
	    						'BPix2+FPix1_neg+FPix2_neg',
	    						'BPix1+FPix1_pos+FPix2_pos',
	    						'BPix1+FPix1_neg+FPix2_neg',
	    						'FPix1_pos+FPix2_pos+FPix3_pos',
	    						'FPix1_neg+FPix2_neg+FPix3_neg' )

    ## need changes to mixedtriplets step to use for imcreasing high eta efficiency
    process.mixedTripletStepClusters.oldClusterRemovalInfo = cms.InputTag("pixelPairStepClusters")
    process.mixedTripletStepClusters.trajectories = cms.InputTag("pixelPairStepTracks")
    process.mixedTripletStepClusters.overrideTrkQuals = cms.InputTag('pixelPairStepSelector','pixelPairStep')
    process.mixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.originRadius = 0.02
    process.mixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.originRadius = 0.02
    
    ## new layer list for mixed triplet step
    process.mixedTripletStepSeedLayersA.layerList = cms.vstring('BPix1+BPix2+BPix3', 
                                                                'BPix2+BPix3+BPix4',
                                                                'BPix1+BPix2+FPix1_pos', 
								'BPix1+BPix2+FPix1_neg', 
                                                                'BPix1+FPix1_pos+FPix2_pos', 
								'BPix1+FPix1_neg+FPix2_neg', 
                                                                'FPix1_pos+FPix2_pos+FPix3_pos', 
								'FPix1_neg+FPix2_neg+FPix3_neg', 
                                                                'BPix2+FPix1_pos+FPix2_pos', 
								'BPix2+FPix1_neg+FPix2_neg', 
                                                                'FPix2_pos+FPix3_pos+TEC1_pos', 
								'FPix2_neg+FPix3_neg+TEC1_neg',
                                                                'FPix3_pos+TEC2_pos+TEC3_pos', 
								'FPix3_neg+TEC2_neg+TEC3_neg' )

    #mixedTripletStepSeedLayersB.layerList = cms.vstring('BPix3+BPix4+TIB1', 'BPix3+BPix4+TIB2')
    ## switch off SeedB the easy way
    process.mixedTripletStepSeedLayersB.layerList = cms.vstring('BPix1+BPix2+BPix3')

    ## increased the max track candidates
    process.mixedTripletStepTrackCandidates.maxNSeeds = cms.uint32(150000)
    process.pixelPairStepTrackCandidates.maxNSeeds    = cms.uint32(150000)

    ######### FOR initialStepSeeds SeedMergerPSet ---->  mergeTriplets must be true  
    global RecoTracker
    from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock
    process.initialStepSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone(
      RegionFactoryPSet = RegionPsetFomBeamSpotBlock.clone(
        ComponentName = cms.string('GlobalRegionProducerFromBeamSpot'),
        RegionPSet = RegionPsetFomBeamSpotBlock.RegionPSet.clone(
          ptMin = 0.6,
          originRadius = 0.02,
          nSigmaZ = 4.0
        )
      ),
      SeedMergerPSet = cms.PSet(
	layerListName = cms.string('PixelSeedMergerQuadruplets'),
	addRemainingTriplets = cms.bool(False),
	mergeTriplets = cms.bool(True),
	ttrhBuilderLabel = cms.string('PixelTTRHBuilderWithoutAngle')
      )
    )
    process.initialStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet.ComponentName = 'LowPtClusterShapeSeedComparitor'
    
    # quadruplets in step0
    #process.initialStepSeeds.SeedMergerPSet.mergeTriplets       = cms.bool(True)

    # disconnect merger for stepOne and step 2 to have triplets merged
    #process.highPtTripletStepSeeds.SeedMergerPSet.mergeTriplets = cms.bool(False)
    #process.lowPtTripletStepSeeds.SeedMergerPSet.mergeTriplets  = cms.bool(False)
    #process.pixelPairStepSeeds.SeedMergerPSet.mergeTriplets     = cms.bool(False)
    #process.mixedTripletStepSeedsA.SeedMergerPSet.mergeTriplets = cms.bool(False)
    #process.mixedTripletStepSeedsB.SeedMergerPSet.mergeTriplets = cms.bool(False)

    # to avoid 'too many clusters'
    process.initialStepSeeds.ClusterCheckPSet.doClusterCheck       = cms.bool(False)
    process.highPtTripletStepSeeds.ClusterCheckPSet.doClusterCheck = cms.bool(False)
    process.lowPtTripletStepSeeds.ClusterCheckPSet.doClusterCheck  = cms.bool(False)
    process.pixelPairStepSeeds.ClusterCheckPSet.doClusterCheck     = cms.bool(False)
    process.mixedTripletStepSeedsA.ClusterCheckPSet.doClusterCheck = cms.bool(False)
    process.mixedTripletStepSeedsB.ClusterCheckPSet.doClusterCheck = cms.bool(False)
    
    # avoid 'number of triples exceed maximum'
    process.pixelTracks.OrderedHitsFactoryPSet.GeneratorPSet.maxElement            = cms.uint32(0)
    process.initialStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.maxElement       = cms.uint32(0)
    process.highPtTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = cms.uint32(0)
    process.lowPtTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.maxElement  = cms.uint32(0)
    process.mixedTripletStepSeedsA.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = cms.uint32(0)
    process.mixedTripletStepSeedsB.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = cms.uint32(0)
    # avoid 'number of pairs exceed maximum'
    process.pixelPairStepSeeds.OrderedHitsFactoryPSet.maxElement =  cms.uint32(0)
    
    process.initialStepSelector.trackSelectors[0].dz_par1 = cms.vdouble(0.605, 4.0) # 0.65
    process.initialStepSelector.trackSelectors[0].dz_par2 = cms.vdouble(0.42, 4.0) # 0.45
    process.initialStepSelector.trackSelectors[0].d0_par1 = cms.vdouble(0.51, 4.0) # 0.55
    process.initialStepSelector.trackSelectors[0].d0_par2 = cms.vdouble(0.51, 4.0) # 0.55
    process.initialStepSelector.trackSelectors[1].dz_par1 = cms.vdouble(0.325, 4.0) # 0.35
    process.initialStepSelector.trackSelectors[1].dz_par2 = cms.vdouble(0.372, 4.0) # 0.4
    process.initialStepSelector.trackSelectors[1].d0_par1 = cms.vdouble(0.279, 4.0) # 0.3
    process.initialStepSelector.trackSelectors[1].d0_par2 = cms.vdouble(0.372, 4.0) # 0.4
    process.initialStepSelector.trackSelectors[2].dz_par1 = cms.vdouble(0.325, 4.0) # 0.35
    process.initialStepSelector.trackSelectors[2].dz_par2 = cms.vdouble(0.372, 4.0) # 0.4
    process.initialStepSelector.trackSelectors[2].d0_par1 = cms.vdouble(0.279, 4.0) # 0.3
    process.initialStepSelector.trackSelectors[2].d0_par2 = cms.vdouble(0.372, 4.0) # 0.4

    process.lowPtTripletStepSelector.trackSelectors[0].dz_par1 = cms.vdouble(0.605, 4.0) # 0.65
    process.lowPtTripletStepSelector.trackSelectors[0].dz_par2 = cms.vdouble(0.42, 4.0) # 0.45
    process.lowPtTripletStepSelector.trackSelectors[0].d0_par1 = cms.vdouble(0.51, 4.0) # 0.55
    process.lowPtTripletStepSelector.trackSelectors[0].d0_par2 = cms.vdouble(0.51, 4.0) # 0.55
    process.lowPtTripletStepSelector.trackSelectors[1].dz_par1 = cms.vdouble(0.325, 4.0) # 0.35
    process.lowPtTripletStepSelector.trackSelectors[1].dz_par2 = cms.vdouble(0.372, 4.0) # 0.4
    process.lowPtTripletStepSelector.trackSelectors[1].d0_par1 = cms.vdouble(0.279, 4.0) # 0.3
    process.lowPtTripletStepSelector.trackSelectors[1].d0_par2 = cms.vdouble(0.372, 4.0) # 0.4
    process.lowPtTripletStepSelector.trackSelectors[2].dz_par1 = cms.vdouble(0.325, 4.0) # 0.35
    process.lowPtTripletStepSelector.trackSelectors[2].dz_par2 = cms.vdouble(0.372, 4.0) # 0.4
    process.lowPtTripletStepSelector.trackSelectors[2].d0_par1 = cms.vdouble(0.279, 4.0) # 0.3
    process.lowPtTripletStepSelector.trackSelectors[2].d0_par2 = cms.vdouble(0.372, 4.0) # 0.4

    process.highPtTripletStepSelector.trackSelectors[0].dz_par1 = cms.vdouble(0.605, 4.0) # 0.65
    process.highPtTripletStepSelector.trackSelectors[0].dz_par2 = cms.vdouble(0.42, 4.0) # 0.45
    process.highPtTripletStepSelector.trackSelectors[0].d0_par1 = cms.vdouble(0.51, 4.0) # 0.55
    process.highPtTripletStepSelector.trackSelectors[0].d0_par2 = cms.vdouble(0.51, 4.0) # 0.55
    process.highPtTripletStepSelector.trackSelectors[1].dz_par1 = cms.vdouble(0.325, 4.0) # 0.35
    process.highPtTripletStepSelector.trackSelectors[1].dz_par2 = cms.vdouble(0.372, 4.0) # 0.4
    process.highPtTripletStepSelector.trackSelectors[1].d0_par1 = cms.vdouble(0.279, 4.0) # 0.3
    process.highPtTripletStepSelector.trackSelectors[1].d0_par2 = cms.vdouble(0.372, 4.0) # 0.4
    process.highPtTripletStepSelector.trackSelectors[2].dz_par1 = cms.vdouble(0.325, 4.0) # 0.35
    process.highPtTripletStepSelector.trackSelectors[2].dz_par2 = cms.vdouble(0.372, 4.0) # 0.4
    process.highPtTripletStepSelector.trackSelectors[2].d0_par1 = cms.vdouble(0.279, 4.0) # 0.3
    process.highPtTripletStepSelector.trackSelectors[2].d0_par2 = cms.vdouble(0.372, 4.0) # 0.4
   
    # This STEPS should be added later #
    ## remove tracking steps 2-5 to speed up the job
    process.iterTracking.remove(process.DetachedTripletStep)
    process.iterTracking.remove(process.PixelLessStep)
    process.iterTracking.remove(process.TobTecStep)

    #modify the track merger accordingly
    #process.generalTracks.TrackProducers.remove(cms.InputTag('detachedTripletStepTracks'))
    #process.generalTracks.TrackProducers.remove(cms.InputTag('pixelLessStepTracks'))
    #process.generalTracks.TrackProducers.remove(cms.InputTag('tobTecStepTracks'))

    #process.generalTracks.selectedTrackQuals.remove(cms.InputTag("detachedTripletStep"))
    #process.generalTracks.selectedTrackQuals.remove(cms.InputTag("pixelLessStepSelector","pixelLessStep"))
    #process.generalTracks.selectedTrackQuals.remove(cms.InputTag("tobTecStepSelector","tobTecStep"))

    # Corrections for IterativeTracking adding HigPtTripletStep for Phase 1 # Sequence and  Tags #

    # Cloning or Modifing Steps # PixelPairStep and others ...    
    import RecoTracker.IterativeTracking.LowPtTripletStep_cff
    process.lowPtTripletStepClusters = RecoTracker.IterativeTracking.LowPtTripletStep_cff.lowPtTripletStepClusters.clone(
       oldClusterRemovalInfo = cms.InputTag("highPtTripletStepClusters")
    )
    
    process.lowPtTripletStepClusters.trajectories     = cms.InputTag("highPtTripletStepTracks")
    process.lowPtTripletStepClusters.overrideTrkQuals = cms.InputTag('highPtTripletStepSelector','highPtTripletStep')
    process.lowPtTripletStepTracks.AlgorithmName      = cms.string('iter2')
    process.pixelPairStepTracks.AlgorithmName         = cms.string('iter3')
    ## REMOVED BEFORE ##process.detachedTripletStepTracks.AlgorithmName = cms.string('iter4')

    # MergeTrackCollections #    
    process.earlyGeneralTracks.setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1,2,3,4), pQual=cms.bool(True) ))
    process.earlyGeneralTracks.hasSelector=cms.vint32(1,1,1,1,1)
    
    process.earlyGeneralTracks.selectedTrackQuals = cms.VInputTag(
	 cms.InputTag("initialStepSelector","initialStep"), 
	 cms.InputTag("highPtTripletStepSelector","highPtTripletStep"), 
	 cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"), 
	 cms.InputTag("pixelPairStepSelector","pixelPairStep"), 
	 cms.InputTag("mixedTripletStep")
    )

    process.earlyGeneralTracks.TrackProducers = cms.VInputTag(
         cms.InputTag("initialStepTracks"), 
	 cms.InputTag("highPtTripletStepTracks"), 
	 cms.InputTag("lowPtTripletStepTracks"), 
	 cms.InputTag("pixelPairStepTracks"), 
	 cms.InputTag("mixedTripletStepTracks")
    )
    
    # Modifying iterTracking Sequence # Adding HighPtTripletStep to iterTracking Sequence #
    from RecoTracker.IterativeTracking.HighPtTripletStep_cff import HighPtTripletStep
    process.iterTracking = cms.Sequence(InitialStep*
                                         HighPtTripletStep*
					 LowPtTripletStep*
					 PixelPairStep*
					 MixedTripletStep*
		                         earlyGeneralTracks* # Adjust
					 preDuplicateMergingGeneralTracks* # Adjust
					 #generalTracks* # Adjust
					 generalTracksSequence*
					 ConvStep*
					 conversionStepTracks )  
    process.preDuplicateMergingGeneralTracks.TrackProducers = cms.VInputTag(cms.InputTag("earlyGeneralTracks"))
    process.preDuplicateMergingGeneralTracks.selectedTrackQuals = cms.VInputTag(cms.InputTag("muonSeededTracksOutInSelector","muonSeededTracksOutInHighPurity"))
    process.preDuplicateMergingGeneralTracks.setsToMerge = cms.VPSet(cms.PSet(
        pQual = cms.bool(False),
        tLists = cms.vint32(0)
    ))
    process.preDuplicateMergingGeneralTracks.hasSelector = cms.vint32(0)
    process.mergedDuplicateTracks.TTRHBuilder  = 'WithTrackAngle'
    # PixelCPEGeneric #
    process.ctfWithMaterialTracks.TTRHBuilder = 'WithTrackAngle'
    process.PixelCPEGenericESProducer.UseErrorsFromTemplates = cms.bool(False)
    process.PixelCPEGenericESProducer.TruncatePixelCharge = cms.bool(False)
    process.PixelCPEGenericESProducer.LoadTemplatesFromDB = cms.bool(False)
    process.PixelCPEGenericESProducer.Upgrade = cms.bool(True)
    #process.PixelCPEGenericESProducer.SmallPitch = False
    process.PixelCPEGenericESProducer.IrradiationBiasCorrection = False
    process.PixelCPEGenericESProducer.DoCosmics = False

    # CPE for other steps
    process.siPixelRecHits.CPE = cms.string('PixelCPEGeneric')

    #and clean up the conversions (which probably need work)
    process.convClusters.oldClusterRemovalInfo=cms.InputTag("mixedTripletStepClusters")
    process.convClusters.trajectories=cms.InputTag("mixedTripletStepTracks")
    process.convClusters.overrideTrkQuals= cms.InputTag("mixedTripletStep")
    
    # Corrections for Electron Seeds # Sequence and Mask # Tags #

    process.tripletElectronSeedLayers.BPix.skipClusters=cms.InputTag('mixedTripletStepSeedClusterMask')
    process.tripletElectronSeedLayers.FPix.skipClusters=cms.InputTag('mixedTripletStepSeedClusterMask')
    process.tripletElectronClusterMask.oldClusterRemovalInfo=cms.InputTag('mixedTripletStepSeedClusterMask')
    
    process.initialStepSeedClusterMask.oldClusterRemovalInfo=cms.InputTag("mixedTripletStepClusters") #step before pixelLess

    # removing pixelLessStep for now # Taking it out from newCombinedSeeds below #
    #process.newCombinedSeeds.seedCollections.remove( cms.InputTag('pixelLessStepSeeds'))
    # removing pixelLessStep for now # Taking it out from electronSeeds Sequence below #
    #process.electronSeedsSeq.remove(process.pixelLessStepSeedClusterMask)

    from RecoLocalTracker.SubCollectionProducers.SeedClusterRemover_cfi import seedClusterRemover
    process.highPtTripletStepSeedClusterMask = seedClusterRemover.clone(
    	trajectories = cms.InputTag("highPtTripletStepSeeds"),
    	oldClusterRemovalInfo = cms.InputTag("initialStepSeedClusterMask")
    )

    # Now highPtTripletStepSeedClusterMask will be before pixelPairStepSeedClusterMask #
    process.pixelPairStepSeedClusterMask.oldClusterRemovalInfo = cms.InputTag("highPtTripletStepSeedClusterMask")

    ### Not the Tracking uses the 2 seed collections separately. The merged seed collection is produced 
    ### for backward compatibility with electron reconstruction
    process.newCombinedSeeds.seedCollections = cms.VInputTag(cms.InputTag('initialStepSeeds'),
 							     cms.InputTag("highPtTripletStepSeeds"),
 							     cms.InputTag('pixelPairStepSeeds'),
 							     cms.InputTag('mixedTripletStepSeeds'),
 							     cms.InputTag('tripletElectronSeeds'),
 							     cms.InputTag('pixelPairElectronSeeds'),
 							     cms.InputTag('stripPairElectronSeeds')  )

    process.electronSeedsSeq = cms.Sequence( initialStepSeedClusterMask*
    				     	     process.highPtTripletStepSeedClusterMask*
    				     	     pixelPairStepSeedClusterMask*
    				     	     mixedTripletStepSeedClusterMask*
    				     	     tripletElectronSeeds*
    				     	     tripletElectronClusterMask*
    				     	     pixelPairElectronSeeds*
    				     	     stripPairElectronSeeds*
    				     	     newCombinedSeeds  )

    process.reconstruction.remove(process.castorreco)
    process.reconstruction.remove(process.CastorTowerReco)
    process.reconstruction.remove(process.ak7BasicJets)
    process.reconstruction.remove(process.ak7CastorJetID)

    process.load("SLHCUpgradeSimulations.Geometry.recoFromSimDigis_cff")
    process.PixelCPEGenericESProducer.Upgrade = cms.bool(True)
    process.PixelCPEGenericESProducer.UseErrorsFromTemplates = cms.bool(False)
    process.PixelCPEGenericESProducer.LoadTemplatesFromDB = cms.bool(False)
    process.PixelCPEGenericESProducer.TruncatePixelCharge = cms.bool(False)

    #the quadruplet merger configuration     
    process.load("RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff")
    process.pixelseedmergerlayers.BPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
    process.pixelseedmergerlayers.BPix.HitProducer = cms.string("siPixelRecHits" )
    process.pixelseedmergerlayers.FPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
    process.pixelseedmergerlayers.FPix.HitProducer = cms.string("siPixelRecHits" )    
    
    process.highPtTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle') 

    process.initialStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
    process.pixelPairStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
    process.lowPtTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
    process.convStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
    process.mixedTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')

    process.muons1stStep.TrackerKinkFinderParameters.TrackerRecHitBuilder=cms.string('WithTrackAngle')
    process.regionalCosmicTracks.TTRHBuilder=cms.string('WithTrackAngle')
    process.cosmicsVetoTracksRaw.TTRHBuilder=cms.string('WithTrackAngle')

    #well, this needs to move input the default configs
    #SeedMergerPSet = cms.PSet(
    #    layerListName = cms.string('PixelSeedMergerQuadruplets'),
    #    addRemainingTriplets = cms.bool(False),
    #    mergeTriplets = cms.bool(False),
    #    ttrhBuilderLabel = cms.string('PixelTTRHBuilderWithoutAngle')
    #    )

    #process.regionalCosmicTrackerSeeds.SeedMergerPSet=SeedMergerPSet
    
    #done
    return process
# SEEDS
import RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff
from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock

hiLowPtTripletStepSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone(
    RegionFactoryPSet=RegionPsetFomBeamSpotBlock.clone(
        ComponentName=cms.string("GlobalRegionProducerFromBeamSpot"),
        RegionPSet=RegionPsetFomBeamSpotBlock.RegionPSet.clone(
            # Default
            ptMin=cms.double(0.2),
            # Playing around
            #    ptMin = 0.25,
            #    ptMin = 0.30,
            #    ptMin = 1.0,
            # Default
            originRadius=cms.double(0.02),
            # Playing around
            #    originRadius = cms.double(0.01),
            #    originRadius = cms.double(0.005),
            #    originRadius = 0.001,
            # Default
            nSigmaZ=cms.double(4.0),
        ),
    )
)

hiLowPtTripletStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = "hiLowPtTripletStepSeedLayers"

# Added by pawan
# to avoid 'too many clusters'
Пример #8
0
def customise_Reco(process):
    # Need this line to stop error about missing siPixelDigis.
    process.MeasurementTracker.inactivePixelDetectorLabels = cms.VInputTag()
    # Next line is only in for the moment for debugging
    #process.load('Configuration.StandardSequences.Reconstruction_cff')
    #
    process.load("RecoTracker.IterativeTracking.HighPtTripletStep_cff")

    # new layer list (3/4 pixel seeding) in stepZero
    process.pixellayertriplets.layerList = cms.vstring(
        'BPix1+BPix2+BPix3', 'BPix2+BPix3+BPix4', 'BPix1+BPix3+BPix4',
        'BPix1+BPix2+BPix4', 'BPix2+BPix3+FPix1_pos', 'BPix2+BPix3+FPix1_neg',
        'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
        'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg',
        'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg',
        'FPix1_pos+FPix2_pos+FPix3_pos', 'FPix1_neg+FPix2_neg+FPix3_neg')

    process.highPtTripletStepSeedLayers.layerList = cms.vstring(
        'BPix1+BPix2+BPix3', 'BPix2+BPix3+BPix4', 'BPix1+BPix3+BPix4',
        'BPix1+BPix2+BPix4', 'BPix2+BPix3+FPix1_pos', 'BPix2+BPix3+FPix1_neg',
        'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
        'BPix1+BPix3+FPix1_pos', 'BPix1+BPix3+FPix1_neg',
        'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg',
        'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg',
        'BPix1+BPix2+FPix2_pos', 'BPix1+BPix2+FPix2_neg',
        'FPix1_pos+FPix2_pos+FPix3_pos', 'FPix1_neg+FPix2_neg+FPix3_neg',
        'BPix1+FPix2_pos+FPix3_pos', 'BPix1+FPix2_neg+FPix3_neg',
        'BPix1+FPix1_pos+FPix3_pos', 'BPix1+FPix1_neg+FPix3_neg')

    process.lowPtTripletStepSeedLayers.layerList = cms.vstring(
        'BPix1+BPix2+BPix3', 'BPix2+BPix3+BPix4', 'BPix1+BPix3+BPix4',
        'BPix1+BPix2+BPix4', 'BPix2+BPix3+FPix1_pos', 'BPix2+BPix3+FPix1_neg',
        'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
        'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg',
        'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg',
        'FPix1_pos+FPix2_pos+FPix3_pos', 'FPix1_neg+FPix2_neg+FPix3_neg')

    ## need changes to mixedtriplets step to use for imcreasing high eta efficiency
    process.mixedTripletStepClusters.oldClusterRemovalInfo = cms.InputTag(
        "pixelPairStepClusters")
    process.mixedTripletStepClusters.trajectories = cms.InputTag(
        "pixelPairStepTracks")
    process.mixedTripletStepClusters.overrideTrkQuals = cms.InputTag(
        'pixelPairStepSelector', 'pixelPairStep')
    process.mixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.originRadius = 0.02
    process.mixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.originRadius = 0.02

    ## new layer list for mixed triplet step
    process.mixedTripletStepSeedLayersA.layerList = cms.vstring(
        'BPix1+BPix2+BPix3', 'BPix2+BPix3+BPix4', 'BPix1+BPix2+FPix1_pos',
        'BPix1+BPix2+FPix1_neg', 'BPix1+FPix1_pos+FPix2_pos',
        'BPix1+FPix1_neg+FPix2_neg', 'FPix1_pos+FPix2_pos+FPix3_pos',
        'FPix1_neg+FPix2_neg+FPix3_neg', 'BPix2+FPix1_pos+FPix2_pos',
        'BPix2+FPix1_neg+FPix2_neg', 'FPix2_pos+FPix3_pos+TEC1_pos',
        'FPix2_neg+FPix3_neg+TEC1_neg', 'FPix3_pos+TEC2_pos+TEC3_pos',
        'FPix3_neg+TEC2_neg+TEC3_neg')

    #mixedTripletStepSeedLayersB.layerList = cms.vstring('BPix3+BPix4+TIB1', 'BPix3+BPix4+TIB2')
    ## switch off SeedB the easy way
    process.mixedTripletStepSeedLayersB.layerList = cms.vstring(
        'BPix1+BPix2+BPix3')

    ## increased the max track candidates
    process.mixedTripletStepTrackCandidates.maxNSeeds = cms.uint32(150000)
    process.pixelPairStepTrackCandidates.maxNSeeds = cms.uint32(150000)

    ######### FOR initialStepSeeds SeedMergerPSet ---->  mergeTriplets must be true
    global RecoTracker
    from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock
    process.initialStepSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone(
        RegionFactoryPSet=RegionPsetFomBeamSpotBlock.clone(
            ComponentName=cms.string('GlobalRegionProducerFromBeamSpot'),
            RegionPSet=RegionPsetFomBeamSpotBlock.RegionPSet.clone(
                ptMin=0.6, originRadius=0.02, nSigmaZ=4.0)),
        SeedMergerPSet=cms.PSet(
            layerListName=cms.string('PixelSeedMergerQuadruplets'),
            addRemainingTriplets=cms.bool(False),
            mergeTriplets=cms.bool(True),
            ttrhBuilderLabel=cms.string('PixelTTRHBuilderWithoutAngle')))
    process.initialStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet.ComponentName = 'LowPtClusterShapeSeedComparitor'

    # quadruplets in step0
    #process.initialStepSeeds.SeedMergerPSet.mergeTriplets       = cms.bool(True)

    # disconnect merger for stepOne and step 2 to have triplets merged
    #process.highPtTripletStepSeeds.SeedMergerPSet.mergeTriplets = cms.bool(False)
    #process.lowPtTripletStepSeeds.SeedMergerPSet.mergeTriplets  = cms.bool(False)
    #process.pixelPairStepSeeds.SeedMergerPSet.mergeTriplets     = cms.bool(False)
    #process.mixedTripletStepSeedsA.SeedMergerPSet.mergeTriplets = cms.bool(False)
    #process.mixedTripletStepSeedsB.SeedMergerPSet.mergeTriplets = cms.bool(False)

    # to avoid 'too many clusters'
    process.initialStepSeeds.ClusterCheckPSet.doClusterCheck = cms.bool(False)
    process.highPtTripletStepSeeds.ClusterCheckPSet.doClusterCheck = cms.bool(
        False)
    process.lowPtTripletStepSeeds.ClusterCheckPSet.doClusterCheck = cms.bool(
        False)
    process.pixelPairStepSeeds.ClusterCheckPSet.doClusterCheck = cms.bool(
        False)
    process.mixedTripletStepSeedsA.ClusterCheckPSet.doClusterCheck = cms.bool(
        False)
    process.mixedTripletStepSeedsB.ClusterCheckPSet.doClusterCheck = cms.bool(
        False)

    # avoid 'number of triples exceed maximum'
    process.pixelTracks.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = cms.uint32(
        0)
    process.initialStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = cms.uint32(
        0)
    process.highPtTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = cms.uint32(
        0)
    process.lowPtTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = cms.uint32(
        0)
    process.mixedTripletStepSeedsA.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = cms.uint32(
        0)
    process.mixedTripletStepSeedsB.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = cms.uint32(
        0)
    # avoid 'number of pairs exceed maximum'
    process.pixelPairStepSeeds.OrderedHitsFactoryPSet.maxElement = cms.uint32(
        0)

    process.initialStepSelector.trackSelectors[0].dz_par1 = cms.vdouble(
        0.605, 4.0)  # 0.65
    process.initialStepSelector.trackSelectors[0].dz_par2 = cms.vdouble(
        0.42, 4.0)  # 0.45
    process.initialStepSelector.trackSelectors[0].d0_par1 = cms.vdouble(
        0.51, 4.0)  # 0.55
    process.initialStepSelector.trackSelectors[0].d0_par2 = cms.vdouble(
        0.51, 4.0)  # 0.55
    process.initialStepSelector.trackSelectors[1].dz_par1 = cms.vdouble(
        0.325, 4.0)  # 0.35
    process.initialStepSelector.trackSelectors[1].dz_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4
    process.initialStepSelector.trackSelectors[1].d0_par1 = cms.vdouble(
        0.279, 4.0)  # 0.3
    process.initialStepSelector.trackSelectors[1].d0_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4
    process.initialStepSelector.trackSelectors[2].dz_par1 = cms.vdouble(
        0.325, 4.0)  # 0.35
    process.initialStepSelector.trackSelectors[2].dz_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4
    process.initialStepSelector.trackSelectors[2].d0_par1 = cms.vdouble(
        0.279, 4.0)  # 0.3
    process.initialStepSelector.trackSelectors[2].d0_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4

    process.lowPtTripletStepSelector.trackSelectors[0].dz_par1 = cms.vdouble(
        0.605, 4.0)  # 0.65
    process.lowPtTripletStepSelector.trackSelectors[0].dz_par2 = cms.vdouble(
        0.42, 4.0)  # 0.45
    process.lowPtTripletStepSelector.trackSelectors[0].d0_par1 = cms.vdouble(
        0.51, 4.0)  # 0.55
    process.lowPtTripletStepSelector.trackSelectors[0].d0_par2 = cms.vdouble(
        0.51, 4.0)  # 0.55
    process.lowPtTripletStepSelector.trackSelectors[1].dz_par1 = cms.vdouble(
        0.325, 4.0)  # 0.35
    process.lowPtTripletStepSelector.trackSelectors[1].dz_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4
    process.lowPtTripletStepSelector.trackSelectors[1].d0_par1 = cms.vdouble(
        0.279, 4.0)  # 0.3
    process.lowPtTripletStepSelector.trackSelectors[1].d0_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4
    process.lowPtTripletStepSelector.trackSelectors[2].dz_par1 = cms.vdouble(
        0.325, 4.0)  # 0.35
    process.lowPtTripletStepSelector.trackSelectors[2].dz_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4
    process.lowPtTripletStepSelector.trackSelectors[2].d0_par1 = cms.vdouble(
        0.279, 4.0)  # 0.3
    process.lowPtTripletStepSelector.trackSelectors[2].d0_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4

    process.highPtTripletStepSelector.trackSelectors[0].dz_par1 = cms.vdouble(
        0.605, 4.0)  # 0.65
    process.highPtTripletStepSelector.trackSelectors[0].dz_par2 = cms.vdouble(
        0.42, 4.0)  # 0.45
    process.highPtTripletStepSelector.trackSelectors[0].d0_par1 = cms.vdouble(
        0.51, 4.0)  # 0.55
    process.highPtTripletStepSelector.trackSelectors[0].d0_par2 = cms.vdouble(
        0.51, 4.0)  # 0.55
    process.highPtTripletStepSelector.trackSelectors[1].dz_par1 = cms.vdouble(
        0.325, 4.0)  # 0.35
    process.highPtTripletStepSelector.trackSelectors[1].dz_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4
    process.highPtTripletStepSelector.trackSelectors[1].d0_par1 = cms.vdouble(
        0.279, 4.0)  # 0.3
    process.highPtTripletStepSelector.trackSelectors[1].d0_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4
    process.highPtTripletStepSelector.trackSelectors[2].dz_par1 = cms.vdouble(
        0.325, 4.0)  # 0.35
    process.highPtTripletStepSelector.trackSelectors[2].dz_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4
    process.highPtTripletStepSelector.trackSelectors[2].d0_par1 = cms.vdouble(
        0.279, 4.0)  # 0.3
    process.highPtTripletStepSelector.trackSelectors[2].d0_par2 = cms.vdouble(
        0.372, 4.0)  # 0.4

    # This STEPS should be added later #
    ## remove tracking steps 2-5 to speed up the job
    process.iterTracking.remove(process.DetachedTripletStep)
    process.iterTracking.remove(process.PixelLessStep)
    process.iterTracking.remove(process.TobTecStep)

    #modify the track merger accordingly
    #process.generalTracks.TrackProducers.remove(cms.InputTag('detachedTripletStepTracks'))
    #process.generalTracks.TrackProducers.remove(cms.InputTag('pixelLessStepTracks'))
    #process.generalTracks.TrackProducers.remove(cms.InputTag('tobTecStepTracks'))

    #process.generalTracks.selectedTrackQuals.remove(cms.InputTag("detachedTripletStep"))
    #process.generalTracks.selectedTrackQuals.remove(cms.InputTag("pixelLessStepSelector","pixelLessStep"))
    #process.generalTracks.selectedTrackQuals.remove(cms.InputTag("tobTecStepSelector","tobTecStep"))

    # Corrections for IterativeTracking adding HigPtTripletStep for Phase 1 # Sequence and  Tags #

    # Cloning or Modifing Steps # PixelPairStep and others ...
    import RecoTracker.IterativeTracking.LowPtTripletStep_cff
    process.lowPtTripletStepClusters = RecoTracker.IterativeTracking.LowPtTripletStep_cff.lowPtTripletStepClusters.clone(
        oldClusterRemovalInfo=cms.InputTag("highPtTripletStepClusters"))

    process.lowPtTripletStepClusters.trajectories = cms.InputTag(
        "highPtTripletStepTracks")
    process.lowPtTripletStepClusters.overrideTrkQuals = cms.InputTag(
        'highPtTripletStepSelector', 'highPtTripletStep')
    process.lowPtTripletStepTracks.AlgorithmName = cms.string('iter2')
    process.pixelPairStepTracks.AlgorithmName = cms.string('iter3')
    ## REMOVED BEFORE ##process.detachedTripletStepTracks.AlgorithmName = cms.string('iter4')

    # MergeTrackCollections #
    process.earlyGeneralTracks.setsToMerge = cms.VPSet(
        cms.PSet(tLists=cms.vint32(0, 1, 2, 3, 4), pQual=cms.bool(True)))
    process.earlyGeneralTracks.hasSelector = cms.vint32(1, 1, 1, 1, 1)

    process.earlyGeneralTracks.selectedTrackQuals = cms.VInputTag(
        cms.InputTag("initialStepSelector", "initialStep"),
        cms.InputTag("highPtTripletStepSelector", "highPtTripletStep"),
        cms.InputTag("lowPtTripletStepSelector", "lowPtTripletStep"),
        cms.InputTag("pixelPairStepSelector", "pixelPairStep"),
        cms.InputTag("mixedTripletStep"))

    process.earlyGeneralTracks.TrackProducers = cms.VInputTag(
        cms.InputTag("initialStepTracks"),
        cms.InputTag("highPtTripletStepTracks"),
        cms.InputTag("lowPtTripletStepTracks"),
        cms.InputTag("pixelPairStepTracks"),
        cms.InputTag("mixedTripletStepTracks"))

    # Modifying iterTracking Sequence # Adding HighPtTripletStep to iterTracking Sequence #
    from RecoTracker.IterativeTracking.HighPtTripletStep_cff import HighPtTripletStep
    process.iterTracking = cms.Sequence(
        InitialStep * HighPtTripletStep * LowPtTripletStep * PixelPairStep *
        MixedTripletStep * earlyGeneralTracks *  # Adjust
        preDuplicateMergingGeneralTracks *  # Adjust
        #generalTracks* # Adjust
        generalTracksSequence * ConvStep * conversionStepTracks)
    process.preDuplicateMergingGeneralTracks.TrackProducers = cms.VInputTag(
        cms.InputTag("earlyGeneralTracks"))
    process.preDuplicateMergingGeneralTracks.selectedTrackQuals = cms.VInputTag(
        cms.InputTag("muonSeededTracksOutInSelector",
                     "muonSeededTracksOutInHighPurity"))
    process.preDuplicateMergingGeneralTracks.setsToMerge = cms.VPSet(
        cms.PSet(pQual=cms.bool(False), tLists=cms.vint32(0)))
    process.preDuplicateMergingGeneralTracks.hasSelector = cms.vint32(0)
    process.mergedDuplicateTracks.TTRHBuilder = 'WithTrackAngle'
    # PixelCPEGeneric #
    process.ctfWithMaterialTracks.TTRHBuilder = 'WithTrackAngle'
    process.PixelCPEGenericESProducer.UseErrorsFromTemplates = cms.bool(False)
    process.PixelCPEGenericESProducer.TruncatePixelCharge = cms.bool(False)
    process.PixelCPEGenericESProducer.LoadTemplatesFromDB = cms.bool(False)
    process.PixelCPEGenericESProducer.Upgrade = cms.bool(True)
    #process.PixelCPEGenericESProducer.SmallPitch = False
    process.PixelCPEGenericESProducer.IrradiationBiasCorrection = False
    process.PixelCPEGenericESProducer.DoCosmics = False

    # CPE for other steps
    process.siPixelRecHits.CPE = cms.string('PixelCPEGeneric')

    #and clean up the conversions (which probably need work)
    process.convClusters.oldClusterRemovalInfo = cms.InputTag(
        "mixedTripletStepClusters")
    process.convClusters.trajectories = cms.InputTag("mixedTripletStepTracks")
    process.convClusters.overrideTrkQuals = cms.InputTag("mixedTripletStep")

    # Corrections for Electron Seeds # Sequence and Mask # Tags #

    process.tripletElectronSeedLayers.BPix.skipClusters = cms.InputTag(
        'mixedTripletStepSeedClusterMask')
    process.tripletElectronSeedLayers.FPix.skipClusters = cms.InputTag(
        'mixedTripletStepSeedClusterMask')
    process.tripletElectronClusterMask.oldClusterRemovalInfo = cms.InputTag(
        'mixedTripletStepSeedClusterMask')

    process.initialStepSeedClusterMask.oldClusterRemovalInfo = cms.InputTag(
        "mixedTripletStepClusters")  #step before pixelLess

    # removing pixelLessStep for now # Taking it out from newCombinedSeeds below #
    #process.newCombinedSeeds.seedCollections.remove( cms.InputTag('pixelLessStepSeeds'))
    # removing pixelLessStep for now # Taking it out from electronSeeds Sequence below #
    #process.electronSeedsSeq.remove(process.pixelLessStepSeedClusterMask)

    from RecoLocalTracker.SubCollectionProducers.SeedClusterRemover_cfi import seedClusterRemover
    process.highPtTripletStepSeedClusterMask = seedClusterRemover.clone(
        trajectories=cms.InputTag("highPtTripletStepSeeds"),
        oldClusterRemovalInfo=cms.InputTag("initialStepSeedClusterMask"))

    # Now highPtTripletStepSeedClusterMask will be before pixelPairStepSeedClusterMask #
    process.pixelPairStepSeedClusterMask.oldClusterRemovalInfo = cms.InputTag(
        "highPtTripletStepSeedClusterMask")

    ### Not the Tracking uses the 2 seed collections separately. The merged seed collection is produced
    ### for backward compatibility with electron reconstruction
    process.newCombinedSeeds.seedCollections = cms.VInputTag(
        cms.InputTag('initialStepSeeds'),
        cms.InputTag("highPtTripletStepSeeds"),
        cms.InputTag('pixelPairStepSeeds'),
        cms.InputTag('mixedTripletStepSeeds'),
        cms.InputTag('tripletElectronSeeds'),
        cms.InputTag('pixelPairElectronSeeds'),
        cms.InputTag('stripPairElectronSeeds'))

    process.electronSeedsSeq = cms.Sequence(
        initialStepSeedClusterMask * process.highPtTripletStepSeedClusterMask *
        pixelPairStepSeedClusterMask * mixedTripletStepSeedClusterMask *
        tripletElectronSeeds * tripletElectronClusterMask *
        pixelPairElectronSeeds * stripPairElectronSeeds * newCombinedSeeds)

    process.reconstruction.remove(process.castorreco)
    process.reconstruction.remove(process.CastorTowerReco)
    process.reconstruction.remove(process.ak7BasicJets)
    process.reconstruction.remove(process.ak7CastorJetID)

    process.load("SLHCUpgradeSimulations.Geometry.recoFromSimDigis_cff")
    process.PixelCPEGenericESProducer.Upgrade = cms.bool(True)
    process.PixelCPEGenericESProducer.UseErrorsFromTemplates = cms.bool(False)
    process.PixelCPEGenericESProducer.LoadTemplatesFromDB = cms.bool(False)
    process.PixelCPEGenericESProducer.TruncatePixelCharge = cms.bool(False)

    #the quadruplet merger configuration
    process.load("RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff")
    process.pixelseedmergerlayers.BPix.TTRHBuilder = cms.string(
        "PixelTTRHBuilderWithoutAngle")
    process.pixelseedmergerlayers.BPix.HitProducer = cms.string(
        "siPixelRecHits")
    process.pixelseedmergerlayers.FPix.TTRHBuilder = cms.string(
        "PixelTTRHBuilderWithoutAngle")
    process.pixelseedmergerlayers.FPix.HitProducer = cms.string(
        "siPixelRecHits")

    process.highPtTripletStepTracks.TTRHBuilder = cms.string('WithTrackAngle')

    process.initialStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
    process.pixelPairStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
    process.lowPtTripletStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
    process.convStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
    process.mixedTripletStepTracks.TTRHBuilder = cms.string('WithTrackAngle')

    process.muons1stStep.TrackerKinkFinderParameters.TrackerRecHitBuilder = cms.string(
        'WithTrackAngle')
    process.regionalCosmicTracks.TTRHBuilder = cms.string('WithTrackAngle')
    process.cosmicsVetoTracksRaw.TTRHBuilder = cms.string('WithTrackAngle')

    #well, this needs to move input the default configs
    #SeedMergerPSet = cms.PSet(
    #    layerListName = cms.string('PixelSeedMergerQuadruplets'),
    #    addRemainingTriplets = cms.bool(False),
    #    mergeTriplets = cms.bool(False),
    #    ttrhBuilderLabel = cms.string('PixelTTRHBuilderWithoutAngle')
    #    )

    #process.regionalCosmicTrackerSeeds.SeedMergerPSet=SeedMergerPSet

    #done
    return process
# SEEDING LAYERS
import RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi
hiSecondPixelTripletSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.pixellayertriplets.clone(
        ComponentName = 'hiSecondPixelTripletSeedLayers'
            )
hiSecondPixelTripletSeedLayers.BPix.skipClusters = cms.InputTag('hiSecondPixelTripletClusters')
hiSecondPixelTripletSeedLayers.FPix.skipClusters = cms.InputTag('hiSecondPixelTripletClusters')

# SEEDS
import RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff
from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock
hiSecondPixelTripletSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone(
    RegionFactoryPSet = RegionPsetFomBeamSpotBlock.clone(
    ComponentName = cms.string('GlobalRegionProducerFromBeamSpot'),
    RegionPSet = RegionPsetFomBeamSpotBlock.RegionPSet.clone(
    ptMin = cms.double(4.0),
    originRadius = cms.double(0.005),
    nSigmaZ = cms.double(4.0)
    )
    )
)

hiSecondPixelTripletSeeds.OrderedHitsFactoryPSet.SeedingLayers = 'hiSecondPixelTripletSeedLayers'
hiSecondPixelTripletSeeds.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = cms.uint32(5000000)
hiSecondPixelTripletSeeds.ClusterCheckPSet.MaxNumberOfPixelClusters = cms.uint32(5000000)
hiSecondPixelTripletSeeds.ClusterCheckPSet.MaxNumberOfCosmicClusters = cms.uint32(50000000)

from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import *
hiSecondPixelTripletSeeds.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet.ComponentName = 'LowPtClusterShapeSeedComparitor'


# QUALITY CUTS DURING TRACK BUILDING