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

Overlap Validation for Tracker Alignment #26526

Merged
merged 23 commits into from May 8, 2019

Conversation

feingoldj
Copy link
Contributor

@hroskes @jfan20 @VictordeHavenon @adewit @connorpa @mmusich @gritsan

PR description:

We have developed an Overlap Validation that is adept at detecting the Bowing, Radial, and Z-expansion Weak Modes. It uses the difference between residuals on overlapping modules to characterize the misalignment.

Details can be found here:
Overlap Validation Presentation

PR validation:

The following is the Overlap Validation plot for a radial misalignment with various epsilon values:
image

We also implemented DMRs separated by track charge that highlights biases that cause Z-expansion in TEC. More information can be found here:
Z-Expansion Update

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26526/9398

  • This PR adds an extra 252KB to repository

  • Found files with invalid states:

    • Alignment/OfflineValidation/python/overlapValidationPlotOld.py:
    • Alignment/OfflineValidation/python/overlapValidationPlotNew.py:

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26526/9400

  • This PR adds an extra 472KB to repository

  • Found files with invalid states:

    • Alignment/OfflineValidation/python/overlapValidationPlotOld.py:
    • Alignment/OfflineValidation/python/overlapValidationPlotNew.py:

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

Alignment/OfflineValidation
MuonAnalysis/MomentumScaleCalibration

@christopheralanwest, @tocheng, @cmsbuild, @franzoni, @tlampen, @pohsun, @santocch can you please review it and eventually sign? Thanks.
@adewit, @tocheng, @argiro, @bellan, @tlampen, @mschrode, @mmusich this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

Copy link
Contributor

@mmusich mmusich left a comment

Choose a reason for hiding this comment

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

Hi @feingoldj
thanks for porting this into cmssw. I have few (mainly stylistic) comments.
Additionally the git commit history is a bit messy and there are transient files which got deleted later in the history (see comment from the bot here: #26526 (comment)).
I am wondering if the commit structure can be improved as there are several distinct updates to the package:

  1. move the TkAlStyle.cc from plugins to macros
  2. introduce the OverlapValidation in the all-in-one tool
  3. introduce the chargeCut_ in the OfflineValidation module
  4. save ROOT output for the Z->mm validation (is that really needed)?

Thanks,

@@ -43,7 +43,7 @@
#include <TSystem.h>
#include <TTimeStamp.h>
#include <TStopwatch.h>
//#include "Alignment/OfflineValidation/plugins/TkAlStyle.cc"
//#include "Alignment/OfflineValidation/macros/TkAlStyle.cc"
Copy link
Contributor

Choose a reason for hiding this comment

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

as you moved the TkAlStyle.cc from plugins to macros I am wondering if we could also dump the dependency on:

<use   name="rootgraphics"/>
<use   name="rootinteractive"/>

we have in https://github.com/cms-sw/cmssw/blob/master/Alignment/OfflineValidation/plugins/BuildFile.xml#L52.
This is a dependency violation and moreover is effectively barring us from submitting condor jobs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, I remember you mentioned that on mattermost. Done.

#include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
#include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
#include "DataFormats/DetId/interface/DetId.h"
//#include "DataFormats/SiStripDetId/interface/TIBDetId.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

as these DataFormats do not even exist anymore in cmssw, you can remove the commented lines.

Copy link
Contributor

Choose a reason for hiding this comment

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

Done

//


class OverlapValidation : public edm::EDAnalyzer {
Copy link
Contributor

Choose a reason for hiding this comment

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

please avoid using a legacy module.
if this cannot be made multi-thread friendly make it at least a one::EDAnalyzer:
https://twiki.cern.ch/twiki/bin/view/CMSPublic/FWMultithreadedFrameworkModuleTypes

Copy link
Contributor

Choose a reason for hiding this comment

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

I went with one for now. As part of the condor migration maybe someone can make all the validation tools thread safe but it's too much for now.

// quality cuts on trajectory
// min. # hits / matched hits

if ( trajectory.foundHits()<6 ) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

I am wondering if these cuts can be made configurable.

Copy link
Contributor

Choose a reason for hiding this comment

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

I made them const variables and moved the hardcoded numbers to the constructor. I didn't propagate to the cfg and all in one tool interface, but at least they're more visible now.

edm::LogVerbatim("OverlapValidation") << "Invalid";
continue;
}
if (barrelOnly_ && (subDet==4 || subDet==6) ) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

please use StripSubdetector::TID and StripSubdetector::TEC to improve readability.

Copy link
Contributor

Choose a reason for hiding this comment

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

Done

momentum_ = comb1.globalMomentum().mag();

// get cluster size
if (subDet1>2) { //strip
Copy link
Contributor

Choose a reason for hiding this comment

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

please use the
PixelSubdetector::PixelBarrel and PixelSubdetector::PixelEndcap negation instead (or the OR of the 4 Strip subdetIds).

Copy link
Contributor

Choose a reason for hiding this comment

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

Done



vector<TrajectoryMeasurement> measurements(trajectory.measurements());
for ( vector<TrajectoryMeasurement>::const_iterator itm=measurements.begin();
Copy link
Contributor

Choose a reason for hiding this comment

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

range-based loop here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this one, because we do some iterator math on it down below. But I modified a few of the others.

}


if (subDet2<3) { //pixel
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as a above about using DetId enum.

Copy link
Contributor

Choose a reason for hiding this comment

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

Done

@boudoul
Copy link
Contributor

boudoul commented Apr 25, 2019

dear @feingoldj , could you please edit the title of your PR : "Overlap validation" can mean many different things in CMS , so please could you please make it more explicit ? thanks

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26526/9635

  • This PR adds an extra 216KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

Pull request #26526 was updated. @christopheralanwest, @tocheng, @cmsbuild, @franzoni, @tlampen, @pohsun can you please check and sign again.

@christopheralanwest
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/50/console Started: 2019/05/07 13:49

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 33
  • DQMHistoTests: Total histograms compared: 3211964
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3211759
  • DQMHistoTests: Total skipped: 204
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 32 files compared)
  • Checked 137 log files, 14 edm output root files, 33 DQM output files

@pohsun
Copy link

pohsun commented May 7, 2019

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor

fabiocos commented May 8, 2019

+1

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.

None yet

10 participants