{"action":"created","comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/93785012","pull_request_review_id":14321401,"id":93785012,"diff_hunk":"@@ -0,0 +1,174 @@\n+// system include files\n+#include <memory>\n+\n+// user include files\n+#include \"FWCore/Framework/interface/Frameworkfwd.h\"\n+#include \"FWCore/Framework/interface/stream/EDProducer.h\"\n+\n+#include \"FWCore/Framework/interface/Event.h\"\n+#include \"FWCore/Framework/interface/MakerMacros.h\"\n+\n+#include \"FWCore/ParameterSet/interface/ParameterSet.h\"\n+\n+//#include \"DataFormats/Candidate/interface/Candidate.h\"\n+#include \"DataFormats/Candidate/interface/VertexCompositeCandidate.h\"\n+#include \"DataFormats/RecoCandidate/interface/RecoChargedCandidate.h\"\n+\n+#include \"DataFormats/VertexReco/interface/Vertex.h\"\n+#include \"DataFormats/VertexReco/interface/VertexFwd.h\"\n+\n+//\n+// class declaration\n+//\n+namespace {\n+  const float dummy = -9.;\n+  const GlobalPoint dummyGP(dummy,dummy,0.);\n+} //end anonymous namespace\n+\n+class VertexCompositeCandidateCollectionSelector : public edm::stream::EDProducer<> {\n+public:\n+  explicit VertexCompositeCandidateCollectionSelector(const edm::ParameterSet&);\n+\n+  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);\n+\n+   private:\n+      virtual void produce(edm::Event&, const edm::EventSetup&) override;\n+\n+      // ----------member data ---------------------------\n+\n+  edm::EDGetTokenT<reco::VertexCompositeCandidateCollection> v0Token_;\n+  edm::EDGetTokenT<reco::BeamSpot>         bsToken_;\n+  edm::EDGetTokenT<reco::VertexCollection> pvToken_;\n+\n+  int pvNDOF_;\n+\n+  std::string label_;\n+\n+  // list of variables for the selection\n+  float lxyCUT_;\n+  float lxyWRTbsCUT_;\n+  bool  debug_;\n+};\n+\n+//\n+// constants, enums and typedefs\n+//\n+\n+\n+//\n+// static data member definitions\n+//\n+\n+//\n+// constructors and destructor\n+//\n+VertexCompositeCandidateCollectionSelector::VertexCompositeCandidateCollectionSelector(const edm::ParameterSet& iConfig)\n+  : v0Token_ ( consumes<reco::VertexCompositeCandidateCollection>(iConfig.getParameter<edm::InputTag>(\"v0\") )            )\n+  , bsToken_ ( consumes<reco::BeamSpot>                          (iConfig.getParameter<edm::InputTag>(\"beamSpot\") )      )\n+  , pvToken_ ( consumes<reco::VertexCollection>                  (iConfig.getParameter<edm::InputTag>(\"primaryVertex\") ) )\n+  , pvNDOF_ ( iConfig.getParameter<int> (\"pvNDOF\") )\n+  , label_  ( iConfig.getParameter<edm::InputTag>(\"v0\").instance() )\n+  , lxyCUT_      ( iConfig.getParameter<double>(\"lxyCUT\") )\n+  , lxyWRTbsCUT_ ( iConfig.getParameter<double>(\"lxyWRTbsCUT\") )\n+  , debug_ ( iConfig.getUntrackedParameter<bool>(\"debug\") )\n+{\n+  if (debug_) std::cout << \"VertexCompositeCandidateCollectionSelector::VertexCompositeCandidateCollectionSelector\" << std::endl;\n+  // product\n+  produces<reco::VertexCompositeCandidateCollection>();\n+\n+  //now do what ever other initialization is needed\n+  \n+}\n+\n+\n+//\n+// member functions\n+//\n+\n+// ------------ method called to produce the data  ------------\n+void\n+VertexCompositeCandidateCollectionSelector::produce(edm::Event& iEvent, const edm::EventSetup& iSetup)\n+{\n+   using namespace edm;\n+   \n+  if (debug_) std::cout << \"VertexCompositeCandidateCollectionSelector::produce\" << std::endl;\n+\n+   // Create auto_ptr for each collection to be stored in the Event\n+   auto result = std::make_unique<reco::VertexCompositeCandidateCollection>();\n+\n+   edm::Handle<reco::BeamSpot> beamspotHandle;\n+   iEvent.getByToken(bsToken_,beamspotHandle);\n+   reco::BeamSpot const * bs = nullptr;\n+   if (beamspotHandle.isValid())\n+     bs = &(*beamspotHandle);\n+\n+\n+   edm::Handle< reco::VertexCollection > pvHandle;\n+   iEvent.getByToken(pvToken_, pvHandle );\n+   reco::Vertex const * pv = nullptr;  \n+   if (pvHandle.isValid()) {\n+     pv = &pvHandle->front();\n+     //--- pv fake (the pv collection should have size==1 and the pv==beam spot)\n+     if (   pv->isFake() || pv->tracksSize()==0\n+\t    // definition of goodOfflinePrimaryVertex\n+\t    || pv->ndof() < pvNDOF_ || pv->z() > 24.)  pv = nullptr;\n+   }\n+\n+   edm::Handle<reco::VertexCompositeCandidateCollection> v0Handle;\n+   iEvent.getByToken(v0Token_, v0Handle);\n+   int n = ( v0Handle.isValid() ? v0Handle->size() : -1 );\n+   if (debug_) std::cout << \"n: \" << n << std::endl;\n+   if (n>0) {\n+  \n+     reco::VertexCompositeCandidateCollection v0s = *v0Handle.product();    \n+     for ( auto v0 : v0s ) {","path":"CommonTools/RecoAlgos/plugins/VertexCompositeCandidateCollectionSelector.cc","position":124,"original_position":124,"commit_id":"ea563898b88da998cb2b2d314a5892640aac882b","original_commit_id":"ea563898b88da998cb2b2d314a5892640aac882b","user":{"login":"VinInn","id":4143702,"avatar_url":"https://avatars.githubusercontent.com/u/4143702?v=3","gravatar_id":"","url":"https://api.github.com/users/VinInn","html_url":"https://github.com/VinInn","followers_url":"https://api.github.com/users/VinInn/followers","following_url":"https://api.github.com/users/VinInn/following{/other_user}","gists_url":"https://api.github.com/users/VinInn/gists{/gist_id}","starred_url":"https://api.github.com/users/VinInn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VinInn/subscriptions","organizations_url":"https://api.github.com/users/VinInn/orgs","repos_url":"https://api.github.com/users/VinInn/repos","events_url":"https://api.github.com/users/VinInn/events{/privacy}","received_events_url":"https://api.github.com/users/VinInn/received_events","type":"User","site_admin":false},"body":"and auto const & v0s as well (just to avoid a festival of copies...)","created_at":"2016-12-23T17:00:36Z","updated_at":"2016-12-23T17:00:36Z","html_url":"https://github.com/cms-sw/cmssw/pull/17074#discussion_r93785012","pull_request_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/17074","_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/93785012"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/17074#discussion_r93785012"},"pull_request":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/17074"}}},"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/17074","id":98565917,"html_url":"https://github.com/cms-sw/cmssw/pull/17074","diff_url":"https://github.com/cms-sw/cmssw/pull/17074.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/17074.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/17074","number":17074,"state":"open","locked":false,"title":"tracking DQM improvements","user":{"login":"mtosi","id":4946419,"avatar_url":"https://avatars.githubusercontent.com/u/4946419?v=3","gravatar_id":"","url":"https://api.github.com/users/mtosi","html_url":"https://github.com/mtosi","followers_url":"https://api.github.com/users/mtosi/followers","following_url":"https://api.github.com/users/mtosi/following{/other_user}","gists_url":"https://api.github.com/users/mtosi/gists{/gist_id}","starred_url":"https://api.github.com/users/mtosi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtosi/subscriptions","organizations_url":"https://api.github.com/users/mtosi/orgs","repos_url":"https://api.github.com/users/mtosi/repos","events_url":"https://api.github.com/users/mtosi/events{/privacy}","received_events_url":"https://api.github.com/users/mtosi/received_events","type":"User","site_admin":false},"body":"as requested by tracking POG @VinInn @rovere \r\nwe add some plots\r\n- tracks from PV monitoring\r\n  (these tracks are selected by using the available TrackWithVertexSelector_cfi)\r\n- V0 monitoring for V0 candidates w/ lxy > 16 cm\r\n  (the V0 candidates are selected by a new EDProducer)\r\n","created_at":"2016-12-19T13:34:58Z","updated_at":"2016-12-23T17:00:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3cb67983a1cb40bcba08c5e03a9cce03458fffb","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/64","html_url":"https://github.com/cms-sw/cmssw/milestone/64","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/64/labels","id":2138657,"number":64,"title":"Next CMSSW_9_0_X","description":null,"creator":{"login":"smuzaffar","id":4115138,"avatar_url":"https://avatars.githubusercontent.com/u/4115138?v=3","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":60,"closed_issues":293,"state":"open","created_at":"2016-11-16T08:55:18Z","updated_at":"2016-12-23T12:14:57Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/17074/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/17074/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/17074/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/ea563898b88da998cb2b2d314a5892640aac882b","head":{"label":"mtosi:trackingDQMimprovements910pre1","ref":"trackingDQMimprovements910pre1","sha":"ea563898b88da998cb2b2d314a5892640aac882b","user":{"login":"mtosi","id":4946419,"avatar_url":"https://avatars.githubusercontent.com/u/4946419?v=3","gravatar_id":"","url":"https://api.github.com/users/mtosi","html_url":"https://github.com/mtosi","followers_url":"https://api.github.com/users/mtosi/followers","following_url":"https://api.github.com/users/mtosi/following{/other_user}","gists_url":"https://api.github.com/users/mtosi/gists{/gist_id}","starred_url":"https://api.github.com/users/mtosi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtosi/subscriptions","organizations_url":"https://api.github.com/users/mtosi/orgs","repos_url":"https://api.github.com/users/mtosi/repos","events_url":"https://api.github.com/users/mtosi/events{/privacy}","received_events_url":"https://api.github.com/users/mtosi/received_events","type":"User","site_admin":false},"repo":{"id":11196435,"name":"cmssw","full_name":"mtosi/cmssw","owner":{"login":"mtosi","id":4946419,"avatar_url":"https://avatars.githubusercontent.com/u/4946419?v=3","gravatar_id":"","url":"https://api.github.com/users/mtosi","html_url":"https://github.com/mtosi","followers_url":"https://api.github.com/users/mtosi/followers","following_url":"https://api.github.com/users/mtosi/following{/other_user}","gists_url":"https://api.github.com/users/mtosi/gists{/gist_id}","starred_url":"https://api.github.com/users/mtosi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtosi/subscriptions","organizations_url":"https://api.github.com/users/mtosi/orgs","repos_url":"https://api.github.com/users/mtosi/repos","events_url":"https://api.github.com/users/mtosi/events{/privacy}","received_events_url":"https://api.github.com/users/mtosi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mtosi/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/mtosi/cmssw","forks_url":"https://api.github.com/repos/mtosi/cmssw/forks","keys_url":"https://api.github.com/repos/mtosi/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mtosi/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mtosi/cmssw/teams","hooks_url":"https://api.github.com/repos/mtosi/cmssw/hooks","issue_events_url":"https://api.github.com/repos/mtosi/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/mtosi/cmssw/events","assignees_url":"https://api.github.com/repos/mtosi/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/mtosi/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/mtosi/cmssw/tags","blobs_url":"https://api.github.com/repos/mtosi/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mtosi/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mtosi/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/mtosi/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mtosi/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/mtosi/cmssw/languages","stargazers_url":"https://api.github.com/repos/mtosi/cmssw/stargazers","contributors_url":"https://api.github.com/repos/mtosi/cmssw/contributors","subscribers_url":"https://api.github.com/repos/mtosi/cmssw/subscribers","subscription_url":"https://api.github.com/repos/mtosi/cmssw/subscription","commits_url":"https://api.github.com/repos/mtosi/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/mtosi/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/mtosi/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/mtosi/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/mtosi/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/mtosi/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mtosi/cmssw/merges","archive_url":"https://api.github.com/repos/mtosi/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mtosi/cmssw/downloads","issues_url":"https://api.github.com/repos/mtosi/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/mtosi/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/mtosi/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/mtosi/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mtosi/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/mtosi/cmssw/releases{/id}","deployments_url":"https://api.github.com/repos/mtosi/cmssw/deployments","created_at":"2013-07-05T09:41:40Z","updated_at":"2014-06-03T16:19:21Z","pushed_at":"2016-12-23T09:27:11Z","git_url":"git://github.com/mtosi/cmssw.git","ssh_url":"git@github.com:mtosi/cmssw.git","clone_url":"https://github.com/mtosi/cmssw.git","svn_url":"https://github.com/mtosi/cmssw","homepage":"cms-sw.github.io/cmssw","size":806124,"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_0_X"}},"base":{"label":"cms-sw:CMSSW_9_0_X","ref":"CMSSW_9_0_X","sha":"785e7d09b0df68e8e4ff1d9bf5d17769a6d17c19","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}","deployments_url":"https://api.github.com/repos/cms-sw/cmssw/deployments","created_at":"2013-06-26T14:09:07Z","updated_at":"2016-12-20T23:59:29Z","pushed_at":"2016-12-23T15:20:21Z","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":919431,"stargazers_count":373,"watchers_count":373,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2049,"mirror_url":null,"open_issues_count":338,"forks":2049,"open_issues":338,"watchers":373,"default_branch":"CMSSW_9_0_X"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/17074"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/17074"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/17074"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/17074/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/17074/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/17074/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/ea563898b88da998cb2b2d314a5892640aac882b"}}}}
{"actor":{"display_login":"VinInn"}}