lcsim/src/org/lcsim/mc/CCDSim
diff -u -r1.2 -r1.3
--- ReconstructedCCDHit.java 23 Mar 2006 00:44:40 -0000 1.2
+++ ReconstructedCCDHit.java 5 Apr 2006 18:39:06 -0000 1.3
@@ -1,17 +1,21 @@
package org.lcsim.mc.CCDSim;
+
import java.io.*;
import java.util.*;
import org.lcsim.event.*;
+import org.lcsim.geometry.IDDecoder;
+import org.lcsim.geometry.Subdetector;
/**
- * class implementing SimTrackerHit for reconstructed from digitized CCD signals information.
- * It can be used in the track finding/fotting in place of ideal original Geant4 generated hit.
- * While the position of ideal hit does not take into account any effects of detector response
- * to the passage of the charge particle through sensitive layer, ReconstructedCcdHit position is
- * affected by diffusion of the charge in active layer, electronics noise, ADC scale, signal
+ * class implementing SimTrackerHit for reconstructed from digitized CCD signals
+ * information. It can be used in the track finding/fotting in place of ideal
+ * original Geant4 generated hit. While the position of ideal hit does not take
+ * into account any effects of detector response to the passage of the charge
+ * particle through sensitive layer, ReconstructedCcdHit position is affected by
+ * diffusion of the charge in active layer, electronics noise, ADC scale, signal
* clustering algorithm and so on.
- *
- * @author sinev U of Oregon; SLAC x2970 ; [log in to unmask]
+ *
+ * @author sinev U of Oregon; SLAC x2970 ; [log in to unmask]
* @see SimTrackerHit
* @see CCDSim
* @see CCD
@@ -19,101 +23,181 @@
public class ReconstructedCCDHit implements SimTrackerHit, java.io.Serializable
{
- double[] point = new double[3];
- double dedx = 0.;
- int ADCcounts = 0;
- double mom[] = {0.,0.,0.};
- SimTrackerHit parent = null;
-
- /**
- * constructor using hit position, energy loss and parent hit
- * @param x double reconstructed hit position X coordinate
- * @param y double reconstructed hit position Y coordinate
- * @param z double reconstructed hit position Z coordinate
- * @param de double particle energy loss deposited in the this hit (in MeV)
- * @param par SimTrackerHit parent of this hit (the tracker hit contributed most of the signal)
- */
- ReconstructedCCDHit(double x,double y,double z, double de,SimTrackerHit par)
- {
- double r = Math.sqrt(x*x + y*y);
- double pax = x;
- double pay = y;
- if(par != null)
- {
- pax = par.getPoint()[0];
- pay = par.getPoint()[1];
- mom = par.getMomentum();
- }
- double pr = Math.sqrt(pax*pax+pay*pay);
- point[0]=x*pr/r;
- point[1]=y*pr/r;
- point[2]=z*pr/r;
- dedx = de;
- parent = par;
- }
-
- // SimTrackerHit access functions:
-
-// public int getLayer() { if(parent != null) return parent.getLayer(); return 0; }
- /**
- * hit position
- * @return <code>double[]</code> 3 coordinates of the hit position
- */
- public double[] getPoint() { return point; }
- public double[] getMomentum()
- {
- return mom;
- }
- /**
- * dEdx - energy deposition
- * @return <code>double</code> energy deposition of the charged particle into given hit
- */
- public double getdEdx() { return dedx; }
- /**
- * encoded hit cell identification to use in the CellIDDecoder
- * @return cell id which can be used by CellIDDecoder to determine hits layer,
- * barrel/endcap affiliation and so on
- */
- public int getCellID() { if(parent != null) return parent.getCellID(); return 0; }
- /**
- * retrieving hit origination time
- * @return <code>double</code> time hit was generated (in nanoseconds)
- */
- public double getTime() { if(parent != null) return parent.getTime(); return 0.; }
- /**
- * finding MC particle which generated this hit
- * @return <code>MCParticle</code> which generated hit. If hit has contribution from more than
- * one particle, the largest contributor in the hit signal will be returned.
- * May return null if MC parent of the hit is not defigned (some type of background hits)
- */
- public MCParticle getMCParticle() { if(parent != null) return parent.getMCParticle(); return null; }
-// public int getSystem() {if(parent != null) return parent.getSystem(); return 0; }
-// public boolean isEndcap() { if(parent != null) return parent.isEndcap(); return false; }
-// public boolean isNorth() { if(parent != null) return parent.isNorth(); return false; }
+ public IDDecoder getIDDecoder()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
- // Extra access functions:
-/**
- * access to parent hit
- * @return <code>SimTrackerHit</code> original monte-carlo hit, contributed most of the signal to this hit
- */
- public SimTrackerHit getParent() { return parent; }
- /**
- * retrieving hit digitized amplitude
- * @return sum of digitized signals (ADC counts) from all pixels composing hit
- */
- public int getADCCounts() { return ADCcounts; }
- /**
- * setting hit digitized amplitude
- * @param cnts - summ of ADC counts from all pixels, composing hit. Is set by CCDClusterCenter
- */
- public void setADCCounts(int cnts) {ADCcounts=cnts;}
+ public int getLayer()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Subdetector getSubdetector()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ double[] point = new double[3];
+ double dedx = 0.;
+ int ADCcounts = 0;
+ double mom[] =
+ { 0., 0., 0. };
+ SimTrackerHit parent = null;
+
+ /**
+ * constructor using hit position, energy loss and parent hit
+ *
+ * @param x
+ * double reconstructed hit position X coordinate
+ * @param y
+ * double reconstructed hit position Y coordinate
+ * @param z
+ * double reconstructed hit position Z coordinate
+ * @param de
+ * double particle energy loss deposited in the this hit (in MeV)
+ * @param par
+ * SimTrackerHit parent of this hit (the tracker hit contributed
+ * most of the signal)
+ */
+ ReconstructedCCDHit(double x, double y, double z, double de, SimTrackerHit par)
+ {
+ double r = Math.sqrt(x * x + y * y);
+ double pax = x;
+ double pay = y;
+ if (par != null)
+ {
+ pax = par.getPoint()[0];
+ pay = par.getPoint()[1];
+ mom = par.getMomentum();
+ }
+ double pr = Math.sqrt(pax * pax + pay * pay);
+ point[0] = x * pr / r;
+ point[1] = y * pr / r;
+ point[2] = z * pr / r;
+ dedx = de;
+ parent = par;
+ }
+
+ // SimTrackerHit access functions:
+
+ // public int getLayer() { if(parent != null) return parent.getLayer();
+ // return 0; }
+ /**
+ * hit position
+ *
+ * @return <code>double[]</code> 3 coordinates of the hit position
+ */
+ public double[] getPoint()
+ {
+ return point;
+ }
+
+ public double[] getMomentum()
+ {
+ return mom;
+ }
+
+ /**
+ * dEdx - energy deposition
+ *
+ * @return <code>double</code> energy deposition of the charged particle
+ * into given hit
+ */
+ public double getdEdx()
+ {
+ return dedx;
+ }
+ /**
+ * encoded hit cell identification to use in the CellIDDecoder
+ *
+ * @return cell id which can be used by CellIDDecoder to determine hits
+ * layer, barrel/endcap affiliation and so on
+ */
+ public int getCellID()
+ {
+ if (parent != null)
+ return parent.getCellID();
+ return 0;
+ }
+
+ /**
+ * retrieving hit origination time
+ *
+ * @return <code>double</code> time hit was generated (in nanoseconds)
+ */
+ public double getTime()
+ {
+ if (parent != null)
+ return parent.getTime();
+ return 0.;
+ }
+
+ /**
+ * finding MC particle which generated this hit
+ *
+ * @return <code>MCParticle</code> which generated hit. If hit has
+ * contribution from more than one particle, the largest contributor
+ * in the hit signal will be returned. May return null if MC parent
+ * of the hit is not defigned (some type of background hits)
+ */
+ public MCParticle getMCParticle()
+ {
+ if (parent != null)
+ return parent.getMCParticle();
+ return null;
+ }
+
+ // public int getSystem() {if(parent != null) return parent.getSystem();
+ // return 0; }
+ // public boolean isEndcap() { if(parent != null) return parent.isEndcap();
+ // return false; }
+ // public boolean isNorth() { if(parent != null) return parent.isNorth();
+ // return false; }
+
+ // Extra access functions:
+ /**
+ * access to parent hit
+ *
+ * @return <code>SimTrackerHit</code> original monte-carlo hit,
+ * contributed most of the signal to this hit
+ */
+ public SimTrackerHit getParent()
+ {
+ return parent;
+ }
+
+ /**
+ * retrieving hit digitized amplitude
+ *
+ * @return sum of digitized signals (ADC counts) from all pixels composing
+ * hit
+ */
+ public int getADCCounts()
+ {
+ return ADCcounts;
+ }
+
+ /**
+ * setting hit digitized amplitude
+ *
+ * @param cnts -
+ * summ of ADC counts from all pixels, composing hit. Is set by
+ * CCDClusterCenter
+ */
+ public void setADCCounts(int cnts)
+ {
+ ADCcounts = cnts;
+ }
/* Need this is fulfill SimTrackerHit interface --JM 03-22-2006 */
public double getPathLength()
{
- throw new RuntimeException("The getPathLength method from the SimTrackerHit interface is not implemented by ReconstructedCCDHit.");
+ throw new RuntimeException(
+ "The getPathLength method from the SimTrackerHit interface is not implemented by ReconstructedCCDHit.");
}
}
-
-
lcsim/src/org/lcsim/event
diff -u -r1.7 -r1.8
--- SimTrackerHit.java 5 Apr 2006 11:19:33 -0000 1.7
+++ SimTrackerHit.java 5 Apr 2006 18:39:06 -0000 1.8
@@ -5,8 +5,8 @@
public interface SimTrackerHit
{
-// /** Layer containing hit */
-// public int getLayer();
+ /** Layer containing hit */
+ public int getLayer();
/** x,y,z point of (center-of) hit */
double[] getPoint();
@@ -30,9 +30,9 @@
*/
double getPathLength();
-// /** Returns the IDDecoder associated with this hit */
-// IDDecoder getIDDecoder();
-//
-// /** Using the IDDecoder, returns the Subdetector associated with this hit */
-// Subdetector getSubdetector();
-}
\ No newline at end of file
+ /** Returns the IDDecoder associated with this hit */
+ IDDecoder getIDDecoder();
+
+ /** Using the IDDecoder, returns the Subdetector associated with this hit */
+ Subdetector getSubdetector();
+}