<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://clonwiki0.jlab.org/wiki/index.php?action=history&amp;feed=atom&amp;title=DVCS_Cluster_finding_8-Oct-2007</id>
	<title>DVCS Cluster finding 8-Oct-2007 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://clonwiki0.jlab.org/wiki/index.php?action=history&amp;feed=atom&amp;title=DVCS_Cluster_finding_8-Oct-2007"/>
	<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=DVCS_Cluster_finding_8-Oct-2007&amp;action=history"/>
	<updated>2026-04-11T03:09:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=DVCS_Cluster_finding_8-Oct-2007&amp;diff=2650&amp;oldid=prev</id>
		<title>Boiarino at 18:40, 16 October 2007</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=DVCS_Cluster_finding_8-Oct-2007&amp;diff=2650&amp;oldid=prev"/>
		<updated>2007-10-16T18:40:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;    Attached are some images of the program that interfaces to the V1495&lt;br /&gt;
 module. This let me make a pattern, send it to the V1495, and retrieves&lt;br /&gt;
 the processed information from the V1495 that would be used for generating&lt;br /&gt;
 the trigger.&lt;br /&gt;
    [http://clonweb/wiki/clondocs/DVCS_Trigger/Trigger_Regular.png Trigger_Regular] is the algorithm as described in the specification&lt;br /&gt;
 document that I received. It looks at all possible 3x3 windows and&lt;br /&gt;
 determines if there are more hit towers than the programmed threshold&lt;br /&gt;
 (here the threshold was set to 4 - there had to be more than 4 hits in a&lt;br /&gt;
 3x3 window to define a cluster). As you can see 4 clusters were found in&lt;br /&gt;
 the sample image (the cluster count is also reported by the V1495 unit).&lt;br /&gt;
 The one in the bottom left has overlapping 3x3 windows that meet the&lt;br /&gt;
 cluster definition criteria. In this case, some logic could be used to&lt;br /&gt;
 determine that a neighboring cluster has fewer hits than the other&lt;br /&gt;
 neighber and so it could supress that report.&lt;br /&gt;
    Next, I played around a little more and wrote a simple algorithm that just&lt;br /&gt;
 just ran in my program (on my PC, not the V1495) that took the same data&lt;br /&gt;
 and caused adjacent hit towers (Up/down/left/right/all diagonals) to&lt;br /&gt;
 attract to each other. So if more hits were on the left side of a cluster,&lt;br /&gt;
 that cluster value would hop left if the weight was larger than its own&lt;br /&gt;
 (or any other direction if the weight were arragned so). I took the same&lt;br /&gt;
 data set as in the last image, and ran 3 iterations through this algorithm&lt;br /&gt;
 ([http://clonweb/wiki/clondocs/DVCS_Trigger/Trigger_Alg_Step1.png fig1] [http://clonweb/wiki/clondocs/DVCS_Trigger/Trigger_Alg_Step2.png fig2] [http://clonweb/wiki/clondocs/DVCS_Trigger/Trigger_Alg_Step3.png fig3]) and you can see the hits clump together and increase in count when two&lt;br /&gt;
 hits go to the same cell. The idea here would be to run this algorithm,&lt;br /&gt;
 and then apply a threshold to each cell to determine if it is a cluster or&lt;br /&gt;
 not. Anyway, you can see now the bottom left cell clumps together to a&lt;br /&gt;
 single point where the &amp;quot;center of mass&amp;quot; would have been for those original&lt;br /&gt;
 hits. So does the upper left. The upper right fails to clump into a single&lt;br /&gt;
 point because there is not bias to move either way because there is equal&lt;br /&gt;
 pull in both directions (this would be something that can be overcome by&lt;br /&gt;
 forcing them to always go a particular direction when pulls are equal).&lt;br /&gt;
    For the heck of it I sythesized this algorithm on the FPGA and found it&lt;br /&gt;
 will need about 3 times the available resources (not really a surprise)!&lt;br /&gt;
 This, or something of similar complexity could work if spread over more&lt;br /&gt;
 that one board. I&amp;#039;ve got some ideas for dealing with that if it is of&lt;br /&gt;
 interest.&lt;br /&gt;
    Determining the X/Y location of the clusters is actually a bit more&lt;br /&gt;
 difficult (especially if the latency needs to be kept low). This should be&lt;br /&gt;
 feasible, but it will take several more, at least, clock cycles beyond&lt;br /&gt;
 when a trigger has been determined. This is because all 424 potential&lt;br /&gt;
 clusters will have to be looked at and probably sorted. Just a guess is&lt;br /&gt;
 that it could take about 40ns beyond the assertion of the ASYNC trigger.&lt;br /&gt;
 If there is any flexibility here it may be of some use. I&amp;#039;ll certainly&lt;br /&gt;
 find out more when I get around to implementing this feature. Currently,&lt;br /&gt;
 I&amp;#039;m planning to focus on &amp;quot;properly&amp;quot; finding clusters.&lt;br /&gt;
    I&amp;#039;m interested in seeing what some real data looks like. There&amp;#039;s probably&lt;br /&gt;
 no need to format it because I can just read it in with some standard file&lt;br /&gt;
 I/O in c++.&lt;br /&gt;
    I need clarification on how to deal with adjacent cluster hits (whether to&lt;br /&gt;
 count them individually or not, or if we need to do further processing).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
</feed>