Commit in lcsim/src/org/lcsim/recon/tracking/digitization on MAIN
SiliconRawHit.java+69added 1.1
SiliconRawHitMC.java+57added 1.1
+126
2 added files
First draft of raw tracker hits. work in progress.

lcsim/src/org/lcsim/recon/tracking/digitization
SiliconRawHit.java added at 1.1
diff -N SiliconRawHit.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SiliconRawHit.java	14 Jun 2006 15:09:25 -0000	1.1
@@ -0,0 +1,69 @@
+/*
+ * SiliconRawHit.java
+ *
+ * Created on February 21, 2006, 5:41 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package org.lcsim.recon.tracking.digitization;
+
+/**
+ *
+ * @author ngraf
+ */
+public class SiliconRawHit
+{
+    private int _cellID0;
+    private int _cellID1;
+    private int _timeStamp;
+    private int _adcCounts;
+    
+    /** Creates a new instance of SiliconRawHit */
+    public SiliconRawHit(int cellID0, int cellID1, int timeStamp, int adcCounts)
+    {
+        _cellID0 = cellID0;
+        _cellID1 = cellID1;
+        _timeStamp = timeStamp;
+        _adcCounts = adcCounts;
+    }
+
+    /** The id0 of the cell that recorded the hit.
+     */
+    public int getCellID0()
+    {
+        return _cellID0;
+    }
+
+    /** The id1 of the cell that recorded the hit.
+     */
+    public int getCellID1()
+    {
+        return _cellID1;
+    }
+
+    /** The detector specific time stamp of the hit.
+     */
+    public int getTimeStamp()
+    {
+        return _timeStamp;
+    }
+
+    /** The ADC counts of the hit.
+     */
+    public int getADCCounts()
+    {
+        return _adcCounts;
+    }
+    
+    /** Adds counts adcCounts at time timeStamp.
+     * If timeStamp is prior to current time, time will be overwritten. 
+     */
+    public void addHit(int timeStamp, int adcCounts)
+    {
+        _adcCounts+=adcCounts;
+        if(timeStamp<_timeStamp) _timeStamp=timeStamp;
+    }
+    
+}

lcsim/src/org/lcsim/recon/tracking/digitization
SiliconRawHitMC.java added at 1.1
diff -N SiliconRawHitMC.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SiliconRawHitMC.java	14 Jun 2006 15:09:25 -0000	1.1
@@ -0,0 +1,57 @@
+/*
+ * SiliconRawHitMC.java
+ *
+ * Created on February 21, 2006, 5:44 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package org.lcsim.recon.tracking.digitization;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.lcsim.event.MCParticle;
+import org.lcsim.event.SimTrackerHit;
+
+/**
+ * A SiliconRawHit with information about the Monte Carlo particles 
+ * which contributed to this hit.
+ * @author ngraf
+ */
+public class SiliconRawHitMC extends SiliconRawHit
+{
+    private List<MCParticle> _mcParticles = new ArrayList<MCParticle>();
+    private List<SimTrackerHit> _mcHits = new ArrayList<SimTrackerHit>();
+    
+    /** Creates a new instance of SiliconRawHitMC */
+    public SiliconRawHitMC(int cellID0, int cellID1, int timeStamp, int adcCounts, MCParticle mcParticle)
+    {
+        super(cellID0, cellID1, timeStamp, adcCounts);
+        _mcParticles.add(mcParticle);
+    }
+    
+    public List<MCParticle> mcParticles()
+    {
+        return _mcParticles;
+    }
+    
+    public void addHit(int timeStamp, int adcCounts, SimTrackerHit hit)
+    {
+        addHit(timeStamp, adcCounts);
+        _mcParticles.add(hit.getMCParticle());
+        _mcHits.add(hit);
+    }
+    
+    public void addHit(SiliconRawHitMC hit)
+    {
+        addHit( hit.getTimeStamp(), hit.getADCCounts());
+        _mcParticles.addAll(hit.mcParticles());
+        _mcHits.addAll(hit.simTrackerHits());
+    }
+
+    public List<SimTrackerHit> simTrackerHits()
+    {
+        return _mcHits;
+    }
+}
CVSspam 0.2.8