{"action":"created","comment":{"url":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/comments/174238216","pull_request_review_id":103528493,"id":174238216,"diff_hunk":"@@ -32,60 +82,88 @@ void TriggerTools::Initialize(const edm::Event &_iEvent)\n     iEvent->getByToken(triggerPrescales_token, triggerPrescales);\n     iEvent->getByToken(triggerObjects_token, triggerObjects);\n     iEvent->getByToken(l1JetParticles_token, l1JetParticles);\n-}\n \n-void TriggerTools::SetTriggerAcceptBits(const analysis::TriggerDescriptors& descriptors,\n-                                        analysis::TriggerResults& results)\n-{\n-    const auto& triggerResultsHLT = triggerResultsMap.at(CMSSW_Process::HLT);\n-    const edm::TriggerNames& triggerNames = iEvent->triggerNames(*triggerResultsHLT);\n+    static const std::map<analysis::LegType,std::set<trigger::TriggerObjectType>> map_legType_triggerObjType\n+            = {\n+               { analysis::LegType::e, { trigger::TriggerElectron, trigger::TriggerCluster } },\n+               { analysis::LegType::mu, { trigger::TriggerMuon } },\n+               { analysis::LegType::tau, { trigger::TriggerTau } }\n+              };\n \n-    for (size_t i = 0; i < triggerResultsHLT->size(); ++i) {\n-        if(triggerPrescales->getPrescaleForIndex(i) != 1) continue;\n-        size_t index;\n-        if(descriptors.FindPatternMatch(triggerNames.triggerName(i), index))\n-            results.SetAccept(index, triggerResultsHLT->accept(i));\n-    }\n-}\n-\n-TriggerTools::TriggerObjectSet TriggerTools::FindMatchingTriggerObjects(\n-        const TriggerDescriptors& descriptors, size_t path_index,\n-        const std::set<trigger::TriggerObjectType>& objectTypes, const LorentzVector& candidateMomentum,\n-        size_t leg_id, double deltaR_Limit)\n-{\n-    const auto hasExpectedType = [&](const pat::TriggerObjectStandAlone& triggerObject) {\n-        for(auto type : objectTypes)\n-            if(triggerObject.type(type)) return true;\n-        return false;\n+    const auto hasExpectedType = [&](const LegType& legType, const pat::TriggerObjectStandAlone& triggerObject) {\n+            for(auto type : map_legType_triggerObjType.at(legType))\n+                if(triggerObject.type(type)) return true;\n+            return false;\n     };\n \n-    const auto& filters = descriptors.GetFilters(path_index, leg_id);\n-    const auto passFilters = [&](const pat::TriggerObjectStandAlone& triggerObject) {\n+\n+    const auto passFilters = [&](const pat::TriggerObjectStandAlone& triggerObject,\n+            const TriggerDescriptorCollection::FilterVector& filters) {\n         for(const auto& filter : filters)\n             if(!triggerObject.hasFilterLabel(filter)) return false;\n         return true;\n     };\n-    \n-    TriggerObjectSet matches;\n+\n+","path":"Production/src/TriggerTools.cc","position":127,"original_position":127,"commit_id":"0d6f660530c6def1c99f7709f5f6b4342336a45d","original_commit_id":"0d6f660530c6def1c99f7709f5f6b4342336a45d","user":{"login":"kandrosov","id":6347415,"avatar_url":"https://avatars0.githubusercontent.com/u/6347415?v=4","gravatar_id":"","url":"https://api.github.com/users/kandrosov","html_url":"https://github.com/kandrosov","followers_url":"https://api.github.com/users/kandrosov/followers","following_url":"https://api.github.com/users/kandrosov/following{/other_user}","gists_url":"https://api.github.com/users/kandrosov/gists{/gist_id}","starred_url":"https://api.github.com/users/kandrosov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kandrosov/subscriptions","organizations_url":"https://api.github.com/users/kandrosov/orgs","repos_url":"https://api.github.com/users/kandrosov/repos","events_url":"https://api.github.com/users/kandrosov/events{/privacy}","received_events_url":"https://api.github.com/users/kandrosov/received_events","type":"User","site_admin":false},"body":"sets in path_legId_triggerObjPtr_map should be cleared before for","created_at":"2018-03-13T18:25:41Z","updated_at":"2018-03-13T18:36:02Z","html_url":"https://github.com/hh-italian-group/h-tautau/pull/39#discussion_r174238216","pull_request_url":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/39","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/comments/174238216"},"html":{"href":"https://github.com/hh-italian-group/h-tautau/pull/39#discussion_r174238216"},"pull_request":{"href":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/39","id":174720266,"html_url":"https://github.com/hh-italian-group/h-tautau/pull/39","diff_url":"https://github.com/hh-italian-group/h-tautau/pull/39.diff","patch_url":"https://github.com/hh-italian-group/h-tautau/pull/39.patch","issue_url":"https://api.github.com/repos/hh-italian-group/h-tautau/issues/39","number":39,"state":"open","locked":false,"title":"Prod v4 Trigger match review for 2017","user":{"login":"mgrippo","id":6523611,"avatar_url":"https://avatars2.githubusercontent.com/u/6523611?v=4","gravatar_id":"","url":"https://api.github.com/users/mgrippo","html_url":"https://github.com/mgrippo","followers_url":"https://api.github.com/users/mgrippo/followers","following_url":"https://api.github.com/users/mgrippo/following{/other_user}","gists_url":"https://api.github.com/users/mgrippo/gists{/gist_id}","starred_url":"https://api.github.com/users/mgrippo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgrippo/subscriptions","organizations_url":"https://api.github.com/users/mgrippo/orgs","repos_url":"https://api.github.com/users/mgrippo/repos","events_url":"https://api.github.com/users/mgrippo/events{/privacy}","received_events_url":"https://api.github.com/users/mgrippo/received_events","type":"User","site_admin":false},"body":"Big change in trigger match structure and pt cuts, for 2017 and also 2016. For 2017 introduced new triggers","created_at":"2018-03-13T16:40:59Z","updated_at":"2018-03-13T18:36:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca9ac66d7a5d7d435b7b6220b8e4f1605418f2f1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/39/commits","review_comments_url":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/39/comments","review_comment_url":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hh-italian-group/h-tautau/issues/39/comments","statuses_url":"https://api.github.com/repos/hh-italian-group/h-tautau/statuses/0d6f660530c6def1c99f7709f5f6b4342336a45d","head":{"label":"mgrippo:prod_v4_2017_trigger","ref":"prod_v4_2017_trigger","sha":"0d6f660530c6def1c99f7709f5f6b4342336a45d","user":{"login":"mgrippo","id":6523611,"avatar_url":"https://avatars2.githubusercontent.com/u/6523611?v=4","gravatar_id":"","url":"https://api.github.com/users/mgrippo","html_url":"https://github.com/mgrippo","followers_url":"https://api.github.com/users/mgrippo/followers","following_url":"https://api.github.com/users/mgrippo/following{/other_user}","gists_url":"https://api.github.com/users/mgrippo/gists{/gist_id}","starred_url":"https://api.github.com/users/mgrippo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgrippo/subscriptions","organizations_url":"https://api.github.com/users/mgrippo/orgs","repos_url":"https://api.github.com/users/mgrippo/repos","events_url":"https://api.github.com/users/mgrippo/events{/privacy}","received_events_url":"https://api.github.com/users/mgrippo/received_events","type":"User","site_admin":false},"repo":{"id":83303139,"name":"h-tautau","full_name":"mgrippo/h-tautau","owner":{"login":"mgrippo","id":6523611,"avatar_url":"https://avatars2.githubusercontent.com/u/6523611?v=4","gravatar_id":"","url":"https://api.github.com/users/mgrippo","html_url":"https://github.com/mgrippo","followers_url":"https://api.github.com/users/mgrippo/followers","following_url":"https://api.github.com/users/mgrippo/following{/other_user}","gists_url":"https://api.github.com/users/mgrippo/gists{/gist_id}","starred_url":"https://api.github.com/users/mgrippo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgrippo/subscriptions","organizations_url":"https://api.github.com/users/mgrippo/orgs","repos_url":"https://api.github.com/users/mgrippo/repos","events_url":"https://api.github.com/users/mgrippo/events{/privacy}","received_events_url":"https://api.github.com/users/mgrippo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mgrippo/h-tautau","description":"Higgs to tautau analyses","fork":true,"url":"https://api.github.com/repos/mgrippo/h-tautau","forks_url":"https://api.github.com/repos/mgrippo/h-tautau/forks","keys_url":"https://api.github.com/repos/mgrippo/h-tautau/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mgrippo/h-tautau/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mgrippo/h-tautau/teams","hooks_url":"https://api.github.com/repos/mgrippo/h-tautau/hooks","issue_events_url":"https://api.github.com/repos/mgrippo/h-tautau/issues/events{/number}","events_url":"https://api.github.com/repos/mgrippo/h-tautau/events","assignees_url":"https://api.github.com/repos/mgrippo/h-tautau/assignees{/user}","branches_url":"https://api.github.com/repos/mgrippo/h-tautau/branches{/branch}","tags_url":"https://api.github.com/repos/mgrippo/h-tautau/tags","blobs_url":"https://api.github.com/repos/mgrippo/h-tautau/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mgrippo/h-tautau/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mgrippo/h-tautau/git/refs{/sha}","trees_url":"https://api.github.com/repos/mgrippo/h-tautau/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mgrippo/h-tautau/statuses/{sha}","languages_url":"https://api.github.com/repos/mgrippo/h-tautau/languages","stargazers_url":"https://api.github.com/repos/mgrippo/h-tautau/stargazers","contributors_url":"https://api.github.com/repos/mgrippo/h-tautau/contributors","subscribers_url":"https://api.github.com/repos/mgrippo/h-tautau/subscribers","subscription_url":"https://api.github.com/repos/mgrippo/h-tautau/subscription","commits_url":"https://api.github.com/repos/mgrippo/h-tautau/commits{/sha}","git_commits_url":"https://api.github.com/repos/mgrippo/h-tautau/git/commits{/sha}","comments_url":"https://api.github.com/repos/mgrippo/h-tautau/comments{/number}","issue_comment_url":"https://api.github.com/repos/mgrippo/h-tautau/issues/comments{/number}","contents_url":"https://api.github.com/repos/mgrippo/h-tautau/contents/{+path}","compare_url":"https://api.github.com/repos/mgrippo/h-tautau/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mgrippo/h-tautau/merges","archive_url":"https://api.github.com/repos/mgrippo/h-tautau/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mgrippo/h-tautau/downloads","issues_url":"https://api.github.com/repos/mgrippo/h-tautau/issues{/number}","pulls_url":"https://api.github.com/repos/mgrippo/h-tautau/pulls{/number}","milestones_url":"https://api.github.com/repos/mgrippo/h-tautau/milestones{/number}","notifications_url":"https://api.github.com/repos/mgrippo/h-tautau/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mgrippo/h-tautau/labels{/name}","releases_url":"https://api.github.com/repos/mgrippo/h-tautau/releases{/id}","deployments_url":"https://api.github.com/repos/mgrippo/h-tautau/deployments","created_at":"2017-02-27T11:31:05Z","updated_at":"2017-02-27T11:31:07Z","pushed_at":"2018-03-13T15:47:01Z","git_url":"git://github.com/mgrippo/h-tautau.git","ssh_url":"git@github.com:mgrippo/h-tautau.git","clone_url":"https://github.com/mgrippo/h-tautau.git","svn_url":"https://github.com/mgrippo/h-tautau","homepage":"","size":12919,"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":"hh-italian-group:prod_v4_2017","ref":"prod_v4_2017","sha":"254ad3b4c9f21ae3b1c18acb5e6693342d67b066","user":{"login":"hh-italian-group","id":9250152,"avatar_url":"https://avatars3.githubusercontent.com/u/9250152?v=4","gravatar_id":"","url":"https://api.github.com/users/hh-italian-group","html_url":"https://github.com/hh-italian-group","followers_url":"https://api.github.com/users/hh-italian-group/followers","following_url":"https://api.github.com/users/hh-italian-group/following{/other_user}","gists_url":"https://api.github.com/users/hh-italian-group/gists{/gist_id}","starred_url":"https://api.github.com/users/hh-italian-group/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hh-italian-group/subscriptions","organizations_url":"https://api.github.com/users/hh-italian-group/orgs","repos_url":"https://api.github.com/users/hh-italian-group/repos","events_url":"https://api.github.com/users/hh-italian-group/events{/privacy}","received_events_url":"https://api.github.com/users/hh-italian-group/received_events","type":"Organization","site_admin":false},"repo":{"id":47543330,"name":"h-tautau","full_name":"hh-italian-group/h-tautau","owner":{"login":"hh-italian-group","id":9250152,"avatar_url":"https://avatars3.githubusercontent.com/u/9250152?v=4","gravatar_id":"","url":"https://api.github.com/users/hh-italian-group","html_url":"https://github.com/hh-italian-group","followers_url":"https://api.github.com/users/hh-italian-group/followers","following_url":"https://api.github.com/users/hh-italian-group/following{/other_user}","gists_url":"https://api.github.com/users/hh-italian-group/gists{/gist_id}","starred_url":"https://api.github.com/users/hh-italian-group/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hh-italian-group/subscriptions","organizations_url":"https://api.github.com/users/hh-italian-group/orgs","repos_url":"https://api.github.com/users/hh-italian-group/repos","events_url":"https://api.github.com/users/hh-italian-group/events{/privacy}","received_events_url":"https://api.github.com/users/hh-italian-group/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hh-italian-group/h-tautau","description":"Higgs to tautau analyses","fork":false,"url":"https://api.github.com/repos/hh-italian-group/h-tautau","forks_url":"https://api.github.com/repos/hh-italian-group/h-tautau/forks","keys_url":"https://api.github.com/repos/hh-italian-group/h-tautau/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hh-italian-group/h-tautau/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hh-italian-group/h-tautau/teams","hooks_url":"https://api.github.com/repos/hh-italian-group/h-tautau/hooks","issue_events_url":"https://api.github.com/repos/hh-italian-group/h-tautau/issues/events{/number}","events_url":"https://api.github.com/repos/hh-italian-group/h-tautau/events","assignees_url":"https://api.github.com/repos/hh-italian-group/h-tautau/assignees{/user}","branches_url":"https://api.github.com/repos/hh-italian-group/h-tautau/branches{/branch}","tags_url":"https://api.github.com/repos/hh-italian-group/h-tautau/tags","blobs_url":"https://api.github.com/repos/hh-italian-group/h-tautau/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hh-italian-group/h-tautau/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hh-italian-group/h-tautau/git/refs{/sha}","trees_url":"https://api.github.com/repos/hh-italian-group/h-tautau/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hh-italian-group/h-tautau/statuses/{sha}","languages_url":"https://api.github.com/repos/hh-italian-group/h-tautau/languages","stargazers_url":"https://api.github.com/repos/hh-italian-group/h-tautau/stargazers","contributors_url":"https://api.github.com/repos/hh-italian-group/h-tautau/contributors","subscribers_url":"https://api.github.com/repos/hh-italian-group/h-tautau/subscribers","subscription_url":"https://api.github.com/repos/hh-italian-group/h-tautau/subscription","commits_url":"https://api.github.com/repos/hh-italian-group/h-tautau/commits{/sha}","git_commits_url":"https://api.github.com/repos/hh-italian-group/h-tautau/git/commits{/sha}","comments_url":"https://api.github.com/repos/hh-italian-group/h-tautau/comments{/number}","issue_comment_url":"https://api.github.com/repos/hh-italian-group/h-tautau/issues/comments{/number}","contents_url":"https://api.github.com/repos/hh-italian-group/h-tautau/contents/{+path}","compare_url":"https://api.github.com/repos/hh-italian-group/h-tautau/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hh-italian-group/h-tautau/merges","archive_url":"https://api.github.com/repos/hh-italian-group/h-tautau/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hh-italian-group/h-tautau/downloads","issues_url":"https://api.github.com/repos/hh-italian-group/h-tautau/issues{/number}","pulls_url":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls{/number}","milestones_url":"https://api.github.com/repos/hh-italian-group/h-tautau/milestones{/number}","notifications_url":"https://api.github.com/repos/hh-italian-group/h-tautau/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hh-italian-group/h-tautau/labels{/name}","releases_url":"https://api.github.com/repos/hh-italian-group/h-tautau/releases{/id}","deployments_url":"https://api.github.com/repos/hh-italian-group/h-tautau/deployments","created_at":"2015-12-07T09:46:12Z","updated_at":"2016-10-31T20:21:38Z","pushed_at":"2018-03-13T16:41:00Z","git_url":"git://github.com/hh-italian-group/h-tautau.git","ssh_url":"git@github.com:hh-italian-group/h-tautau.git","clone_url":"https://github.com/hh-italian-group/h-tautau.git","svn_url":"https://github.com/hh-italian-group/h-tautau","homepage":"","size":8573,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":5,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/39"},"html":{"href":"https://github.com/hh-italian-group/h-tautau/pull/39"},"issue":{"href":"https://api.github.com/repos/hh-italian-group/h-tautau/issues/39"},"comments":{"href":"https://api.github.com/repos/hh-italian-group/h-tautau/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hh-italian-group/h-tautau/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/hh-italian-group/h-tautau/statuses/0d6f660530c6def1c99f7709f5f6b4342336a45d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kandrosov"}}