Hi all,

I am currently working analysising silicon pixel detectors for the LHC at my university.

One thing i have to do is to find clusters of signal in a silicon pixel detector.

I have directory of macros which handles the data and getting it ready, not important.

My goals are to create a macro/ algorithym that finds clusters of data, with this i want to:
1) find number of 1 cluster hits, 2 cluster, 3 cluster etc.... on the sensor
2) this info will be made into a histo (not a problem)
3) histo's of 1 cluster, 2 cluster and 3 or more clusters will be filled with the total relevant signal


The sensors i used are silicon pixel, they are very small and are designed for charge sharing, this means that pixels are prone to share there charge with surrounding pixels. this allows for a good resolution.

The sensor is made up of 2048 pixels sensors with 256 read out channels. therefore each channel is attached to 8 pixels. the pixels aren't next to each other they6 are spread out over the sensor in a specific pattern.

pixels connected to channel 1 and 2 arnt next to each other either.

i used a 2D array as a model of the sensor layout. were each element can be thought of as a pixel. each element in the array is filled with the relevant channel for that "pixel"

vectors havnt been used to simpilfy things since a spacial position isnt required merely a position with refference to the other pixels.

The 2D array has the form PIXEL[16][128]
where the signal for each channel is _signal[256]

any help about how to find the clusters is much apreiated


Firstly, help me in understanding your problem fully by replying some queries about your system and program requirements :
q1: Isn't this module/macro for some microcontroller.
q2: are you prepared to work in assembly or C languages to get your job done.

If answer to anyone, or both these questions is yes.
You can search those forums as well and post your query there as well. ( I don't known much about multiple query rules here ).
Mark this thread as solved, if rules say no more than one post with same subject and post in asembly language thread if it is for microcrontroller, and C thread if it is for PC. ( You will get more qiuck respone there)
Hopefully this will help you ( if only somewhat ) .

Not 100% sure what you are after, so I am going to re-iterate your problem as I see it then you can correct me and (hopefully) we can all get closer to the exact problem you are after:

You seem to have several problems that need to be separated out.

(a) You have an array of detectors that are silicon based. The array is a close packed structure on a rectangular/square array (?) [This is important -- is it square/rectangular -- since that effects the probability that charge can move to the next cell]

(b) the readout electronics is obviously not reading in the same pattern, [thus allowing electronic cross talk to be seen -- this is different from pixel cross talk, and to improve deadtime issues]. Thus the array of data that you get needs to be re-mapped to find out which pixel is next to which other pixel.

(c) The data you get for a given pixel is simple binary detection of an event/ no detection. There is no time information, no charge information etc. (?)

(d) As I understand it you you have a grid of pixels in space, that have a finer grid of position sensitive points within each grid point. You seem to have 2048 pixels each made up of 16x16 fine grid of points.

(e) There is charge spillage from a fine point to its nearest neighbours but there is no charge spillage to the next pixel grid (??).

(f) The datum of interest is first the number of true events, and then second the coordinated of those points, (and then I assume if they are tracked, likely energy etc )

(g) You have to (i) group clusters of data together that give real events, noting that you may have points at the edges that give spill charge in one direction only, that there may me two points close together that give an asymmetric structure.
(ii) you have to count the number of clusters initially, before deciding to process further.

(h) Lastly, where is this code going to go ? On a machine in the LHC that decides about an event (triggering), or in post-processing. If it is post-processing, then you are certainly going to be doing it in C++ so it matches into almost all the CERN software.

So if it is C++ then you can do the following, first write a mapping class that allows you to geometrically determine which grid points are next to which other grid points.
Second write a simple class that takes a simple 16x16 find grid, and determines if there is sufficient points to have a point within it. [Yes it might have an outlying point that might be contributing to another grid [if allowed] but doesn't have the centre point], and that those points are close together. [Note, how much noise do you get?]

I think you then can start experimenting with approaches, you have two obvious ways forward, something like a neural network, that is something you seem to not want to do --computational expense etc, or something like a Bayisean approach, Start with a point that has a hit, then building up the most likely point to search and each point having either got the cluster past the 95% (or whatever the criteria) or below the 5% mark, ie. to be discarded, depending on the result. In the Bayisean approach you will find that it is better to get the result from a point that has the largest impact on the confidence of a cluster, if you have say a centre point and then 6 of the points surrounding it, searching the next 16 points (surrounding distance 2 points) gives little additional information since their probability is about 50%, it is actually looking further that may help. [Significantly dependent on the strength of the signal spread function]

Anyway, you have going to have fun by the sounds of things... But I guess to get meaningful information from this forum you are going to have to break the problem down into smaller pieces. [Does CERN not have its own forums ?? -- Can't believe they don't -- Although they might be a bit intimidating !]

Also I have never had anything to do with LHC etc so I don't really know how it works, so if I have got it wrong, please feel free to correct me.

Hi, sry for the late reply hol etc.. :)
StuXYZ your post has given me some very interesting ideas thx.

For completeness i would like to add that the siganl i get for each channel is the charge collected by the sensor for that given channel. Alot of what you have rightly pointed out is already taken care of ie the taking the data from optimal time slices of the detector electronics and determining wheather the signal is an actual event hit or Bkg noise.

The software i am constructing will be ran offline but has to be c++ to be compaticle with root, even c is a no no apparently for my case.

Once again thanks for the advice and yes CERN does have a forum but unfortunatly getting aurthorisation is taking its time :(