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

Payload Inspector: introduce maps for SiPixelDynamicInefficiency input factors #40495

Merged
merged 3 commits into from
Jan 13, 2023

Conversation

mmusich
Copy link
Contributor

@mmusich mmusich commented Jan 12, 2023

PR description:

The purpose of this PR is introduce Pixel Tracker Maps (via Phase1PixelSummaryMap) of the input factors for the computation of the dynamic inefficiency used in the pixel digitizer. This is done separately for geometrical and PU factors.
Provision for the further expansion are laid out, but currently not used (and therefore commented)
The package unit tests are also expanded accordingly.

PR validation:

Run the following script:

#!/bin/bash
# Save current working dir so img can be outputted there later
W_DIR=$(pwd);
source /afs/cern.ch/cms/cmsset_default.sh;
eval `scram run -sh`;
# Go back to original working directory
cd $W_DIR;

if [ -d $W_DIR/plots_DynIneff ]; then
    rm -fr $W_DIR/plots_DynIneff
fi

mkdir -p $W_DIR/plots_DynIneff

tags=(SiPixelDynamicInefficiency_PhaseI_v9 SiPixelDynamicInefficiency_PhaseI_v8 SiPixelDynamicInefficiency_PhaseI_Run3Studies_v2 SiPixelDynamicInefficiency_PhaseI_Run3Studies SiPixelDynamicInefficiency_P
haseI_v6 SiPixelDynamicInefficiency_PhaseI_v5 SiPixelDynamicInefficiency_PhaseI_v4 SiPixelDynamicInefficiency_PhaseI_relvals_v2 SiPixelDynamicInefficiency_PhaseI_relvals_v1 SiPixelDynamicInefficiency_Pha
seI_v3 SiPixelDynamicInefficiency_Phase1_v4 SiPixelDynamicInefficiency_Phase1_v3 SiPixelDynamicInefficiency_13TeV_v3_mc SiPixelDynamicInefficiency_FakeInefficiency_0999_mc SiPixelDynamicInefficiency_Phas
eI_v2 SiPixelDynamicInefficiency_PhaseI_v1 SiPixelDynamicInefficiency_13TeV_v2_mc SiPixelDynamicInefficiency_8TeV_v2_mc SiPixelDynamicInefficiency_13TeV_50ns_v2_mc SiPixelDynamicInefficiency_8TeV_v1_mc S
iPixelDynamicInefficiency_13TeV_v1_mc SiPixelDynamicInefficiency_13TeV_50ns_v1_mc)
plots=(Geom ColGeom ChipGeom)

for i in "${tags[@]}" 
do
    for j in "${plots[@]}" 
    do
    	getPayloadData.py \
    	    --plugin pluginSiPixelDynamicInefficiency_PayloadInspector \
    	    --plot plot_SiPixelDynamicInefficiency${j}FactorMap \
    	    --tag ${i} \
    	    --time_type Run \
    	    --iovs '{"start_iov": "1", "end_iov": "1"}' \
    	    --db Prod \
    	    --test;

    	mv *.png $W_DIR/plots_DynIneff/${j}_${i}.png
    done

    getPayloadData.py \
     	--plugin pluginSiPixelDynamicInefficiency_PayloadInspector \
	--plot plot_SiPixelDynamicInefficiencyPUPixelMaps \
	--tag ${i} \
     	--time_type Run \
     	--iovs '{"start_iov": "1", "end_iov": "1"}' \
     	--db Prod \
     	--test;
    
    mv *.png $W_DIR/plots_DynIneff/PU_${i}.png
done

and obtained sensible plots. An example is the following plot:

image

Also tested the package unit tests via scram b runtests.

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

N/A

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40495/33675

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @mmusich (Marco Musich) for master.

It involves the following packages:

  • CondCore/SiPixelPlugins (db)
  • DQM/TrackerRemapper (dqm)

@malbouis, @pmandrik, @emanueleusai, @ahmad3213, @tvami, @cmsbuild, @saumyaphor4252, @syuvivida, @ggovi, @francescobrivio, @micsucmed, @rvenditti can you please review it and eventually sign? Thanks.
@hdelanno, @VinInn, @mroguljic, @dkotlins, @fioriNTU, @jandrea, @ferencek, @idebruyn, @mmusich, @threus, @tvami this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@tvami
Copy link
Contributor

tvami commented Jan 12, 2023

@cmsbuild , please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40495/33680

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

Pull request #40495 was updated. @malbouis, @pmandrik, @emanueleusai, @ahmad3213, @tvami, @cmsbuild, @saumyaphor4252, @syuvivida, @ggovi, @francescobrivio, @micsucmed, @rvenditti can you please check and sign again.

@mmusich
Copy link
Contributor Author

mmusich commented Jan 12, 2023

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8a022c/29946/summary.html
COMMIT: a5e8cd3
CMSSW: CMSSW_13_0_X_2023-01-12-1100/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/40495/29946/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

There are some workflows for which there are errors in the baseline:
11634.15 step 3
The results for the comparisons for these workflows could be incomplete
This means most likely that the IB is having errors in the relvals.The error does NOT come from this pull request

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3555538
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3555513
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 211 log files, 162 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@tvami
Copy link
Contributor

tvami commented Jan 12, 2023

+db

  • tess pass
  • PI plots from Marco look good

@emanueleusai
Copy link
Member

+1

  • mostly cosmetic improvements in the DQM part

@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. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

}

/*
//(Not used for the moment)
Copy link
Contributor

Choose a reason for hiding this comment

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

Even if currently not used, I wonder what is the purpose of commenting out the definition of this method: was it giving problems while building?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@perrotta

indeed, it leads to the following compilation warning:

/tmp/musich/CMSSW_13_0_X_2023-01-10-2300/src/CondCore/SiPixelPlugins/plugins/SiPixelDynamicInefficiency_PayloadInspector.cc:169:10: warning: 'bool {anonymous}::SiPixDynIneff::matches(const DetId&, const DetId&, const std::vector<unsigned int>&)' defined but not used [-Wunused-function]
  169 |     bool matches(const DetId& detid, const DetId& db_id, const std::vector<uint32_t>& DetIdmasks) {
      |          ^~~~~~~

which is a bit annoying.
OTOH with these changes

diff --git a/CondCore/SiPixelPlugins/plugins/SiPixelDynamicInefficiency_PayloadInspector.cc b/CondCore/SiPixelPlugins/plugins/SiPixelDynamicInefficiency_PayloadInspector.cc
index 043b6459248..9c8d1701cd3 100644
--- a/CondCore/SiPixelPlugins/plugins/SiPixelDynamicInefficiency_PayloadInspector.cc
+++ b/CondCore/SiPixelPlugins/plugins/SiPixelDynamicInefficiency_PayloadInspector.cc
@@ -164,10 +164,9 @@ namespace {
       return pufactors_db;
     }
 
-    /* 
     //(Not used for the moment)
     //_________________________________________________
-    bool matches(const DetId& detid, const DetId& db_id, const std::vector<uint32_t>& DetIdmasks) {
+    [[maybe_unused]] bool matches(const DetId& detid, const DetId& db_id, const std::vector<uint32_t>& DetIdmasks) {
       if (detid.subdetId() != db_id.subdetId())
         return false;
       for (size_t i = 0; i < DetIdmasks.size(); ++i) {
@@ -180,7 +179,6 @@ namespace {
       }
       return true;
     }
-    */
 
     //_________________________________________________
     bool checkPhase(const SiPixelPI::phase phase, const std::vector<uint32_t>& masks_db) {

I see that the warning goes away.
I can apply this in the next iteration (if it will still be unused).

@perrotta
Copy link
Contributor

+1

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.

5 participants