{"action":"closed","number":22559,"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/22559","id":174087767,"html_url":"https://github.com/cms-sw/cmssw/pull/22559","diff_url":"https://github.com/cms-sw/cmssw/pull/22559.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/22559.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/22559","number":22559,"state":"closed","locked":false,"title":"optimize and clean up EventShapeVariables code, add Fox-Wolfram moments","user":{"login":"kpedro88","id":4672808,"avatar_url":"https://avatars0.githubusercontent.com/u/4672808?v=4","gravatar_id":"","url":"https://api.github.com/users/kpedro88","html_url":"https://github.com/kpedro88","followers_url":"https://api.github.com/users/kpedro88/followers","following_url":"https://api.github.com/users/kpedro88/following{/other_user}","gists_url":"https://api.github.com/users/kpedro88/gists{/gist_id}","starred_url":"https://api.github.com/users/kpedro88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpedro88/subscriptions","organizations_url":"https://api.github.com/users/kpedro88/orgs","repos_url":"https://api.github.com/users/kpedro88/repos","events_url":"https://api.github.com/users/kpedro88/events{/privacy}","received_events_url":"https://api.github.com/users/kpedro88/received_events","type":"User","site_admin":false},"body":"I was looking at these variables for an analysis and became dissatisfied with inefficiencies in the code. My changes include:\r\n* remove commented-out code\r\n* update documentation in comments\r\n* use range-based loops\r\n* avoid repeated computations of momentum tensor and eigenvalues\r\n* avoid unnecessary use of `TVectorD::operator()` (incredibly slow for some reason, thanks ROOT)\r\n  * assignment of ROOT matrix objects is also slow, so tried to avoid that\r\n* avoid repeated trig computations\r\n\r\nIn addition, @owen234 had introduced the calculation of Fox-Wolfram moments in a private version of this code. I optimized it as follows:\r\n* calculate Legendre polynomials using recursive definition (minimize computation)\r\n* use symmetry factor to reduce summation (i,j term same as j,i term)\r\n\r\nThe updates are propagated to the associated producer.\r\n\r\nattn: @justinrpilot @nstrobbe","created_at":"2018-03-09T19:25:53Z","updated_at":"2018-03-15T17:05:05Z","closed_at":"2018-03-15T17:05:05Z","merged_at":"2018-03-15T17:05:05Z","merge_commit_sha":"19c3d8de5802b78e93551332faefeb001430e2db","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":52881179,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/analysis-pending","name":"analysis-pending","color":"fbca04","default":false},{"id":673935047,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/code-checks-approved","name":"code-checks-approved","color":"2cbe4e","default":false},{"id":88645479,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/comparison-available","name":"comparison-available","color":"2cbe4e","default":false},{"id":290514704,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/orp-approved","name":"orp-approved","color":"2cbe4e","default":false},{"id":53167770,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/pending-signatures","name":"pending-signatures","color":"ff8000","default":false},{"id":56131195,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/tests-approved","name":"tests-approved","color":"2cbe4e","default":false}],"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/73","html_url":"https://github.com/cms-sw/cmssw/milestone/73","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/73/labels","id":3060828,"number":73,"title":"CMSSW_10_1_X","description":null,"creator":{"login":"smuzaffar","id":4115138,"avatar_url":"https://avatars3.githubusercontent.com/u/4115138?v=4","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":98,"closed_issues":463,"state":"open","created_at":"2018-01-24T11:24:59Z","updated_at":"2018-03-15T17:05:05Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/22559/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/22559/comments","review_comment_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/issues/22559/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/188ef2666f617fb8798a94db0842378730896c8d","head":{"label":"kpedro88:OptimizeEventShapeVars","ref":"OptimizeEventShapeVars","sha":"188ef2666f617fb8798a94db0842378730896c8d","user":{"login":"kpedro88","id":4672808,"avatar_url":"https://avatars0.githubusercontent.com/u/4672808?v=4","gravatar_id":"","url":"https://api.github.com/users/kpedro88","html_url":"https://github.com/kpedro88","followers_url":"https://api.github.com/users/kpedro88/followers","following_url":"https://api.github.com/users/kpedro88/following{/other_user}","gists_url":"https://api.github.com/users/kpedro88/gists{/gist_id}","starred_url":"https://api.github.com/users/kpedro88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpedro88/subscriptions","organizations_url":"https://api.github.com/users/kpedro88/orgs","repos_url":"https://api.github.com/users/kpedro88/repos","events_url":"https://api.github.com/users/kpedro88/events{/privacy}","received_events_url":"https://api.github.com/users/kpedro88/received_events","type":"User","site_admin":false},"repo":{"id":11408331,"name":"cmssw","full_name":"kpedro88/cmssw","owner":{"login":"kpedro88","id":4672808,"avatar_url":"https://avatars0.githubusercontent.com/u/4672808?v=4","gravatar_id":"","url":"https://api.github.com/users/kpedro88","html_url":"https://github.com/kpedro88","followers_url":"https://api.github.com/users/kpedro88/followers","following_url":"https://api.github.com/users/kpedro88/following{/other_user}","gists_url":"https://api.github.com/users/kpedro88/gists{/gist_id}","starred_url":"https://api.github.com/users/kpedro88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpedro88/subscriptions","organizations_url":"https://api.github.com/users/kpedro88/orgs","repos_url":"https://api.github.com/users/kpedro88/repos","events_url":"https://api.github.com/users/kpedro88/events{/privacy}","received_events_url":"https://api.github.com/users/kpedro88/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kpedro88/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/kpedro88/cmssw","forks_url":"https://api.github.com/repos/kpedro88/cmssw/forks","keys_url":"https://api.github.com/repos/kpedro88/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kpedro88/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kpedro88/cmssw/teams","hooks_url":"https://api.github.com/repos/kpedro88/cmssw/hooks","issue_events_url":"https://api.github.com/repos/kpedro88/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/kpedro88/cmssw/events","assignees_url":"https://api.github.com/repos/kpedro88/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/kpedro88/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/kpedro88/cmssw/tags","blobs_url":"https://api.github.com/repos/kpedro88/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kpedro88/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kpedro88/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/kpedro88/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kpedro88/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/kpedro88/cmssw/languages","stargazers_url":"https://api.github.com/repos/kpedro88/cmssw/stargazers","contributors_url":"https://api.github.com/repos/kpedro88/cmssw/contributors","subscribers_url":"https://api.github.com/repos/kpedro88/cmssw/subscribers","subscription_url":"https://api.github.com/repos/kpedro88/cmssw/subscription","commits_url":"https://api.github.com/repos/kpedro88/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/kpedro88/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/kpedro88/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/kpedro88/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/kpedro88/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/kpedro88/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kpedro88/cmssw/merges","archive_url":"https://api.github.com/repos/kpedro88/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kpedro88/cmssw/downloads","issues_url":"https://api.github.com/repos/kpedro88/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/kpedro88/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/kpedro88/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/kpedro88/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kpedro88/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/kpedro88/cmssw/releases{/id}","deployments_url":"https://api.github.com/repos/kpedro88/cmssw/deployments","created_at":"2013-07-14T19:51:22Z","updated_at":"2018-02-22T16:31:14Z","pushed_at":"2018-03-14T14:37:31Z","git_url":"git://github.com/kpedro88/cmssw.git","ssh_url":"git@github.com:kpedro88/cmssw.git","clone_url":"https://github.com/kpedro88/cmssw.git","svn_url":"https://github.com/kpedro88/cmssw","homepage":"cms-sw.github.io/cmssw","size":938908,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"CMSSW_7_0_X"}},"base":{"label":"cms-sw:master","ref":"master","sha":"2146f4009b2c949b4419d777b1a8cc3b777f35ab","user":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars0.githubusercontent.com/u/3863500?v=4","gravatar_id":"","url":"https://api.github.com/users/cms-sw","html_url":"https://github.com/cms-sw","followers_url":"https://api.github.com/users/cms-sw/followers","following_url":"https://api.github.com/users/cms-sw/following{/other_user}","gists_url":"https://api.github.com/users/cms-sw/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-sw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-sw/subscriptions","organizations_url":"https://api.github.com/users/cms-sw/orgs","repos_url":"https://api.github.com/users/cms-sw/repos","events_url":"https://api.github.com/users/cms-sw/events{/privacy}","received_events_url":"https://api.github.com/users/cms-sw/received_events","type":"Organization","site_admin":false},"repo":{"id":10969551,"name":"cmssw","full_name":"cms-sw/cmssw","owner":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars0.githubusercontent.com/u/3863500?v=4","gravatar_id":"","url":"https://api.github.com/users/cms-sw","html_url":"https://github.com/cms-sw","followers_url":"https://api.github.com/users/cms-sw/followers","following_url":"https://api.github.com/users/cms-sw/following{/other_user}","gists_url":"https://api.github.com/users/cms-sw/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-sw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-sw/subscriptions","organizations_url":"https://api.github.com/users/cms-sw/orgs","repos_url":"https://api.github.com/users/cms-sw/repos","events_url":"https://api.github.com/users/cms-sw/events{/privacy}","received_events_url":"https://api.github.com/users/cms-sw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cms-sw/cmssw","description":"CMS Offline Software","fork":false,"url":"https://api.github.com/repos/cms-sw/cmssw","forks_url":"https://api.github.com/repos/cms-sw/cmssw/forks","keys_url":"https://api.github.com/repos/cms-sw/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cms-sw/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cms-sw/cmssw/teams","hooks_url":"https://api.github.com/repos/cms-sw/cmssw/hooks","issue_events_url":"https://api.github.com/repos/cms-sw/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/cms-sw/cmssw/events","assignees_url":"https://api.github.com/repos/cms-sw/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/cms-sw/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/cms-sw/cmssw/tags","blobs_url":"https://api.github.com/repos/cms-sw/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cms-sw/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cms-sw/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/cms-sw/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/cms-sw/cmssw/languages","stargazers_url":"https://api.github.com/repos/cms-sw/cmssw/stargazers","contributors_url":"https://api.github.com/repos/cms-sw/cmssw/contributors","subscribers_url":"https://api.github.com/repos/cms-sw/cmssw/subscribers","subscription_url":"https://api.github.com/repos/cms-sw/cmssw/subscription","commits_url":"https://api.github.com/repos/cms-sw/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/cms-sw/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/cms-sw/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/cms-sw/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/cms-sw/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cms-sw/cmssw/merges","archive_url":"https://api.github.com/repos/cms-sw/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cms-sw/cmssw/downloads","issues_url":"https://api.github.com/repos/cms-sw/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/cms-sw/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/cms-sw/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/cms-sw/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cms-sw/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/cms-sw/cmssw/releases{/id}","deployments_url":"https://api.github.com/repos/cms-sw/cmssw/deployments","created_at":"2013-06-26T14:09:07Z","updated_at":"2018-03-15T16:50:03Z","pushed_at":"2018-03-15T17:05:05Z","git_url":"git://github.com/cms-sw/cmssw.git","ssh_url":"git@github.com:cms-sw/cmssw.git","clone_url":"https://github.com/cms-sw/cmssw.git","svn_url":"https://github.com/cms-sw/cmssw","homepage":"http://cms-sw.github.io/","size":995828,"stargazers_count":525,"watchers_count":525,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2504,"mirror_url":null,"archived":false,"open_issues_count":484,"license":null,"forks":2504,"open_issues":484,"watchers":525,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/22559"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/22559"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/22559"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/22559/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/22559/comments"},"review_comment":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/22559/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/188ef2666f617fb8798a94db0842378730896c8d"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"cmsbuild","id":4170616,"avatar_url":"https://avatars1.githubusercontent.com/u/4170616?v=4","gravatar_id":"","url":"https://api.github.com/users/cmsbuild","html_url":"https://github.com/cmsbuild","followers_url":"https://api.github.com/users/cmsbuild/followers","following_url":"https://api.github.com/users/cmsbuild/following{/other_user}","gists_url":"https://api.github.com/users/cmsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/cmsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmsbuild/subscriptions","organizations_url":"https://api.github.com/users/cmsbuild/orgs","repos_url":"https://api.github.com/users/cmsbuild/repos","events_url":"https://api.github.com/users/cmsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/cmsbuild/received_events","type":"User","site_admin":false},"comments":17,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":254,"deletions":105,"changed_files":5}}
{"actor":{"display_login":"cmsbuild"}}