-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Dynamic pps timing calibration fit #44235
Dynamic pps timing calibration fit #44235
Conversation
cms-bot internal usage |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44235/39243
|
A new Pull Request was created by @ChrisMisan for master. It involves the following packages:
@cmsbuild, @saumyaphor4252, @consuegs, @perrotta can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
for (int i = 0; i < hists.toT[chid]->getNbinsX(); i++) { | ||
double bin_value = hists.toT[chid]->getBinContent(i); | ||
int bin_x_pos = hists.toT[chid]->getTH1()->GetXaxis()->GetBinCenter(i); | ||
if (bin_x_pos > 20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this "20" be assigned to a named constant, with a meaningful name?
int upper_limit_pos = max_bin_pos; | ||
int lower_limit_pos = max_bin_pos; | ||
double threshold = threshold_percent_of_max_ * hists.toT[chid]->getBinContent(max_bin_pos); | ||
while (hists.toT[chid]->getTH1()->GetXaxis()->GetBinCenter(upper_limit_pos) < 18) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this "18" be assigned to a named constant, with a meaningful name? Is it the previous 20 minus 2?
if (hists.toT[chid]->getBinContent(upper_limit_pos) < threshold) | ||
break; | ||
} | ||
while (hists.toT[chid]->getTH1()->GetXaxis()->GetBinCenter(lower_limit_pos) > 8) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this "8" be assigned to a named constant, with a meaningful name?
double upper_tot_range = hists.toT[chid]->getTH1()->GetXaxis()->GetBinCenter(upper_limit_pos); | ||
double lower_tot_range = hists.toT[chid]->getTH1()->GetXaxis()->GetBinCenter(lower_limit_pos); | ||
|
||
//const double upper_tot_range = hists.toT[chid]->getMean() + 2.5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this commented out line needed? Add another comment line with an explanation if so, otherwise just remove
86cf244
to
9cf5b07
Compare
@perrotta thanks, I addressed all of the comments. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44235/39272
|
Pull request #44235 was updated. @perrotta, @cmsbuild, @saumyaphor4252, @consuegs can you please check and sign again. |
@@ -42,6 +42,10 @@ class PPSTimingCalibrationPCLHarvester : public DQMEDHarvester { | |||
const std::string dqmDir_; | |||
const std::string formula_; | |||
const unsigned int min_entries_; | |||
const double threshold_fraction_of_max_; | |||
static constexpr double upper_limit_max_search_ = 20; | |||
static constexpr double upper_limit_range_search_ = 20; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was 18 before the last update: please check and either confirm or fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change was intentional, after discussing it internally we decided to switch it to 20.
@ChrisMisan As for tests, am I correct we need to run it with WFs 1043-1045 ? |
@grzanka I think only 1044 is relevant for this pr. |
test parameters:
|
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-6a3155/37812/summary.html Comparison SummarySummary:
|
Effect on wf 1044 is only in the step4 (harvesting) step, as expected (last three of the four fit results are affected):
|
+1 |
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. @sextonkennedy, @antoniovilela, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
Extension to the existing calibration fit that calculates the parameter from the histogram, instead of relying on the pre-defined ranges. Logic works as follows:
From TOTMAX_bin move to higher TOT till the counts are below THR% of max -> this define the upper_tot_range for the fit (in any case below 18 ns)
PR validation:
Standard wfs for PPS timing calibration.
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:
not a backport