-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Prompt calibration loop module for SiPixelLorentzAngle #35507
Prompt calibration loop module for SiPixelLorentzAngle #35507
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35507/25703
|
A new Pull Request was created by @wweiphy for master. It involves the following packages:
@perrotta, @malbouis, @yuanchao, @jordan-martins, @davidlange6, @bbilin, @wajidalikhan, @cmsbuild, @AdrianoDee, @srimanob, @kskovpen, @qliphy, @francescobrivio, @fabiocos, @tvami can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
test parameters:
|
@cmsbuild, please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-86c3fd/19325/summary.html Comparison SummaryThe workflows 1001.0 have different files in step1_dasquery.log than the ones found in the baseline. You may want to check and retrigger the tests if necessary. You can check it in the "files" directory in the results of the comparisons @slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
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.
thanks @wweiphy!
Find below a first pass of review comments.
Also please change the title in order to contain the word SiPixel in it.
Finally please add the new PCL workflow to the testPCLAlCaHarvesting
unit test at
process.PoolDBOutputService.toPut.append(process.ALCAHARVESTSiPixelAli_dbOutput) |
// if the fit quality is OK | ||
if (prob > fitProbCut_) { | ||
for (const auto& id : detIdsToFill) { | ||
bPixLorentzAnglePerTesla_ = p1 / 3.8f; |
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.
please take the magnetic field value from the ES.
edm::LogError("SiPixelLorentzAngleDB") << er.what() << std::endl; | ||
} catch (const std::exception& er) { | ||
edm::LogError("SiPixelLorentzAngleDB") << "caught std::exception " << er.what() << std::endl; | ||
} catch (...) { |
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 triggers a warning in the static analyzer.
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.
Should catch (...)
be replaced?
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.
yes, I think it should be removed.
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.
MonitorElement* h_drift_depth_adc_slice_ = | ||
iBooker.book1D("h_drift_depth_adc_slice", "slice of adc histogram", hist_drift_, min_drift_, max_drift_); | ||
|
||
edm::LogPrint("LorentzAngle") << "module" |
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 is not very readable, please break into multiple lines.
|
||
// tree branches barrel | ||
int run_; | ||
long int event_; |
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.
All these variables are giving static analyzer warnings "non-const global static variable":
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-86c3fd/19325/llvm-analysis/
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.
@mmusich Any recommendation to fix this? I think we need the global variables for Tree production.
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't these be private members of the class?
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.
Moving those variables into private class result in errors such as:
assignment of member 'SiPixelLorentzAnglePCLWorker::panelF_' in read-only object
because function dqmAnalyze
is set const.
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.
Perhaps another DQM class interface is better suited:
https://github.com/cms-sw/cmssw/tree/master/DQMServices/Core
} | ||
} | ||
|
||
SiPixelLorentzAnglePCLWorker::~SiPixelLorentzAnglePCLWorker() { |
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.
If nothing is done here, then set it as default
std::vector<int> FPixnewDetIds_; | ||
std::vector<int> FPixnewDisk_; | ||
std::vector<int> FPixnewBlade_; | ||
std::map<uint32_t, std::vector<uint32_t> > detIdsList; |
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 be unordered?
} | ||
*/ | ||
|
||
for (int i_layer = 1; i_layer <= hists.nlay; i_layer++) { |
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.
range based loop?
} | ||
} | ||
|
||
for (int i = 0; i < (int)hists.BPixnewDetIds_.size(); i++) { |
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.
range based loop?
<< "\t" | ||
<< "newDetId" << std::endl; | ||
|
||
SiPixelLorentzAngle* LorentzAngle = new SiPixelLorentzAngle(); |
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.
where is this deleted?
bool large_pix = false; | ||
for (int j = 0; j < pixinfo_.npix; j++) { | ||
int colpos = static_cast<int>(pixinfo_.col[j]); | ||
if (pixinfo_.row[j] == 0 || pixinfo_.row[j] == 79 || pixinfo_.row[j] == 80 || pixinfo_.row[j] == 159 || |
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.
maybe this interface can be re-used?
constexpr inline bool isBigPixX(uint16_t px) { return (px == 79) | (px == 80); } |
constexpr inline bool isBigPixY(uint16_t py) { |
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.
@mmusich there are extra terms pixinfo_.row[j] == 0
and pixinfo_.row[j] == 159
, which are not included in the function phase1PixelTopology::isBigPixX
. Should I keep or remove them?
In other words:
if (pixinfo_.row[j] == 0 || phase1PixelTopology::isBigPixX(pixinfo_.row[j]) || pixinfo_.row[j] == 159 || phase1PixelTopology::isBigPixY(pixinfo_.col[j]))
or
if (phase1PixelTopology::isBigPixX(pixinfo_.row[j]) || phase1PixelTopology::isBigPixY(pixinfo_.col[j])){
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.
@tsusa please clarify why the previous usage.
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.
@tsusa please clarify, so that we can proceed with this PR
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.
#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" | ||
|
||
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" | ||
#include "../interface/SiPixelLorentzAngleCalibrationStruct.h" |
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.
I think it's preferred to have absolute path instead of the relative path
/* | ||
for(const auto& [index,histo] : hists.h_drift_depth_adc_){ | ||
std::cout << index << " => " << histo->getName(); | ||
} | ||
*/ |
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 can either go or become LogDebug
#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" | ||
|
||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "../interface/SiPixelLorentzAngleCalibrationStruct.h" |
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.
Please use absolute path
double max_depth_; | ||
double min_drift_; | ||
double max_drift_; | ||
int bufsize; |
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.
int bufsize; | |
int bufsize_; |
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.
Hmm I guess one can argue that this should stay bufsize
, let's see what others think
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.
Yes, all class members should follow the same conventions for naming, therefore the trailing underscore should be added here.
On the other hand, bufsize
is only used inside the constructor, where it is also initialized. Then I don't see why it should remain a class member, instead of becoming a local variable instead (without the trailing underscore in that case).
Anyway, the new |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-86c3fd/19612/summary.html Comparison SummaryThe workflows 1001.0, 140.53 have different files in step1_dasquery.log than the ones found in the baseline. You may want to check and retrigger the tests if necessary. You can check it in the "files" directory in the results of the comparisons @slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
+alca |
+Upgrade The PR introduces a new PCL module as described in the PR description. Changes in |
+1 |
+operations |
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) |
+1 |
PR description:
With this PR, we introduce the Lorentz Angle (LA) calibration PCL module for barrel Pixel detector. It includes the general workflow of PCL as well as dedicated improvements for LA measurements. The details are listed below:
SiPixelLorentzAnglePCLWorker
creates and fills the 2D histograms of electron drift and its production depth as tracks pass through the barrel pixel. We applied improved selections on clusters. Tree production of tracks and clusters is also included in case of other needs and is made optional.SiPixelLorentzAnglePCLHarvester
fits the histograms and obtains LA. We have improved the fitting by moving to a higher order polynomial fit to include the nonlinear distributions in the histograms.SiPixelLorentzAnglePCLWorker
andSiPixelLorentzAnglePCLHarvester
and measure LA fo each one of them.PR validation:
Tested with 50000 events from
/store/data/Run2018D/SingleMuon/ALCARECO/SiPixelCalSingleMuon-ForPixelALCARECO_UL2018-v1/230000/F33B7CA6-256A-B34F-9536-7594FBC6F75B.root
Results were presented in the AlCaDB meeting and also attached.
LA_AlCa.pdf
if this PR is a backport please specify the original PR and why you need to backport that PR: N/A
Before submitting your pull requests, make sure you followed this checklist: