Commit in hps-java/src/main/java/org/lcsim/hps/recon/tracking on MAIN | |||
HPSSVTSensorSetup.java | +28 | -45 | 1.3 -> 1.4 |
diff -u -r1.3 -r1.4 --- HPSSVTSensorSetup.java 15 Feb 2012 20:03:16 -0000 1.3 +++ HPSSVTSensorSetup.java 16 Feb 2012 23:23:27 -0000 1.4 @@ -29,12 +29,12 @@
* * @author Mathew Graham <[log in to unmask]> * @author Omar Moreno <[log in to unmask]>
- * @version $Id: HPSSVTSensorSetup.java,v 1.3 2012/02/15 20:03:16 jeremy Exp $
+ * @version $Id: HPSSVTSensorSetup.java,v 1.4 2012/02/16 23:23:27 jeremy Exp $
*/ public class HPSSVTSensorSetup extends Driver { String subdetectorName = "Tracker";
- boolean debug = false;
+ boolean debug = true;
// Sensor Characteristics private double readoutStripPitch = 0.060; // micro-m
@@ -82,8 +82,7 @@
sensors.addAll(detectorElement.findDescendants(SiSensor.class)); if(debug) System.err.println(this.getClass().getName() + ": Added " + sensors.size() + " sensors");
- -
+
// Configure the sensors configureSensors(sensors); }
@@ -96,68 +95,52 @@
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);
- Box sensorSolid - = (Box) sensor.getGeometry().getLogicalVolume().getSolid();
+ Box sensorSolid = (Box) sensor.getGeometry().getLogicalVolume().getSolid();
- Polygon3D pSide - = sensorSolid.getFacesNormalTo( - new BasicHep3Vector(0, 0, 1)).get(0); - Polygon3D nSide = sensorSolid.getFacesNormalTo( - new BasicHep3Vector(0, 0, -1)).get(0);
+ Polygon3D pSide = sensorSolid.getFacesNormalTo(new BasicHep3Vector(0, 0, 1)).get(0); + Polygon3D nSide = sensorSolid.getFacesNormalTo(new BasicHep3Vector(0, 0, -1)).get(0);
// p side collects holes sensor.setBiasSurface(ChargeCarrier.HOLE, pSide); // n side collects electrons sensor.setBiasSurface(ChargeCarrier.ELECTRON, nSide);
- // Translate to the outside of the box in order to setup - // electrodes - ITranslation3D electrodesPosition - = new Translation3D(VecOp.mult(-pSide.getDistance(), - pSide.getNormal())); - - // Align the strips with the edge of the sensor - IRotation3D electrodesRotation - = new RotationPassiveXYZ(0, 0, Math.PI/2); - Transform3D electrodesTransform - = new Transform3D(electrodesPosition, electrodesRotation); - - // Set the number of readout and sense electrodes - SiStrips readoutElectrodes - = new SiStrips(ChargeCarrier.HOLE, readoutStripPitch, sensor, - electrodesTransform); - SiStrips senseElectrodes - = new SiStrips(ChargeCarrier.HOLE, senseStripPitch, - (readoutElectrodes.getNCells()*2-1), - sensor, electrodesTransform);
+ // Translate to the outside of the box in order to setup electrodes. + ITranslation3D electrodesPosition = new Translation3D(VecOp.mult(-pSide.getDistance(), pSide.getNormal())); + //System.out.println("electrodes position..."); + //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, 0); // Is this the right rotation??? + Transform3D electrodesTransform = new Transform3D(electrodesPosition, electrodesRotation); + + // Set the number of readout and sense electrodes. + 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()); // Set the strip capacitance
- readoutElectrodes.setCapacitanceIntercept( - readoutStripCapacitanceIntercept); - readoutElectrodes.setCapacitanceSlope( - readoutStripCapacitanceSlope); - senseElectrodes.setCapacitanceIntercept( - senseStripCapacitanceIntercept); - senseElectrodes.setCapacitanceSlope( - senseStripCapacitanceSlope);
+ readoutElectrodes.setCapacitanceIntercept(readoutStripCapacitanceIntercept); + readoutElectrodes.setCapacitanceSlope(readoutStripCapacitanceSlope); + senseElectrodes.setCapacitanceIntercept(senseStripCapacitanceIntercept); + senseElectrodes.setCapacitanceSlope(senseStripCapacitanceSlope);
// Set sense and readout electrodes sensor.setSenseElectrodes(senseElectrodes); sensor.setReadoutElectrodes(readoutElectrodes); // Set the charge transfer efficiency
- double[][] transferEfficiencies - = {{readoutTransferEfficiency, senseTransferEfficiency}}; - sensor.setTransferEfficiencies(ChargeCarrier.HOLE, - new BasicMatrix(transferEfficiencies));
+ double[][] transferEfficiencies = {{readoutTransferEfficiency, senseTransferEfficiency}}; + sensor.setTransferEfficiencies(ChargeCarrier.HOLE, new BasicMatrix(transferEfficiencies));
} }
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