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

Add PixelBaryCentreAnalyzer in Alignment offline validation tool #32601

Merged
merged 8 commits into from Jan 28, 2021

Conversation

tocheng
Copy link
Contributor

@tocheng tocheng commented Jan 5, 2021

PR description:

PixelBaryCentreAnalyzer is an ED Analyzer that reads global tracker position from GlobalTag and tracker alignment constants from different ESsources, calculates and stores barycentres of different pixel detector substructure in ROOT TTrees, one for each ESsource.

The One module is used because the analyzer is expected to read (empty event) data in orders of lumi section/run number. (Concurrent lumi section processing is not very needed here).

Plotting script is added to compare barycentres from Prompt Reco, End-of-Year Rereco and so-called Run-2 (Ultra)Legacy Rereco.

PR validation:

Plotting script is used as a validation of the output (Ntuple) from the analyzer

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

The PR is not a backport.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 5, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32601/20638

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 5, 2021

A new Pull Request was created by @tocheng (Tongguang) for master.

It involves the following packages:

Alignment/OfflineValidation

@cmsbuild, @pohsun, @yuanchao, @christopheralanwest, @tlampen can you please review it and eventually sign? Thanks.
@mschrode, @mmusich, @adewit, @tocheng, @tlampen this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@tocheng
Copy link
Contributor Author

tocheng commented Jan 5, 2021

@cmsbuild please test

@tocheng
Copy link
Contributor Author

tocheng commented Jan 5, 2021

@connorpa @vbotta This is something you want to watch and comment. Thanks.

@smuzaffar
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 5, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a64171/11962/summary.html
CMSSW: CMSSW_11_3_X_2021-01-04-2300/slc7_amd64_gcc900

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 7 differences found in the comparisons
  • DQMHistoTests: Total files compared: 37
  • DQMHistoTests: Total histograms compared: 2716967
  • DQMHistoTests: Total failures: 12
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2716932
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 36 files compared)
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 156 log files, 37 edm output root files, 37 DQM output files

@vbotta
Copy link
Contributor

vbotta commented Jan 5, 2021

Hi @tocheng,
thanks. After looking at the code, I have the following comments:

  1. Could you add to the produced tree the barycentre of the two FPIX endcaps separately? As far as I can see, this is not stored right now, but will be useful in the future.
  2. It would be nice to make the plotting script a little more general, so that it can be used also for other comparisons in the future. Some concrete suggestions:
    • pass the pixel templates tag and the input ROOT file name as arguments
    • add a check on the existence of the input file
    • make the plotting configurable (number of curves, names, colours, labels), e.g. with a .json you pass as input.
  3. Could you add the python cfg to run the analyzer as well?

@@ -0,0 +1,117 @@
#ifndef Alignment_OfflineValidation_PixelBaryCentreAnalyzer_H
Copy link
Contributor

Choose a reason for hiding this comment

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

cmssw plugins should not have header files, but be fully contained in the .cc file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

const SiPixelQuality* badPixelInfo = &iSetup.getData(siPixelQualityToken_);

// global position
edm::ESHandle<Alignments> globalAlignments;
Copy link
Contributor

Choose a reason for hiding this comment

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

missing esConsumes migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

PixelBaryCentreAnalyzer::initBC();

// Get TkAlign from EventSetup:
edm::ESHandle<Alignments> alignments;
Copy link
Contributor

Choose a reason for hiding this comment

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

missing esConsumes migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

PixelBaryCentreAnalyzer::initBS();

// Get BeamSpot from EventSetup
edm::ESHandle<BeamSpotObjects> beamhandle;
Copy link
Contributor

Choose a reason for hiding this comment

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

missing esConsumes migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESHandle.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

this should go.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I got compile error removing Event.h header
"invalid use of incomplete type 'const class edm::Event'
212 | ls_ = iEvent.id().luminosityBlock()"
and compile error removing MakerMacros header
aggregate 'edm::ParameterSetDescription desc' has incomplete type and cannot be defined

Copy link
Contributor

Choose a reason for hiding this comment

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

In case it was not clear it's just

#include "FWCore/Framework/interface/ESHandle.h

that is unnecessary after the esConsumes migration.

@yuanchao
Copy link
Contributor

Hi @tocheng ,
edm::eventsetup::EventSetupRecord::get<edm::ESHandle > is deprecated. Please update the corresponding code with esConsumes style in PixelBaryCentreAnalyzer.cc and TrackerOfflineValidationSummary.cc . You can refer to this twiki page: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#Getting_data_from_EventSetup_wit

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32601/20685

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

Pull request #32601 was updated. @cmsbuild, @pohsun, @yuanchao, @christopheralanwest, @tlampen can you please check and sign again.

@cmsbuild
Copy link
Contributor

Pull request #32601 was updated. @cmsbuild, @pohsun, @yuanchao, @christopheralanwest, @tlampen can you please check and sign again.

@tlampen
Copy link
Contributor

tlampen commented Jan 27, 2021

please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32601/20906

  • This PR adds an extra 24KB to repository

  • Found files with invalid states:

    • Alignment/OfflineValidation/plugins/PixelBaryCentreAnalyzer.h:

@cmsbuild
Copy link
Contributor

Pull request #32601 was updated. @cmsbuild, @pohsun, @yuanchao, @christopheralanwest, @tlampen can you please check and sign again.

@mmusich
Copy link
Contributor

mmusich commented Jan 27, 2021

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a64171/12574/summary.html
COMMIT: 0e60337
CMSSW: CMSSW_11_3_X_2021-01-27-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/32601/12574/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 37
  • DQMHistoTests: Total histograms compared: 2716596
  • DQMHistoTests: Total failures: 7
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2716567
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 36 files compared)
  • Checked 156 log files, 37 edm output root files, 37 DQM output files

@yuanchao
Copy link
Contributor

+1
Thanks a lot for the update.

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

@qliphy
Copy link
Contributor

qliphy commented Jan 28, 2021

+1

@cmsbuild cmsbuild merged commit cd0fab1 into cms-sw:master Jan 28, 2021
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.

None yet

9 participants