Commit in hps-java/src/main/java/org/lcsim/hps/recon/tracking on MAIN | |||
HPSSVTSensorSetup.java | +24 | -90 | 1.4 -> 1.5 |
fix electrodes transform; does not need 90 degree rotation
diff -u -r1.4 -r1.5 --- HPSSVTSensorSetup.java 16 Feb 2012 23:23:27 -0000 1.4 +++ HPSSVTSensorSetup.java 28 Feb 2012 00:03:15 -0000 1.5 @@ -1,16 +1,12 @@
-
package org.lcsim.hps.recon.tracking;
-//--- Java ---// -import java.util.HashSet; -import java.util.Set; - -//--- HEP ---//
import hep.physics.matrix.BasicMatrix; import hep.physics.vec.BasicHep3Vector; import hep.physics.vec.VecOp;
-//--- org.lcsim ---//
+import java.util.HashSet; +import java.util.Set; +
import org.lcsim.detector.IDetectorElement; import org.lcsim.detector.IRotation3D; import org.lcsim.detector.ITranslation3D;
@@ -26,13 +22,14 @@
import org.lcsim.util.Driver; /**
+ * Setup driver for the HPSTracker subdetector.
* * @author Mathew Graham <[log in to unmask]> * @author Omar Moreno <[log in to unmask]>
- * @version $Id: HPSSVTSensorSetup.java,v 1.4 2012/02/16 23:23:27 jeremy Exp $
+ * @author Jeremy McCormick <[log in to unmask]> + * @version $Id: HPSSVTSensorSetup.java,v 1.5 2012/02/28 00:03:15 jeremy Exp $
*/
-public class HPSSVTSensorSetup extends Driver { -
+public class HPSSVTSensorSetup extends Driver {
String subdetectorName = "Tracker"; boolean debug = true;
@@ -51,22 +48,13 @@
// Set of sensors Set<SiSensor> sensors = new HashSet<SiSensor>();
- /** - * Default Constructor (Not in use) - */ - public HPSSVTSensorSetup(){}
+ public HPSSVTSensorSetup() {}
- /** - * - */ - public HPSSVTSensorSetup(String subdetectorName) - {
+ public HPSSVTSensorSetup(String subdetectorName) {
this.subdetectorName = subdetectorName; }
- @Override - public void detectorChanged(Detector detector) - {
+ public void detectorChanged(Detector detector) {
// Call the sub-Driver's detectorChanged methods. super.detectorChanged(detector);
@@ -92,11 +80,9 @@
* * @param subdetector */
- private void configureSensors(Set<SiSensor> sensors) - {
+ private void configureSensors(Set<SiSensor> sensors) {
// Loop through all the sensors in the set
- for(SiSensor sensor : sensors) - {
+ for(SiSensor sensor : sensors) {
System.out.println("setting up sensor " + sensor.getName()); // Set the sensor Id //setSensorId(sensor);
@@ -117,7 +103,8 @@
//System.out.println(electrodesPosition.toString()); // Align the strips with the edge of the sensor
- IRotation3D electrodesRotation = new RotationPassiveXYZ(0, 0, Math.PI/2); // Is this the right rotation???
+ //IRotation3D electrodesRotation = new RotationPassiveXYZ(0, 0, Math.PI/2); // Is this the right rotation???
+ IRotation3D electrodesRotation = new RotationPassiveXYZ(0, 0, 0);
//IRotation3D electrodesRotation = new RotationPassiveXYZ(0, 0, 0); // Is this the right rotation??? Transform3D electrodesTransform = new Transform3D(electrodesPosition, electrodesRotation);
@@ -125,8 +112,10 @@
SiStrips readoutElectrodes = new SiStrips(ChargeCarrier.HOLE, readoutStripPitch, sensor, electrodesTransform); SiStrips senseElectrodes = new SiStrips(ChargeCarrier.HOLE, senseStripPitch, (readoutElectrodes.getNCells()*2-1), sensor, electrodesTransform);
- System.out.println(this.getClass().getName() + ": The number of readout strips are " + readoutElectrodes.getNCells()); - System.out.println(this.getClass().getName() + ": The number of sense strips are " + senseElectrodes.getNCells());
+ if (debug) { + System.out.println(this.getClass().getName() + ": The number of readout strips are " + readoutElectrodes.getNCells()); + System.out.println(this.getClass().getName() + ": The number of sense strips are " + senseElectrodes.getNCells()); + }
// Set the strip capacitance readoutElectrodes.setCapacitanceIntercept(readoutStripCapacitanceIntercept);
@@ -145,61 +134,12 @@
} /**
- * Set the SVT sensor ID. - * - * @param sensor - */ - /* - private void setSensorId(SiSensor sensor) - { - // This is ugly but it works - String sensorParentNames - = sensor.getParent().getParent().getName(); - - String[] sensorDescriptions = sensorParentNames.split("_"); - - if(sensorDescriptions[1].matches("positive")){ - - // Get the layer number - int layerNumber - = Integer.parseInt(sensorDescriptions[2].substring(5)); - - if(debug) - System.out.println(this.getClass().getName() + ": layer number " + layerNumber); - - // Set the sensor ID - sensor.setSensorID(2*layerNumber - 2); - - if(debug) - System.out.println(this.getClass().getName() + ": sensor number " + sensor.getSensorID()); - - } else { - - // Get the layer number - int layerNumber - = Integer.parseInt(sensorDescriptions[3].substring(9)); - - if(debug) - System.out.println(this.getClass().getName() + ": layer number " + layerNumber); - - // Set the sensor ID - sensor.setSensorID(2*layerNumber - 1); - - if(debug) - System.out.println(this.getClass().getName() + ": sensor number " + sensor.getSensorID()); - - } - } - */ - - /**
* Set the readout strip capacitance * * @param intercept * @param slope */
- public void setReadoutStripCapacitance(double intercept, double slope) - {
+ public void setReadoutStripCapacitance(double intercept, double slope) {
readoutStripCapacitanceIntercept = intercept; readoutStripCapacitanceSlope = slope; }
@@ -210,8 +150,7 @@
* @param intercept * @param slope */
- public void setSenseStripCapacitance(double intercept, double slope) - {
+ public void setSenseStripCapacitance(double intercept, double slope) {
senseStripCapacitanceIntercept = intercept; senseStripCapacitanceSlope = slope; }
@@ -221,8 +160,7 @@
* * @param strip pitch */
- public void setReadoutStripPitch(double pitch) - {
+ public void setReadoutStripPitch(double pitch) {
readoutStripPitch = pitch; }
@@ -231,8 +169,7 @@
* * @param strip pitch */
- public void setSenseStripPitch(double pitch) - {
+ public void setSenseStripPitch(double pitch) {
senseStripPitch = pitch; }
@@ -241,8 +178,7 @@
* * @param efficiency */
- public void setReadoutTransferEfficiency(double efficiency) - {
+ public void setReadoutTransferEfficiency(double efficiency) {
readoutTransferEfficiency = efficiency; }
@@ -251,9 +187,7 @@
* * @param efficiency */
- public void setSenseTransferEfficiency(double efficiency) - {
+ public void setSenseTransferEfficiency(double efficiency) {
senseTransferEfficiency = efficiency; }
-
}
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