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

Decoupling charge reweighting from SiPixelDigitizerAlgorithm #31622

Merged
merged 5 commits into from Oct 3, 2020

Conversation

carolinecollard
Copy link
Contributor

PR description:

  • Add a new class (SiPixelChargeReweightingAlgorithm) to extract the charge reweighting functions from SiPixelDigitizerAlgorithm.

  • Correct a typo in SiPixelDigitizerAlgorithm.

These are requested by the DPG Tracker conveners and the Pixel Offline conveners

PR validation:

Two tests have been run:
runTheMatrix.py -l 11834.0 --command='-n 100'
runTheMatrix.py -l 11834.99 --command='-n 100'

Results comparing the default one with the proposed ("decouple") version: there is perfect agreement.
---> https://tinyurl.com/y3gctmqs for standard mixing
---> https://tinyurl.com/y6pzmu8r for pre-mixing

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31622/18691

  • This PR adds an extra 44KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @carolinecollard for master.

It involves the following packages:

SimTracker/SiPixelDigitizer

@cmsbuild, @civanch, @mdhildreth can you please review it and eventually sign? Thanks.
@makortel, @mtosi, @GiacomoSguazzoni, @JanFSchulte, @rovere, @VinInn, @dkotlins, @ferencek, @ebrondol, @threus, @dgulhan, @tvami 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

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 @carolinecollard!
I have just a couple of minor comments, see below.

//class SiPixelChargeReweightingAlgorithm SimTracker/SiPixelDigitizer/src/SiPixelChargeReweightingAlgorithm.cc

// Original Author Caroline Collard
// September 2020 : Extraction of the code for cluster charge reweighting from SiPixelDigitizerAlgoithm to a new class
Copy link
Contributor

Choose a reason for hiding this comment

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

minor typo: "SiPixelDigitizerAlgoithm" -> "SiPixelDigitizerAlgorithm"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok. corrected.


#include "SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.h"

typedef boost::multi_array<float, 2> array_2d;
Copy link
Contributor

Choose a reason for hiding this comment

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

is this needed as it's already defined at line 63?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Line 6 is not needed --> removed.
But line 4 is really needed because it is used for
typedef std::map<int, SiPixelDigitizerAlgorithm::Amplitude, std::less > signal_map_type;
on new line 42.

@mmusich
Copy link
Contributor

mmusich commented Sep 30, 2020

@emiglior FYI

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31622/18695

  • This PR adds an extra 44KB to repository

@cmsbuild
Copy link
Contributor

Pull request #31622 was updated. @cmsbuild, @civanch, @mdhildreth can you please check and sign again.

UseReweighting(conf.getParameter<bool>("UseReweighting")),
PrintClusters(conf.getParameter<bool>("PrintClusters")),
PrintTemplates(conf.getParameter<bool>("PrintTemplates")) {
LogInfo("PixelDigitizer ") << "SiPixelChargeReweightingAlgorithm constructed"
Copy link
Contributor

Choose a reason for hiding this comment

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

@carolinecollard , better to use edm::LogVerbatim

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok. I am changing it. I will update on git in a few minutes.

}

if (PrintClusters) {
std::cout << "Cluster after reweighting: " << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

use #ifdef TP_DEBUG or LogDEbug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@civanch I disagree with this proposal. The purpose of the "PrintClusters" bool on line 303 (and 326 on your next comment) is to activate specifically this print out. By default this variable is set to false in the python, so there is no risk to get print out messages in standard running. It was coded like that by the original author when it was included in SiPixelDigitizerAlgorithm.cc. I prefer not to change.

}

if (PrintClusters) {
std::cout << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

the same cout

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see previous reply.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2020

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31622/18739

  • This PR adds an extra 48KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2020

Pull request #31622 was updated. @cmsbuild, @civanch, @mdhildreth can you please check and sign again.

@civanch
Copy link
Contributor

civanch commented Oct 2, 2020

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2020

+1
Tested at: 74cf769
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-663c26/9702/summary.html
CMSSW: CMSSW_11_2_X_2020-10-01-2300
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2020

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2020

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-663c26/9702/summary.html

Comparison Summary:

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

@civanch
Copy link
Contributor

civanch commented Oct 2, 2020

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2020

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)

@silviodonato
Copy link
Contributor

@carolinecollard I know cout was already in the code before this PR. Howver, would you mind to move from cout to edm::LogInfo or something like that (see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideMessageLogger ) ? std::cout is not thread safe, so we should move away from it (see cms-sw/cms-sw.github.io#94)

@carolinecollard
Copy link
Contributor Author

@silviodonato Ok, I understand. Unfortunately, I will have no time to make any change before October 12.

@silviodonato
Copy link
Contributor

@silviodonato
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.

None yet

5 participants