Commit in hps-java/src/main/java/org/lcsim/hps/recon/tracking on MAIN | |||
HPSSVTSensorSetup.java | +54 | -16 | 1.9 -> 1.10 |
Added automatic switch that checks for long sensors and uses a more accurate estimation of the strip capacitance. Currently hardcoded to apply for the HPS double layer setup using expected S/N=16.
diff -u -r1.9 -r1.10 --- HPSSVTSensorSetup.java 14 Aug 2012 00:58:03 -0000 1.9 +++ HPSSVTSensorSetup.java 25 Oct 2012 22:23:49 -0000 1.10 @@ -3,17 +3,12 @@
import hep.physics.matrix.BasicMatrix; import hep.physics.vec.BasicHep3Vector; import hep.physics.vec.VecOp;
-
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
- -import org.lcsim.detector.IDetectorElement; -import org.lcsim.detector.IRotation3D; -import org.lcsim.detector.ITranslation3D; -import org.lcsim.detector.RotationPassiveXYZ; -import org.lcsim.detector.Transform3D; -import org.lcsim.detector.Translation3D;
+import org.lcsim.detector.*;
import org.lcsim.detector.solids.Box;
+import org.lcsim.detector.solids.LineSegment3D;
import org.lcsim.detector.solids.Polygon3D; import org.lcsim.detector.tracker.silicon.ChargeCarrier; import org.lcsim.detector.tracker.silicon.SiSensor;
@@ -27,21 +22,32 @@
* @author Mathew Graham <[log in to unmask]> * @author Omar Moreno <[log in to unmask]> * @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: HPSSVTSensorSetup.java,v 1.9 2012/08/14 00:58:03 meeg Exp $
+ * @version $Id: HPSSVTSensorSetup.java,v 1.10 2012/10/25 22:23:49 phansson Exp $
*/ public class HPSSVTSensorSetup extends Driver { boolean debug = false; String subdetectorName = "Tracker"; // Sensor Characteristics
- private double readoutStripPitch = 0.060; // micro-m - private double senseStripPitch = 0.030; // micro-m
+ private double readoutStripPitch = 0.060; // mm + private double senseStripPitch = 0.030; // mm
private double readoutStripCapacitanceIntercept = 0;
- private double readoutStripCapacitanceSlope = 0.16; // pf/cm
+ private double readoutStripCapacitanceSlope = 0.16; // pf/mm
private double senseStripCapacitanceIntercept = 0;
- private double senseStripCapacitanceSlope = 0.16; // pf/cm
+ private double senseStripCapacitanceSlope = 0.16; // pf/mm
private double readoutTransferEfficiency = 0.986; private double senseTransferEfficiency = 0.419;
+ /* + * Adding separate strip capacitance for long detectors following + * S/N = mip_charge/(270e- + 35*C[pf/cm]*L[cm] + * e.g. for expected S/N=16 and L=20cm -> C=0.1757pf/mm + * This should be taken into account by the noise model -> FIX THIS. + */ + private double longSensorLengthThreshold = 190.0; //mm + private double readoutLongStripCapacitanceSlope = 0.1757; // pf/mm + private double senseLongStripCapacitanceSlope = 0.1757; // pf/mm + +
// Set of sensors Set<SiSensor> sensors = new HashSet<SiSensor>();
@@ -114,13 +120,22 @@
System.out.println("The number of readout strips is " + readoutElectrodes.getNCells()); System.out.println("The number of sense strips is " + senseElectrodes.getNCells()); }
-
+ + double roCap = this.getStripLength(sensor) > longSensorLengthThreshold ? readoutLongStripCapacitanceSlope : readoutStripCapacitanceSlope; + double senseCap = this.getStripLength(sensor) > longSensorLengthThreshold ? senseLongStripCapacitanceSlope : senseStripCapacitanceSlope; +
// Set the strip capacitance. readoutElectrodes.setCapacitanceIntercept(readoutStripCapacitanceIntercept);
- readoutElectrodes.setCapacitanceSlope(readoutStripCapacitanceSlope);
+ readoutElectrodes.setCapacitanceSlope(roCap);
senseElectrodes.setCapacitanceIntercept(senseStripCapacitanceIntercept);
- senseElectrodes.setCapacitanceSlope(senseStripCapacitanceSlope);
+ senseElectrodes.setCapacitanceSlope(senseCap);
+ if(debug) { + System.out.printf("%s: Sensor %s has strip length %.3f\n",this.getClass().getSimpleName(),sensor.getName(),this.getStripLength(sensor)); + System.out.printf("%s: ro electrodes capacitance %.3f (cell0 %.3f)\n",this.getClass().getSimpleName(),readoutElectrodes.getCapacitance(),readoutElectrodes.getCapacitance(0)); + System.out.printf("%s: ro sense capacitance %.3f (cell0 %.3f)\n",this.getClass().getSimpleName(),senseElectrodes.getCapacitance(),senseElectrodes.getCapacitance(0)); + } +
// Set sense and readout electrodes. sensor.setSenseElectrodes(senseElectrodes); sensor.setReadoutElectrodes(readoutElectrodes);
@@ -135,6 +150,29 @@
} }
+ double getStripLength(SiSensor sensor) { + /* + * Returns the length of the strip + * This is getting the face of the sensor and then getting the longest edge + * VERY DANGEROUS -> FIX THIS! + */ + double length = 0; + List<Polygon3D> faces = ((Box) sensor.getGeometry().getLogicalVolume().getSolid()).getFacesNormalTo(new BasicHep3Vector(0,0,1)); + for(Polygon3D face : faces) { + //System.out.printf("%s: Sensor %s polygon3D %s\n",this.getClass().getSimpleName(),sensor.getName(),face.toString()); + List<LineSegment3D> edges = face.getEdges(); + for(LineSegment3D edge : edges) { + double l = edge.getLength(); + if(l>length) { + length = l; + } + //System.out.printf("%s: edge %.3f \n",this.getClass().getSimpleName(),edge.getLength()); + } + } + + return length; + } +
/** * Set the readout strip capacitance *
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1