-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vertex reconstruction: code re-organization + vertex time computation #43592
Merged
cmsbuild
merged 1 commit into
cms-sw:master
from
kdeleo:revised-primaryvertexproducer_1400pre1_PR_151223
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
Configuration/ProcessModifiers/python/vertex4DTrackSelMVA_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
# Modifier to enable the use of the MVA selection on | ||
# tracks for the 4D vertex reco | ||
|
||
vertex4DTrackSelMVA = cms.Modifier() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
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, | ||
TkClusParameters = dict( | ||
algorithm = "DA2D_vect", | ||
TkDAClusParameters = dict( | ||
Tmin = 4.0, | ||
Tpurge = 4.0, | ||
Tstop = 2.0 | ||
), | ||
), | ||
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')))} | ||
) | ||
trackWithVertexRefSelectorBeforeSorting4D = trackWithVertexRefSelector.clone( | ||
vertexTag = "unsortedOfflinePrimaryVertices4D", | ||
|
@@ -27,28 +34,6 @@ | |
vertices = "unsortedOfflinePrimaryVertices4D:WithBS" | ||
) | ||
|
||
unsortedOfflinePrimaryVertices4DnoPID = unsortedOfflinePrimaryVertices4D.clone( | ||
TrackTimesLabel = "trackExtenderWithMTD:generalTrackt0", | ||
TrackTimeResosLabel = "trackExtenderWithMTD:generalTracksigmat0" | ||
) | ||
trackWithVertexRefSelectorBeforeSorting4DnoPID = trackWithVertexRefSelector.clone( | ||
vertexTag = "unsortedOfflinePrimaryVertices4DnoPID", | ||
ptMax = 9e99, | ||
ptErrorCut = 9e99 | ||
) | ||
trackRefsForJetsBeforeSorting4DnoPID = trackRefsForJets.clone( | ||
src = "trackWithVertexRefSelectorBeforeSorting4DnoPID" | ||
) | ||
offlinePrimaryVertices4DnoPID = offlinePrimaryVertices4D.clone( | ||
vertices = "unsortedOfflinePrimaryVertices4DnoPID", | ||
particles = "trackRefsForJetsBeforeSorting4DnoPID", | ||
trackTimeTag = "trackExtenderWithMTD:generalTrackt0", | ||
trackTimeResoTag = "trackExtenderWithMTD:generalTracksigmat0" | ||
) | ||
offlinePrimaryVertices4DnoPIDWithBS=offlinePrimaryVertices4DnoPID.clone( | ||
vertices = "unsortedOfflinePrimaryVertices4DnoPID:WithBS" | ||
) | ||
|
||
unsortedOfflinePrimaryVertices4DwithPID = unsortedOfflinePrimaryVertices4D.clone( | ||
TrackTimesLabel = "tofPID4DnoPID:t0safe", | ||
TrackTimeResosLabel = "tofPID4DnoPID:sigmat0safe" | ||
|
@@ -76,9 +61,15 @@ | |
from SimTracker.TrackAssociation.trackTimeValueMapProducer_cfi import trackTimeValueMapProducer | ||
from RecoMTD.TimingIDTools.tofPIDProducer_cfi import tofPIDProducer | ||
|
||
tofPID4DnoPID=tofPIDProducer.clone(vtxsSrc='unsortedOfflinePrimaryVertices4DnoPID') | ||
tofPID4DnoPID=tofPIDProducer.clone(vtxsSrc='unsortedOfflinePrimaryVertices') | ||
tofPID=tofPIDProducer.clone() | ||
tofPID3D=tofPIDProducer.clone(vtxsSrc='unsortedOfflinePrimaryVertices') | ||
|
||
from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer | ||
phase2_timing_layer.toModify(tofPID, vtxsSrc='unsortedOfflinePrimaryVertices4D') | ||
phase2_timing_layer.toModify(tofPID, vtxsSrc='unsortedOfflinePrimaryVertices4D', vertexReassignment=False) | ||
phase2_timing_layer.toModify(tofPID3D, vertexReassignment=False) | ||
phase2_timing_layer.toModify(unsortedOfflinePrimaryVertices, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this violates the rules of applying modifiers, modules can be modified only in the files where they are defined |
||
vertexCollections = {0: dict(vertexTimeParameters = cms.PSet( algorithm = cms.string('fromTracksPID'))), | ||
1: dict(vertexTimeParameters = cms.PSet( algorithm = cms.string('fromTracksPID')))} | ||
) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this change necessary here? The clusterizer in ZT is never used in this module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmusich
here it is necessary to update the PSet to the one of the ZT clusterizer, which contains all the parameters of both Z and ZT clusterizers, because otherwise the tests of the PVValidation were failing. The error was caused by the missing parameters in the config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This happens because you import here
DA_vectParameters
cmssw/Alignment/OfflineValidation/test/testPrimaryVertexRelatedValidations_cfg.py
Line 288 in 6b63e89
which is defined as:
cmssw/RecoVertex/PrimaryVertexProducer/python/OfflinePrimaryVertices_cfi.py
Line 7 in 6b63e89
and is auto-generated by
cmssw/RecoVertex/PrimaryVertexProducer/plugins/PrimaryVertexProducer.cc
Line 407 in 6b63e89
This is assuming that all use-cases of
DA_vectParameters
are actually using the ZT-clusterizer (which is not the case).I think it would be clearer to create two
PSet
-s instead: one with the full (Z-T) set of parameters and one with only the ones strictly needed by the clusterizer in z.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given #43592 (comment), I gather this (admittedly minor) point will be followed up in a subsequent PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmusich @mandrenguyen I have opened #43787 to track this residual issue