{"action":"created","comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/86836830","pull_request_review_id":7474940,"id":86836830,"diff_hunk":"@@ -595,16 +595,17 @@ void HcalTriggerPrimitiveAlgo::analyzeHF2017(\n             if (saturated) {\n                output[ibin] = QIE10_MAX_LINEARIZATION_ET;\n             } else {\n-               // If both channels are valid, we cut the sum in half.\n-               if (long_fiber_count == 2)\n-                  long_fiber_val *= 0.5;\n-               if (short_fiber_count == 2)\n-                  short_fiber_val *= 0.5;\n+               // if one of the dual anode read-outs is valid, double the\n+               // energy of the remaining one\n+               if (long_fiber_count == 1)\n+                  long_fiber_val *= 2;\n+               if (short_fiber_count == 1)\n+                  short_fiber_val *= 2;\n \n                auto sum = long_fiber_val + short_fiber_val;\n                // If both towers are valid, we cut the sum in half\n-               if (long_fiber_count > 0 and short_fiber_count > 0)\n-                  sum *= 0.5;\n+               if (long_fiber_count == 0 or short_fiber_count == 0)","path":"SimCalorimetry/HcalTrigPrimAlgos/src/HcalTriggerPrimitiveAlgo.cc","position":20,"original_position":20,"commit_id":"da0e687ff89ab8123ac5acaf7e3eda38e1d3d985","original_commit_id":"da0e687ff89ab8123ac5acaf7e3eda38e1d3d985","user":{"login":"matz-e","id":2151261,"avatar_url":"https://avatars.githubusercontent.com/u/2151261?v=3","gravatar_id":"","url":"https://api.github.com/users/matz-e","html_url":"https://github.com/matz-e","followers_url":"https://api.github.com/users/matz-e/followers","following_url":"https://api.github.com/users/matz-e/following{/other_user}","gists_url":"https://api.github.com/users/matz-e/gists{/gist_id}","starred_url":"https://api.github.com/users/matz-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matz-e/subscriptions","organizations_url":"https://api.github.com/users/matz-e/orgs","repos_url":"https://api.github.com/users/matz-e/repos","events_url":"https://api.github.com/users/matz-e/events{/privacy}","received_events_url":"https://api.github.com/users/matz-e/received_events","type":"User","site_admin":false},"body":"I should update the comment (was focused on logic) to read\r\n```c++\r\n// If one of the fibers is invalid, use the value of the other one instead by doubling the sum\r\n```\r\nOther than that, I can also link to the uHTR spec, which is a bit more verbose and covers a lot more.\r\n\r\nWould that be better?","created_at":"2016-11-07T18:28:33Z","updated_at":"2016-11-07T18:28:33Z","html_url":"https://github.com/cms-sw/cmssw/pull/16464#discussion_r86836830","pull_request_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/16464","_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/86836830"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/16464#discussion_r86836830"},"pull_request":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/16464"}}},"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/16464","id":92315576,"html_url":"https://github.com/cms-sw/cmssw/pull/16464","diff_url":"https://github.com/cms-sw/cmssw/pull/16464.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/16464.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/16464","number":16464,"state":"open","locked":false,"title":"HCAL 2017 HF TP dual-anode readout fixes.","user":{"login":"matz-e","id":2151261,"avatar_url":"https://avatars.githubusercontent.com/u/2151261?v=3","gravatar_id":"","url":"https://api.github.com/users/matz-e","html_url":"https://github.com/matz-e","followers_url":"https://api.github.com/users/matz-e/followers","following_url":"https://api.github.com/users/matz-e/following{/other_user}","gists_url":"https://api.github.com/users/matz-e/gists{/gist_id}","starred_url":"https://api.github.com/users/matz-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matz-e/subscriptions","organizations_url":"https://api.github.com/users/matz-e/orgs","repos_url":"https://api.github.com/users/matz-e/repos","events_url":"https://api.github.com/users/matz-e/events{/privacy}","received_events_url":"https://api.github.com/users/matz-e/received_events","type":"User","site_admin":false},"body":"Fix the energy calculation to match firmware. Duplicate valid energies when one part of the readout fails, and shift over the lower energy bits properly.","created_at":"2016-11-04T10:29:07Z","updated_at":"2016-11-07T18:28:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd2aeaabdde1b7b53240d87e45ad92655b2e4e9e","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/59","html_url":"https://github.com/cms-sw/cmssw/milestones/Next%20CMSSW_8_1_X","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/59/labels","id":1590252,"number":59,"title":"Next CMSSW_8_1_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":67,"closed_issues":1854,"state":"open","created_at":"2016-02-18T09:12:12Z","updated_at":"2016-11-07T18:10:01Z","due_on":"2016-11-01T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/16464/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/16464/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/16464/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/da0e687ff89ab8123ac5acaf7e3eda38e1d3d985","head":{"label":"matz-e:hcal-tp-2017-divisions","ref":"hcal-tp-2017-divisions","sha":"da0e687ff89ab8123ac5acaf7e3eda38e1d3d985","user":{"login":"matz-e","id":2151261,"avatar_url":"https://avatars.githubusercontent.com/u/2151261?v=3","gravatar_id":"","url":"https://api.github.com/users/matz-e","html_url":"https://github.com/matz-e","followers_url":"https://api.github.com/users/matz-e/followers","following_url":"https://api.github.com/users/matz-e/following{/other_user}","gists_url":"https://api.github.com/users/matz-e/gists{/gist_id}","starred_url":"https://api.github.com/users/matz-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matz-e/subscriptions","organizations_url":"https://api.github.com/users/matz-e/orgs","repos_url":"https://api.github.com/users/matz-e/repos","events_url":"https://api.github.com/users/matz-e/events{/privacy}","received_events_url":"https://api.github.com/users/matz-e/received_events","type":"User","site_admin":false},"repo":{"id":15907567,"name":"cmssw","full_name":"matz-e/cmssw","owner":{"login":"matz-e","id":2151261,"avatar_url":"https://avatars.githubusercontent.com/u/2151261?v=3","gravatar_id":"","url":"https://api.github.com/users/matz-e","html_url":"https://github.com/matz-e","followers_url":"https://api.github.com/users/matz-e/followers","following_url":"https://api.github.com/users/matz-e/following{/other_user}","gists_url":"https://api.github.com/users/matz-e/gists{/gist_id}","starred_url":"https://api.github.com/users/matz-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matz-e/subscriptions","organizations_url":"https://api.github.com/users/matz-e/orgs","repos_url":"https://api.github.com/users/matz-e/repos","events_url":"https://api.github.com/users/matz-e/events{/privacy}","received_events_url":"https://api.github.com/users/matz-e/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matz-e/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/matz-e/cmssw","forks_url":"https://api.github.com/repos/matz-e/cmssw/forks","keys_url":"https://api.github.com/repos/matz-e/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matz-e/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matz-e/cmssw/teams","hooks_url":"https://api.github.com/repos/matz-e/cmssw/hooks","issue_events_url":"https://api.github.com/repos/matz-e/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/matz-e/cmssw/events","assignees_url":"https://api.github.com/repos/matz-e/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/matz-e/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/matz-e/cmssw/tags","blobs_url":"https://api.github.com/repos/matz-e/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matz-e/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matz-e/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/matz-e/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matz-e/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/matz-e/cmssw/languages","stargazers_url":"https://api.github.com/repos/matz-e/cmssw/stargazers","contributors_url":"https://api.github.com/repos/matz-e/cmssw/contributors","subscribers_url":"https://api.github.com/repos/matz-e/cmssw/subscribers","subscription_url":"https://api.github.com/repos/matz-e/cmssw/subscription","commits_url":"https://api.github.com/repos/matz-e/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/matz-e/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/matz-e/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/matz-e/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/matz-e/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/matz-e/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matz-e/cmssw/merges","archive_url":"https://api.github.com/repos/matz-e/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matz-e/cmssw/downloads","issues_url":"https://api.github.com/repos/matz-e/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/matz-e/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/matz-e/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/matz-e/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matz-e/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/matz-e/cmssw/releases{/id}","deployments_url":"https://api.github.com/repos/matz-e/cmssw/deployments","created_at":"2014-01-14T16:15:49Z","updated_at":"2015-03-30T13:43:17Z","pushed_at":"2016-11-04T09:33:36Z","git_url":"git://github.com/matz-e/cmssw.git","ssh_url":"git@github.com:matz-e/cmssw.git","clone_url":"https://github.com/matz-e/cmssw.git","svn_url":"https://github.com/matz-e/cmssw","homepage":"cms-sw.github.io/cmssw","size":879692,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"l1hcal"}},"base":{"label":"cms-sw:CMSSW_8_1_X","ref":"CMSSW_8_1_X","sha":"ff01954d53367eb16087dbc5be2949efe408adc0","user":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars.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://avatars.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":"2016-11-06T09:24:44Z","pushed_at":"2016-11-07T18:08:30Z","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":1116918,"stargazers_count":355,"watchers_count":355,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2016,"mirror_url":null,"open_issues_count":371,"forks":2016,"open_issues":371,"watchers":355,"default_branch":"CMSSW_8_1_X"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/16464"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/16464"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/16464"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/16464/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/16464/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/16464/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/da0e687ff89ab8123ac5acaf7e3eda38e1d3d985"}}}}
{"actor":{"display_login":"matz-e"}}