Notes on Fabric's clustering and filtering.

Limited topology accepted as a cluster:
Highest, 2 nd highest and 3rd highest must form an L with the highest at the knee.
i.e. the second highest and the third highest can never lie on a diagonal with the highest.

This is the spirit behind his routine fLocate16PixCluster
In this routine the pixels of a 4 by 4 cluster are organized into the tLoc matrix where the first index of tLoc is the pixel number 0-15 and the second index is 0 or 1 designating the row or column of the pixel. The ordering of the 4 by 4 array to the 0-15 pixel index is shown in the following figure:
The numbers in this table show the pixel numbering for the first index of the tLoc matrix. The topology has been flopped and rotated such that the pixel amplitudes appear as shown in the 4 by 4 table. The amplitude ordering is not well defined for pixels other than the central 4. Clusters that do not conform to this topology are probably not included, but this needs to be checked.
Definitions of tVar in fCalcClusterFilterVar

tVar0 Highest Pixel Signal to noise
tVar1 Probability that it is noise using ChiSqrd of 2nd and 3rd highest pixel
tVar2 Probability that it is noise using ChiSqrd of 2nd highest, 3rd highest and diagonal
tVar3 Probability that it is noise using ChiSqrd of all but the max amplitude pixel (Fabrice argues that removing the highest pixel removes the bias on this cut from the orginal max pixel cut
tVar4 ChiSqrd of highest, 2nd highest, 3rd highest and diagonal
tVar5 ChiSqrd of all but max amplitude pixel.
Notes, by HW 31-May-2005
Input parameters
in e-
in pitch
in number of noise sigma
Generate impact position
Non-redundant random locations over the pixel
Generate signal for different ionization. From 50 e- to 550 e-
rnorm returns vector with element for each electron with a gaussian distribution
about the x impact point. So this gives the projection onto the x axis
in e-
this distributes the projected number in each x bin into y bins
first index different impact locations, second index different signal amplitude
Generate noise. Only keep the events with a signal > seed threshold on the cental pixel
Suppression factor due to seed threshold
Gaussian noise distribution into each pixel
i counts the different random noise events
keep throwing until over threshold then
store in center
Definitions of tVar in fCalcClusterFilterVariable

tVar0 Highest Pixel Signal to noise
tVar1 Probability that it is noise using ChiSqrd of 2nd and 3rd highest pixel
tVar2 Probability that it is noise using ChiSqrd of 2nd highest, 3rd highest and diagonal
tVar3 Probability that it is noise using ChiSqrd of all but the max amplitude pixel (Fabrice argues that removing the highest pixel removes the bias on this cut from the orginal max pixel cut
tVar4 ChiSqrd of highest, 2nd highest, 3rd highest and diagonal
tVar5 ChiSqrd of all but max amplitude pixel.
Probably returns list of pixel locations for cluster of 16. Haven't worked out topology
returns square cluster only even if non-sq element is larger
tLoc gives each pixel location for the cluser of pixels
locates max adjacent, does not do diag
probably starts with only center 3by3 so actually pixel with max could could have smaller value than that in 2max
Locates pixel with max signal in the
center 3 by 3
First index is pixel number in the cluster
Second index selects row or column
Filter signal and noise
i.e. only do it for ionization = 150 e-
See tVar definitions
2 values only
Make histograms
Run for signal = 150 electrons
max pixel signal to noise
Noise probability based on 2nd,3rd, diag
Chi2 based on 2nd, 3rd, diag
Noise probability based on 16 less seed
Chi2 based on 16 less seed
Probability of a noise hit passing the cuts for cuts that give efficiency of 70 % for 150