{"action":"created","comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/104969478","pull_request_review_id":25827575,"id":104969478,"diff_hunk":"@@ -205,25 +205,28 @@ bool DAClusterizerInZT::merge(vector<vertex_t> & y, double & beta)const{\n }\n \n bool DAClusterizerInZT::purge(vector<vertex_t> & y, vector<track_t> & tks, double & rho0, const double beta)const{\n+  constexpr int maxUnique = 2;\n   // eliminate clusters with only one significant/unique track\n   if(y.size()<2)  return false;\n   \n   unsigned int nt=tks.size();\n   double sumpmin=nt;\n   vector<vertex_t>::iterator k0=y.end();\n-  for(vector<vertex_t>::iterator k=y.begin(); k!=y.end(); k++){ \n+  const double rho0exp = rho0*std::exp(-beta*dzCutOff_*dzCutOff_);\n+  for(vector<vertex_t>::iterator k=y.begin(); k!=y.end(); ++k){ \n     int nUnique=0;\n     double sump=0;\n-    double pmax=k->pk/(k->pk+rho0*exp(-beta*dzCutOff_*dzCutOff_));\n-    for(unsigned int i=0; i<nt; i++){\n-      if(tks[i].zi > 0){\n-\tdouble p = k->pk * std::exp(-beta*e_ik(tks[i],*k)) / tks[i].zi ;\n+    double pmax=k->pk/(k->pk+rho0exp);\n+    for(auto&& tk : tks){\n+      if(tk.zi > 0){\n+\tdouble p = k->pk * std::exp(-beta*e_ik(tk,*k)) / tk.zi ;\n \tsump+=p;\n-\tif( (p > 0.9*pmax) && (tks[i].pi>0) ){ nUnique++; }\n+\tif( (p > 0.9*pmax) && (tk.pi>0) ){ ++nUnique; }\n+\tif( nUnique >= maxUnique ) { break; }","path":"RecoVertex/PrimaryVertexProducer/src/DAClusterizerInZT.cc","position":80,"original_position":80,"commit_id":"968ef8779607d5ccd5d031f460a7c2637ec46fc1","original_commit_id":"968ef8779607d5ccd5d031f460a7c2637ec46fc1","user":{"login":"slava77","id":4676718,"avatar_url":"https://avatars1.githubusercontent.com/u/4676718?v=3","gravatar_id":"","url":"https://api.github.com/users/slava77","html_url":"https://github.com/slava77","followers_url":"https://api.github.com/users/slava77/followers","following_url":"https://api.github.com/users/slava77/following{/other_user}","gists_url":"https://api.github.com/users/slava77/gists{/gist_id}","starred_url":"https://api.github.com/users/slava77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slava77/subscriptions","organizations_url":"https://api.github.com/users/slava77/orgs","repos_url":"https://api.github.com/users/slava77/repos","events_url":"https://api.github.com/users/slava77/events{/privacy}","received_events_url":"https://api.github.com/users/slava77/received_events","type":"User","site_admin":false},"body":"other than this line, I don't see anything obvious that can generate differences in reconstruction.","created_at":"2017-03-08T17:12:26Z","updated_at":"2017-03-08T17:12:26Z","html_url":"https://github.com/cms-sw/cmssw/pull/17712#discussion_r104969478","pull_request_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/17712","_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/104969478"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/17712#discussion_r104969478"},"pull_request":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/17712"}}},"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/17712","id":108749469,"html_url":"https://github.com/cms-sw/cmssw/pull/17712","diff_url":"https://github.com/cms-sw/cmssw/pull/17712.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/17712.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/17712","number":17712,"state":"open","locked":false,"title":"Primary vertexing speed improvements","user":{"login":"cmsbuild","id":4170616,"avatar_url":"https://avatars2.githubusercontent.com/u/4170616?v=3","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},"body":"Speed improvements for slowly converging cases in 140/200PU. First found in KNL runs but shown to be a problem in Xeon as well.\r\n\r\nPrimary fix here is to move an expensive calculation out of a loop and also to short circuit that loop when more than 2 tracks are found in the vertex.\r\n\r\nFactor many speed improvement for problem events. Should also improve the typical vertexing time, from same short circuit.\nAutomatically ported from CMSSW_9_0_X #17622 (original by @lgray).\nPlease wait for a new IB (12 to 24H) before requesting to test this PR.","created_at":"2017-03-02T12:31:53Z","updated_at":"2017-03-08T17:12:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14ee3d22cd43c270855d88be3bf0a8e427f849e6","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/65","html_url":"https://github.com/cms-sw/cmssw/milestone/65","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/65/labels","id":2358370,"number":65,"title":"Next CMSSW_9_1_X","description":"","creator":{"login":"smuzaffar","id":4115138,"avatar_url":"https://avatars0.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":72,"closed_issues":44,"state":"open","created_at":"2017-03-02T09:15:47Z","updated_at":"2017-03-08T17:09:11Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/17712/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/17712/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/17712/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/968ef8779607d5ccd5d031f460a7c2637ec46fc1","head":{"label":"lgray:topic_speed_vertex","ref":"topic_speed_vertex","sha":"968ef8779607d5ccd5d031f460a7c2637ec46fc1","user":{"login":"lgray","id":1068089,"avatar_url":"https://avatars3.githubusercontent.com/u/1068089?v=3","gravatar_id":"","url":"https://api.github.com/users/lgray","html_url":"https://github.com/lgray","followers_url":"https://api.github.com/users/lgray/followers","following_url":"https://api.github.com/users/lgray/following{/other_user}","gists_url":"https://api.github.com/users/lgray/gists{/gist_id}","starred_url":"https://api.github.com/users/lgray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgray/subscriptions","organizations_url":"https://api.github.com/users/lgray/orgs","repos_url":"https://api.github.com/users/lgray/repos","events_url":"https://api.github.com/users/lgray/events{/privacy}","received_events_url":"https://api.github.com/users/lgray/received_events","type":"User","site_admin":false},"repo":{"id":11345764,"name":"cmssw","full_name":"lgray/cmssw","owner":{"login":"lgray","id":1068089,"avatar_url":"https://avatars3.githubusercontent.com/u/1068089?v=3","gravatar_id":"","url":"https://api.github.com/users/lgray","html_url":"https://github.com/lgray","followers_url":"https://api.github.com/users/lgray/followers","following_url":"https://api.github.com/users/lgray/following{/other_user}","gists_url":"https://api.github.com/users/lgray/gists{/gist_id}","starred_url":"https://api.github.com/users/lgray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgray/subscriptions","organizations_url":"https://api.github.com/users/lgray/orgs","repos_url":"https://api.github.com/users/lgray/repos","events_url":"https://api.github.com/users/lgray/events{/privacy}","received_events_url":"https://api.github.com/users/lgray/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lgray/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/lgray/cmssw","forks_url":"https://api.github.com/repos/lgray/cmssw/forks","keys_url":"https://api.github.com/repos/lgray/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lgray/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lgray/cmssw/teams","hooks_url":"https://api.github.com/repos/lgray/cmssw/hooks","issue_events_url":"https://api.github.com/repos/lgray/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/lgray/cmssw/events","assignees_url":"https://api.github.com/repos/lgray/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/lgray/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/lgray/cmssw/tags","blobs_url":"https://api.github.com/repos/lgray/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lgray/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lgray/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/lgray/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lgray/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/lgray/cmssw/languages","stargazers_url":"https://api.github.com/repos/lgray/cmssw/stargazers","contributors_url":"https://api.github.com/repos/lgray/cmssw/contributors","subscribers_url":"https://api.github.com/repos/lgray/cmssw/subscribers","subscription_url":"https://api.github.com/repos/lgray/cmssw/subscription","commits_url":"https://api.github.com/repos/lgray/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/lgray/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/lgray/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/lgray/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/lgray/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/lgray/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lgray/cmssw/merges","archive_url":"https://api.github.com/repos/lgray/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lgray/cmssw/downloads","issues_url":"https://api.github.com/repos/lgray/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/lgray/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/lgray/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/lgray/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lgray/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/lgray/cmssw/releases{/id}","deployments_url":"https://api.github.com/repos/lgray/cmssw/deployments","created_at":"2013-07-11T15:38:46Z","updated_at":"2016-06-13T15:06:35Z","pushed_at":"2017-02-27T02:47:47Z","git_url":"git://github.com/lgray/cmssw.git","ssh_url":"git@github.com:lgray/cmssw.git","clone_url":"https://github.com/lgray/cmssw.git","svn_url":"https://github.com/lgray/cmssw","homepage":"cms-sw.github.io/cmssw","size":913556,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"CMSSW_9_0_X"}},"base":{"label":"cms-sw:master","ref":"master","sha":"6b7668fc03651cd63dbe9f8db78fb4b53bfef6df","user":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars3.githubusercontent.com/u/3863500?v=3","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://avatars3.githubusercontent.com/u/3863500?v=3","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":"2017-03-07T08:07:23Z","pushed_at":"2017-03-08T17:08:55Z","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":931614,"stargazers_count":396,"watchers_count":396,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2109,"mirror_url":null,"open_issues_count":418,"forks":2109,"open_issues":418,"watchers":396,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/17712"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/17712"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/17712"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/17712/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/17712/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/17712/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/968ef8779607d5ccd5d031f460a7c2637ec46fc1"}}}}
{"actor":{"display_login":"slava77"}}