Merge pull request #1 from mathieubenoit/master

added cm to the units
Edited Cluster.py to catch the case where a cluster of size 4 is not shape 2x2.
Previously these clusters were missed, and a centroid position was not calculated,
so the centroid position would remain the initialised value.
Now the centroid position is calculated using the QWeighted method.
Merge pull request #2 from sredford/master

Edited Cluster.py to catch the case where a cluster of size 4 is not sha...
Tidy of pyEudetReconstructionOnly.py, but no changes of method.
Added comment on purpose of file.
Removed commented out test code.
Saved chi2 plots.
Altered structure of saved data, all now within Run0000 directory.
Should be simpler for newcomers to use and understand.
Merge pull request #3 from sredford/master

Tidy of pyEudetReconstructionOnly.py, but no changes of method.
To avoid a crash in TotalSigmaFunctionX I added a check that the histogram being fitted has
GetEffectiveEntries() > 10. This avoids a fit to no data, which will crash when you try to
get a fitted parameter. It could be that there is a mistake in the code leading to the
histogram being empty in the first place.
Removed superfluous print statement.
Tidy of pyEudetAnalysisOnly.py, but no changes of method.
Added comment on purpose of the file.
Removed commented out test code.
Simplified canvas saving.
Resized some canvases.
Didn't remove commented out code relating to calibration / landau fits.
We should add a proper example of how to calibrate somewhere.
Merge pull request #4 from sredford/master

Mainly a tidy of pyEudetAnalysisOnly.py, also catching a crash from TotalSigmaFunctionX
Indented call to EdgeEfficiency so this only happens if there is a non-zero edge width.
This avoids axis errors when making the histograms.
Bug fix and tidy of EdgeEfficency.

In pyEudetAnalysisOnly.py:
- better save names for plots
- save plot of the total track distribution per edge
- write all 'per edge' plots into root file

In ToolBox.py:
- bug fix: edge_tracks[i] were being filled with only matched tracks. Fixed to fill all tracks.
- better variable names
- return edge_tracks
Cosmetic changes to TrackClusterCorrelation and pyEudetAnalysisOnly.py.

In ToolBox.py:
- better histogram names for TrackClusterCorrelation
- removed unnecessary index and enumerate

In pyEudetAnalysisOnly.py:
- changed order to better follow code
- improved some histogram titles
Merge pull request #5 from sredford/master

EdgeEfficiency indentation and bug fix, plus general tidy of pyEudetAnalysisOnly.py
Removed different treatment of cluster size calculations for EtaCorrection method.
The cluster size has no relation to the centroid method and should be calculated in the same way for all.

If using filter_cluster=True the results before and after this change are the same, as only matched clusters remain.
However, with filter_cluster=False the old code will count every cluster (even non-matched) for the EtaCorrection method.
I think this is the wrong way to do it.
Tidy and new control plot for FindMatchedCluster.

In EudetData.py:
- tidied FindMatchedCluster
- added catch incase of no clusters
- fill control plot of track-cluster distance (helps determine r_max)

In pyEudetReconstructionOnly.py:
- create control plot, pass to FindMatchedCluster and save at the end
Merge pull request #6 from sredford/master

Removed different treatment of cluster size calculations for EtaCorrecti...
Create README.md
Reduced the maximum track-cluster distance permissable for a matched cluster.
Old value was 0.5 mm, new value is 0.1 mm.
This is motivated by the histogram of track-cluster distance.

Also added a check that the requested number of events is not greater than the total
and allow the user to input -1 from the command line to mean "all events".
Merge pull request #7 from sredford/master

Reduced the maximum track-cluster distance permissable for a matched clu...
Moved all cluster size histograms into newly named CountClusterSize (was CountPixelSize).

In ToolBox.py:
- moved histograms into CountClusterSize
- lowered timing printout frequency

In pyEudetAnalysisOnly.py:
- moved cluster histograms together
- fixed bug: only try to write edge histograms if nonzero edge