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

TkDQM: Introduce monitoring package for pixel SoA products #35965

Merged
merged 5 commits into from
Nov 22, 2021

Conversation

sroychow
Copy link
Contributor

@sroychow sroychow commented Nov 3, 2021

PR description:

This PR introduces a new DQM subpackage called SiPixelPhase1Heterogeneous which will contain all the DQM modules to monitor the pixel SoA products. This proposal was presented in the last Central DQM meeting(talk). In this PR, only the modules to monitor Tracks and Vertices are added. The sequence defined in this package is added to the DQMHarvestPixelTracking sequence.
We plan to follow this up with several other PRs to this package:-

  • modules to monitor digis, clusters and rechits.
  • Comparator modules to produce plots for GPU vs CPU comparisons

A PR to cms-bot for new package will be done.

PR validation:

Validated with the Patatrack PixelOnly wfs.

  • CPU wfs: 136.885501,136.888501,10824.501,10824.505,10842.501,10842.505,11634.501,11634.505,11650.501,11650.505
  • GPU wfs:
    136.885502,136.888502,10824.502,10824.506,10842.502,10842.506,11634.502,11634.506,11650.502,11650.506

if this PR is a backport please specify the original PR and why you need to backport that PR:

NA

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 3, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35965/26388

  • This PR adds an extra 20KB to repository

  • Found files with invalid states:

    • DQM/SiPixelPhase1Heterogeneous/python/SiPixelPhase1MonitorTrackSoA_cfi.py:
    • DQM/SiPixelPhase1Heterogeneous/python/SiPixelPhase1MonitorVertexSoA_cfi.py:

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 3, 2021

A new Pull Request was created by @sroychow (Suvankar Roy Chowdhury) for master.

It involves the following packages:

  • DQM/SiPixelPhase1Heterogeneous (****)
  • DQMOffline/Configuration (dqm)

The following packages do not have a category, yet:

DQM/SiPixelPhase1Heterogeneous
Please create a PR for https://github.com/cms-sw/cms-bot/blob/master/categories_map.py to assign category

@emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please review it and eventually sign? Thanks.
@hdelanno, @fioriNTU, @jandrea, @idebruyn, @threus, @rociovilar this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@sroychow
Copy link
Contributor Author

sroychow commented Nov 3, 2021

enable gpu

@sroychow
Copy link
Contributor Author

sroychow commented Nov 3, 2021

@cmsbuild please test

continue;
float chi2 = tsoa.chi2(it);
float phi = tsoa.phi(it);
float zip = tsoa.zip(it);
Copy link
Contributor

Choose a reason for hiding this comment

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

what about tip?

if (nHits == 0)
break; // this is a guard
float pt = tsoa.pt(it);
if (!(pt > 0.))
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe some "optional" filter on quality could be useful.
(eventually a plot of quality itself)

hz->Fill(z);
if (vsoa.ndof[iv] != 0)
hchi2->Fill(vsoa.chi2[iv] / vsoa.ndof[iv]);
hptv2->Fill(vsoa.ptv2[iv]);
Copy link
Contributor

Choose a reason for hiding this comment

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

what about track multiplicity?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am trying to understand if vsoa.ndof[iv] does the right thing.
Why

float chi2[MAXVTX]; // vertices chi2

but

int32_t ndof[MAXTRACKS]; // vertices number of dof (reused as workspace for the number of nearest neighbours FIXME)

isn't ndof a property of the vertex ?

Copy link
Contributor

Choose a reason for hiding this comment

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

because of
reused as workspace for the number of nearest neighbours FIXME
so ndof IS a property of the vertex and == to number-of-associated-tracks-1

Copy link
Contributor

Choose a reason for hiding this comment

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

so it is safe to use vsoa.ndof[iv]. @sroychow can you put it back?
Also we can just use ndof+1 instead of counting the tracks:

for (auto k = 0U; k < pixtrks.size(); ++k) {
if (vsoa.idv[k] == int16_t(vsoa.sortInd[iv]))
ntk++;
}
hntrks->Fill(ntk);

right?

ibooker.cd();
ibooker.setCurrentFolder(topFolderName_);
hnVertex = ibooker.book1D("nVertex", ";# of Vertex;#entries", 101, -0.5, 100.5);
hx = ibooker.book1D("vx", ";Vertez x;#entries", 30, -30., 30);
Copy link
Contributor

Choose a reason for hiding this comment

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

the scale is a bit exaggerated in the transverse plane

Copy link
Contributor

@mmusich mmusich left a comment

Choose a reason for hiding this comment

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

Thanks @sroychow just some minor additional comments.

SiPixelPhase1MonitorTrackSoA::~SiPixelPhase1MonitorTrackSoA() {
// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
edm::LogInfo("SiPixelPhase1MonitorTrackSoA") << ">>> Destroy SiPixelPhase1MonitorTrackSoA ";
Copy link
Contributor

Choose a reason for hiding this comment

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

is it really needed?
This has a cost in production as the message is constructed anyway but dropped.

desc.add<std::string>("TopFolderName", "SiPixelHeterogeneous/PixelTrackSoA");
descriptions.add("monitorpixelTrackSoA", desc);
// or use the following to generate the label from the module's C++ type
//descriptions.addWithDefaultLabel(desc);
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason why not using the default?

SiPixelPhase1MonitorVertexSoA::~SiPixelPhase1MonitorVertexSoA() {
// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
edm::LogInfo("SiPixelPhase1MonitorVertexSoA") << ">>> Destroy SiPixelPhase1MonitorVertexSoA ";
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as above.

desc.add<std::string>("TopFolderName", "SiPixelHeterogeneous/PixelVertexSoA");
descriptions.add("monitorpixelVertexSoA", desc);
// or use the following to generate the label from the module's C++ type
//descriptions.addWithDefaultLabel(desc);
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 3, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-26f94d/20220/summary.html
COMMIT: 0e208d3
CMSSW: CMSSW_12_2_X_2021-11-02-2300/slc7_amd64_gcc900
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35965/20220/install.sh to create a dev area with all the needed externals and cmssw changes.

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 4
  • DQMHistoTests: Total histograms compared: 19782
  • DQMHistoTests: Total failures: 22
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 19760
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 7.546 KiB( 3 files compared)
  • DQMHistoSizes: changed ( 11634.506 ): 5.584 KiB SiPixelHeterogeneous/PixelTrackSoA
  • DQMHistoSizes: changed ( 11634.506 ): 1.962 KiB SiPixelHeterogeneous/PixelVertexSoA
  • Checked 12 log files, 9 edm output root files, 4 DQM output files
  • TriggerResults: no differences found

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 2901890
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2901862
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 41 files compared)
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

address review comments

add plot for ntracks associated

simplify ntracks
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35965/26764

  • This PR adds an extra 16KB to repository

  • Found files with invalid states:

    • DQM/SiPixelPhase1Heterogeneous/python/SiPixelPhase1MonitorTrackSoA_cfi.py:
    • DQM/SiPixelPhase1Heterogeneous/python/SiPixelPhase1MonitorVertexSoA_cfi.py:

@cmsbuild
Copy link
Contributor

Pull request #35965 was updated. @emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please check and sign again.

@mmusich
Copy link
Contributor

mmusich commented Nov 19, 2021

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-26f94d/20634/summary.html
COMMIT: 95b41ec
CMSSW: CMSSW_12_2_X_2021-11-19-1100/slc7_amd64_gcc900
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35965/20634/install.sh to create a dev area with all the needed externals and cmssw changes.

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 4
  • DQMHistoTests: Total histograms compared: 19782
  • DQMHistoTests: Total failures: 8
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 19774
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 8.471 KiB( 3 files compared)
  • DQMHistoSizes: changed ( 11634.506 ): 6.020 KiB SiPixelHeterogeneous/PixelTrackSoA
  • DQMHistoSizes: changed ( 11634.506 ): 2.451 KiB SiPixelHeterogeneous/PixelVertexSoA
  • Checked 12 log files, 9 edm output root files, 4 DQM output files
  • TriggerResults: no differences found

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 3327156
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3327134
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 41 files compared)
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

@jfernan2
Copy link
Contributor

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

@qliphy
Copy link
Contributor

qliphy commented Nov 22, 2021

+1

@cmsbuild cmsbuild merged commit 8b07203 into cms-sw:master Nov 22, 2021
@perrotta
Copy link
Contributor

@sroychow in the last IBs there are errors in two RelVal workflows (136.8855 and 136.8885, see https://cmssdt.cern.ch/SDT/html/cmssdt-ib/#/relVal/CMSSW_12_2/2021-11-22-1100?selectedArchs=slc7_amd64_gcc900&selectedFlavors=X&selectedStatus=failed) which were originated by this PR:

----- Begin Fatal Exception 22-Nov-2021 17:04:50 CET-----------------------
An exception of category 'ProductNotFound' occurred while
   [0] Processing  Event run: 320822 lumi: 47 event: 77301286 stream: 3
   [1] Running path 'dqmoffline_step'
   [2] Calling method for module SiPixelPhase1MonitorTrackSoA/'siPixelPhase1MonitorTrackSoA'
Exception Message:
Principal::getByToken: Found zero products matching all criteria
Looking for type: HeterogeneousSoA<TrackSoAHeterogeneousT<32768> >
Looking for module label: pixelTracksSoA
Looking for productInstanceName: 

   Additional Info:
      [a] If you wish to continue processing events after a ProductNotFound exception,
add "SkipEvent = cms.untracked.vstring('ProductNotFound')" to the "options" PSet in the configuration.
----- End Fatal Exception -------------------------------------------------

Could you please have a look and provide a fix?

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.

7 participants