예제 #1
0
fastSim.toReplaceWith(
    initialStepTrackCandidates,
    FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.
    clone(src=cms.InputTag("initialStepSeeds"), MinNumberOfCrossedLayers=3))

# fitting
import RecoTracker.TrackProducer.TrackProducer_cfi
initialStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
    src='initialStepTrackCandidates',
    AlgorithmName=cms.string('initialStep'),
    Fitter=cms.string('FlexibleKFFittingSmoother'))
fastSim.toModify(initialStepTracks, TTRHBuilder='WithoutRefit')

#vertices
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices as _offlinePrimaryVertices
firstStepPrimaryVerticesUnsorted = _offlinePrimaryVertices.clone()
firstStepPrimaryVerticesUnsorted.TrackLabel = cms.InputTag("initialStepTracks")
firstStepPrimaryVerticesUnsorted.vertexCollections = [
    _offlinePrimaryVertices.vertexCollections[0].clone()
]

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
(pp_on_XeXe_2017 | pp_on_AA_2018).toModify(
    firstStepPrimaryVerticesUnsorted,
    TkFilterParameters=dict(trackQuality="any"))

# we need a replacment for the firstStepPrimaryVerticesUnsorted
# that includes tracker information of signal and pile up
# after mixing there is no such thing as initialStepTracks,
# so we replace the input collection for firstStepPrimaryVerticesUnsorted with generalTracks
예제 #2
0
initialStepTrackCandidatesPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'

# fitting
import RecoTracker.TrackProducer.TrackProducer_cfi
initialStepTracksPreSplitting = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
    src = 'initialStepTrackCandidatesPreSplitting',
    AlgorithmName = cms.string('initialStep'),
    Fitter = cms.string('FlexibleKFFittingSmoother'),
    NavigationSchool ='',
    MeasurementTrackerEvent = ''
    )
initialStepTracksPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'

#vertices
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices as _offlinePrimaryVertices
firstStepPrimaryVerticesPreSplitting = _offlinePrimaryVertices.clone()
firstStepPrimaryVerticesPreSplitting.TrackLabel = cms.InputTag("initialStepTracksPreSplitting")
firstStepPrimaryVerticesPreSplitting.vertexCollections = [_offlinePrimaryVertices.vertexCollections[0].clone()]

#Jet Core emulation to identify jet-tracks
from RecoTracker.IterativeTracking.InitialStep_cff import initialStepTrackRefsForJets, caloTowerForTrk, ak4CaloJetsForTrk
from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import jetsForCoreTracking
initialStepTrackRefsForJetsPreSplitting = initialStepTrackRefsForJets.clone(
    src = 'initialStepTracksPreSplitting')
caloTowerForTrkPreSplitting = caloTowerForTrk.clone()
ak4CaloJetsForTrkPreSplitting = ak4CaloJetsForTrk.clone(
    src = 'caloTowerForTrkPreSplitting',
    srcPVs = 'firstStepPrimaryVerticesPreSplitting')
jetsForCoreTrackingPreSplitting = jetsForCoreTracking.clone(
    src = 'ak4CaloJetsForTrkPreSplitting')
예제 #3
0
# fitting
import RecoTracker.TrackProducer.TrackProducer_cfi

initialStepTracksPreSplitting = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
    src='initialStepTrackCandidatesPreSplitting',
    AlgorithmName=cms.string('initialStep'),
    Fitter=cms.string('FlexibleKFFittingSmoother'),
    NavigationSchool='',
    MeasurementTrackerEvent='')
initialStepTracksPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'

#vertices
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices as _offlinePrimaryVertices

firstStepPrimaryVerticesPreSplitting = _offlinePrimaryVertices.clone()
firstStepPrimaryVerticesPreSplitting.TrackLabel = cms.InputTag(
    "initialStepTracksPreSplitting")
firstStepPrimaryVerticesPreSplitting.vertexCollections = [
    _offlinePrimaryVertices.vertexCollections[0].clone()
]

#Jet Core emulation to identify jet-tracks
from RecoTracker.IterativeTracking.InitialStep_cff import initialStepTrackRefsForJets, caloTowerForTrk, ak4CaloJetsForTrk
from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import jetsForCoreTracking

initialStepTrackRefsForJetsPreSplitting = initialStepTrackRefsForJets.clone(
    src='initialStepTracksPreSplitting')
caloTowerForTrkPreSplitting = caloTowerForTrk.clone()
ak4CaloJetsForTrkPreSplitting = ak4CaloJetsForTrk.clone(
    src='caloTowerForTrkPreSplitting',
예제 #4
0
))


# fitting
import RecoTracker.TrackProducer.TrackProducer_cfi
initialStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
    src           = 'initialStepTrackCandidates',
    AlgorithmName = 'initialStep',
    Fitter        = 'FlexibleKFFittingSmoother'
)
fastSim.toModify(initialStepTracks, TTRHBuilder = 'WithoutRefit')

#vertices
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices as _offlinePrimaryVertices
firstStepPrimaryVerticesUnsorted = _offlinePrimaryVertices.clone(
    TrackLabel = 'initialStepTracks',
    vertexCollections = [_offlinePrimaryVertices.vertexCollections[0].clone()]
)
(pp_on_XeXe_2017 | pp_on_AA).toModify(firstStepPrimaryVerticesUnsorted, TkFilterParameters = dict(trackQuality = 'any'))

# we need a replacment for the firstStepPrimaryVerticesUnsorted
# that includes tracker information of signal and pile up
# after mixing there is no such thing as initialStepTracks,
# so we replace the input collection for firstStepPrimaryVerticesUnsorted with generalTracks
firstStepPrimaryVerticesBeforeMixing =  firstStepPrimaryVerticesUnsorted.clone()
fastSim.toModify(firstStepPrimaryVerticesUnsorted, TrackLabel = 'generalTracks')


from RecoJets.JetProducers.TracksForJets_cff import trackRefsForJets
initialStepTrackRefsForJets = trackRefsForJets.clone(
    src = 'initialStepTracks'
)
예제 #5
0
    minPt=cms.untracked.double(1.),
    maxPt=cms.untracked.double(30.),
    runControl=cms.untracked.bool(True),
    runControlNumber=cms.untracked.vuint32(int(runboundary)),
    TkFilterParameters=FilteringParams,
    TkClusParameters=switchClusterizerParameters(isDA))

####################################################################
# Path
####################################################################
process.p = cms.Path(process.goodvertexSkim * process.seqTrackselRefit *
                     process.PVValidation)

## PV refit part
process.load("TrackingTools.TransientTrack.TransientTrackBuilder_cfi")
process.offlinePrimaryVerticesFromRefittedTrks = offlinePrimaryVertices.clone()
process.offlinePrimaryVerticesFromRefittedTrks.TrackLabel = cms.InputTag(
    "FinalTrackRefitter")
process.offlinePrimaryVerticesFromRefittedTrks.vertexCollections.maxDistanceToBeam = 1
process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.maxNormalizedChi2 = 20
process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.minSiliconLayersWithHits = 5
process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.maxD0Significance = 5.0
# as it was prior to https://github.com/cms-sw/cmssw/commit/c8462ae4313b6be3bbce36e45373aa6e87253c59
process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.maxD0Error = 1.0
process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.maxDzError = 1.0
process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.minPixelLayersWithHits = 2

###################################################################
# The trigger filter module
###################################################################
from HLTrigger.HLTfilters.triggerResultsFilter_cfi import *
예제 #6
0
    onlyPixelHitsForSeedCleaner=cms.bool(True),
    TrajectoryBuilderPSet=cms.PSet(
        refToPSet_=cms.string('initialStepTrajectoryBuilder')),
    doSeedingRegionRebuilding=True,
    useHitsSplitting=True)

# fitting
import RecoTracker.TrackProducer.TrackProducer_cfi
initialStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
    src='initialStepTrackCandidates',
    AlgorithmName=cms.string('initialStep'),
    Fitter=cms.string('FlexibleKFFittingSmoother'))

#vertices
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices as _offlinePrimaryVertices
firstStepPrimaryVertices = _offlinePrimaryVertices.clone()
firstStepPrimaryVertices.TrackLabel = cms.InputTag("initialStepTracks")
firstStepPrimaryVertices.vertexCollections = [
    _offlinePrimaryVertices.vertexCollections[0].clone()
]

# Final selection
from RecoTracker.FinalTrackSelectors.TrackMVAClassifierPrompt_cfi import *
from RecoTracker.FinalTrackSelectors.TrackMVAClassifierDetached_cfi import *

initialStepClassifier1 = TrackMVAClassifierPrompt.clone()
initialStepClassifier1.src = 'initialStepTracks'
initialStepClassifier1.GBRForestLabel = 'MVASelectorIter0_13TeV'
initialStepClassifier1.qualityCuts = [-0.9, -0.8, -0.7]

from RecoTracker.IterativeTracking.DetachedTripletStep_cff import detachedTripletStepClassifier1
예제 #7
0
        MinNumberOfCrossedLayers = 3
    ))


# fitting
import RecoTracker.TrackProducer.TrackProducer_cfi
initialStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
    src = 'initialStepTrackCandidates',
    AlgorithmName = cms.string('initialStep'),
    Fitter = cms.string('FlexibleKFFittingSmoother')
    )
fastSim.toModify(initialStepTracks, TTRHBuilder = 'WithoutRefit')

#vertices
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices as _offlinePrimaryVertices
firstStepPrimaryVerticesUnsorted = _offlinePrimaryVertices.clone()
firstStepPrimaryVerticesUnsorted.TrackLabel = cms.InputTag("initialStepTracks")
firstStepPrimaryVerticesUnsorted.vertexCollections = [_offlinePrimaryVertices.vertexCollections[0].clone()]
# we need a replacment for the firstStepPrimaryVerticesUnsorted
# that includes tracker information of signal and pile up
# after mixing there is no such thing as initialStepTracks,
# so we replace the input collection for firstStepPrimaryVerticesUnsorted with generalTracks
firstStepPrimaryVerticesBeforeMixing =  firstStepPrimaryVerticesUnsorted.clone()
fastSim.toModify(firstStepPrimaryVerticesUnsorted, TrackLabel = "generalTracks")


from RecoJets.JetProducers.TracksForJets_cff import trackRefsForJets
initialStepTrackRefsForJets = trackRefsForJets.clone(src = cms.InputTag('initialStepTracks'))
fastSim.toModify(initialStepTrackRefsForJets, src = "generalTracks")
from RecoJets.JetProducers.caloJetsForTrk_cff import *
from CommonTools.RecoAlgos.sortedPrimaryVertices_cfi import sortedPrimaryVertices as _sortedPrimaryVertices
# in general this GT should be for the ReReco
process.GlobalTag.globaltag = 'GR_E_V48'

## Track refit
process.load("RecoTracker.TrackProducer.TrackRefitters_cff")

# remove the following lines if you run on RECO files
process.TrackRefitter.src = 'ALCARECOTkAlMinBias'
process.TrackRefitter.NavigationSchool = ''


## PV refit
process.load("TrackingTools.TransientTrack.TransientTrackBuilder_cfi")

from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices 
process.offlinePrimaryVerticesFromRefittedTrks  = offlinePrimaryVertices.clone()
process.offlinePrimaryVerticesFromRefittedTrks.TrackLabel                                       = cms.InputTag("TrackRefitter") 
process.offlinePrimaryVerticesFromRefittedTrks.vertexCollections.maxDistanceToBeam              = 1
process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.maxNormalizedChi2             = 20
process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.minSiliconLayersWithHits      = 5
process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.maxD0Significance             = 5.0 
process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.minPixelLayersWithHits        = 2   


                     
## BeamSpot fit
process.load("RecoVertex.BeamSpotProducer.d0_phi_analyzer_cff")

process.d0_phi_analyzer.BeamFitter.WriteAscii                = True
process.d0_phi_analyzer.BeamFitter.AsciiFileName             = 'BeamFit_LumiBased_NewAlignWorkflow_alcareco.txt'
process.d0_phi_analyzer.BeamFitter.AppendRunToFileName       = False
# fitting
import RecoTracker.TrackProducer.TrackProducer_cfi

initialStepTracksPreSplitting = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
    src='initialStepTrackCandidatesPreSplitting',
    AlgorithmName='initialStep',
    Fitter='FlexibleKFFittingSmoother',
    NavigationSchool='',
    MeasurementTrackerEvent='')
initialStepTracksPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'

#vertices
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices as _offlinePrimaryVertices

firstStepPrimaryVerticesPreSplitting = _offlinePrimaryVertices.clone(
    TrackLabel='initialStepTracksPreSplitting',
    vertexCollections=[_offlinePrimaryVertices.vertexCollections[0].clone()])
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
(pp_on_XeXe_2017 | pp_on_AA).toModify(
    firstStepPrimaryVerticesPreSplitting,
    TkFilterParameters=dict(trackQuality='any'))

#Jet Core emulation to identify jet-tracks
from RecoTracker.IterativeTracking.InitialStep_cff import initialStepTrackRefsForJets, caloTowerForTrk, ak4CaloJetsForTrk
from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import jetsForCoreTracking

initialStepTrackRefsForJetsPreSplitting = initialStepTrackRefsForJets.clone(
    src='initialStepTracksPreSplitting')
caloTowerForTrkPreSplitting = caloTowerForTrk.clone()
ak4CaloJetsForTrkPreSplitting = ak4CaloJetsForTrk.clone(
예제 #10
0
import FWCore.ParameterSet.Config as cms

from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices

offlinePrimaryVerticesRecovery = offlinePrimaryVertices.clone(
    isRecoveryIteration=True,
    recoveryVtxCollection="offlinePrimaryVertices",
    TkFilterParameters=dict(maxNormalizedChi2=999.0,
                            minPixelLayersWithHits=0,
                            minSiliconLayersWithHits=0,
                            maxD0Significance=999.0,
                            minPt=0.0,
                            maxEta=999.0,
                            trackQuality="any"),
    TkClusParameters=dict(
        algorithm="gap",
        TkGapClusParameters=cms.PSet(zSeparation=cms.double(1.0))),
    vertexCollections=[offlinePrimaryVertices.vertexCollections[0].clone()])

from PhysicsTools.PatAlgos.slimming.offlineSlimmedPrimaryVertices_cfi import offlineSlimmedPrimaryVertices
offlineSlimmedPrimaryVerticesRecovery = offlineSlimmedPrimaryVertices.clone(
    src="offlinePrimaryVerticesRecovery", score=None)