Skip to content
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

Primary vertex reconstruction: update configuration handling #43846

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

fabiocos
Copy link
Contributor

@fabiocos fabiocos commented Feb 2, 2024

PR description:

This PR addresses issue #43787 following the primary vertex code reorganization made in #43592 . In particular:

  • the previous python master definitions are restored;
  • the fillDescription of PrimaryVertexProducer is updated to provide a default, but no explicit cfi python at runtime;
  • conditional statements are introduced for the definition of TkClusParameters and logical alternatives for TkFilterParameters* in order to prevent the need for all possible versions always present in the PSet definition.

RecoHI/HiTracking code is neglected, as obsolete and anyway not properly working.

*: as HITrackFilterForPVFinding is just an extension of TrackFilterForPVFinding and the output PSet has always the same name TkFilterParameters, the use of logical statements for PSet like xor does not really works correctly. Using the extended version to provide the overall default seems the cleanest and safest solution.

PR validation:

Several benchmark reco configurations are expanded and compared to previous version. FWK calidation of parameters is tested at runtime for a number of benchmark cases.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 2, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 2, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43846/38677

  • This PR adds an extra 72KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 2, 2024

A new Pull Request was created by @fabiocos (Fabio Cossutti) for master.

It involves the following packages:

  • Alignment/OfflineValidation (alca)
  • RecoVertex/Configuration (reconstruction)
  • RecoVertex/PrimaryVertexProducer (reconstruction)
  • Validation/RecoVertex (dqm)

@perrotta, @nothingface0, @mandrenguyen, @saumyaphor4252, @consuegs, @tjavaid, @rvenditti, @cmsbuild, @jfernan2, @syuvivida, @antoniovagnerini can you please review it and eventually sign? Thanks.
@rsreds, @venturia, @VourMa, @missirol, @yuanchao, @mmusich, @rovere, @VinInn, @tocheng, @JanFSchulte, @tlampen, @felicepantaleo, @adewit, @mtosi, @dgulhan, @GiacomoSguazzoni this is something you requested to watch as well.
@sextonkennedy, @rappoccio, @antoniovilela you are the release manager for this.

cms-bot commands are listed here

@fabiocos
Copy link
Contributor Author

fabiocos commented Feb 2, 2024

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 2, 2024

-1

Failed Tests: UnitTests RelVals RelVals-INPUT AddOn
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b2ad5c/37189/summary.html
COMMIT: 506faab
CMSSW: CMSSW_14_0_X_2024-02-02-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/43846/37189/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found 14 errors in the following unit tests:

---> test TestDQMOnlineClient-beampixel_dqm_sourceclient had ERRORS
---> test TestDQMOnlineClient-beam_dqm_sourceclient had ERRORS
---> test TestDQMOnlineClient-sistrip_approx_dqm_sourceclient had ERRORS
and more ...

RelVals

----- Begin Fatal Exception 02-Feb-2024 15:59:57 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PrimaryVertexProducer label='offlinePrimaryVertices'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'TkFilterParameters'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 02-Feb-2024 16:00:16 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PrimaryVertexProducer label='firstStepPrimaryVerticesBeforeMixing'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'TkFilterParameters'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 02-Feb-2024 16:00:16 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PrimaryVertexProducer label='firstStepPrimaryVerticesBeforeMixing'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'TkFilterParameters'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------
Expand to see more relval errors ...

RelVals-INPUT

  • 4.224.22_RunCosmics2011A/step2_RunCosmics2011A.log
  • 4.64.6_MinimumBias2010A/step2_MinimumBias2010A.log
  • 134.813134.813_RunCosmics2015C/step2_RunCosmics2015C.log
Expand to see more relval errors ...

AddOn Tests

----- Begin Fatal Exception 02-Feb-2024 15:58:34 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PrimaryVertexProducer label='firstStepPrimaryVerticesBeforeMixing'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'TkFilterParameters'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 02-Feb-2024 15:58:34 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PrimaryVertexProducer label='firstStepPrimaryVerticesBeforeMixing'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'TkFilterParameters'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 02-Feb-2024 15:58:34 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PrimaryVertexProducer label='firstStepPrimaryVerticesBeforeMixing'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'TkFilterParameters'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------
Expand to see more addon errors ...

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 6, 2024

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43846/38731

  • This PR adds an extra 72KB to repository

  • There are other open Pull requests which might conflict with changes you have proposed:

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@jfernan2
Copy link
Contributor

+1

@perrotta
Copy link
Contributor

+alca

@fabiocos
Copy link
Contributor Author

@cms-sw/dqm-l2 any comment?

@tjavaid
Copy link

tjavaid commented Feb 20, 2024

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @antoniovilela, @sextonkennedy, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@rappoccio
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 39df2dd into cms-sw:master Feb 21, 2024
11 checks passed
@mmusich
Copy link
Contributor

mmusich commented Feb 24, 2024

@fabiocos as #43592 entered 14.0.X can you make a backport for this PR too?

@@ -451,7 +457,7 @@ void PrimaryVertexProducer::fillDescriptions(edm::ConfigurationDescriptions& des
desc.add<bool>("useMVACut", false);
desc.add<double>("minTrackTimeQuality", 0.8);

descriptions.add("primaryVertexProducer", desc);
descriptions.addDefault(desc);
Copy link
Contributor

@Martin-Grunewald Martin-Grunewald Mar 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change messes up ConfDB parsing because no explicit cfi file is generated. I assume descriptions.addWithDefaultLabel would work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by #44287

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this change was intedended @fabiocos FYI

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Martin-Grunewald the whole point of the work behind this PR was to get rid of duplicated definitions of the PV configuration, already achieved in #43592 , without the need to carry forward in any case the complete configuration for all cases as it was in this PR, following the discussion #43592 (comment) .

From you action I understand that in ConfDB you do not only need an explicit definition of offlinePrimaryVertex, obviously granted by this PR, but also of primaryVertexProducer, am I correct? In this case keeping the construction of any other configuration from this latter, as it was in #43592 , was the appropriate thing. Your fix on top of this PR basically vanishes the goal, although I understand it is needed.

I need to verify whether the original target might be recovered in some way exploiting the new was in which the fillDescription is now written.

Copy link
Contributor

@Martin-Grunewald Martin-Grunewald Mar 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabiocos
I think the only effect of changing from addDefault to addWithDefaultLabel is writing out a cfi file primaryVertexProducer_cfi.py in ../cfipython. Since such a file does not exist elsewhere in CMSSW nor is included/imported in any other cfi/cff/cfg file, this change should be safe as it does not change any behaviour. AFAIK addDefault does still enforce fillDescriptions (and supplies missing parameters), while for ConfDb parsing we need the full list of all possible top-level parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Martin-Grunewald it is not used now because I removed it form some configurations, but sooner or later it might come back, as it already happened. At this point I would like a confirmation that the alternative definitions of TkClusParameters I have put in fillDescritption is compatible with ConfDB needs. It defines three possible alternatives depending on the algortihm value, but just one is present by default in the output _cfi.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, is there in the IB integration a test where this issue can be possibly caught in time?

Copy link
Contributor

@Martin-Grunewald Martin-Grunewald Mar 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We (only) need the full set of top-level parameters in the cfi file for ConfDb parsing, as those are fixed by ConfDb. Any parameters within PSets etc. we can freely change/add/remove. So any variant of TkClusParameters content in the cfi file should be fine for ConfDb parsing.
Of course, the parameters used at HLT would need to be those supposed to be used at HLT, but that is a manual thing to check and to adjust (if it is not the default value).
Unfortunately for the ConfDb issue/problems related to not having all top-level parameters in the cfi file, or no cfi file at all, there is no test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants