CMS 3D CMS Logo

RecoVertex_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # Reco Vertex
4 # initialize magnetic field #########################
10 
15 
16 unsortedOfflinePrimaryVertices=offlinePrimaryVertices.clone()
17 offlinePrimaryVertices=sortedPrimaryVertices.clone(
18  vertices="unsortedOfflinePrimaryVertices",
19  particles="trackRefsForJetsBeforeSorting"
20 )
21 offlinePrimaryVerticesWithBS=sortedPrimaryVertices.clone(
22  vertices="unsortedOfflinePrimaryVertices:WithBS",
23  particles="trackRefsForJetsBeforeSorting"
24 )
25 trackWithVertexRefSelectorBeforeSorting = trackWithVertexRefSelector.clone(
26  vertexTag="unsortedOfflinePrimaryVertices",
27  ptMax=9e99,
28  ptErrorCut=9e99
29 )
30 trackRefsForJetsBeforeSorting = trackRefsForJets.clone(src="trackWithVertexRefSelectorBeforeSorting")
31 
32 
33 vertexrecoTask = cms.Task(unsortedOfflinePrimaryVertices,
34  trackWithVertexRefSelectorBeforeSorting,
35  trackRefsForJetsBeforeSorting,
36  offlinePrimaryVertices,
37  offlinePrimaryVerticesWithBS,
38  generalV0Candidates,
39  caloJetsForTrkTask,
40  inclusiveVertexingTask
41  )
42 vertexreco = cms.Sequence(vertexrecoTask)
43 
44 #modifications for timing
45 from RecoVertex.Configuration.RecoVertex_phase2_timing_cff import (tpClusterProducer ,
46  quickTrackAssociatorByHits ,
47  trackTimeValueMapProducer ,
48  unsortedOfflinePrimaryVertices4DwithPID ,
49  offlinePrimaryVertices4DwithPID ,
50  offlinePrimaryVertices4DwithPIDWithBS,
51  tofPID,
52  tofPID3D,
53  tofPID4DnoPID,
54  unsortedOfflinePrimaryVertices4D,
55  trackWithVertexRefSelectorBeforeSorting4D,
56  trackRefsForJetsBeforeSorting4D,
57  offlinePrimaryVertices4D,
58  offlinePrimaryVertices4DWithBS)
59 
60 _phase2_tktiming_vertexrecoTask = cms.Task( vertexrecoTask.copy() ,
61  tpClusterProducer ,
62  quickTrackAssociatorByHits ,
63  trackTimeValueMapProducer ,
64  unsortedOfflinePrimaryVertices4D,
65  trackWithVertexRefSelectorBeforeSorting4D ,
66  trackRefsForJetsBeforeSorting4D,
67  offlinePrimaryVertices4D,
68  offlinePrimaryVertices4DWithBS,
69  )
70 
71 _phase2_tktiming_layer_vertexrecoTask = cms.Task( _phase2_tktiming_vertexrecoTask.copy() ,
72  tofPID3D,
73  tofPID,
74  tofPID4DnoPID,
75  )
76 
77 from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
78 phase2_timing.toReplaceWith(vertexrecoTask, _phase2_tktiming_vertexrecoTask)
79 
80 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
81 phase2_timing_layer.toReplaceWith(vertexrecoTask, _phase2_tktiming_layer_vertexrecoTask)
82 phase2_timing_layer.toReplaceWith(unsortedOfflinePrimaryVertices4D, unsortedOfflinePrimaryVertices4DwithPID.clone())
83 phase2_timing_layer.toReplaceWith(offlinePrimaryVertices4D, offlinePrimaryVertices4DwithPID.clone())
84 phase2_timing_layer.toReplaceWith(offlinePrimaryVertices4DWithBS, offlinePrimaryVertices4DwithPIDWithBS.clone())
85 phase2_timing_layer.toModify(offlinePrimaryVertices4D, vertices = "unsortedOfflinePrimaryVertices4D", particles = "trackRefsForJetsBeforeSorting4D")
86 phase2_timing_layer.toModify(offlinePrimaryVertices4DWithBS, vertices = "unsortedOfflinePrimaryVertices4D:WithBS", particles = "trackRefsForJetsBeforeSorting4D")
87 
88 from Configuration.ProcessModifiers.vertex4DTrackSelMVA_cff import vertex4DTrackSelMVA
89 vertex4DTrackSelMVA.toModify(unsortedOfflinePrimaryVertices4D, useMVACut = True)
90 vertex4DTrackSelMVA.toModify(unsortedOfflinePrimaryVertices4DwithPID, useMVACut = True)