cms-sw/cmssw — pull request #2490 by lgray (2014-02-16 21:50:42+00:00)
Title: Protection to stabilize the behavior of PFClusterAlgo

Require that the sum of rechit fractions be of reasonable size to be sure you're not adding some rechit that is far away any cluster position.

An example case of the instability is as follows:
some rechit is, at closest, ~7-8 crystals away from any cluster position. This means that the largest rechit fraction is going to be ~1e-23. The smaller fractions from clusters even farther away can be ~1e-50, which is outside of double precision when you add them together. The fraction can randomly be one or very very slightly less than one.

The means that when the fractions are normalized a rechit that is very far away from any cluster can be randomly added *in its entirety* to a cluster it simply doesn't belong to, and it can vanish for no reason when doing the position fit in PFClusterAlgo. This makes the algorithm convergence unstable.

Requiring the rechit fraction sum to be larger than 1e-20 fixes this issue, since it ensures that at least one cluster is within about 10 shower-sigmas of the rechit. The only exception to this case are the rechit seeds, which shouldn't move very from from the cluster position on average.