{"action":"created","comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/23127774","id":23127774,"diff_hunk":"@@ -0,0 +1,1154 @@\n+#include \"SimMuon/MCTruth/interface/MuonAssociatorByHitsHelper.h\"\n+#include \"FWCore/MessageLogger/interface/MessageLogger.h\"\n+#include \"Geometry/CommonDetUnit/interface/GeomDetUnit.h\"\n+#include \"DataFormats/DetId/interface/DetId.h\"\n+#include \"DataFormats/MuonDetId/interface/MuonSubdetId.h\"\n+#include \"Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h\"\n+#include \"DataFormats/SiStripDetId/interface/StripSubdetector.h\"\n+#include \"DataFormats/SiPixelDetId/interface/PixelSubdetector.h\"\n+#include \"DataFormats/TrackerCommon/interface/TrackerTopology.h\"\n+#include \"DataFormats/DTRecHit/interface/DTRecSegment4D.h\"\n+#include \"DataFormats/CSCRecHit/interface/CSCSegment.h\"\n+#include <sstream>\n+\n+using namespace reco;\n+using namespace std;\n+\n+MuonAssociatorByHitsHelper::MuonAssociatorByHitsHelper (const edm::ParameterSet& conf) :  \n+  includeZeroHitMuons(conf.getParameter<bool>(\"includeZeroHitMuons\")),\n+  acceptOneStubMatchings(conf.getParameter<bool>(\"acceptOneStubMatchings\")),\n+  UseTracker(conf.getParameter<bool>(\"UseTracker\")),\n+  UseMuon(conf.getParameter<bool>(\"UseMuon\")),\n+  AbsoluteNumberOfHits_track(conf.getParameter<bool>(\"AbsoluteNumberOfHits_track\")),\n+  NHitCut_track(conf.getParameter<unsigned int>(\"NHitCut_track\")),\n+  EfficiencyCut_track(conf.getParameter<double>(\"EfficiencyCut_track\")),\n+  PurityCut_track(conf.getParameter<double>(\"PurityCut_track\")),\n+  AbsoluteNumberOfHits_muon(conf.getParameter<bool>(\"AbsoluteNumberOfHits_muon\")),\n+  NHitCut_muon(conf.getParameter<unsigned int>(\"NHitCut_muon\")),\n+  EfficiencyCut_muon(conf.getParameter<double>(\"EfficiencyCut_muon\")),\n+  PurityCut_muon(conf.getParameter<double>(\"PurityCut_muon\")),\n+  UsePixels(conf.getParameter<bool>(\"UsePixels\")),\n+  UseGrouped(conf.getParameter<bool>(\"UseGrouped\")),\n+  UseSplitting(conf.getParameter<bool>(\"UseSplitting\")),\n+  ThreeHitTracksAreSpecial(conf.getParameter<bool>(\"ThreeHitTracksAreSpecial\")),\n+  dumpDT(conf.getParameter<bool>(\"dumpDT\"))\n+{\n+  edm::LogVerbatim(\"MuonAssociatorByHitsHelper\") << \"constructing  MuonAssociatorByHitsHelper\" << conf.dump();\n+\n+  // up to the user in the other cases - print a message\n+  if (UseTracker) edm::LogVerbatim(\"MuonAssociatorByHitsHelper\")<<\"\\n UseTracker = TRUE  : Tracker SimHits and RecHits WILL be counted\";\n+  else edm::LogVerbatim(\"MuonAssociatorByHitsHelper\") <<\"\\n UseTracker = FALSE : Tracker SimHits and RecHits WILL NOT be counted\";\n+  \n+  // up to the user in the other cases - print a message\n+  if (UseMuon) edm::LogVerbatim(\"MuonAssociatorByHitsHelper\")<<\" UseMuon = TRUE  : Muon SimHits and RecHits WILL be counted\";\n+  else edm::LogVerbatim(\"MuonAssociatorByHitsHelper\") <<\" UseMuon = FALSE : Muon SimHits and RecHits WILL NOT be counted\"<<endl;\n+  \n+  // check consistency of the configuration when allowing zero-hit muon matching (counting invalid hits)\n+  if (includeZeroHitMuons) {\n+    edm::LogVerbatim(\"MuonAssociatorByHitsHelper\") \n+      <<\"\\n includeZeroHitMuons = TRUE\"\n+      <<\"\\n ==> (re)set NHitCut_muon = 0, PurityCut_muon = 0, EfficiencyCut_muon = 0\"<<endl;\n+    NHitCut_muon = 0;\n+    PurityCut_muon = 0.;\n+    EfficiencyCut_muon = 0.;\n+  }\n+\n+}","path":"SimMuon/MCTruth/src/MuonAssociatorByHitsHelper.cc","position":56,"original_position":56,"commit_id":"d27695186f631bde412f573769b2d625b3236d95","original_commit_id":"594732563f79e3254557f4dc8e3cd9575ea49f30","user":{"login":"Dr15Jones","id":3757616,"avatar_url":"https://avatars.githubusercontent.com/u/3757616?v=3","gravatar_id":"","url":"https://api.github.com/users/Dr15Jones","html_url":"https://github.com/Dr15Jones","followers_url":"https://api.github.com/users/Dr15Jones/followers","following_url":"https://api.github.com/users/Dr15Jones/following{/other_user}","gists_url":"https://api.github.com/users/Dr15Jones/gists{/gist_id}","starred_url":"https://api.github.com/users/Dr15Jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dr15Jones/subscriptions","organizations_url":"https://api.github.com/users/Dr15Jones/orgs","repos_url":"https://api.github.com/users/Dr15Jones/repos","events_url":"https://api.github.com/users/Dr15Jones/events{/privacy}","received_events_url":"https://api.github.com/users/Dr15Jones/received_events","type":"User","site_admin":false},"body":"I added back the ability to get the diagnostic print outs. It is now done by passing an optional std::function to MuonAssociatorByHitsHelper which can do the dump.","created_at":"2015-01-17T19:26:25Z","updated_at":"2015-01-17T19:26:25Z","html_url":"https://github.com/cms-sw/cmssw/pull/7175#discussion_r23127774","pull_request_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/7175","_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/23127774"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/7175#discussion_r23127774"},"pull_request":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/7175"}}},"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/7175","id":27384702,"html_url":"https://github.com/cms-sw/cmssw/pull/7175","diff_url":"https://github.com/cms-sw/cmssw/pull/7175.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/7175.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/7175","number":7175,"state":"open","locked":false,"title":"Event based track and muon to simulation associators","user":{"login":"Dr15Jones","id":3757616,"avatar_url":"https://avatars.githubusercontent.com/u/3757616?v=3","gravatar_id":"","url":"https://api.github.com/users/Dr15Jones","html_url":"https://github.com/Dr15Jones","followers_url":"https://api.github.com/users/Dr15Jones/followers","following_url":"https://api.github.com/users/Dr15Jones/following{/other_user}","gists_url":"https://api.github.com/users/Dr15Jones/gists{/gist_id}","starred_url":"https://api.github.com/users/Dr15Jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dr15Jones/subscriptions","organizations_url":"https://api.github.com/users/Dr15Jones/orgs","repos_url":"https://api.github.com/users/Dr15Jones/repos","events_url":"https://api.github.com/users/Dr15Jones/events{/privacy}","received_events_url":"https://api.github.com/users/Dr15Jones/received_events","type":"User","site_admin":false},"body":"Replaced TrackAssociatorBase class with three classes which are obtained from the Event. This allows\r\nmodules to properly register their 'consumes'.\r\nThis change should give identical results to the previous implementation.","created_at":"2015-01-14T21:24:38Z","updated_at":"2015-01-17T19:26:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61165b129757812799532db746c9f15b00bf909c","assignee":null,"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/50","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/50/labels","id":875803,"number":50,"title":"Next CMSSW_7_4_X","description":"","creator":{"login":"nclopezo","id":1944922,"avatar_url":"https://avatars.githubusercontent.com/u/1944922?v=3","gravatar_id":"","url":"https://api.github.com/users/nclopezo","html_url":"https://github.com/nclopezo","followers_url":"https://api.github.com/users/nclopezo/followers","following_url":"https://api.github.com/users/nclopezo/following{/other_user}","gists_url":"https://api.github.com/users/nclopezo/gists{/gist_id}","starred_url":"https://api.github.com/users/nclopezo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nclopezo/subscriptions","organizations_url":"https://api.github.com/users/nclopezo/orgs","repos_url":"https://api.github.com/users/nclopezo/repos","events_url":"https://api.github.com/users/nclopezo/events{/privacy}","received_events_url":"https://api.github.com/users/nclopezo/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":320,"state":"open","created_at":"2014-11-21T15:23:58Z","updated_at":"2015-01-17T17:01:00Z","due_on":"2015-01-20T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/7175/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/7175/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/7175/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/d27695186f631bde412f573769b2d625b3236d95","head":{"label":"Dr15Jones:eventBasedTrackAssociation","ref":"eventBasedTrackAssociation","sha":"d27695186f631bde412f573769b2d625b3236d95","user":{"login":"Dr15Jones","id":3757616,"avatar_url":"https://avatars.githubusercontent.com/u/3757616?v=3","gravatar_id":"","url":"https://api.github.com/users/Dr15Jones","html_url":"https://github.com/Dr15Jones","followers_url":"https://api.github.com/users/Dr15Jones/followers","following_url":"https://api.github.com/users/Dr15Jones/following{/other_user}","gists_url":"https://api.github.com/users/Dr15Jones/gists{/gist_id}","starred_url":"https://api.github.com/users/Dr15Jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dr15Jones/subscriptions","organizations_url":"https://api.github.com/users/Dr15Jones/orgs","repos_url":"https://api.github.com/users/Dr15Jones/repos","events_url":"https://api.github.com/users/Dr15Jones/events{/privacy}","received_events_url":"https://api.github.com/users/Dr15Jones/received_events","type":"User","site_admin":false},"repo":{"id":10974606,"name":"cmssw","full_name":"Dr15Jones/cmssw","owner":{"login":"Dr15Jones","id":3757616,"avatar_url":"https://avatars.githubusercontent.com/u/3757616?v=3","gravatar_id":"","url":"https://api.github.com/users/Dr15Jones","html_url":"https://github.com/Dr15Jones","followers_url":"https://api.github.com/users/Dr15Jones/followers","following_url":"https://api.github.com/users/Dr15Jones/following{/other_user}","gists_url":"https://api.github.com/users/Dr15Jones/gists{/gist_id}","starred_url":"https://api.github.com/users/Dr15Jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dr15Jones/subscriptions","organizations_url":"https://api.github.com/users/Dr15Jones/orgs","repos_url":"https://api.github.com/users/Dr15Jones/repos","events_url":"https://api.github.com/users/Dr15Jones/events{/privacy}","received_events_url":"https://api.github.com/users/Dr15Jones/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Dr15Jones/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/Dr15Jones/cmssw","forks_url":"https://api.github.com/repos/Dr15Jones/cmssw/forks","keys_url":"https://api.github.com/repos/Dr15Jones/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dr15Jones/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dr15Jones/cmssw/teams","hooks_url":"https://api.github.com/repos/Dr15Jones/cmssw/hooks","issue_events_url":"https://api.github.com/repos/Dr15Jones/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/Dr15Jones/cmssw/events","assignees_url":"https://api.github.com/repos/Dr15Jones/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/Dr15Jones/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/Dr15Jones/cmssw/tags","blobs_url":"https://api.github.com/repos/Dr15Jones/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dr15Jones/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dr15Jones/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dr15Jones/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dr15Jones/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/Dr15Jones/cmssw/languages","stargazers_url":"https://api.github.com/repos/Dr15Jones/cmssw/stargazers","contributors_url":"https://api.github.com/repos/Dr15Jones/cmssw/contributors","subscribers_url":"https://api.github.com/repos/Dr15Jones/cmssw/subscribers","subscription_url":"https://api.github.com/repos/Dr15Jones/cmssw/subscription","commits_url":"https://api.github.com/repos/Dr15Jones/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dr15Jones/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dr15Jones/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dr15Jones/cmssw/issues/comments/{number}","contents_url":"https://api.github.com/repos/Dr15Jones/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/Dr15Jones/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dr15Jones/cmssw/merges","archive_url":"https://api.github.com/repos/Dr15Jones/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dr15Jones/cmssw/downloads","issues_url":"https://api.github.com/repos/Dr15Jones/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/Dr15Jones/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/Dr15Jones/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/Dr15Jones/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dr15Jones/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/Dr15Jones/cmssw/releases{/id}","created_at":"2013-06-26T17:40:38Z","updated_at":"2014-12-22T16:00:01Z","pushed_at":"2015-01-17T19:03:32Z","git_url":"git://github.com/Dr15Jones/cmssw.git","ssh_url":"git@github.com:Dr15Jones/cmssw.git","clone_url":"https://github.com/Dr15Jones/cmssw.git","svn_url":"https://github.com/Dr15Jones/cmssw","homepage":null,"size":525719,"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":"CMSSW_7_4_X"}},"base":{"label":"cms-sw:CMSSW_7_4_X","ref":"CMSSW_7_4_X","sha":"3afe3114c4de554c9ff1d8cbb2b0e0eca12545a6","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}","created_at":"2013-06-26T14:09:07Z","updated_at":"2015-01-17T15:25:30Z","pushed_at":"2015-01-17T16:10:13Z","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":785348,"stargazers_count":197,"watchers_count":197,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1215,"mirror_url":null,"open_issues_count":116,"forks":1215,"open_issues":116,"watchers":197,"default_branch":"CMSSW_7_4_X"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/7175"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/7175"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/7175"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/7175/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/7175/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/7175/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/d27695186f631bde412f573769b2d625b3236d95"}}}}