Commit in lcsim/src/org/lcsim/contrib/SiStripSim on MAIN
ReadoutChip.java+27added 1.1
Kpix.java+74added 1.1
+101
2 added files
A brief first skecth of the readout chip.

lcsim/src/org/lcsim/contrib/SiStripSim
ReadoutChip.java added at 1.1
diff -N ReadoutChip.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ReadoutChip.java	30 Apr 2007 21:23:54 -0000	1.1
@@ -0,0 +1,27 @@
+/*
+ * ReadoutChip.java
+ *
+ * Created on April 20, 2007, 9:46 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package org.lcsim.contrib.SiStripSim;
+
+import org.lcsim.detector.tracker.silicon.SiSensorElectrodes;
+import java.util.Map;
+
+/**
+ *
+ * @author tknelson
+ */
+public interface ReadoutChip
+{
+    public Map<Integer,Integer> readout(SiSensorElectrodes electrodes);
+    
+    
+    
+    
+    
+}

lcsim/src/org/lcsim/contrib/SiStripSim
Kpix.java added at 1.1
diff -N Kpix.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Kpix.java	30 Apr 2007 21:23:54 -0000	1.1
@@ -0,0 +1,74 @@
+/*
+ * Kpix.java
+ *
+ * Created on April 20, 2007, 10:09 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package org.lcsim.contrib.SiStripSim;
+
+import java.util.TreeMap;
+import java.util.SortedMap;
+import java.util.Map;
+import org.lcsim.detector.tracker.silicon.*;
+
+/**
+ *
+ * @author tknelson
+ */
+public class Kpix implements ReadoutChip
+{
+    // Fields    
+
+    // Static
+    static double ELECTRON_CHARGE = 1.60217646E-4; // fC
+            
+    static double NOISE_INTERCEPT = 300.0; // electrons
+    static double NOISE_SLOPE = 30.0; // electrons
+
+    static double HIGH_GAIN_DEFAULT = 10.0; // counts/fC
+//    static double LOW_GAIN_DEFAULT = 0.5; // counts/fC
+//    static double GAIN_SWITCHOVER = ??;
+    
+    // Variables    
+    
+    /** Creates a new instance of Kpix */
+    public Kpix()
+    {
+    }
+
+    public Map<Integer,Integer> readout(SiSensorElectrodes electrodes)
+    {
+        Map<Integer,Double> electrode_charge = electrodes.getChargeMap();
+        int nchannels = electrodes.getNCells();
+        
+        addNoise(electrode_charge, nchannels);              
+        return digitize(electrode_charge);
+    }
+    
+    private void addNoise(Map<Integer,Double> electrode_charge, int nchannels)
+    {
+        for (Integer channel : electrode_charge.keySet())
+        {
+            
+        }
+        return;
+    }
+    
+    private Map<Integer,Integer> digitize(Map<Integer,Double> electrode_charge)
+    {        
+        
+        Map<Integer,Integer> digitized_charge = new TreeMap<Integer,Integer>();
+                
+        for (Integer channel : electrode_charge.keySet())
+        {
+            double analog = electrode_charge.get(channel);
+            int digital = (int)Math.floor(analog * ELECTRON_CHARGE * HIGH_GAIN_DEFAULT);
+        }
+        return digitized_charge;
+    }
+    
+    
+}
CVSspam 0.2.8