-
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
Outer Tracker Phase2 DQM: additional stub validation plots #45475
base: master
Are you sure you want to change the base?
Conversation
merging save_branch to get TTStub cfi file
cms-bot internal usage |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45475/40939 |
A new Pull Request was created by @brandiskip for master. It involves the following packages:
@antoniovagnerini, @cmsbuild, @nothingface0, @rvenditti, @syuvivida, @tjavaid can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
|
||
// z-resolution for PS modules | ||
HistoName = "#Delta z Barrel PS modules"; | ||
z_res_isPS_barrel = iBooker.book1D(HistoName, |
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.
Suggest to use the utility function.
@@ -0,0 +1,20 @@ | |||
import FWCore.ParameterSet.Config as cms |
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.
Since you have the fillDescriptions
method, this default config file will be automatically generated while compiling.
Any changes can be done via cff files later. see example for clusters
@@ -0,0 +1,134 @@ | |||
import FWCore.ParameterSet.Config as cms |
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.
Similar comment
|
||
// delta_phi hists | ||
MonitorElement* phi_res_barrel; | ||
MonitorElement* phi_res_barrel_L1; |
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.
Instead of declaring separately phi_res_barrel_L1, phi_res_barrel_L2 etc., which requires many lines of code, use an std::vector<MonitorElement*>. Then when booking and filling the histograms, you can use for loops to make the code much shorter.
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45475/40996
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
theTrackerGeom_ = &(iSetup.getData(geomToken_)); | ||
tTopo_ = &(iSetup.getData(tTopoToken_)); | ||
|
||
// Clear existing histograms |
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 does the idea to clear the existing histograms come from? It may be correct, but I don't see simiilar things happening in beginRun of the other DQM packages. e.g. https://github.com/brandiskip/cmssw/blob/test_branch/Validation/SiTrackerPhase2V/plugins/Phase2OTValidateCluster.cc .
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 kept getting a seg fault and someone pointed me to lines 116 and 117 found here: https://cmssdt.cern.ch/lxr/source/DQM/HLTEvF/plugins/TriggerBxVsOrbitMonitor.cc?v=CMSSW_14_1_X_2024-07-17-2300
and when I followed that format, it fixed my issues. Perhaps there is a better way. I will investigate further.
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.
You need to set the vector size to 6 or whatever, since you refer to the elements later on. e.g. https://github.com/brandiskip/cmssw/blob/test_branch/Validation/SiTrackerPhase2V/plugins/Phase2OTValidateTTStub.cc#L452 . But I don't understand why it needs resetting o 6 every run. Or why the call to clear is needed. If it were set to 6 in the constructor, resize would not be needed.
layer = -1; | ||
} | ||
|
||
int isPSmodule = (topo.nrows() == 960) ? 1 : 0; |
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.
Having magic numbers in CMSSW code, such as 960 is forbidden.
bend_res_bw_endcap_discs.clear(); | ||
|
||
// Resize vectors and set elements to nullptr | ||
phi_res_barrel_layers.resize(6, nullptr); |
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.
Having magic numbers in the code like 5 or 6 is not allowed. At the very least these need to be named constants.
|
||
// Ensure that the vectors are correctly assigned before use | ||
if (isBarrel == 1) { | ||
phi_res_discs = &phi_res_barrel_layers; // Pointing to barrel layers vector |
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.
What is going on here? If we're in the barrel, why is variable phi_res_discs being set?
} | ||
|
||
// Fill the appropriate histogram based on layer/disc | ||
if (layer >= 1 && layer <= 6) { |
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 can't understand what this part of hte code is doing. The comment suggests that its filling both layers and disks. But it requires layer <= 6, when there are only 5 disks. And it fills a variable alled bend_res_discs, which doesn't sound appropriate for the barrel.
A general question. How have you chosen the level of detail that is best for the validation code? e.g. Histograms for barrel + endcap vs histograms for every single layer? |
General comments: All classes need a comment at the top explaining what they are for. |
Milestone for this pull request has been moved to CMSSW_14_2_X. Please open a backport if it should also go in to CMSSW_14_1_X. |
ping (to make bot change milestone) |
PR description:
Histograms added for stub coordinates Δφ and Δz, stub Δbend, and stub efficiency vs tp pT
Proposal for validation plots
Presentation slides with final results
PR validation:
Added histograms examined and validated, showing sensible results as presented at the offline software meeting
ran:
scram build code-checks
scram build code-format