CMS 3D CMS Logo

OfflinePrimaryVertices_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 offlinePrimaryVertices = cms.EDProducer(
4  "PrimaryVertexProducer",
5 
6  verbose = cms.untracked.bool(False),
7  TrackLabel = cms.InputTag("generalTracks"),
8  beamSpotLabel = cms.InputTag("offlineBeamSpot"),
9 
10  TkFilterParameters = cms.PSet(
11  algorithm=cms.string('filter'),
12  maxNormalizedChi2 = cms.double(10.0),
13  minPixelLayersWithHits=cms.int32(2),
14  minSiliconLayersWithHits = cms.int32(5),
15  maxD0Significance = cms.double(4.0),
16  maxD0Error = cms.double(1.0),
17  maxDzError = cms.double(1.0),
18  minPt = cms.double(0.0),
19  maxEta = cms.double(2.4),
20  trackQuality = cms.string("any")
21  ),
22 
23  TkClusParameters = cms.PSet(
24  algorithm = cms.string("DA_vect"),
25  TkDAClusParameters = cms.PSet(
26  coolingFactor = cms.double(0.6), # moderate annealing speed
27  zrange = cms.double(4.), # consider only clusters within 4 sigma*sqrt(T) of a track
28  delta_highT = cms.double(1.e-2), # convergence requirement at high T
29  delta_lowT = cms.double(1.e-3), # convergence requirement at low T
30  convergence_mode = cms.int32(0), # 0 = two steps, 1 = dynamic with sqrt(T)
31  Tmin = cms.double(2.0), # end of vertex splitting
32  Tpurge = cms.double(2.0), # cleaning
33  Tstop = cms.double(0.5), # end of annealing
34  vertexSize = cms.double(0.006), # added in quadrature to track-z resolutions
35  d0CutOff = cms.double(3.), # downweight high IP tracks
36  dzCutOff = cms.double(3.), # outlier rejection after freeze-out (T<Tmin)
37  zmerge = cms.double(1e-2), # merge intermediat clusters separated by less than zmerge
38  uniquetrkweight = cms.double(0.8),# require at least two tracks with this weight at T=Tpurge
39  uniquetrkminp = cms.double(0.0), # minimal a priori track weight for counting unique tracks
40  runInBlocks = cms.bool(False), # activate the DA running in blocks of z sorted tracks
41  block_size = cms.uint32(10000), # block size in tracks
42  overlap_frac = cms.double(0.0) # overlap between consecutive blocks (blocks_size*overlap_frac)
43  )
44  ),
45 
46  vertexCollections = cms.VPSet(
47  [cms.PSet(label=cms.string(""),
48  algorithm=cms.string("AdaptiveVertexFitter"),
49  chi2cutoff = cms.double(2.5),
50  minNdof=cms.double(0.0),
51  useBeamConstraint = cms.bool(False),
52  maxDistanceToBeam = cms.double(1.0)
53  ),
54  cms.PSet(label=cms.string("WithBS"),
55  algorithm = cms.string('AdaptiveVertexFitter'),
56  chi2cutoff = cms.double(2.5),
57  minNdof=cms.double(2.0),
58  useBeamConstraint = cms.bool(True),
59  maxDistanceToBeam = cms.double(1.0),
60  )
61  ]
62  ),
63 
64  isRecoveryIteration = cms.bool(False),
65  recoveryVtxCollection = cms.InputTag("")
66 
67 
68 )
69 
70 from Configuration.ProcessModifiers.vertexInBlocks_cff import vertexInBlocks
71 vertexInBlocks.toModify(offlinePrimaryVertices,
72  TkClusParameters = dict(
73  TkDAClusParameters = dict(
74  runInBlocks = True,
75  block_size = 128,
76  overlap_frac = 0.5
77  )
78  )
79 )
80 
81 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
82 (phase2_tracker & vertexInBlocks).toModify(offlinePrimaryVertices,
83  TkClusParameters = dict(
84  TkDAClusParameters = dict(
85  block_size = 512,
86  overlap_frac = 0.5)
87  )
88 )
89 
90 from Configuration.Eras.Modifier_highBetaStar_2018_cff import highBetaStar_2018
91 highBetaStar_2018.toModify(offlinePrimaryVertices,
92  TkClusParameters = dict(
93  TkDAClusParameters = dict(
94  Tmin = 4.0,
95  Tpurge = 1.0,
96  Tstop = 1.0,
97  vertexSize = 0.01,
98  d0CutOff = 4.,
99  dzCutOff = 5.,
100  zmerge = 2.e-2,
101  uniquetrkweight = 0.9
102  )
103  )
104 )
105 
106 DA_vectParameters = cms.PSet(offlinePrimaryVertices.TkClusParameters.clone())
107 
108 from Configuration.ProcessModifiers.weightedVertexing_cff import weightedVertexing
109 weightedVertexing.toModify(offlinePrimaryVertices,
110  vertexCollections = cms.VPSet(
111  [cms.PSet(label=cms.string(""),
112  algorithm=cms.string("WeightedMeanFitter"),
113  chi2cutoff = cms.double(2.5),
114  minNdof=cms.double(0.0),
115  useBeamConstraint = cms.bool(False),
116  maxDistanceToBeam = cms.double(1.0)
117  ),
118  cms.PSet(label=cms.string("WithBS"),
119  algorithm = cms.string('WeightedMeanFitter'),
120  minNdof=cms.double(0.0),
121  chi2cutoff = cms.double(2.5),
122  useBeamConstraint = cms.bool(True),
123  maxDistanceToBeam = cms.double(1.0)
124  )
125  ]
126  ))
127 # This customization is needed in the trackingLowPU era to be able to
128 # produce vertices also in the cases in which the pixel detector is
129 # not included in data-taking, like it was the case for "Quiet Beam"
130 # collisions on 2016 with run 269207.
131 
132 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
133 trackingLowPU.toModify(offlinePrimaryVertices,
134  TkFilterParameters = dict(minPixelLayersWithHits = 0))
135 
136 
137 # higher eta cut for the phase 2 tracker
138 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
139 phase2_tracker.toModify(offlinePrimaryVertices,
140  TkFilterParameters = dict(maxEta = 4.0))
141 
142 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
143 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
144 (pp_on_XeXe_2017 | pp_on_AA).toModify(offlinePrimaryVertices,
145  TkFilterParameters = dict(
146  algorithm="filterWithThreshold",
147  maxD0Significance = 2.0,
148  maxD0Error = 10.0,
149  maxDzError = 10.0,
150  minPixelLayersWithHits=3,
151  minPt = 0.7,
152  trackQuality = "highPurity",
153  numTracksThreshold = cms.int32(10),
154  maxNumTracksThreshold = cms.int32(1000),
155  minPtTight = cms.double(1.0)
156  ),
157  TkClusParameters = cms.PSet(
158  algorithm = cms.string("gap"),
159  TkGapClusParameters = cms.PSet(
160  zSeparation = cms.double(1.0)
161  )
162  )
163 )
164 
165 from Configuration.Eras.Modifier_highBetaStar_2018_cff import highBetaStar_2018
166 highBetaStar_2018.toModify(offlinePrimaryVertices,
167  TkFilterParameters = dict(
168  maxNormalizedChi2 = 80.0,
169  minPixelLayersWithHits = 1,
170  minSiliconLayersWithHits = 3,
171  maxD0Significance = 7.0,
172  maxD0Error = 10.0,
173  maxDzError = 10.0,
174  maxEta = 2.5
175  ),
176  vertexCollections = {
177  0: dict(chi2cutoff = 4.0, minNdof = -1.1),
178  1: dict(chi2cutoff = 4.0, minNdof = -2.0),
179  }
180 )
181