cms-sw/cmssw — pull request #6833 by Dr15Jones (2014-12-09 01:04:21+00:00)
Title: Removed poor use of Ref classes in PFTracking and fixed getByToken problem

There were a number of uses of RefToBase::castTo where a dynamic_cast would be more appropriate.
A getByToken was using tokens obtained from a 'consumes' call for a different type. This was probably due to the fact that in the past two getByLabels for the different types were sharing the same InputTag. This was probably not seen since the product is only optionally obtained.

These changes are a prequel to internal framework changes which can affect castTo.