{"action":"created","issue":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/11624","labels_url":"https://api.github.com/repos/cms-sw/cmssw/issues/11624/labels{/name}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/issues/11624/comments","events_url":"https://api.github.com/repos/cms-sw/cmssw/issues/11624/events","html_url":"https://github.com/cms-sw/cmssw/pull/11624","id":109509252,"number":11624,"title":"Migrate away from explicit comparisons of GeomDetEnumerators::PixelBarrel/PixelEndcap","user":{"login":"makortel","id":33993,"avatar_url":"https://avatars.githubusercontent.com/u/33993?v=3","gravatar_id":"","url":"https://api.github.com/users/makortel","html_url":"https://github.com/makortel","followers_url":"https://api.github.com/users/makortel/followers","following_url":"https://api.github.com/users/makortel/following{/other_user}","gists_url":"https://api.github.com/users/makortel/gists{/gist_id}","starred_url":"https://api.github.com/users/makortel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makortel/subscriptions","organizations_url":"https://api.github.com/users/makortel/orgs","repos_url":"https://api.github.com/users/makortel/repos","events_url":"https://api.github.com/users/makortel/events{/privacy}","received_events_url":"https://api.github.com/users/makortel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/alca-pending","name":"alca-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/comparison-available","name":"comparison-available","color":"009800"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/fastsim-pending","name":"fastsim-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/geometry-pending","name":"geometry-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/orp-pending","name":"orp-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/pending-signatures","name":"pending-signatures","color":"eb6420"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/reconstruction-pending","name":"reconstruction-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/tests-approved","name":"tests-approved","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/55","html_url":"https://github.com/cms-sw/cmssw/milestones/Next%20CMSSW_7_6_X","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/55/labels","id":1176788,"number":55,"title":"Next CMSSW_7_6_X","description":"","creator":{"login":"smuzaffar","id":4115138,"avatar_url":"https://avatars.githubusercontent.com/u/4115138?v=3","gravatar_id":"","url":"https://api.github.com/users/smuzaffar","html_url":"https://github.com/smuzaffar","followers_url":"https://api.github.com/users/smuzaffar/followers","following_url":"https://api.github.com/users/smuzaffar/following{/other_user}","gists_url":"https://api.github.com/users/smuzaffar/gists{/gist_id}","starred_url":"https://api.github.com/users/smuzaffar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smuzaffar/subscriptions","organizations_url":"https://api.github.com/users/smuzaffar/orgs","repos_url":"https://api.github.com/users/smuzaffar/repos","events_url":"https://api.github.com/users/smuzaffar/events{/privacy}","received_events_url":"https://api.github.com/users/smuzaffar/received_events","type":"User","site_admin":false},"open_issues":77,"closed_issues":832,"state":"open","created_at":"2015-06-23T07:27:04Z","updated_at":"2015-10-06T22:46:21Z","due_on":null,"closed_at":null},"comments":15,"created_at":"2015-10-02T15:02:58Z","updated_at":"2015-10-07T02:45:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/11624","html_url":"https://github.com/cms-sw/cmssw/pull/11624","diff_url":"https://github.com/cms-sw/cmssw/pull/11624.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/11624.patch"},"body":"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).\r\n\r\nI 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`).\r\n\r\nTogether 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)\r\n\r\nTested in 760pre6, no changes expected in Run1/2 workflows.\r\n\r\n@rovere @VinInn @boudoul @venturia @mark-grimes "},"comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/comments/146063166","html_url":"https://github.com/cms-sw/cmssw/pull/11624#issuecomment-146063166","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/11624","id":146063166,"user":{"login":"cvuosalo","id":5736159,"avatar_url":"https://avatars.githubusercontent.com/u/5736159?v=3","gravatar_id":"","url":"https://api.github.com/users/cvuosalo","html_url":"https://github.com/cvuosalo","followers_url":"https://api.github.com/users/cvuosalo/followers","following_url":"https://api.github.com/users/cvuosalo/following{/other_user}","gists_url":"https://api.github.com/users/cvuosalo/gists{/gist_id}","starred_url":"https://api.github.com/users/cvuosalo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvuosalo/subscriptions","organizations_url":"https://api.github.com/users/cvuosalo/orgs","repos_url":"https://api.github.com/users/cvuosalo/repos","events_url":"https://api.github.com/users/cvuosalo/events{/privacy}","received_events_url":"https://api.github.com/users/cvuosalo/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T02:45:43Z","updated_at":"2015-10-07T02:45:43Z","body":"+1\r\n\r\nFor #11624 902fd4991a40a368050a9ce670dd4aa457f0cd22\r\n\r\nConverting 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.\r\n\r\nThe code changes are satisfactory, and Jenkins [tests](https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-11624/8654/summary.html) against baseline CMSSW_7_6_X_2015-10-05-2300 show no significant differences, as expected. "}}