Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:08

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # Reco Vertex
0004 # initialize magnetic field #########################
0005 from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import *
0006 from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import *
0007 from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVerticesWithBS_cfi import *
0008 from RecoVertex.V0Producer.generalV0Candidates_cff import *
0009 from RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff import *
0010 
0011 from CommonTools.RecoAlgos.TrackWithVertexRefSelector_cfi import *
0012 from RecoJets.JetProducers.TracksForJets_cff import *
0013 from CommonTools.RecoAlgos.sortedPrimaryVertices_cfi import *
0014 from RecoJets.JetProducers.caloJetsForTrk_cff import *
0015 
0016 unsortedOfflinePrimaryVertices=offlinePrimaryVertices.clone()
0017 offlinePrimaryVertices=sortedPrimaryVertices.clone(
0018     vertices="unsortedOfflinePrimaryVertices", 
0019     particles="trackRefsForJetsBeforeSorting"
0020 )
0021 offlinePrimaryVerticesWithBS=sortedPrimaryVertices.clone(
0022     vertices="unsortedOfflinePrimaryVertices:WithBS", 
0023     particles="trackRefsForJetsBeforeSorting"
0024 )
0025 trackWithVertexRefSelectorBeforeSorting = trackWithVertexRefSelector.clone(
0026     vertexTag="unsortedOfflinePrimaryVertices",
0027     ptMax=9e99,
0028     ptErrorCut=9e99
0029 )
0030 trackRefsForJetsBeforeSorting = trackRefsForJets.clone(src="trackWithVertexRefSelectorBeforeSorting")
0031 
0032 
0033 vertexrecoTask = cms.Task(unsortedOfflinePrimaryVertices,
0034                           trackWithVertexRefSelectorBeforeSorting,
0035                           trackRefsForJetsBeforeSorting,
0036                           offlinePrimaryVertices,
0037                           offlinePrimaryVerticesWithBS,
0038                           generalV0Candidates,
0039                           caloJetsForTrkTask,
0040                           inclusiveVertexingTask
0041                           )
0042 vertexreco = cms.Sequence(vertexrecoTask)
0043 
0044 #modifications for timing
0045 from RecoVertex.Configuration.RecoVertex_phase2_timing_cff import (tpClusterProducer ,
0046                                                                   quickTrackAssociatorByHits ,
0047                                                                   trackTimeValueMapProducer ,
0048                                                                   unsortedOfflinePrimaryVertices4DnoPID ,
0049                                                                   trackWithVertexRefSelectorBeforeSorting4DnoPID ,
0050                                                                   trackRefsForJetsBeforeSorting4DnoPID ,
0051                                                                   offlinePrimaryVertices4DnoPID ,
0052                                                                   offlinePrimaryVertices4DnoPIDWithBS,
0053                                                                   unsortedOfflinePrimaryVertices4DwithPID ,
0054                                                                   offlinePrimaryVertices4DwithPID ,
0055                                                                   offlinePrimaryVertices4DwithPIDWithBS,
0056                                                                   tofPID,
0057                                                                   tofPID4DnoPID,
0058                                                                   unsortedOfflinePrimaryVertices4D,
0059                                                                   trackWithVertexRefSelectorBeforeSorting4D,
0060                                                                   trackRefsForJetsBeforeSorting4D,
0061                                                                   offlinePrimaryVertices4D,
0062                                                                   offlinePrimaryVertices4DWithBS)
0063 
0064 _phase2_tktiming_vertexrecoTask = cms.Task( vertexrecoTask.copy() ,
0065                                             tpClusterProducer ,
0066                                             quickTrackAssociatorByHits ,
0067                                             trackTimeValueMapProducer ,
0068                                             unsortedOfflinePrimaryVertices4D,
0069                                             trackWithVertexRefSelectorBeforeSorting4D ,
0070                                             trackRefsForJetsBeforeSorting4D,
0071                                             offlinePrimaryVertices4D,
0072                                             offlinePrimaryVertices4DWithBS,
0073                                             )
0074 
0075 _phase2_tktiming_layer_vertexrecoTask = cms.Task( _phase2_tktiming_vertexrecoTask.copy() ,
0076                                             unsortedOfflinePrimaryVertices4DnoPID ,
0077                                             trackWithVertexRefSelectorBeforeSorting4DnoPID ,
0078                                             trackRefsForJetsBeforeSorting4DnoPID ,
0079                                             offlinePrimaryVertices4DnoPID ,
0080                                             offlinePrimaryVertices4DnoPIDWithBS,
0081                                             tofPID,
0082                                             tofPID4DnoPID,
0083                                             )
0084 
0085 from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
0086 phase2_timing.toReplaceWith(vertexrecoTask, _phase2_tktiming_vertexrecoTask)
0087 
0088 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
0089 phase2_timing_layer.toReplaceWith(vertexrecoTask, _phase2_tktiming_layer_vertexrecoTask)
0090 phase2_timing_layer.toReplaceWith(unsortedOfflinePrimaryVertices4D, unsortedOfflinePrimaryVertices4DwithPID.clone())
0091 phase2_timing_layer.toReplaceWith(offlinePrimaryVertices4D, offlinePrimaryVertices4DwithPID.clone())
0092 phase2_timing_layer.toReplaceWith(offlinePrimaryVertices4DWithBS, offlinePrimaryVertices4DwithPIDWithBS.clone())
0093 phase2_timing_layer.toModify(offlinePrimaryVertices4D, vertices = "unsortedOfflinePrimaryVertices4D", particles = "trackRefsForJetsBeforeSorting4D")
0094 phase2_timing_layer.toModify(offlinePrimaryVertices4DWithBS, vertices = "unsortedOfflinePrimaryVertices4D:WithBS", particles = "trackRefsForJetsBeforeSorting4D")
0095