Skip to content

Commit

Permalink
Adopt a fillDescription default based python solution, with no explic…
Browse files Browse the repository at this point in the history
…it declaration where not strictly needed
  • Loading branch information
fabiocos committed Feb 15, 2024
1 parent 0b33159 commit 8a0bedb
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
)

## MM 04.05.2017 (use settings as in: https://github.com/cms-sw/cmssw/pull/18330)
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import DA_vectParameters
DAClusterizationParams = DA_vectParameters.clone()

GapClusterizationParams = cms.PSet(algorithm = cms.string('gap'),
Expand Down
2 changes: 1 addition & 1 deletion Alignment/OfflineValidation/test/PVValidation_TEMPL_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def customiseKinksAndBows(process):
)

## MM 04.05.2017 (use settings as in: https://github.com/cms-sw/cmssw/pull/18330)
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import DA_vectParameters
DAClusterizationParams = DA_vectParameters.clone()

GapClusterizationParams = cms.PSet(algorithm = cms.string('gap'),
Expand Down
2 changes: 1 addition & 1 deletion Alignment/OfflineValidation/test/PVValidation_T_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def customiseKinksAndBows(process):
)

## MM 04.05.2017 (use settings as in: https://github.com/cms-sw/cmssw/pull/18330)
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import DA_vectParameters
DAClusterizationParams = DA_vectParameters.clone()

GapClusterizationParams = cms.PSet(algorithm = cms.string('gap'),
Expand Down
2 changes: 1 addition & 1 deletion Alignment/OfflineValidation/test/testG4Refitter_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
)

## MM 04.05.2017 (use settings as in: https://github.com/cms-sw/cmssw/pull/18330)
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import DA_vectParameters
DAClusterizationParams = DA_vectParameters.clone()

####################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class RefitType(Enum):
)

## MM 04.05.2017 (use settings as in: https://github.com/cms-sw/cmssw/pull/18330)
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import DA_vectParameters
DAClusterizationParams = DA_vectParameters.clone()

GapClusterizationParams = cms.PSet(algorithm = cms.string('gap'),
Expand Down
2 changes: 1 addition & 1 deletion Alignment/OfflineValidation/test/test_all_Phase2_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class RefitType(Enum):
)

## MM 04.05.2017 (use settings as in: https://github.com/cms-sw/cmssw/pull/18330)
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import DA_vectParameters
DAClusterizationParams = DA_vectParameters.clone()

GapClusterizationParams = cms.PSet(algorithm = cms.string('gap'),
Expand Down
2 changes: 1 addition & 1 deletion Alignment/OfflineValidation/test/test_all_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class RefitType(Enum):
)

## MM 04.05.2017 (use settings as in: https://github.com/cms-sw/cmssw/pull/18330)
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import DA_vectParameters
DAClusterizationParams = DA_vectParameters.clone()

GapClusterizationParams = cms.PSet(algorithm = cms.string('gap'),
Expand Down
10 changes: 7 additions & 3 deletions RecoVertex/Configuration/python/RecoVertex_phase2_timing_cff.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import FWCore.ParameterSet.Config as cms
from RecoVertex.Configuration.RecoVertex_cff import unsortedOfflinePrimaryVertices, trackWithVertexRefSelector, trackRefsForJets, sortedPrimaryVertices, offlinePrimaryVertices, offlinePrimaryVerticesWithBS,vertexrecoTask

from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff import DA2D_vectParameters

unsortedOfflinePrimaryVertices4D = unsortedOfflinePrimaryVertices.clone(
TkClusParameters = DA2D_vectParameters.clone(),
TkClusParameters = cms.PSet(algorithm = cms.string("DA2D_vect"),
TkDAClusParameters = cms.PSet(
Tmin = cms.double(4.0),
Tpurge = cms.double(4.0),
Tstop = cms.double(2.0),
)
),
TrackTimesLabel = cms.InputTag("trackTimeValueMapProducer","generalTracksConfigurableFlatResolutionModel"),
TrackTimeResosLabel = cms.InputTag("trackTimeValueMapProducer","generalTracksConfigurableFlatResolutionModelResolution"),
vertexCollections = {0: dict(vertexTimeParameters = cms.PSet( algorithm = cms.string('legacy4D'))),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import FWCore.ParameterSet.Config as cms

from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff import DA_vectParameters

offlinePrimaryVertices = cms.EDProducer(
"PrimaryVertexProducer",

Expand All @@ -22,7 +20,28 @@
trackQuality = cms.string("any")
),

TkClusParameters = DA_vectParameters.clone(),
TkClusParameters = cms.PSet(
algorithm = cms.string("DA_vect"),
TkDAClusParameters = cms.PSet(
coolingFactor = cms.double(0.6), # moderate annealing speed
zrange = cms.double(4.), # consider only clusters within 4 sigma*sqrt(T) of a track
delta_highT = cms.double(1.e-2), # convergence requirement at high T
delta_lowT = cms.double(1.e-3), # convergence requirement at low T
convergence_mode = cms.int32(0), # 0 = two steps, 1 = dynamic with sqrt(T)
Tmin = cms.double(2.0), # end of vertex splitting
Tpurge = cms.double(2.0), # cleaning
Tstop = cms.double(0.5), # end of annealing
vertexSize = cms.double(0.006), # added in quadrature to track-z resolutions
d0CutOff = cms.double(3.), # downweight high IP tracks
dzCutOff = cms.double(3.), # outlier rejection after freeze-out (T<Tmin)
zmerge = cms.double(1e-2), # merge intermediat clusters separated by less than zmerge
uniquetrkweight = cms.double(0.8),# require at least two tracks with this weight at T=Tpurge
uniquetrkminp = cms.double(0.0), # minimal a priori track weight for counting unique tracks
runInBlocks = cms.bool(False), # activate the DA running in blocks of z sorted tracks
block_size = cms.uint32(10000), # block size in tracks
overlap_frac = cms.double(0.0) # overlap between consecutive blocks (blocks_size*overlap_frac)
)
),

vertexCollections = cms.VPSet(
[cms.PSet(label=cms.string(""),
Expand All @@ -48,6 +67,44 @@

)

from Configuration.ProcessModifiers.vertexInBlocks_cff import vertexInBlocks
vertexInBlocks.toModify(offlinePrimaryVertices,
TkClusParameters = dict(
TkDAClusParameters = dict(
runInBlocks = True,
block_size = 128,
overlap_frac = 0.5
)
)
)

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
(phase2_tracker & vertexInBlocks).toModify(offlinePrimaryVertices,
TkClusParameters = dict(
TkDAClusParameters = dict(
block_size = 512,
overlap_frac = 0.5)
)
)

from Configuration.Eras.Modifier_highBetaStar_2018_cff import highBetaStar_2018
highBetaStar_2018.toModify(offlinePrimaryVertices,
TkClusParameters = dict(
TkDAClusParameters = dict(
Tmin = 4.0,
Tpurge = 1.0,
Tstop = 1.0,
vertexSize = 0.01,
d0CutOff = 4.,
dzCutOff = 5.,
zmerge = 2.e-2,
uniquetrkweight = 0.9
)
)
)

DA_vectParameters = cms.PSet(offlinePrimaryVertices.TkClusParameters.clone())

from Configuration.ProcessModifiers.weightedVertexing_cff import weightedVertexing
weightedVertexing.toModify(offlinePrimaryVertices,
vertexCollections = cms.VPSet(
Expand Down
77 changes: 0 additions & 77 deletions RecoVertex/PrimaryVertexProducer/python/TkClusParameters_cff.py

This file was deleted.

0 comments on commit 8a0bedb

Please sign in to comment.