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

Software Design Update for the Phase2 Tracker Digitizer #30582

Merged

Conversation

suchandradutta
Copy link
Contributor

PR description:

Software Design Update for the Phase2 Tracker Digitizer

  • The interface of the base algorithm class Phase2TrackerDigitizerAlgorithm has been updated to support Pixel3DDigitizerAlgorithm properly in the framework. Prototype of a number of methods of Phase2TrackerDigitizerAlgorithm have changed. Code duplication removed. Integration of new algorithms, if any, will be more straight-forward now.

  • Phase2TrackerDigitizer configuration updated to have a common PSet for Pixel. Individual IT-pixel algorithms clone it with necessary modifications

  • A bug fix has been made in the dual slope correction to avoid a shift of 0.5 ToT bin

  • A logical bug was fixed in Phase2TrackerDigitizerAlgorithm::primary_ionization(...)

  • what changes are expected in the output if any --> none

  • what other PRs or externals it depends upon if any --> none

  • link to any additional material useful to provide a documentation for this PR (slides, JIRA tickets, related pull requestes, hypernews, TWiki or Indico pages) --> https://indico.cern.ch/event/879046/contributions/3931489/attachments/2068895/3472721/SWDesignUpdate_validation_03072020.pdf

PR validation:

scram b runtests
runTheMatrix.py -l limited -i all --ibeos

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

Not applicable

@subirsarkar @emiglior @skinnari @duartej @OzAmram

Suchandra added 2 commits July 7, 2020 18:25
…n the framework. Phase2Digitizer configuraion updated to to have a common PSet for Pixel and individual IT-pixel algotithms can clone it and make necessary modifications. A bug fix has been made in the dual slope correction to avoid a shift of 0.5 ToT bin
@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 7, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 7, 2020

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30582/16819

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 7, 2020

A new Pull Request was created by @suchandradutta (Suchandra Dutta) for master.

It involves the following packages:

SimTracker/SiPhase2Digitizer

@cmsbuild, @civanch, @kpedro88, @mdhildreth can you please review it and eventually sign? Thanks.
@makortel, @mtosi, @GiacomoSguazzoni, @JanFSchulte, @rovere, @VinInn, @ebrondol, @threus, @dgulhan this is something you requested to watch as well.
@silviodonato, @dpiparo you are the release manager for this.

cms-bot commands are listed here

@kpedro88
Copy link
Contributor

kpedro88 commented Jul 7, 2020

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 7, 2020

The tests are being triggered in jenkins.

namespace {
double calcQ(float x) {
auto xx = std::min(0.5f * x * x, 12.5f);
return 0.5 * (1.0 - std::copysign(std::sqrt(1.f - unsafe_expf<4>(-xx * (1.f + 0.2733f / (1.f + 0.147f * xx)))), x));
Copy link
Contributor

Choose a reason for hiding this comment

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

use named constants rather than magic numbers, or at least provide a comment explaining what the numbers mean

double signalScale = 1.0;
// fill collection_points for this SimHit, indpendent of topology
if (select_hit(hit, (pixdet->surface().toGlobal(hit.localPosition()).mag() * c_inv), signalScale)) {
const auto ionization_points = primary_ionization(hit); // fills ionization_points
Copy link
Contributor

Choose a reason for hiding this comment

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

const auto& would be better (captures temporary object returned by the function and extends its lifetime to match the current scope, rather than making a copy)

const auto ionization_points = primary_ionization(hit); // fills ionization_points

// transforms ionization_points -> collection_points
const auto collection_points = drift(hit, pixdet, bfield, ionization_points);
Copy link
Contributor

Choose a reason for hiding this comment

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

const auto&

elossVector = fluctuateEloss(hit.particleType(), hit.pabs(), eLoss, length, NumberOfSegments);
} else {
float averageEloss = eLoss / NumberOfSegments;
std::fill(std::begin(elossVector), std::end(elossVector), averageEloss);
Copy link
Contributor

Choose a reason for hiding this comment

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

reserve() doesn't actually create entries, so I don't think this fill() will work. Rather:

elossVector.resize(NumberOfSegments, averageEloss);

// material,*, momentum,energy,*, *, mass
//myglandz_(14.,segmentLength,2.,2.,dedx,de,0.14);
// material,*, momentum,energy,*, *, mass
// myglandz_(14.,segmentLength,2.,2.,dedx,de,0.14);
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 commented-out code still useful? if not, delete it

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 7, 2020

+1
Tested at: 3e7b97d
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-72707d/7768/summary.html
CMSSW: CMSSW_11_2_X_2020-07-07-1100
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 7, 2020

Comparison job queued.

@@ -258,11 +221,6 @@
AddInefficiency = False,
AddThresholdSmearing = False,
),
Pixel3DDigitizerAlgorithm = dict(
Copy link
Contributor

Choose a reason for hiding this comment

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

@suchandradutta,
This reverts f38453e from @duartej. Please restore it as it was previously.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 7, 2020

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-72707d/7768/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 37
  • DQMHistoTests: Total histograms compared: 2787364
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2787313
  • DQMHistoTests: Total skipped: 50
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 36 files compared)
  • Checked 154 log files, 17 edm output root files, 37 DQM output files

@suchandradutta
Copy link
Contributor Author

@suchandradutta there are minor changes in phase 2 workflows, including tracks and downstream objects:

all_OldVSNew_TTbar14TeV2026D49wf23234p0c_recoTracks_generalTracks__RECO_obj_chi2

I expect that these arise from the bug fixes in this PR, but please confirm that the behavior is expected.

I have checked the Phase2Digi DQM histograms after the change in the return type

double calcQ(float x)

to

float calcQ(float x)

as suggested here and I can see the minor changes which is seen here

@kpedro88
Copy link
Contributor

+upgrade

@civanch
Copy link
Contributor

civanch commented Jul 21, 2020

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

@silviodonato
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 21, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: 3de577a
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-72707d/8189/summary.html
CMSSW: CMSSW_11_2_X_2020-07-21-1100
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-72707d/8189/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 1172 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2525996
  • DQMHistoTests: Total failures: 10999
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2514950
  • DQMHistoTests: Total skipped: 47
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 144 log files, 17 edm output root files, 34 DQM output files

@silviodonato
Copy link
Contributor

merge

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.

8 participants