{"action":"created","comment":{"url":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/comments/239788239","pull_request_review_id":182667881,"id":239788239,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTc4ODIzOQ==","diff_hunk":"@@ -538,7 +581,16 @@ void StitchingCosmicRayMergingTool::StitchPfos(const MasterAlgorithm *const pAlg\n             }\n \n             for (const ParticleFlowObject *const pPfoToShift : pfoVector)\n-                pAlgorithm->ShiftPfoHierarchy(pPfoToShift, pfoToLArTPCMap, x0);\n+            {\n+                if (pfoToLArTPCMap.find(pPfoToShift) != pfoToLArTPCMap.end())\n+                {\n+                    const LArTPC *const pActiveLArTPC(pfoToLArTPCMap.at(pPfoToShift));\n+                    const LArTPC *const pPartnerLArTPC(stitchedLArTPCs.first == pActiveLArTPC ? stitchedLArTPCs.second : stitchedLArTPCs.first);\n+                    const float sign(pActiveLArTPC->GetCenterX() < pPartnerLArTPC->GetCenterX() ? 1.f : -1.f);","path":"larpandoracontent/LArControlFlow/StitchingCosmicRayMergingTool.cc","position":60,"original_position":60,"commit_id":"fe83d005e9668e1a67373f3517814e20973618ac","original_commit_id":"fe83d005e9668e1a67373f3517814e20973618ac","user":{"login":"StevenGreen1","id":11979712,"node_id":"MDQ6VXNlcjExOTc5NzEy","avatar_url":"https://avatars0.githubusercontent.com/u/11979712?v=4","gravatar_id":"","url":"https://api.github.com/users/StevenGreen1","html_url":"https://github.com/StevenGreen1","followers_url":"https://api.github.com/users/StevenGreen1/followers","following_url":"https://api.github.com/users/StevenGreen1/following{/other_user}","gists_url":"https://api.github.com/users/StevenGreen1/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenGreen1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenGreen1/subscriptions","organizations_url":"https://api.github.com/users/StevenGreen1/orgs","repos_url":"https://api.github.com/users/StevenGreen1/repos","events_url":"https://api.github.com/users/StevenGreen1/events{/privacy}","received_events_url":"https://api.github.com/users/StevenGreen1/received_events","type":"User","site_admin":false},"body":"Hi John,\r\nThank you for the comments.  They were really useful and I've implemented them.  I think what I didn't particularly like was the try-catch block structure as I felt it was too big, but by moving the try block logic to a separate function it looks quite clean now.  \r\n\r\nI think you might be right about there being an issue if the CPA/APA structure is different as this logic assumes that the 3D particle appears in the 3D drift volume it was measured in, when that might not be the case.  I will have more of a think about this and look at a few more events to check everything still makes sense.  Especially for DUNEFD too.  \r\n\r\nCheers\r\nSteve ","created_at":"2018-12-07T12:16:24Z","updated_at":"2018-12-07T12:16:24Z","html_url":"https://github.com/PandoraPFA/LArContent/pull/75#discussion_r239788239","pull_request_url":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/75","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/comments/239788239"},"html":{"href":"https://github.com/PandoraPFA/LArContent/pull/75#discussion_r239788239"},"pull_request":{"href":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/75"}},"in_reply_to_id":239529026},"pull_request":{"url":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/75","id":234950444,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0OTUwNDQ0","html_url":"https://github.com/PandoraPFA/LArContent/pull/75","diff_url":"https://github.com/PandoraPFA/LArContent/pull/75.diff","patch_url":"https://github.com/PandoraPFA/LArContent/pull/75.patch","issue_url":"https://api.github.com/repos/PandoraPFA/LArContent/issues/75","number":75,"state":"open","locked":false,"title":"APA Stitching","user":{"login":"StevenGreen1","id":11979712,"node_id":"MDQ6VXNlcjExOTc5NzEy","avatar_url":"https://avatars0.githubusercontent.com/u/11979712?v=4","gravatar_id":"","url":"https://api.github.com/users/StevenGreen1","html_url":"https://github.com/StevenGreen1","followers_url":"https://api.github.com/users/StevenGreen1/followers","following_url":"https://api.github.com/users/StevenGreen1/following{/other_user}","gists_url":"https://api.github.com/users/StevenGreen1/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenGreen1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenGreen1/subscriptions","organizations_url":"https://api.github.com/users/StevenGreen1/orgs","repos_url":"https://api.github.com/users/StevenGreen1/repos","events_url":"https://api.github.com/users/StevenGreen1/events{/privacy}","received_events_url":"https://api.github.com/users/StevenGreen1/received_events","type":"User","site_admin":false},"body":"Modification to sign of x0 to allow for stitching across APA and CPA boundaries.  Below are screenshots of stitching demonstrating that stitching now works as expected across CPAs and APAs.\r\n\r\n![screenshot 2018-11-30 at 10 57 48](https://user-images.githubusercontent.com/11979712/49285494-737ef180-f48f-11e8-82bf-d331788d48c4.png)\r\n![screenshot 2018-11-30 at 10 57 32](https://user-images.githubusercontent.com/11979712/49285495-737ef180-f48f-11e8-9557-508077d67a3a.png)\r\n![screenshot 2018-11-30 at 10 57 23](https://user-images.githubusercontent.com/11979712/49285496-737ef180-f48f-11e8-97b1-43e7f77dd27b.png)","created_at":"2018-11-30T11:03:13Z","updated_at":"2018-12-07T12:16:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6cece06c864550cdc917ba1570296472d3aaa1a0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/75/commits","review_comments_url":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/75/comments","review_comment_url":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PandoraPFA/LArContent/issues/75/comments","statuses_url":"https://api.github.com/repos/PandoraPFA/LArContent/statuses/fe83d005e9668e1a67373f3517814e20973618ac","head":{"label":"StevenGreen1:feature/APAStitching","ref":"feature/APAStitching","sha":"fe83d005e9668e1a67373f3517814e20973618ac","user":{"login":"StevenGreen1","id":11979712,"node_id":"MDQ6VXNlcjExOTc5NzEy","avatar_url":"https://avatars0.githubusercontent.com/u/11979712?v=4","gravatar_id":"","url":"https://api.github.com/users/StevenGreen1","html_url":"https://github.com/StevenGreen1","followers_url":"https://api.github.com/users/StevenGreen1/followers","following_url":"https://api.github.com/users/StevenGreen1/following{/other_user}","gists_url":"https://api.github.com/users/StevenGreen1/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenGreen1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenGreen1/subscriptions","organizations_url":"https://api.github.com/users/StevenGreen1/orgs","repos_url":"https://api.github.com/users/StevenGreen1/repos","events_url":"https://api.github.com/users/StevenGreen1/events{/privacy}","received_events_url":"https://api.github.com/users/StevenGreen1/received_events","type":"User","site_admin":false},"repo":{"id":109973501,"node_id":"MDEwOlJlcG9zaXRvcnkxMDk5NzM1MDE=","name":"LArContent","full_name":"StevenGreen1/LArContent","private":false,"owner":{"login":"StevenGreen1","id":11979712,"node_id":"MDQ6VXNlcjExOTc5NzEy","avatar_url":"https://avatars0.githubusercontent.com/u/11979712?v=4","gravatar_id":"","url":"https://api.github.com/users/StevenGreen1","html_url":"https://github.com/StevenGreen1","followers_url":"https://api.github.com/users/StevenGreen1/followers","following_url":"https://api.github.com/users/StevenGreen1/following{/other_user}","gists_url":"https://api.github.com/users/StevenGreen1/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenGreen1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenGreen1/subscriptions","organizations_url":"https://api.github.com/users/StevenGreen1/orgs","repos_url":"https://api.github.com/users/StevenGreen1/repos","events_url":"https://api.github.com/users/StevenGreen1/events{/privacy}","received_events_url":"https://api.github.com/users/StevenGreen1/received_events","type":"User","site_admin":false},"html_url":"https://github.com/StevenGreen1/LArContent","description":"Algorithms and tools for LAr TPC event reconstruction","fork":true,"url":"https://api.github.com/repos/StevenGreen1/LArContent","forks_url":"https://api.github.com/repos/StevenGreen1/LArContent/forks","keys_url":"https://api.github.com/repos/StevenGreen1/LArContent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StevenGreen1/LArContent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StevenGreen1/LArContent/teams","hooks_url":"https://api.github.com/repos/StevenGreen1/LArContent/hooks","issue_events_url":"https://api.github.com/repos/StevenGreen1/LArContent/issues/events{/number}","events_url":"https://api.github.com/repos/StevenGreen1/LArContent/events","assignees_url":"https://api.github.com/repos/StevenGreen1/LArContent/assignees{/user}","branches_url":"https://api.github.com/repos/StevenGreen1/LArContent/branches{/branch}","tags_url":"https://api.github.com/repos/StevenGreen1/LArContent/tags","blobs_url":"https://api.github.com/repos/StevenGreen1/LArContent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StevenGreen1/LArContent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StevenGreen1/LArContent/git/refs{/sha}","trees_url":"https://api.github.com/repos/StevenGreen1/LArContent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StevenGreen1/LArContent/statuses/{sha}","languages_url":"https://api.github.com/repos/StevenGreen1/LArContent/languages","stargazers_url":"https://api.github.com/repos/StevenGreen1/LArContent/stargazers","contributors_url":"https://api.github.com/repos/StevenGreen1/LArContent/contributors","subscribers_url":"https://api.github.com/repos/StevenGreen1/LArContent/subscribers","subscription_url":"https://api.github.com/repos/StevenGreen1/LArContent/subscription","commits_url":"https://api.github.com/repos/StevenGreen1/LArContent/commits{/sha}","git_commits_url":"https://api.github.com/repos/StevenGreen1/LArContent/git/commits{/sha}","comments_url":"https://api.github.com/repos/StevenGreen1/LArContent/comments{/number}","issue_comment_url":"https://api.github.com/repos/StevenGreen1/LArContent/issues/comments{/number}","contents_url":"https://api.github.com/repos/StevenGreen1/LArContent/contents/{+path}","compare_url":"https://api.github.com/repos/StevenGreen1/LArContent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StevenGreen1/LArContent/merges","archive_url":"https://api.github.com/repos/StevenGreen1/LArContent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StevenGreen1/LArContent/downloads","issues_url":"https://api.github.com/repos/StevenGreen1/LArContent/issues{/number}","pulls_url":"https://api.github.com/repos/StevenGreen1/LArContent/pulls{/number}","milestones_url":"https://api.github.com/repos/StevenGreen1/LArContent/milestones{/number}","notifications_url":"https://api.github.com/repos/StevenGreen1/LArContent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StevenGreen1/LArContent/labels{/name}","releases_url":"https://api.github.com/repos/StevenGreen1/LArContent/releases{/id}","deployments_url":"https://api.github.com/repos/StevenGreen1/LArContent/deployments","created_at":"2017-11-08T12:32:51Z","updated_at":"2017-11-08T12:32:54Z","pushed_at":"2018-12-06T14:10:35Z","git_url":"git://github.com/StevenGreen1/LArContent.git","ssh_url":"git@github.com:StevenGreen1/LArContent.git","clone_url":"https://github.com/StevenGreen1/LArContent.git","svn_url":"https://github.com/StevenGreen1/LArContent","homepage":"","size":24120,"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":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PandoraPFA:master","ref":"master","sha":"0c7840a9217d0baa44637400940ae68a540a8a2b","user":{"login":"PandoraPFA","id":13437413,"node_id":"MDQ6VXNlcjEzNDM3NDEz","avatar_url":"https://avatars2.githubusercontent.com/u/13437413?v=4","gravatar_id":"","url":"https://api.github.com/users/PandoraPFA","html_url":"https://github.com/PandoraPFA","followers_url":"https://api.github.com/users/PandoraPFA/followers","following_url":"https://api.github.com/users/PandoraPFA/following{/other_user}","gists_url":"https://api.github.com/users/PandoraPFA/gists{/gist_id}","starred_url":"https://api.github.com/users/PandoraPFA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PandoraPFA/subscriptions","organizations_url":"https://api.github.com/users/PandoraPFA/orgs","repos_url":"https://api.github.com/users/PandoraPFA/repos","events_url":"https://api.github.com/users/PandoraPFA/events{/privacy}","received_events_url":"https://api.github.com/users/PandoraPFA/received_events","type":"User","site_admin":false},"repo":{"id":43431205,"node_id":"MDEwOlJlcG9zaXRvcnk0MzQzMTIwNQ==","name":"LArContent","full_name":"PandoraPFA/LArContent","private":false,"owner":{"login":"PandoraPFA","id":13437413,"node_id":"MDQ6VXNlcjEzNDM3NDEz","avatar_url":"https://avatars2.githubusercontent.com/u/13437413?v=4","gravatar_id":"","url":"https://api.github.com/users/PandoraPFA","html_url":"https://github.com/PandoraPFA","followers_url":"https://api.github.com/users/PandoraPFA/followers","following_url":"https://api.github.com/users/PandoraPFA/following{/other_user}","gists_url":"https://api.github.com/users/PandoraPFA/gists{/gist_id}","starred_url":"https://api.github.com/users/PandoraPFA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PandoraPFA/subscriptions","organizations_url":"https://api.github.com/users/PandoraPFA/orgs","repos_url":"https://api.github.com/users/PandoraPFA/repos","events_url":"https://api.github.com/users/PandoraPFA/events{/privacy}","received_events_url":"https://api.github.com/users/PandoraPFA/received_events","type":"User","site_admin":false},"html_url":"https://github.com/PandoraPFA/LArContent","description":"Algorithms and tools for LAr TPC event reconstruction","fork":false,"url":"https://api.github.com/repos/PandoraPFA/LArContent","forks_url":"https://api.github.com/repos/PandoraPFA/LArContent/forks","keys_url":"https://api.github.com/repos/PandoraPFA/LArContent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PandoraPFA/LArContent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PandoraPFA/LArContent/teams","hooks_url":"https://api.github.com/repos/PandoraPFA/LArContent/hooks","issue_events_url":"https://api.github.com/repos/PandoraPFA/LArContent/issues/events{/number}","events_url":"https://api.github.com/repos/PandoraPFA/LArContent/events","assignees_url":"https://api.github.com/repos/PandoraPFA/LArContent/assignees{/user}","branches_url":"https://api.github.com/repos/PandoraPFA/LArContent/branches{/branch}","tags_url":"https://api.github.com/repos/PandoraPFA/LArContent/tags","blobs_url":"https://api.github.com/repos/PandoraPFA/LArContent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PandoraPFA/LArContent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PandoraPFA/LArContent/git/refs{/sha}","trees_url":"https://api.github.com/repos/PandoraPFA/LArContent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PandoraPFA/LArContent/statuses/{sha}","languages_url":"https://api.github.com/repos/PandoraPFA/LArContent/languages","stargazers_url":"https://api.github.com/repos/PandoraPFA/LArContent/stargazers","contributors_url":"https://api.github.com/repos/PandoraPFA/LArContent/contributors","subscribers_url":"https://api.github.com/repos/PandoraPFA/LArContent/subscribers","subscription_url":"https://api.github.com/repos/PandoraPFA/LArContent/subscription","commits_url":"https://api.github.com/repos/PandoraPFA/LArContent/commits{/sha}","git_commits_url":"https://api.github.com/repos/PandoraPFA/LArContent/git/commits{/sha}","comments_url":"https://api.github.com/repos/PandoraPFA/LArContent/comments{/number}","issue_comment_url":"https://api.github.com/repos/PandoraPFA/LArContent/issues/comments{/number}","contents_url":"https://api.github.com/repos/PandoraPFA/LArContent/contents/{+path}","compare_url":"https://api.github.com/repos/PandoraPFA/LArContent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PandoraPFA/LArContent/merges","archive_url":"https://api.github.com/repos/PandoraPFA/LArContent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PandoraPFA/LArContent/downloads","issues_url":"https://api.github.com/repos/PandoraPFA/LArContent/issues{/number}","pulls_url":"https://api.github.com/repos/PandoraPFA/LArContent/pulls{/number}","milestones_url":"https://api.github.com/repos/PandoraPFA/LArContent/milestones{/number}","notifications_url":"https://api.github.com/repos/PandoraPFA/LArContent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PandoraPFA/LArContent/labels{/name}","releases_url":"https://api.github.com/repos/PandoraPFA/LArContent/releases{/id}","deployments_url":"https://api.github.com/repos/PandoraPFA/LArContent/deployments","created_at":"2015-09-30T12:19:46Z","updated_at":"2018-12-04T09:33:36Z","pushed_at":"2018-12-04T09:33:34Z","git_url":"git://github.com/PandoraPFA/LArContent.git","ssh_url":"git@github.com:PandoraPFA/LArContent.git","clone_url":"https://github.com/PandoraPFA/LArContent.git","svn_url":"https://github.com/PandoraPFA/LArContent","homepage":"","size":23987,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":11,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/75"},"html":{"href":"https://github.com/PandoraPFA/LArContent/pull/75"},"issue":{"href":"https://api.github.com/repos/PandoraPFA/LArContent/issues/75"},"comments":{"href":"https://api.github.com/repos/PandoraPFA/LArContent/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PandoraPFA/LArContent/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/PandoraPFA/LArContent/statuses/fe83d005e9668e1a67373f3517814e20973618ac"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"StevenGreen1"}}