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

Outer Tracker Phase2 DQM: additional stub validation plots #45475

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

brandiskip
Copy link

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

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 16, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45475/40939

  • Found files with invalid states:
    • DQM/SiTrackerPhase2/test/step3_pre4_inDQM.root:
    • DQM/SiTrackerPhase2/test/DQM_V0001_R000000001__Global__CMSSW_X_Y_Z__RECO.root:

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

  • DQM/SiTrackerPhase2 (dqm)
  • Validation/SiTrackerPhase2V (dqm)

@antoniovagnerini, @cmsbuild, @nothingface0, @rvenditti, @syuvivida, @tjavaid can you please review it and eventually sign? Thanks.
@arossi83, @missirol, @mmusich, @sroychow this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@tomalin
Copy link
Contributor

tomalin commented Jul 18, 2024

In https://indico.cern.ch/event/1414546/contributions/5965160/attachments/2861743/5006999/DQM_Update_OfflineSW.pdf

  1. Slide 4 shows stub resolution in z. Is this really the resolution in r-z? The modules measure z in the barrel, but r in the endcap.
  2. Slide 7 gives no info about the stub efficiency for Pt < 2 GeV. There is probably a little efficiency in the range between 1.5 - 2 GeV, so it would be nice to see it.


// z-resolution for PS modules
HistoName = "#Delta z Barrel PS modules";
z_res_isPS_barrel = iBooker.book1D(HistoName,
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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;
Copy link
Contributor

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.

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45475/40996

  • Found files with invalid states:
    • DQM/SiTrackerPhase2/test/step3_pre4_inDQM.root:
    • DQM/SiTrackerPhase2/test/DQM_V0001_R000000001__Global__CMSSW_X_Y_Z__RECO.root:

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
Copy link
Contributor

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 .

Copy link
Author

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.

Copy link
Contributor

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;
Copy link
Contributor

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);
Copy link
Contributor

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
Copy link
Contributor

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) {
Copy link
Contributor

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.

@tomalin
Copy link
Contributor

tomalin commented Jul 22, 2024

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?

@tomalin
Copy link
Contributor

tomalin commented Jul 22, 2024

General comments: All classes need a comment at the top explaining what they are for.

@cmsbuild
Copy link
Contributor

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.

@cmsbuild cmsbuild modified the milestones: CMSSW_14_1_X, CMSSW_14_2_X Aug 27, 2024
@antoniovilela
Copy link
Contributor

ping (to make bot change milestone)

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.

6 participants