{"action":"created","comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/183142597","pull_request_review_id":114091667,"id":183142597,"diff_hunk":"@@ -0,0 +1,168 @@\n+#include <limits>\n+#include \"FWCore/ParameterSet/interface/FileInPath.h\"\n+#include \"FWCore/MessageLogger/interface/MessageLogger.h\"\n+#include \"L1Trigger/L1THGCal/interface/be_algorithms/HGCalTriggerClusterIdentificationBase.h\"\n+#include \"L1Trigger/L1THGCal/interface/HGCalTriggerTools.h\"\n+#include \"CommonTools/Utils/interface/TMVAEvaluator.h\"\n+\n+\n+\n+class HGCalTriggerClusterIdentificationBDT : public HGCalTriggerClusterIdentificationBase\n+{\n+\n+  public:\n+    class Category\n+    {\n+      public:\n+        Category(float pt_min, float pt_max, float eta_min, float eta_max):\n+          pt_min_(pt_min), pt_max_(pt_max), \n+          eta_min_(eta_min), eta_max_(eta_max)\n+        {\n+        }\n+        ~Category(){}\n+        bool contains(float pt, float eta) const\n+        {\n+          bool output = true;\n+          if(pt<pt_min_ || pt>=pt_max_) output = false;\n+          if(std::abs(eta)<eta_min_ || std::abs(eta)>=eta_max_) output = false;\n+          return output;\n+        }\n+\n+        float pt_min() const {return pt_min_;}\n+        float pt_max() const {return pt_max_;}\n+        float eta_min() const {return eta_min_;}\n+        float eta_max() const {return eta_max_;}\n+\n+      private:\n+        float pt_min_ = 0.;\n+        float pt_max_ = std::numeric_limits<float>::max();\n+        float eta_min_ = 1.5;\n+        float eta_max_ = 3.;\n+    };\n+\n+  public:\n+\n+    HGCalTriggerClusterIdentificationBDT();\n+    ~HGCalTriggerClusterIdentificationBDT() override{};\n+    void initialize(const edm::ParameterSet& conf) final;\n+    float value(const l1t::HGCalMulticluster& cluster) const final;\n+    bool decision(const l1t::HGCalMulticluster& cluster) const final;\n+\n+  private:\n+    std::vector<Category> categories_;\n+    std::vector<std::unique_ptr<TMVAEvaluator>> bdts_;\n+    std::vector<double> working_points_;\n+    std::vector<std::string> input_variables_;\n+\n+    float clusterVariable(const std::string&, const l1t::HGCalMulticluster&) const;\n+    int category(float pt, float eta) const;\n+\n+\n+};\n+\n+DEFINE_EDM_PLUGIN(HGCalTriggerClusterIdentificationFactory,","path":"L1Trigger/L1THGCal/plugins/be_algorithms/HGCalTriggerClusterIdentificationBDT.cc","position":63,"original_position":63,"commit_id":"d3d134dd12361954d3364d8a31ed35c5220abd3a","original_commit_id":"d3d134dd12361954d3364d8a31ed35c5220abd3a","user":{"login":"kpedro88","id":4672808,"avatar_url":"https://avatars0.githubusercontent.com/u/4672808?v=4","gravatar_id":"","url":"https://api.github.com/users/kpedro88","html_url":"https://github.com/kpedro88","followers_url":"https://api.github.com/users/kpedro88/followers","following_url":"https://api.github.com/users/kpedro88/following{/other_user}","gists_url":"https://api.github.com/users/kpedro88/gists{/gist_id}","starred_url":"https://api.github.com/users/kpedro88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpedro88/subscriptions","organizations_url":"https://api.github.com/users/kpedro88/orgs","repos_url":"https://api.github.com/users/kpedro88/repos","events_url":"https://api.github.com/users/kpedro88/events{/privacy}","received_events_url":"https://api.github.com/users/kpedro88/received_events","type":"User","site_admin":false},"body":"you could define your own macro with the first argument (factory type) fixed, to simplify the definitions\r\n(assuming this factory will be used more in the future)","created_at":"2018-04-20T19:02:09Z","updated_at":"2018-04-20T19:30:25Z","html_url":"https://github.com/cms-sw/cmssw/pull/23024#discussion_r183142597","pull_request_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/23024","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/183142597"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/23024#discussion_r183142597"},"pull_request":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/23024"}}},"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/23024","id":183091795,"html_url":"https://github.com/cms-sw/cmssw/pull/23024","diff_url":"https://github.com/cms-sw/cmssw/pull/23024.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/23024.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/23024","number":23024,"state":"open","locked":false,"title":"HGCAL trigger: EM cluster identification","user":{"login":"jbsauvan","id":5569798,"avatar_url":"https://avatars3.githubusercontent.com/u/5569798?v=4","gravatar_id":"","url":"https://api.github.com/users/jbsauvan","html_url":"https://github.com/jbsauvan","followers_url":"https://api.github.com/users/jbsauvan/followers","following_url":"https://api.github.com/users/jbsauvan/following{/other_user}","gists_url":"https://api.github.com/users/jbsauvan/gists{/gist_id}","starred_url":"https://api.github.com/users/jbsauvan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbsauvan/subscriptions","organizations_url":"https://api.github.com/users/jbsauvan/orgs","repos_url":"https://api.github.com/users/jbsauvan/repos","events_url":"https://api.github.com/users/jbsauvan/events{/privacy}","received_events_url":"https://api.github.com/users/jbsauvan/received_events","type":"User","site_admin":false},"body":"Add identification of electromagnetic clusters based on BDTs.\r\n\r\nDepends on external cms-data/L1Trigger-L1THGCal#7","created_at":"2018-04-20T15:11:23Z","updated_at":"2018-04-20T19:30:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41118f82c092e72a652a415a165f577888f3afc3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":673935047,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/code-checks-approved","name":"code-checks-approved","color":"2cbe4e","default":false},{"id":88653795,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/comparison-pending","name":"comparison-pending","color":"fbca04","default":false},{"id":52820587,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/l1-pending","name":"l1-pending","color":"fbca04","default":false},{"id":56953091,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/orp-pending","name":"orp-pending","color":"fbca04","default":false},{"id":53167770,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/pending-signatures","name":"pending-signatures","color":"ff8000","default":false},{"id":56131152,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/tests-pending","name":"tests-pending","color":"fbca04","default":false},{"id":530655448,"url":"https://api.github.com/repos/cms-sw/cmssw/labels/upgrade-pending","name":"upgrade-pending","color":"fbca04","default":false}],"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/76","html_url":"https://github.com/cms-sw/cmssw/milestone/76","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/76/labels","id":3227631,"number":76,"title":"CMSSW_10_2_X","description":null,"creator":{"login":"smuzaffar","id":4115138,"avatar_url":"https://avatars3.githubusercontent.com/u/4115138?v=4","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":61,"closed_issues":173,"state":"open","created_at":"2018-03-29T07:57:10Z","updated_at":"2018-04-20T16:14:45Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/23024/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/23024/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/23024/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/d3d134dd12361954d3364d8a31ed35c5220abd3a","head":{"label":"PFCal-dev:hgc-tpg-integration-180420","ref":"hgc-tpg-integration-180420","sha":"d3d134dd12361954d3364d8a31ed35c5220abd3a","user":{"login":"PFCal-dev","id":5971108,"avatar_url":"https://avatars1.githubusercontent.com/u/5971108?v=4","gravatar_id":"","url":"https://api.github.com/users/PFCal-dev","html_url":"https://github.com/PFCal-dev","followers_url":"https://api.github.com/users/PFCal-dev/followers","following_url":"https://api.github.com/users/PFCal-dev/following{/other_user}","gists_url":"https://api.github.com/users/PFCal-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/PFCal-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PFCal-dev/subscriptions","organizations_url":"https://api.github.com/users/PFCal-dev/orgs","repos_url":"https://api.github.com/users/PFCal-dev/repos","events_url":"https://api.github.com/users/PFCal-dev/events{/privacy}","received_events_url":"https://api.github.com/users/PFCal-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":14498276,"name":"cmssw","full_name":"PFCal-dev/cmssw","owner":{"login":"PFCal-dev","id":5971108,"avatar_url":"https://avatars1.githubusercontent.com/u/5971108?v=4","gravatar_id":"","url":"https://api.github.com/users/PFCal-dev","html_url":"https://github.com/PFCal-dev","followers_url":"https://api.github.com/users/PFCal-dev/followers","following_url":"https://api.github.com/users/PFCal-dev/following{/other_user}","gists_url":"https://api.github.com/users/PFCal-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/PFCal-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PFCal-dev/subscriptions","organizations_url":"https://api.github.com/users/PFCal-dev/orgs","repos_url":"https://api.github.com/users/PFCal-dev/repos","events_url":"https://api.github.com/users/PFCal-dev/events{/privacy}","received_events_url":"https://api.github.com/users/PFCal-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PFCal-dev/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/PFCal-dev/cmssw","forks_url":"https://api.github.com/repos/PFCal-dev/cmssw/forks","keys_url":"https://api.github.com/repos/PFCal-dev/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PFCal-dev/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PFCal-dev/cmssw/teams","hooks_url":"https://api.github.com/repos/PFCal-dev/cmssw/hooks","issue_events_url":"https://api.github.com/repos/PFCal-dev/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/PFCal-dev/cmssw/events","assignees_url":"https://api.github.com/repos/PFCal-dev/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/PFCal-dev/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/PFCal-dev/cmssw/tags","blobs_url":"https://api.github.com/repos/PFCal-dev/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PFCal-dev/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PFCal-dev/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/PFCal-dev/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PFCal-dev/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/PFCal-dev/cmssw/languages","stargazers_url":"https://api.github.com/repos/PFCal-dev/cmssw/stargazers","contributors_url":"https://api.github.com/repos/PFCal-dev/cmssw/contributors","subscribers_url":"https://api.github.com/repos/PFCal-dev/cmssw/subscribers","subscription_url":"https://api.github.com/repos/PFCal-dev/cmssw/subscription","commits_url":"https://api.github.com/repos/PFCal-dev/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/PFCal-dev/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/PFCal-dev/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/PFCal-dev/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/PFCal-dev/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/PFCal-dev/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PFCal-dev/cmssw/merges","archive_url":"https://api.github.com/repos/PFCal-dev/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PFCal-dev/cmssw/downloads","issues_url":"https://api.github.com/repos/PFCal-dev/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/PFCal-dev/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/PFCal-dev/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/PFCal-dev/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PFCal-dev/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/PFCal-dev/cmssw/releases{/id}","deployments_url":"https://api.github.com/repos/PFCal-dev/cmssw/deployments","created_at":"2013-11-18T16:34:32Z","updated_at":"2018-04-19T08:00:26Z","pushed_at":"2018-04-20T14:59:47Z","git_url":"git://github.com/PFCal-dev/cmssw.git","ssh_url":"git@github.com:PFCal-dev/cmssw.git","clone_url":"https://github.com/PFCal-dev/cmssw.git","svn_url":"https://github.com/PFCal-dev/cmssw","homepage":"cms-sw.github.io/cmssw","size":965061,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":1,"open_issues":13,"watchers":4,"default_branch":"hgc-tpg-devel-CMSSW_10_1_0_pre3"}},"base":{"label":"cms-sw:master","ref":"master","sha":"7ecedc222d7fc05b9fbc8ea906e2806a97fa8e38","user":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars0.githubusercontent.com/u/3863500?v=4","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://avatars0.githubusercontent.com/u/3863500?v=4","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":"2018-04-20T16:15:03Z","pushed_at":"2018-04-20T19:21:16Z","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":998560,"stargazers_count":545,"watchers_count":545,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2541,"mirror_url":null,"archived":false,"open_issues_count":454,"license":null,"forks":2541,"open_issues":454,"watchers":545,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/23024"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/23024"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/23024"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/23024/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/23024/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/23024/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/d3d134dd12361954d3364d8a31ed35c5220abd3a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kpedro88"}}