{"action":"created","issue":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/13242","repository_url":"https://api.github.com/repos/cms-sw/cmssw","labels_url":"https://api.github.com/repos/cms-sw/cmssw/issues/13242/labels{/name}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/issues/13242/comments","events_url":"https://api.github.com/repos/cms-sw/cmssw/issues/13242/events","html_url":"https://github.com/cms-sw/cmssw/pull/13242","id":132716355,"number":13242,"title":"Check TrackingParticle ProductID in cluster->TrackingParticle association","user":{"login":"makortel","id":33993,"avatar_url":"https://avatars.githubusercontent.com/u/33993?v=3","gravatar_id":"","url":"https://api.github.com/users/makortel","html_url":"https://github.com/makortel","followers_url":"https://api.github.com/users/makortel/followers","following_url":"https://api.github.com/users/makortel/following{/other_user}","gists_url":"https://api.github.com/users/makortel/gists{/gist_id}","starred_url":"https://api.github.com/users/makortel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makortel/subscriptions","organizations_url":"https://api.github.com/users/makortel/orgs","repos_url":"https://api.github.com/users/makortel/repos","events_url":"https://api.github.com/users/makortel/events{/privacy}","received_events_url":"https://api.github.com/users/makortel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/comparison-pending","name":"comparison-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/dqm-pending","name":"dqm-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/fastsim-pending","name":"fastsim-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/orp-pending","name":"orp-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/pending-signatures","name":"pending-signatures","color":"eb6420"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/simulation-pending","name":"simulation-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/tests-started","name":"tests-started","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/57","html_url":"https://github.com/cms-sw/cmssw/milestones/Next%20CMSSW_8_0_X","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/57/labels","id":1362157,"number":57,"title":"Next CMSSW_8_0_X","description":"","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":45,"closed_issues":734,"state":"open","created_at":"2015-10-18T08:35:44Z","updated_at":"2016-02-15T11:27:37Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2016-02-10T14:41:01Z","updated_at":"2016-02-15T11:51:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/13242","html_url":"https://github.com/cms-sw/cmssw/pull/13242","diff_url":"https://github.com/cms-sw/cmssw/pull/13242.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/13242.patch"},"body":"The current use of `ClusterTPAssociationList` in `QuickTrackAssociatorByHits` is a bit dangerous. Although `edm::Ref`s to `TrackingParticle`s are used in `ClusterTPAssociationList`, there are no checks done at any point if the `Ref`s point to the same `TrackingParticleCollection` as those being associated in `QuickTrackAssociatorByHits`. Possible bugs would have the following symptoms\r\n* `SimToReco` association returns nothing for a given `TrackingParticle`\r\n* `RecoToSim` association returns associations of `Track` to the `TrackingParticle`s used in `ClusterTPAssociationList`, that are not necessarily the same as were give as arguments\r\n\r\nIn order to catch such bugs, this PR adds a check for the `edm::ProductID` of the `TrackingParticleCollection` to `ClusterTPAssociation(List)` and `QuickTrackAssociatorByHits` by encapsulating the \"raw\" `typedef vector<pair<...>> ClusterTPAssociationList` as `ClusterTPAssociation` class that contains also the `ProductID` of the `TrackingParticleCollection`. On the same go I did some technical cleanup in `ClusterTPAssociationProducer`, including turning it to `global` module and using `fillDescriptions()`.\r\n\r\nIn addition, `QuickTrackAssociatorByHitsImpl::associate...(..., TrackingParticleRefVector)` overloads are fixed for the case where the argument `TrackingParticlRefVector` is a subset of the `TrackingParticle`s used in `ClusterTPAssociation`. Without the fix, the argument is ignored and the associations are done using the `TrackingParticle`s in `ClusterTPAssociation`.\r\n\r\nRunning the short matrix revealed one such bug, in `TkConvValidator`. The existing plots from DQM GUI (https://goo.gl/zor134) look indeed to be poisoned by the bug (obviously one can judge only based on the empty efficiency plots). Minimal fix was to change `TkConvValidator` to read `TrackingParticleRefVector`.\r\n\r\nTested in 8_0_0_pre6, expecting changes only in `EgammaV/ConversionValidator` DQM folder.\r\n\r\n@rovere @VinInn "},"comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/comments/184178997","html_url":"https://github.com/cms-sw/cmssw/pull/13242#issuecomment-184178997","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/13242","id":184178997,"user":{"login":"cmsbuild","id":4170616,"avatar_url":"https://avatars.githubusercontent.com/u/4170616?v=3","gravatar_id":"","url":"https://api.github.com/users/cmsbuild","html_url":"https://github.com/cmsbuild","followers_url":"https://api.github.com/users/cmsbuild/followers","following_url":"https://api.github.com/users/cmsbuild/following{/other_user}","gists_url":"https://api.github.com/users/cmsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/cmsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmsbuild/subscriptions","organizations_url":"https://api.github.com/users/cmsbuild/orgs","repos_url":"https://api.github.com/users/cmsbuild/repos","events_url":"https://api.github.com/users/cmsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/cmsbuild/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T11:51:32Z","updated_at":"2016-02-15T11:51:32Z","body":"+1\nTested at: 00041e00c38c668e9868c3b73a7dae5ce133a724\nhttps://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-13242/11210/summary.html"}}