{"action":"created","comment":{"url":"https://api.github.com/repos/CPLUOS/nano/pulls/comments/181652649","pull_request_review_id":112314237,"id":181652649,"diff_hunk":"@@ -73,12 +82,42 @@ HadTruthProducer::produce( edm::Event& iEvent, const edm::EventSetup& iSetup)\n     if (nmatched == 2) {\n       isHadFrom(trueHad, 6, count, hadFromQuark, hadFromTop);\n       matchHad.insert({trueHad.get(), &cand});\n-    }\n+      matchedGen.push_back(trueHad.get());\n+    } else { matchedGen.push_back(nullptr); }\n \n     isHadFromTsb.push_back(hadFromQuark);\n     isHadFromTop.push_back(hadFromTop);\n   }\n   \n+  for (auto indices : *hadronIndices) {\n+    if (abs((*hadronCands)[indices[0]].pdgId()) != 5122) continue;\n+    int nmatched = 0;\n+    int count=0;\n+    int hadFromQuark=-99;\n+    bool hadFromTop=false;\n+    reco::GenParticleRef trueHad;\n+\n+    for (auto i = 1; i < (int) indices.size(); i++) {\n+      auto gen_dau = matchedGen[indices[i]];\n+      if (gen_dau == nullptr) continue;\n+\n+      for (auto &im : gen_dau->motherRefVector()) {\n+        if (abs((*im).pdgId()) == 5122) {","path":"nanoAOD/plugins/HadTruthProducer.cc","position":76,"original_position":76,"commit_id":"87db960b835de17d84d42d129e7979fcc1fa8ec2","original_commit_id":"87db960b835de17d84d42d129e7979fcc1fa8ec2","user":{"login":"watson-ij","id":29137092,"avatar_url":"https://avatars0.githubusercontent.com/u/29137092?v=4","gravatar_id":"","url":"https://api.github.com/users/watson-ij","html_url":"https://github.com/watson-ij","followers_url":"https://api.github.com/users/watson-ij/followers","following_url":"https://api.github.com/users/watson-ij/following{/other_user}","gists_url":"https://api.github.com/users/watson-ij/gists{/gist_id}","starred_url":"https://api.github.com/users/watson-ij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/watson-ij/subscriptions","organizations_url":"https://api.github.com/users/watson-ij/orgs","repos_url":"https://api.github.com/users/watson-ij/repos","events_url":"https://api.github.com/users/watson-ij/events{/privacy}","received_events_url":"https://api.github.com/users/watson-ij/received_events","type":"User","site_admin":false},"body":"You can do im->pdgId() instead","created_at":"2018-04-16T08:11:38Z","updated_at":"2018-04-16T08:11:38Z","html_url":"https://github.com/CPLUOS/nano/pull/20#discussion_r181652649","pull_request_url":"https://api.github.com/repos/CPLUOS/nano/pulls/20","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/CPLUOS/nano/pulls/comments/181652649"},"html":{"href":"https://github.com/CPLUOS/nano/pull/20#discussion_r181652649"},"pull_request":{"href":"https://api.github.com/repos/CPLUOS/nano/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/CPLUOS/nano/pulls/20","id":181779160,"html_url":"https://github.com/CPLUOS/nano/pull/20","diff_url":"https://github.com/CPLUOS/nano/pull/20.diff","patch_url":"https://github.com/CPLUOS/nano/pull/20.patch","issue_url":"https://api.github.com/repos/CPLUOS/nano/issues/20","number":20,"state":"open","locked":false,"title":"add lambda_b truth matching","user":{"login":"YooSunYoung","id":17974113,"avatar_url":"https://avatars0.githubusercontent.com/u/17974113?v=4","gravatar_id":"","url":"https://api.github.com/users/YooSunYoung","html_url":"https://github.com/YooSunYoung","followers_url":"https://api.github.com/users/YooSunYoung/followers","following_url":"https://api.github.com/users/YooSunYoung/following{/other_user}","gists_url":"https://api.github.com/users/YooSunYoung/gists{/gist_id}","starred_url":"https://api.github.com/users/YooSunYoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YooSunYoung/subscriptions","organizations_url":"https://api.github.com/users/YooSunYoung/orgs","repos_url":"https://api.github.com/users/YooSunYoung/repos","events_url":"https://api.github.com/users/YooSunYoung/events{/privacy}","received_events_url":"https://api.github.com/users/YooSunYoung/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-16T07:55:28Z","updated_at":"2018-04-16T08:11:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65b0103f9ac5138ef74a23f5678acc5762bb775e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CPLUOS/nano/pulls/20/commits","review_comments_url":"https://api.github.com/repos/CPLUOS/nano/pulls/20/comments","review_comment_url":"https://api.github.com/repos/CPLUOS/nano/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CPLUOS/nano/issues/20/comments","statuses_url":"https://api.github.com/repos/CPLUOS/nano/statuses/87db960b835de17d84d42d129e7979fcc1fa8ec2","head":{"label":"YooSunYoung:master","ref":"master","sha":"87db960b835de17d84d42d129e7979fcc1fa8ec2","user":{"login":"YooSunYoung","id":17974113,"avatar_url":"https://avatars0.githubusercontent.com/u/17974113?v=4","gravatar_id":"","url":"https://api.github.com/users/YooSunYoung","html_url":"https://github.com/YooSunYoung","followers_url":"https://api.github.com/users/YooSunYoung/followers","following_url":"https://api.github.com/users/YooSunYoung/following{/other_user}","gists_url":"https://api.github.com/users/YooSunYoung/gists{/gist_id}","starred_url":"https://api.github.com/users/YooSunYoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YooSunYoung/subscriptions","organizations_url":"https://api.github.com/users/YooSunYoung/orgs","repos_url":"https://api.github.com/users/YooSunYoung/repos","events_url":"https://api.github.com/users/YooSunYoung/events{/privacy}","received_events_url":"https://api.github.com/users/YooSunYoung/received_events","type":"User","site_admin":false},"repo":{"id":127700079,"name":"nano","full_name":"YooSunYoung/nano","owner":{"login":"YooSunYoung","id":17974113,"avatar_url":"https://avatars0.githubusercontent.com/u/17974113?v=4","gravatar_id":"","url":"https://api.github.com/users/YooSunYoung","html_url":"https://github.com/YooSunYoung","followers_url":"https://api.github.com/users/YooSunYoung/followers","following_url":"https://api.github.com/users/YooSunYoung/following{/other_user}","gists_url":"https://api.github.com/users/YooSunYoung/gists{/gist_id}","starred_url":"https://api.github.com/users/YooSunYoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YooSunYoung/subscriptions","organizations_url":"https://api.github.com/users/YooSunYoung/orgs","repos_url":"https://api.github.com/users/YooSunYoung/repos","events_url":"https://api.github.com/users/YooSunYoung/events{/privacy}","received_events_url":"https://api.github.com/users/YooSunYoung/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/YooSunYoung/nano","description":null,"fork":true,"url":"https://api.github.com/repos/YooSunYoung/nano","forks_url":"https://api.github.com/repos/YooSunYoung/nano/forks","keys_url":"https://api.github.com/repos/YooSunYoung/nano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/YooSunYoung/nano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/YooSunYoung/nano/teams","hooks_url":"https://api.github.com/repos/YooSunYoung/nano/hooks","issue_events_url":"https://api.github.com/repos/YooSunYoung/nano/issues/events{/number}","events_url":"https://api.github.com/repos/YooSunYoung/nano/events","assignees_url":"https://api.github.com/repos/YooSunYoung/nano/assignees{/user}","branches_url":"https://api.github.com/repos/YooSunYoung/nano/branches{/branch}","tags_url":"https://api.github.com/repos/YooSunYoung/nano/tags","blobs_url":"https://api.github.com/repos/YooSunYoung/nano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/YooSunYoung/nano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/YooSunYoung/nano/git/refs{/sha}","trees_url":"https://api.github.com/repos/YooSunYoung/nano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/YooSunYoung/nano/statuses/{sha}","languages_url":"https://api.github.com/repos/YooSunYoung/nano/languages","stargazers_url":"https://api.github.com/repos/YooSunYoung/nano/stargazers","contributors_url":"https://api.github.com/repos/YooSunYoung/nano/contributors","subscribers_url":"https://api.github.com/repos/YooSunYoung/nano/subscribers","subscription_url":"https://api.github.com/repos/YooSunYoung/nano/subscription","commits_url":"https://api.github.com/repos/YooSunYoung/nano/commits{/sha}","git_commits_url":"https://api.github.com/repos/YooSunYoung/nano/git/commits{/sha}","comments_url":"https://api.github.com/repos/YooSunYoung/nano/comments{/number}","issue_comment_url":"https://api.github.com/repos/YooSunYoung/nano/issues/comments{/number}","contents_url":"https://api.github.com/repos/YooSunYoung/nano/contents/{+path}","compare_url":"https://api.github.com/repos/YooSunYoung/nano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/YooSunYoung/nano/merges","archive_url":"https://api.github.com/repos/YooSunYoung/nano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/YooSunYoung/nano/downloads","issues_url":"https://api.github.com/repos/YooSunYoung/nano/issues{/number}","pulls_url":"https://api.github.com/repos/YooSunYoung/nano/pulls{/number}","milestones_url":"https://api.github.com/repos/YooSunYoung/nano/milestones{/number}","notifications_url":"https://api.github.com/repos/YooSunYoung/nano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/YooSunYoung/nano/labels{/name}","releases_url":"https://api.github.com/repos/YooSunYoung/nano/releases{/id}","deployments_url":"https://api.github.com/repos/YooSunYoung/nano/deployments","created_at":"2018-04-02T03:53:33Z","updated_at":"2018-04-16T07:54:58Z","pushed_at":"2018-04-16T07:54:57Z","git_url":"git://github.com/YooSunYoung/nano.git","ssh_url":"git@github.com:YooSunYoung/nano.git","clone_url":"https://github.com/YooSunYoung/nano.git","svn_url":"https://github.com/YooSunYoung/nano","homepage":null,"size":461,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"CPLUOS:master","ref":"master","sha":"d5e55df92a7274110682592b6a1f1381c1593803","user":{"login":"CPLUOS","id":33823127,"avatar_url":"https://avatars3.githubusercontent.com/u/33823127?v=4","gravatar_id":"","url":"https://api.github.com/users/CPLUOS","html_url":"https://github.com/CPLUOS","followers_url":"https://api.github.com/users/CPLUOS/followers","following_url":"https://api.github.com/users/CPLUOS/following{/other_user}","gists_url":"https://api.github.com/users/CPLUOS/gists{/gist_id}","starred_url":"https://api.github.com/users/CPLUOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CPLUOS/subscriptions","organizations_url":"https://api.github.com/users/CPLUOS/orgs","repos_url":"https://api.github.com/users/CPLUOS/repos","events_url":"https://api.github.com/users/CPLUOS/events{/privacy}","received_events_url":"https://api.github.com/users/CPLUOS/received_events","type":"Organization","site_admin":false},"repo":{"id":127641232,"name":"nano","full_name":"CPLUOS/nano","owner":{"login":"CPLUOS","id":33823127,"avatar_url":"https://avatars3.githubusercontent.com/u/33823127?v=4","gravatar_id":"","url":"https://api.github.com/users/CPLUOS","html_url":"https://github.com/CPLUOS","followers_url":"https://api.github.com/users/CPLUOS/followers","following_url":"https://api.github.com/users/CPLUOS/following{/other_user}","gists_url":"https://api.github.com/users/CPLUOS/gists{/gist_id}","starred_url":"https://api.github.com/users/CPLUOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CPLUOS/subscriptions","organizations_url":"https://api.github.com/users/CPLUOS/orgs","repos_url":"https://api.github.com/users/CPLUOS/repos","events_url":"https://api.github.com/users/CPLUOS/events{/privacy}","received_events_url":"https://api.github.com/users/CPLUOS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CPLUOS/nano","description":null,"fork":false,"url":"https://api.github.com/repos/CPLUOS/nano","forks_url":"https://api.github.com/repos/CPLUOS/nano/forks","keys_url":"https://api.github.com/repos/CPLUOS/nano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CPLUOS/nano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CPLUOS/nano/teams","hooks_url":"https://api.github.com/repos/CPLUOS/nano/hooks","issue_events_url":"https://api.github.com/repos/CPLUOS/nano/issues/events{/number}","events_url":"https://api.github.com/repos/CPLUOS/nano/events","assignees_url":"https://api.github.com/repos/CPLUOS/nano/assignees{/user}","branches_url":"https://api.github.com/repos/CPLUOS/nano/branches{/branch}","tags_url":"https://api.github.com/repos/CPLUOS/nano/tags","blobs_url":"https://api.github.com/repos/CPLUOS/nano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CPLUOS/nano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CPLUOS/nano/git/refs{/sha}","trees_url":"https://api.github.com/repos/CPLUOS/nano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CPLUOS/nano/statuses/{sha}","languages_url":"https://api.github.com/repos/CPLUOS/nano/languages","stargazers_url":"https://api.github.com/repos/CPLUOS/nano/stargazers","contributors_url":"https://api.github.com/repos/CPLUOS/nano/contributors","subscribers_url":"https://api.github.com/repos/CPLUOS/nano/subscribers","subscription_url":"https://api.github.com/repos/CPLUOS/nano/subscription","commits_url":"https://api.github.com/repos/CPLUOS/nano/commits{/sha}","git_commits_url":"https://api.github.com/repos/CPLUOS/nano/git/commits{/sha}","comments_url":"https://api.github.com/repos/CPLUOS/nano/comments{/number}","issue_comment_url":"https://api.github.com/repos/CPLUOS/nano/issues/comments{/number}","contents_url":"https://api.github.com/repos/CPLUOS/nano/contents/{+path}","compare_url":"https://api.github.com/repos/CPLUOS/nano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CPLUOS/nano/merges","archive_url":"https://api.github.com/repos/CPLUOS/nano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CPLUOS/nano/downloads","issues_url":"https://api.github.com/repos/CPLUOS/nano/issues{/number}","pulls_url":"https://api.github.com/repos/CPLUOS/nano/pulls{/number}","milestones_url":"https://api.github.com/repos/CPLUOS/nano/milestones{/number}","notifications_url":"https://api.github.com/repos/CPLUOS/nano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CPLUOS/nano/labels{/name}","releases_url":"https://api.github.com/repos/CPLUOS/nano/releases{/id}","deployments_url":"https://api.github.com/repos/CPLUOS/nano/deployments","created_at":"2018-04-01T15:21:21Z","updated_at":"2018-04-13T14:54:56Z","pushed_at":"2018-04-16T07:55:29Z","git_url":"git://github.com/CPLUOS/nano.git","ssh_url":"git@github.com:CPLUOS/nano.git","clone_url":"https://github.com/CPLUOS/nano.git","svn_url":"https://github.com/CPLUOS/nano","homepage":null,"size":408,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":10,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CPLUOS/nano/pulls/20"},"html":{"href":"https://github.com/CPLUOS/nano/pull/20"},"issue":{"href":"https://api.github.com/repos/CPLUOS/nano/issues/20"},"comments":{"href":"https://api.github.com/repos/CPLUOS/nano/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/CPLUOS/nano/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/CPLUOS/nano/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CPLUOS/nano/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/CPLUOS/nano/statuses/87db960b835de17d84d42d129e7979fcc1fa8ec2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"watson-ij"}}