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

Migrate away from explicit comparisons of GeomDetEnumerators::PixelBarrel/PixelEndcap #11624

Merged

Conversation

makortel
Copy link
Contributor

@makortel makortel commented Oct 2, 2015

This PR migrates all code (found with git grep GeomDetEnumerators::Pixel) from using GeomDetEnumerators::PixelBarrel/PixelEndcap to either use the helper functions in GeomDetEnumerators, or GeomDetEnumerators::subDetGeom (one case) (one case was also from subDetGeom to the helper functions). These changes are needed for the Phase1/2 upgrades, where pixel barrel has P1PXB and pixel endcap P1PXEC or P2PXEC values. (Something similar is probably needed for Phase2 strips, but that is left for future work).

I also added a simple unit test for GeomDetEnumerators to ensure that all subdets are either isBarrel() or isEndcap(), so that I can safely assume in production code that, according to these functions, if something is not barrel, it is endcap (and vice versa). (Mostly because the condition that spurred this PR was if(pixel barrel) ... else if(pixel endcap) ... else throw).

Together with #11621 and #11609, the reco step of phase1 workflow runTheMatrix.py --what upgrade -l 10000 technically works. (The final HARVESTING step fails on missing input file, because DQM/VALIDATION are not part of the reco step)

Tested in 760pre6, no changes expected in Run1/2 workflows.

@rovere @VinInn @boudoul @venturia @mark-grimes

Now I can safely assume in production code that each SubDetector is
either barrel or endcap.
…s instead of explicit comparisons of enumerators

These changes are needed to suppor Phase1+ upgrades, where different
values of GeomDetEnumerators enumeration are used instead of the
Run1/2 values.
@makortel makortel changed the title Migrate away from explicit comparisons of GeomDetEnumerators::Pixel* Migrate away from explicit comparisons of GeomDetEnumerators::PixelBarrel/PixelEndcap Oct 2, 2015
@cmsbuild cmsbuild added this to the Next CMSSW_7_6_X milestone Oct 2, 2015
@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2015

A new Pull Request was created by @makortel (Matti Kortelainen) for CMSSW_7_6_X.

Migrate away from explicit comparisons of GeomDetEnumerators::PixelBarrel/PixelEndcap

It involves the following packages:

CalibTracker/SiPixelESProducers
FastSimulation/TrackingRecHitProducer
Geometry/CommonDetUnit
RecoEgamma/EgammaElectronAlgos
RecoLocalTracker/SiPixelRecHits
RecoMuon/TrackerSeedGenerator
RecoParticleFlow/PFSimProducer
RecoTracker/TkNavigation
RecoTracker/TkTrackingRegions

@civanch, @diguida, @lveldere, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @ssekmen, @franzoni, @Dr15Jones, @cerminar, @slava77, @mmusich can you please review it and eventually sign? Thanks.
@ghellwig, @abbiendi, @Martin-Grunewald, @threus, @mmarionncern, @battibass, @jhgoh, @lgray, @cerati, @trocino, @rociovilar, @Sam-Harper, @GiacomoSguazzoni, @rovere, @VinInn, @bellan, @istaslis, @mschrode, @dgulhan, @dkotlins, @gpetruc, @matt-komm, @bachtis this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@diguida
Copy link
Contributor

diguida commented Oct 2, 2015

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2015

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2015

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 2, 2015

@diguida
Copy link
Contributor

diguida commented Oct 2, 2015

+1

@lveldere
Copy link
Contributor

lveldere commented Oct 5, 2015

+1

@cvuosalo
Copy link
Contributor

cvuosalo commented Oct 7, 2015

+1

For #11624 902fd49

Converting detector comparisons of the pixel detector to support Phase 1 changes. There should be no change in the logic, only the method of comparison. There should be no change in run-time behavior.

The code changes are satisfactory, and Jenkins tests against baseline CMSSW_7_6_X_2015-10-05-2300 show no significant differences, as expected.

@ianna
Copy link
Contributor

ianna commented Oct 12, 2015

+1

@lveldere
Copy link
Contributor

+1

@makortel
Copy link
Contributor Author

@diguida @mmusich Could you please sign again? Thanks.

@diguida
Copy link
Contributor

diguida commented Oct 16, 2015

+1
Concerning your comment #11624 (comment) I hope @ianna has a better opinion.

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@davidlange6
Copy link
Contributor

+1

cmsbuild added a commit that referenced this pull request Oct 16, 2015
Migrate away from explicit comparisons of GeomDetEnumerators::PixelBarrel/PixelEndcap
@cmsbuild cmsbuild merged commit 73dd545 into cms-sw:CMSSW_7_6_X Oct 16, 2015
@slava77
Copy link
Contributor

slava77 commented Mar 15, 2016

@makortel @VinInn
what is this issue in 902fd49 affecting?
Apparently we didn't catch any changes in the tests.

@makortel
Copy link
Contributor Author

Quoting Vincenzo from the private thread

it is higly probable that the bug does not affect anybody as it requires
UseMeasurementTracker::kAlways (or in python UseMeasurementTracker = 1 )
which does not seem very popular

So probably the damage is minimal (or even non-existent?). IIRC in the typical workflows (like in PR tests) this branch of the code is not run.

@VinInn
Copy link
Contributor

VinInn commented Mar 15, 2016

Indeed, validating dead code is tough

@makortel makortel deleted the phase1_migrateGeomDetEnumerators branch October 20, 2016 11:48
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

9 participants