Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-06-06 01:33:41

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 offlinePrimaryVertices = cms.EDProducer(
0004     "PrimaryVertexProducer",
0005 
0006     verbose = cms.untracked.bool(False),
0007     TrackLabel = cms.InputTag("generalTracks"),
0008     beamSpotLabel = cms.InputTag("offlineBeamSpot"),
0009 
0010     TkFilterParameters = cms.PSet(
0011         algorithm=cms.string('filter'),
0012         maxNormalizedChi2 = cms.double(10.0),
0013         minPixelLayersWithHits=cms.int32(2),
0014         minSiliconLayersWithHits = cms.int32(5),
0015         maxD0Significance = cms.double(4.0),
0016         maxD0Error = cms.double(1.0),
0017         maxDzError = cms.double(1.0),
0018         minPt = cms.double(0.0),
0019         maxEta = cms.double(2.4),
0020         trackQuality = cms.string("any")
0021     ),
0022 
0023     TkClusParameters = cms.PSet(
0024         algorithm   = cms.string("DA_vect"),
0025         TkDAClusParameters = cms.PSet(
0026             coolingFactor = cms.double(0.6),  # moderate annealing speed
0027             zrange = cms.double(4.),          # consider only clusters within 4 sigma*sqrt(T) of a track
0028             delta_highT = cms.double(1.e-2),  # convergence requirement at high T
0029             delta_lowT = cms.double(1.e-3),   # convergence requirement at low T
0030             convergence_mode = cms.int32(0),  # 0 = two steps, 1 = dynamic with sqrt(T)
0031             Tmin = cms.double(2.0),           # end of vertex splitting
0032             Tpurge = cms.double(2.0),         # cleaning
0033             Tstop = cms.double(0.5),          # end of annealing
0034             vertexSize = cms.double(0.006),   # added in quadrature to track-z resolutions
0035             d0CutOff = cms.double(3.),        # downweight high IP tracks
0036             dzCutOff = cms.double(3.),        # outlier rejection after freeze-out (T<Tmin)
0037             zmerge = cms.double(1e-2),        # merge intermediat clusters separated by less than zmerge
0038             uniquetrkweight = cms.double(0.8),# require at least two tracks with this weight at T=Tpurge
0039             uniquetrkminp = cms.double(0.0),  # minimal a priori track weight for counting unique tracks
0040             runInBlocks = cms.bool(False),    # activate the DA running in blocks of z sorted tracks
0041             block_size = cms.uint32(10000),   # block size in tracks
0042             overlap_frac = cms.double(0.0)    # overlap between consecutive blocks (blocks_size*overlap_frac)
0043         )
0044     ),
0045 
0046     vertexCollections = cms.VPSet(
0047      [cms.PSet(label=cms.string(""),
0048                algorithm=cms.string("AdaptiveVertexFitter"),
0049                chi2cutoff = cms.double(2.5),
0050                minNdof=cms.double(0.0),
0051                useBeamConstraint = cms.bool(False),
0052                maxDistanceToBeam = cms.double(1.0)
0053                ),
0054       cms.PSet(label=cms.string("WithBS"),
0055                algorithm = cms.string('AdaptiveVertexFitter'),
0056                chi2cutoff = cms.double(2.5),
0057                minNdof=cms.double(2.0),
0058                useBeamConstraint = cms.bool(True),
0059                maxDistanceToBeam = cms.double(1.0),
0060                )
0061       ]
0062     ),
0063 
0064     isRecoveryIteration = cms.bool(False),
0065     recoveryVtxCollection = cms.InputTag("")
0066 
0067 
0068 )
0069 
0070 from Configuration.ProcessModifiers.vertexInBlocks_cff import vertexInBlocks
0071 vertexInBlocks.toModify(offlinePrimaryVertices,
0072     TkClusParameters = dict(
0073         TkDAClusParameters = dict(
0074             runInBlocks = True,
0075             block_size = 128,
0076             overlap_frac = 0.5
0077         )
0078     )
0079 )
0080 
0081 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
0082 (phase2_tracker & vertexInBlocks).toModify(offlinePrimaryVertices,
0083      TkClusParameters = dict(
0084          TkDAClusParameters = dict(
0085              block_size = 512,
0086              overlap_frac = 0.5)
0087          )
0088 )
0089 
0090 from Configuration.Eras.Modifier_highBetaStar_cff import highBetaStar
0091 from Configuration.Eras.Modifier_run3_oxygen_cff import run3_oxygen
0092 (highBetaStar & ~run3_oxygen).toModify(offlinePrimaryVertices,
0093     TkClusParameters = dict(
0094         TkDAClusParameters = dict(
0095             Tmin = 4.0,
0096             Tpurge = 1.0,
0097             Tstop = 1.0,
0098             vertexSize = 0.01,
0099             d0CutOff = 4.,
0100             dzCutOff = 5.,
0101             zmerge = 2.e-2,
0102             uniquetrkweight = 0.9
0103        )
0104     )
0105 )
0106 
0107 DA_vectParameters = cms.PSet(offlinePrimaryVertices.TkClusParameters.clone())
0108 
0109 from Configuration.ProcessModifiers.weightedVertexing_cff import weightedVertexing
0110 weightedVertexing.toModify(offlinePrimaryVertices,
0111                            vertexCollections = cms.VPSet(
0112                            [cms.PSet(label=cms.string(""),
0113                                      algorithm=cms.string("WeightedMeanFitter"),
0114                                      chi2cutoff = cms.double(2.5),
0115                                      minNdof=cms.double(0.0),
0116                                      useBeamConstraint = cms.bool(False),
0117                                      maxDistanceToBeam = cms.double(1.0)
0118                            ),
0119                            cms.PSet(label=cms.string("WithBS"),
0120                                      algorithm = cms.string('WeightedMeanFitter'),
0121                                      minNdof=cms.double(0.0),
0122                                      chi2cutoff = cms.double(2.5),
0123                                      useBeamConstraint = cms.bool(True),
0124                                      maxDistanceToBeam = cms.double(1.0)
0125                                      )
0126                            ]
0127                            ))
0128 # This customization is needed in the trackingLowPU era to be able to
0129 # produce vertices also in the cases in which the pixel detector is
0130 # not included in data-taking, like it was the case for "Quiet Beam"
0131 # collisions on 2016 with run 269207.
0132 
0133 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
0134 trackingLowPU.toModify(offlinePrimaryVertices,
0135                             TkFilterParameters = dict(minPixelLayersWithHits = 0))
0136 
0137 
0138 # higher eta cut for the phase 2 tracker
0139 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
0140 phase2_tracker.toModify(offlinePrimaryVertices,
0141                         TkFilterParameters = dict(maxEta = 4.0))
0142 
0143 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
0144 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0145 (pp_on_XeXe_2017 | pp_on_AA).toModify(offlinePrimaryVertices,
0146                TkFilterParameters = dict(
0147                    algorithm="filterWithThreshold",
0148                    maxD0Significance = 2.0,
0149                    maxD0Error = 10.0,
0150                    maxDzError = 10.0,
0151                    minPixelLayersWithHits=3,
0152                    minPt = 0.7,
0153                    trackQuality = "highPurity",
0154                    numTracksThreshold = cms.int32(10),
0155                    maxNumTracksThreshold = cms.int32(1000),
0156                    minPtTight = cms.double(1.0)
0157                ),
0158                TkClusParameters = cms.PSet(
0159                  algorithm = cms.string("gap"),
0160                  TkGapClusParameters = cms.PSet(
0161                    zSeparation = cms.double(1.0)
0162                  )
0163                )
0164 )
0165 
0166 (highBetaStar & ~run3_oxygen).toModify(offlinePrimaryVertices,
0167      TkFilterParameters = dict(
0168          maxNormalizedChi2 = 80.0,
0169          minPixelLayersWithHits = 1,
0170          minSiliconLayersWithHits = 3,
0171          maxD0Significance = 7.0,
0172          maxD0Error = 10.0,
0173          maxDzError = 10.0,
0174          maxEta = 2.5
0175      ),
0176      vertexCollections = {
0177          0: dict(chi2cutoff = 4.0, minNdof = -1.1),
0178          1: dict(chi2cutoff = 4.0, minNdof = -2.0),
0179      }
0180 )
0181 
0182 from Configuration.Eras.Modifier_run3_upc_cff import run3_upc
0183 (highBetaStar & run3_upc & ~run3_oxygen).toModify(offlinePrimaryVertices,
0184     TkFilterParameters = dict(
0185         algorithm="filterWithThreshold",
0186         maxNormalizedChi2 = 80.0,
0187         minPixelLayersWithHits = 1,
0188         minSiliconLayersWithHits = 3,
0189         maxD0Significance = 4.0,
0190         maxD0Error = 10.0,
0191         maxDzError = 10.0,
0192         minPt = 0.0,
0193         maxEta = 3.0,
0194         trackQuality = "highPurity",
0195         numTracksThreshold = cms.int32(3),
0196         maxNumTracksThreshold = cms.int32(1000),
0197         minPtTight = cms.double(1.0)
0198     ),
0199     TkClusParameters = cms.PSet(
0200         algorithm = cms.string("gap"),
0201         TkGapClusParameters = cms.PSet(
0202             zSeparation = cms.double(6.0)
0203         )
0204     ),
0205     vertexCollections = {
0206         0: dict(chi2cutoff = 4.0, minNdof = -1.1),
0207         1: dict(chi2cutoff = 4.0, minNdof = -2.0),
0208     }
0209 )