Skip to content

Commit

Permalink
Restore situation previous to RecoVertex/PrimaryVertexProducer config…
Browse files Browse the repository at this point in the history
…uration updates
  • Loading branch information
fabiocos committed Feb 15, 2024
1 parent ca93802 commit 5f2258f
Show file tree
Hide file tree
Showing 15 changed files with 191 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@
#include "Geometry/TrackerGeometryBuilder/interface/PixelTopologyMap.h"
#include "Geometry/Records/interface/TrackerTopologyRcd.h"
#include "RecoVertex/PrimaryVertexProducer/interface/TrackFilterForPVFinding.h"
#include "RecoVertex/PrimaryVertexProducer/interface/HITrackFilterForPVFinding.h"
#include "RecoVertex/PrimaryVertexProducer/interface/DAClusterizerInZ_vect.h"
#include "RecoVertex/PrimaryVertexProducer/interface/DAClusterizerInZT_vect.h"
#include "RecoVertex/PrimaryVertexProducer/interface/GapClusterizerInZ.h"
#include "RecoVertex/VertexPrimitives/interface/TransientVertex.h"
#include "TrackingTools/TransientTrack/interface/TransientTrack.h"
Expand Down Expand Up @@ -3696,15 +3694,15 @@ void PrimaryVertexValidation::fillDescriptions(edm::ConfigurationDescriptions& d
// track filtering
edm::ParameterSetDescription psd0;
TrackFilterForPVFinding::fillPSetDescription(psd0);
HITrackFilterForPVFinding::fillPSetDescription(psd0); // HI only
psd0.add<int>("numTracksThreshold", 0); // HI only
desc.add<edm::ParameterSetDescription>("TkFilterParameters", psd0);

// PV Clusterization
{
edm::ParameterSetDescription psd0;
{
edm::ParameterSetDescription psd1;
DAClusterizerInZT_vect::fillPSetDescription(psd1);
DAClusterizerInZ_vect::fillPSetDescription(psd1);
psd0.add<edm::ParameterSetDescription>("TkDAClusParameters", psd1);

edm::ParameterSetDescription psd2;
Expand Down
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.OfflinePrimaryVertices_cfi import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff 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.OfflinePrimaryVertices_cfi import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff 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.OfflinePrimaryVertices_cfi import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff 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.OfflinePrimaryVertices_cfi import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff 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.OfflinePrimaryVertices_cfi import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff 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.OfflinePrimaryVertices_cfi import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff 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.OfflinePrimaryVertices_cfi import DA_vectParameters
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff import DA_vectParameters
DAClusterizationParams = DA_vectParameters.clone()

GapClusterizationParams = cms.PSet(algorithm = cms.string('gap'),
Expand Down
63 changes: 51 additions & 12 deletions RecoVertex/Configuration/python/RecoVertex_phase2_timing_cff.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
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 = dict(
algorithm = "DA2D_vect",
TkDAClusParameters = dict(
Tmin = 4.0,
Tpurge = 4.0,
Tstop = 2.0
),
),
TkClusParameters = DA2D_vectParameters,
TrackTimesLabel = cms.InputTag("trackTimeValueMapProducer","generalTracksConfigurableFlatResolutionModel"),
TrackTimeResosLabel = cms.InputTag("trackTimeValueMapProducer","generalTracksConfigurableFlatResolutionModelResolution"),
vertexCollections = {0: dict(vertexTimeParameters = cms.PSet( algorithm = cms.string('legacy4D'))),
1: dict(vertexTimeParameters = cms.PSet( algorithm = cms.string('legacy4D')))}
vertexCollections = cms.VPSet(
cms.PSet(
algorithm = cms.string('AdaptiveVertexFitter'),
chi2cutoff = cms.double(2.5),
label = cms.string(''),
maxDistanceToBeam = cms.double(1.0),
minNdof = cms.double(0.0),
useBeamConstraint = cms.bool(False),
vertexTimeParameters = cms.PSet(
algorithm = cms.string('legacy4D')
)
),
cms.PSet(
algorithm = cms.string('AdaptiveVertexFitter'),
chi2cutoff = cms.double(2.5),
label = cms.string('WithBS'),
maxDistanceToBeam = cms.double(1.0),
minNdof = cms.double(2.0),
useBeamConstraint = cms.bool(True),
vertexTimeParameters = cms.PSet(
algorithm = cms.string('legacy4D')
)
)
)
)
trackWithVertexRefSelectorBeforeSorting4D = trackWithVertexRefSelector.clone(
vertexTag = "unsortedOfflinePrimaryVertices4D",
Expand Down Expand Up @@ -69,7 +86,29 @@
phase2_timing_layer.toModify(tofPID, vtxsSrc='unsortedOfflinePrimaryVertices4D', vertexReassignment=False)
phase2_timing_layer.toModify(tofPID3D, vertexReassignment=False)
phase2_timing_layer.toModify(unsortedOfflinePrimaryVertices,
vertexCollections = {0: dict(vertexTimeParameters = cms.PSet( algorithm = cms.string('fromTracksPID'))),
1: dict(vertexTimeParameters = cms.PSet( algorithm = cms.string('fromTracksPID')))}
vertexCollections = cms.VPSet(
cms.PSet(
algorithm = cms.string('AdaptiveVertexFitter'),
chi2cutoff = cms.double(2.5),
label = cms.string(''),
maxDistanceToBeam = cms.double(1.0),
minNdof = cms.double(0.0),
useBeamConstraint = cms.bool(False),
vertexTimeParameters = cms.PSet(
algorithm = cms.string('fromTracksPID')
)
),
cms.PSet(
algorithm = cms.string('AdaptiveVertexFitter'),
chi2cutoff = cms.double(2.5),
label = cms.string('WithBS'),
maxDistanceToBeam = cms.double(1.0),
minNdof = cms.double(2.0),
useBeamConstraint = cms.bool(True),
vertexTimeParameters = cms.PSet(
algorithm = cms.string('fromTracksPID')
)
)
)
)

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class HITrackFilterForPVFinding : public TrackFilterForPVFinding {
}

static void fillPSetDescription(edm::ParameterSetDescription& desc) {
TrackFilterForPVFinding::fillPSetDescription(desc);
desc.add<int>("numTracksThreshold", 0); // HI only
desc.add<int>("maxNumTracksThreshold", std::numeric_limits<int>::max());
desc.add<double>("minPtTight", 0.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,9 @@ void PrimaryVertexProducer::fillDescriptions(edm::ConfigurationDescriptions& des
{
edm::ParameterSetDescription psd0;
TrackFilterForPVFinding::fillPSetDescription(psd0);
HITrackFilterForPVFinding::fillPSetDescription(psd0); // HI only
psd0.add<int>("numTracksThreshold", 0); // HI only
psd0.add<int>("maxNumTracksThreshold", 10000000); // HI only
psd0.add<double>("minPtTight", 0.0); // HI only
desc.add<edm::ParameterSetDescription>("TkFilterParameters", psd0);
}
desc.add<edm::InputTag>("beamSpotLabel", edm::InputTag("offlineBeamSpot"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,45 +1,51 @@
import FWCore.ParameterSet.Config as cms

from RecoVertex.PrimaryVertexProducer.primaryVertexProducer_cfi import primaryVertexProducer
from RecoVertex.PrimaryVertexProducer.TkClusParameters_cff import DA_vectParameters

offlinePrimaryVertices = primaryVertexProducer.clone()
offlinePrimaryVertices = cms.EDProducer(
"PrimaryVertexProducer",

DA_vectParameters = cms.PSet(primaryVertexProducer.TkClusParameters.clone())
verbose = cms.untracked.bool(False),
TrackLabel = cms.InputTag("generalTracks"),
beamSpotLabel = cms.InputTag("offlineBeamSpot"),

TkFilterParameters = cms.PSet(
algorithm=cms.string('filter'),
maxNormalizedChi2 = cms.double(10.0),
minPixelLayersWithHits=cms.int32(2),
minSiliconLayersWithHits = cms.int32(5),
maxD0Significance = cms.double(4.0),
maxD0Error = cms.double(1.0),
maxDzError = cms.double(1.0),
minPt = cms.double(0.0),
maxEta = cms.double(2.4),
trackQuality = cms.string("any")
),

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

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)
)
)
vertexCollections = cms.VPSet(
[cms.PSet(label=cms.string(""),
algorithm=cms.string("AdaptiveVertexFitter"),
chi2cutoff = cms.double(2.5),
minNdof=cms.double(0.0),
useBeamConstraint = cms.bool(False),
maxDistanceToBeam = cms.double(1.0)
),
cms.PSet(label=cms.string("WithBS"),
algorithm = cms.string('AdaptiveVertexFitter'),
chi2cutoff = cms.double(2.5),
minNdof=cms.double(2.0),
useBeamConstraint = cms.bool(True),
maxDistanceToBeam = cms.double(1.0),
)
]
),

isRecoveryIteration = cms.bool(False),
recoveryVtxCollection = cms.InputTag("")

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
)
)

)

from Configuration.ProcessModifiers.weightedVertexing_cff import weightedVertexing
Expand Down Expand Up @@ -91,8 +97,11 @@
maxNumTracksThreshold = cms.int32(1000),
minPtTight = cms.double(1.0)
),
TkClusParameters = dict(
algorithm = "gap"
TkClusParameters = cms.PSet(
algorithm = cms.string("gap"),
TkGapClusParameters = cms.PSet(
zSeparation = cms.double(1.0)
)
)
)

Expand All @@ -112,3 +121,4 @@
1: dict(chi2cutoff = 4.0, minNdof = -2.0),
}
)

77 changes: 77 additions & 0 deletions RecoVertex/PrimaryVertexProducer/python/TkClusParameters_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import FWCore.ParameterSet.Config as cms

DA_vectParameters = 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)
)
)

from Configuration.ProcessModifiers.vertexInBlocks_cff import vertexInBlocks
vertexInBlocks.toModify(DA_vectParameters,
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(DA_vectParameters,
TkDAClusParameters = dict(
block_size = 512,
overlap_frac = 0.5))

from Configuration.Eras.Modifier_highBetaStar_2018_cff import highBetaStar_2018
highBetaStar_2018.toModify(DA_vectParameters,
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
)
)

DA2D_vectParameters = cms.PSet(
algorithm = cms.string("DA2D_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(4.0), # end of vertex splitting
Tpurge = cms.double(4.0), # cleaning
Tstop = cms.double(2.0), # end of annealing
vertexSize = cms.double(0.006), # added in quadrature to track-z resolutions
vertexSizeTime = cms.double(0.008),
d0CutOff = cms.double(3.), # downweight high IP tracks
dzCutOff = cms.double(3.), # outlier rejection after freeze-out (T<Tmin)
dtCutOff = cms.double(4.), # outlier rejection after freeze-out (T<Tmin)
t0Max = cms.double(1.0), # outlier rejection for use of timing information
zmerge = cms.double(1e-2), # merge intermediat clusters separated by less than zmerge and tmerge
tmerge = cms.double(1e-1), # merge intermediat clusters separated by less than zmerge and tmerge
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
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ void DAClusterizerInZT_vect::dump(const double beta, const vertex_t& y, const tr

void DAClusterizerInZT_vect::fillPSetDescription(edm::ParameterSetDescription& desc) {
DAClusterizerInZ_vect::fillPSetDescription(desc);
desc.add<double>("tmerge", 0.1); // 4D only
desc.add<double>("tmerge", 0.01); // 4D only
desc.add<double>("dtCutOff", 4.); // 4D only
desc.add<double>("t0Max", 1.0); // 4D only
desc.add<double>("vertexSizeTime", 0.008); // 4D only
Expand Down
4 changes: 2 additions & 2 deletions RecoVertex/PrimaryVertexProducer/src/DAClusterizerInZ_vect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1549,6 +1549,6 @@ void DAClusterizerInZ_vect::fillPSetDescription(edm::ParameterSetDescription& de
desc.add<double>("uniquetrkminp", 0.0);
desc.add<double>("zrange", 4.0);
desc.add<bool>("runInBlocks", false);
desc.add<unsigned int>("block_size", 10000);
desc.add<double>("overlap_frac", 0.0);
desc.add<unsigned int>("block_size", 512);
desc.add<double>("overlap_frac", 0.5);
}

0 comments on commit 5f2258f

Please sign in to comment.