Altered FindMatchedCluster to consider track-pixel distances instead of track-cluster distances.

This is important because for large clusters (possibly delta rays) and for angled tracks,
the track position could be far from the cluster centre, but should still be close to
one of the hit pixels in the cluster.

In Cluster.py:
- new function GetPixelResiduals to get the minimum track-pixel distance for a cluster

In EudetData.py:
- alteration of FindMatchedCluster to use this new function

As a result of this change, more clusters are matched to tracks:
146264 (pixel matching) vs 146064 (cluster matching)
and the distance histogram is sharper.
Two changes in ClusterEvent:

- added a check before clustering on the total number of hit pixels.
This should avoid trying to cluster large events where no triggers
were recieved.

- added a second sigma in the call to GetEtaCorrectedQWeightedCentroid
in line with the parameters this function expects.
Improvements to ComputeChargeDistance.

Made many simplifications:
- graph and histogram showed same data, removed graph
- define cluster for clarity
- use max(cluster.tot) in Qrel calculation
- fill the histogram straight away and return

Also added the check that the cluster aspect ratio is not 1.
Merge pull request #10 from sredford/master

Altered FindMatchedCluster to consider track-pixel distances instead of ...
Tidy and improvements of ComputeAlignment.py

In ComputeAlignment.py:
- plots are now saved for post-alignment cross checks
- added pauses at important points to allow user to consider plots
and continue or stop
- removed old test code

In ToolBox.py:
- removed obsolete TrackClusterCorrelation_Test
- PerformPreAlignement now returns plots for saving
- added checks in Perform3StepAlignment that the optimisation actually
converges, asks user what to do if not
Merge pull request #11 from sredford/master

Tidy and improvements of ComputeAlignment.py
Added CountPixelMapRepeats function.

In ToolBox.py:
- added new function CountPixelMapRepeats. This counts how often
the pixel map is repeated before there is a new event. It is the
old 'scaler' variable, which was thought to be 15 but is shown to
be never more than 15 but often less. This shows that we shouldn't
use a 'scaler' variable, but rather check for when there's a new
pixel map by hand.

In pyEudetReconstructionOnly.py:
- call this function and save histogram
Removed unnecessary print statement from CountPixelMapRepeats.
Alteration to FilterHotPixel to no longer depend on scaler.
Also renamed to FindHotPixel, since this function doesn't
filter (that's done in ClusterEvent).

In EudetData.py:
- rewrite of FindHotPixel to avoid scaler, whilst still taking
into account repeated pixel maps
- two additional debug histograms, for hit pixels and nhits
- catch incase the tbtrack file doesn't have 10000 events

In pyEudetReconstructionOnly.py:
- change call to FindHotPixel
- save two additional histograms

In pyEudetAnalysis.py:
- change call to FindHotPixel

In ComputeAlignment.py:
- change call to FindHotPixel
- change order so n_proc is defined in time for FindHotPixel
Merge pull request #12 from sredford/master

Added CountPixelMapRepeats function.
Speed increase in ComputeAlignment.py, without use of scaler.

In ComputeAlignmet.py:
- do a check if the pixel map is already clustered, if so use
existing clusters, otherwise cluster this pixel map. This increases
the time of clustering by a factor of 10.
- improved sanity check of nevents -> n_proc
- also added two extra debug plots from FilterHotPixel
Merge pull request #13 from sredford/master

Speed increase in ComputeAlignment.py, without use of scaler.
Fixed histogram name typo
Merge pull request #14 from esicking/master

Fixed histogram name typo