2 added + 8 modified, total 10 files
hps-java/src/main/java/org/lcsim/hps/recon/ecal
diff -u -r1.16 -r1.17
--- HPSEcalConditions.java 14 Aug 2012 01:33:22 -0000 1.16
+++ HPSEcalConditions.java 16 Aug 2012 01:06:30 -0000 1.17
@@ -17,7 +17,7 @@
/**
*
* @author meeg
- * @version $Id: HPSEcalConditions.java,v 1.16 2012/08/14 01:33:22 omoreno Exp $
+ * @version $Id: HPSEcalConditions.java,v 1.17 2012/08/16 01:06:30 meeg Exp $
*/
public class HPSEcalConditions extends Driver {
@@ -39,6 +39,7 @@
//subdetector name (for when this is used as a driver)
private String subdetectorName = "Ecal";
private static Subdetector subdetector;
+ private static boolean debug = false;
public HPSEcalConditions() {
}
@@ -83,7 +84,7 @@
public static boolean badChannelsLoaded() {
return badChannelsLoaded;
}
-
+
public static boolean gainsLoaded() {
return gainsLoaded;
}
@@ -174,7 +175,9 @@
expId.setValue(helper.getFieldIndex("ix"), x);
expId.setValue(helper.getFieldIndex("iy"), y);
badChannelsSet.add(helper.pack(expId).getValue());
- System.out.println("Adding bad crystal " + x + "," + y);
+ if (debug) {
+ System.out.println("Adding bad crystal " + x + "," + y);
+ }
}
}
}
@@ -323,7 +326,7 @@
public static Double physicalToPedestal(long physicalID) {
return daqToPedestalMap.get(physicalToDaqMap.get(physicalID));
}
-
+
public static Double physicalToGain(long physicalID) {
return physicalToGainMap.get(physicalID);
}
hps-java/src/main/java/org/lcsim/hps/recon/tracking
diff -N SimpleSvtReadout.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ SimpleSvtReadout.java 16 Aug 2012 01:06:30 -0000 1.1
@@ -0,0 +1,225 @@
+package org.lcsim.hps.recon.tracking;
+
+//--- java ---//
+import org.lcsim.hps.recon.tracking.apv25.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+//--- lcsim ---//
+import org.lcsim.detector.tracker.silicon.ChargeCarrier;
+import org.lcsim.detector.tracker.silicon.SiSensor;
+import org.lcsim.event.EventHeader;
+import org.lcsim.event.RawTrackerHit;
+import org.lcsim.event.base.BaseRawTrackerHit;
+import org.lcsim.geometry.Detector;
+import org.lcsim.hps.util.ClockSingleton;
+import org.lcsim.hps.util.RingBuffer;
+import org.lcsim.recon.tracking.digitization.sisim.CDFSiSensorSim;
+import org.lcsim.recon.tracking.digitization.sisim.SiElectrodeData;
+import org.lcsim.recon.tracking.digitization.sisim.SiElectrodeDataCollection;
+import org.lcsim.recon.tracking.digitization.sisim.SiSensorSim;
+import org.lcsim.recon.tracking.digitization.sisim.config.SimTrackerHitReadoutDriver;
+import org.lcsim.util.Driver;
+
+/**
+ *
+ * @author Omar Moreno <[log in to unmask]>
+ * @version $Id: SimpleSvtReadout.java,v 1.1 2012/08/16 01:06:30 meeg Exp $
+ */
+public class SimpleSvtReadout extends Driver {
+
+ private SiSensorSim siSimulation = new CDFSiSensorSim();
+ String outputCollection = "SVTRawTrackerHits";
+ private Map<SiSensor, APV25Pipeline[]> pipelineMap = new HashMap<SiSensor, APV25Pipeline[]>();
+ //readout period in ns
+ double readoutPeriod = Apv25Constants.SAMPLING_INTERVAL;
+ //readout period time offset in ns
+ double readoutOffset = 0.0;
+ private String readout = "TrackerHits";
+ private SimTrackerHitReadoutDriver readoutDriver = new SimTrackerHitReadoutDriver();
+
+ public SimpleSvtReadout() {
+ add(readoutDriver);
+ }
+
+ /**
+ *
+ */
+ @Override
+ public void detectorChanged(Detector detector) {
+ super.detectorChanged(detector);
+
+ String[] readouts = {readout};
+ readoutDriver.setCollections(readouts);
+
+ pipelineMap.clear();
+ for (SiSensor sensor : SvtUtils.getInstance().getSensors()) {
+ pipelineMap.put(sensor, new APV25Pipeline[HPSSVTConstants.TOTAL_STRIPS_PER_SENSOR]);
+ }
+ }
+
+ /**
+ *
+ */
+ @Override
+ public void process(EventHeader event) {
+ super.process(event);
+
+ //if at the end of a readout cycle, step all the pipelines
+ while (ClockSingleton.getTime() - readoutTime() + ClockSingleton.getDt() >= readoutPeriod) {
+ for (SiSensor sensor : SvtUtils.getInstance().getSensors()) {
+ APV25Pipeline[] pipelines = pipelineMap.get(sensor);
+ for (int i = 0; i < pipelines.length; i++) {
+ if (pipelines[i] != null) {
+ pipelines[i].step();
+ }
+ }
+ }
+ Apv25Full.apv25ClockCycle++;
+ }
+
+ for (SiSensor sensor : SvtUtils.getInstance().getSensors()) {
+ APV25Pipeline[] pipelines = pipelineMap.get(sensor);
+
+ // Set the sensor to be used in the charge deposition simulation
+ siSimulation.setSensor(sensor);
+
+ // Perform the charge deposition simulation
+ Map<ChargeCarrier, SiElectrodeDataCollection> electrodeDataMap = siSimulation.computeElectrodeData();
+
+ for (ChargeCarrier carrier : ChargeCarrier.values()) {
+
+ // If the sensor is capable of collecting the given charge carrier
+ // then obtain the electrode data for the sensor
+ if (sensor.hasElectrodesOnSide(carrier)) {
+
+ SiElectrodeDataCollection electrodeDataCol = electrodeDataMap.get(carrier);
+
+ // If there is no electrode data available create a new instance of electrode data
+ if (electrodeDataCol == null) {
+ electrodeDataCol = new SiElectrodeDataCollection();
+ }
+
+ // Loop over all sensor channels
+ for (Integer channel : electrodeDataCol.keySet()) {
+
+ // Get the electrode data for this channel
+ SiElectrodeData electrodeData = electrodeDataCol.get(channel);
+
+ // Get the charge in units of electrons
+ double charge = electrodeData.getCharge();
+
+ if (pipelines[channel] == null) {
+ pipelines[channel] = new APV25Pipeline();
+ }
+
+ for (int i = 0; i < 20; i++) {
+ pipelines[channel].addToCell(i, charge * pulseAmplitude((i + 1) * readoutPeriod + readoutTime() - ClockSingleton.getTime(), 50.0));
+ }
+ }
+ }
+ }
+
+ // Clear the sensors of all deposited charge
+ siSimulation.clearReadout();
+ }
+
+ // If an Ecal trigger is received, generate six local triggers in order to read out six
+ // samples
+ if (HPSAPV25.readoutBit) {
+// System.out.println("Got trigger");
+
+ HPSAPV25.readoutBit = false;
+
+ // Create a list to hold the analog data
+ List<RawTrackerHit> hits = new ArrayList<RawTrackerHit>();
+
+ for (SiSensor sensor : SvtUtils.getInstance().getSensors()) {
+ APV25Pipeline[] pipelines = pipelineMap.get(sensor);
+ for (int i = 0; i < pipelines.length; i++) {
+ if (pipelines[i] != null) {
+ short[] samples = new short[6];
+ for (int j = 0; j < 6; j++) {
+ samples[j] = (short) pipelines[i].getValue(j);
+// System.out.println(samples[j]);
+ }
+
+ // Find the side number (is 1)
+ int sideNumber;
+ if (sensor.hasElectrodesOnSide(ChargeCarrier.HOLE)) {
+ sideNumber = ChargeCarrier.HOLE.charge();
+ } else {
+ sideNumber = ChargeCarrier.ELECTRON.charge();
+ }
+ long cell_id = sensor.makeStripId(i, sideNumber).getValue();
+
+
+ RawTrackerHit hit = new BaseRawTrackerHit(0, cell_id, samples, null, sensor);
+// System.out.println("Making RTH");
+ hits.add(hit);
+ }
+ }
+ }
+
+ event.put(outputCollection, hits, RawTrackerHit.class, 0);
+
+ }
+ }
+
+ public class APV25Pipeline extends RingBuffer {
+
+ private int _trigger_latency = (int) Math.floor(270 / Apv25Constants.SAMPLING_INTERVAL);
+
+ public APV25Pipeline() {
+ super(Apv25Constants.ANALOG_PIPELINE_LENGTH);
+ }
+
+ /**
+ * Set the trigger latency
+ *
+ * @param latency : trigger latency in [ns]
+ */
+ public void setTriggerLatency(int latency) {
+ _trigger_latency = (int) Math.floor(latency / Apv25Constants.SAMPLING_INTERVAL);
+ }
+
+ @Override
+ public void addToCell(int position, double element) {
+ if (position + _trigger_latency > size) {
+ return;
+ }
+ super.addToCell(position + _trigger_latency, element);
+ }
+
+ /**
+ *
+ */
+ @Override
+ public String toString() {
+ String analogPipeline = "[ ";
+ for (int element = 0; element < Apv25Constants.ANALOG_PIPELINE_LENGTH; element++) {
+ if (element == ptr) {
+ analogPipeline += " TP ===>";
+ } else if (element == ptr + _trigger_latency) {
+ analogPipeline += " WP ===>";
+ }
+ analogPipeline += (array[element] + ", ");
+ }
+ analogPipeline += "] ";
+ return analogPipeline;
+ }
+ }
+
+ private double pulseAmplitude(double time, double tp) {
+ if (time <= 0.0) {
+ return 0.0;
+ }
+ return (time / tp) * Math.exp(1.0 - time / tp);
+ }
+
+ private double readoutTime() {
+ return Apv25Full.apv25ClockCycle * readoutPeriod + readoutOffset;
+ }
+}
hps-java/src/main/java/org/lcsim/hps/recon/tracking
diff -u -r1.5 -r1.6
--- HPSSVTConstants.java 13 Aug 2012 23:06:02 -0000 1.5
+++ HPSSVTConstants.java 16 Aug 2012 01:06:30 -0000 1.6
@@ -3,7 +3,7 @@
/**
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: HPSSVTConstants.java,v 1.5 2012/08/13 23:06:02 omoreno Exp $
+ * @version $Id: HPSSVTConstants.java,v 1.6 2012/08/16 01:06:30 meeg Exp $
*
*/
@@ -13,6 +13,7 @@
public static final int TOTAL_APV25_PER_HYBRID = 5;
public static final int TOTAL_APV25_CHANNELS = 128;
public static final int TOTAL_HYBRIDS_PER_FPGA = 3;
+ public static final int TOTAL_TEMPS_PER_HYBRID = 4;
// The Rear Transition Module gain
public static final double RTM_GAIN = 1.5;
hps-java/src/main/java/org/lcsim/hps/recon/tracking
diff -u -r1.6 -r1.7
--- HPSSVTDataBuffer.java 29 Apr 2012 17:00:12 -0000 1.6
+++ HPSSVTDataBuffer.java 16 Aug 2012 01:06:30 -0000 1.7
@@ -13,7 +13,7 @@
/**
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: HPSSVTDataBuffer.java,v 1.6 2012/04/29 17:00:12 omoreno Exp $
+ * @version $Id: HPSSVTDataBuffer.java,v 1.7 2012/08/16 01:06:30 meeg Exp $
*/
public class HPSSVTDataBuffer {
@@ -25,7 +25,7 @@
private static int eventNumber = 0;
int[] header = new int[6];
- int temp = 23; // C
+ int temp = FpgaData.temperatureToInt(23.0); // C
boolean debug = false;
hps-java/src/main/java/org/lcsim/hps/recon/tracking
diff -u -r1.2 -r1.3
--- FpgaData.java 29 Apr 2012 23:06:58 -0000 1.2
+++ FpgaData.java 16 Aug 2012 01:06:30 -0000 1.3
@@ -4,6 +4,7 @@
import static org.lcsim.hps.recon.tracking.HPSSVTConstants.TEMP_MASK;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
//--- org.lcsim ---//
@@ -26,14 +27,14 @@
* and ADC value to a temperature in celsius
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: FpgaData.java,v 1.2 2012/04/29 23:06:58 meeg Exp $
+ * @version $Id: FpgaData.java,v 1.3 2012/08/16 01:06:30 meeg Exp $
*/
public class FpgaData implements GenericObject {
int fpgaID;
List<Double> temperatures = new ArrayList<Double>();
int tail;
- public static double[] temperatureTable = null;
+ private static double[] temperatureTable = null;
/**
*
@@ -43,16 +44,28 @@
public FpgaData(int fpgaID, int[] data, int tail) {
this.fpgaID = fpgaID;
- int[] temperature = this.extractTemperature(data);
+ int[] temperature = extractTemperature(data);
// Fill the temperature lookup table
- this.fillTemperatureTable();
+ fillTemperatureTable();
this.tail = tail;
// Fill the temperature list
for (int index = 0; index < temperature.length; index++) {
- temperatures.add(temperatureTable[temperature[index]]);
+ temperatures.add(intToTemperature(temperature[index]));
+ }
+ }
+
+ public FpgaData(int fpgaID, double[] temperatures, int tail) {
+ this.fpgaID = fpgaID;
+
+ this.tail = tail;
+
+ this.temperatures.clear();
+ // Fill the temperature list
+ for (int index = 0; index < temperatures.length; index++) {
+ this.temperatures.add(temperatures[index]);
}
}
@@ -79,7 +92,7 @@
* Temperature lookup table. Takes an ADC value and returns a temperature in
* Celsius
*/
- private void fillTemperatureTable() {
+ private static void fillTemperatureTable() {
if (temperatureTable == null) {
temperatureTable = new double[ADC_TEMP_COUNT];
@@ -102,6 +115,38 @@
}
}
+ public static double intToTemperature(int tempIndex) {
+ fillTemperatureTable();
+ return temperatureTable[tempIndex];
+ }
+
+ public static int temperatureToInt(double temperature) {
+ fillTemperatureTable();
+ return Math.abs(Arrays.binarySearch(temperatureTable, temperature));
+ }
+
+ public int[] extractData() {
+ fillTemperatureTable();
+
+ int[] header = new int[(temperatures.size() + 1) / 2];
+ for (int i = 0; i < temperatures.size(); i++) {
+ if (i % 2 == 0) {
+ header[i / 2] = (header[i / 2] &= ~TEMP_MASK) | (temperatureToInt(temperatures.get(i)) & TEMP_MASK);
+ } else {
+ header[i / 2] = (header[i / 2] &= ~(TEMP_MASK << 16)) | ((temperatureToInt(temperatures.get(i)) & TEMP_MASK) << 16);
+ }
+ }
+ return header;
+ }
+
+ public int getFpga() {
+ return fpgaID;
+ }
+
+ public int getTail() {
+ return tail;
+ }
+
/**
* Get the temperature at a given index
*/
@@ -122,9 +167,9 @@
public int getIntVal(int index) {
switch (index) {
case 0:
- return fpgaID;
+ return getFpga();
case 1:
- return tail;
+ return getTail();
default:
throw new ArrayIndexOutOfBoundsException(index);
}
hps-java/src/main/java/org/lcsim/hps/recon/tracking
diff -u -r1.7 -r1.8
--- HPSSVTData.java 14 Aug 2012 00:58:03 -0000 1.7
+++ HPSSVTData.java 16 Aug 2012 01:06:30 -0000 1.8
@@ -15,7 +15,7 @@
*
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: HPSSVTData.java,v 1.7 2012/08/14 00:58:03 meeg Exp $
+ * @version $Id: HPSSVTData.java,v 1.8 2012/08/16 01:06:30 meeg Exp $
*/
public class HPSSVTData {
@@ -68,6 +68,11 @@
*/
private void createSVTDataPacket(int hybridNumber, int apvNumber,
int channelNumber, int fpgaAddress, short[] adc) {
+ createSVTDataPacket(hybridNumber, apvNumber, channelNumber, fpgaAddress, adc, data);
+ }
+
+ public static void createSVTDataPacket(int hybridNumber, int apvNumber,
+ int channelNumber, int fpgaAddress, short[] adc, int[] data) {
/*
* Sample Data consists of the following: Z[xx:xx] = Zeros, O[xx:xx] =
* Ones data[0] = O[0], Z[0], Hybrid[1:0], Z[0], ApvChip[2:0], Z[0],
@@ -127,7 +132,6 @@
// Add sample 5
data[3] = (data[3] &= ~(SAMPLE_MASK << 16)) | ((adc[5] & SAMPLE_MASK) << 16);
-
}
/**
@@ -284,6 +288,14 @@
return sensorChannel;
}
+ public static int getAPV(int sensorChannel) {
+ return TOTAL_APV25_PER_HYBRID - (sensorChannel / TOTAL_APV25_CHANNELS) - 1;
+ }
+
+ public static int getAPVChannel(int sensorChannel) {
+ return sensorChannel % TOTAL_APV25_CHANNELS;
+ }
+
public static int getSensorChannel(int[] data) {
return getSensorChannel(getAPVNumber(data), getChannelNumber(data));
}
hps-java/src/main/java/org/lcsim/hps/evio
diff -N SVTHitWriter_RTH.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ SVTHitWriter_RTH.java 16 Aug 2012 01:06:30 -0000 1.1
@@ -0,0 +1,138 @@
+package org.lcsim.hps.evio;
+
+import java.util.ArrayList;
+import java.util.List;
+import static org.lcsim.hps.evio.EventConstants.SVT_BANK_NUMBER;
+import static org.lcsim.hps.evio.EventConstants.SVT_BANK_TAG;
+import static org.lcsim.hps.evio.EventConstants.SVT_TOTAL_NUMBER_FPGAS;
+
+
+import org.jlab.coda.jevio.DataType;
+import org.jlab.coda.jevio.EventBuilder;
+import org.jlab.coda.jevio.EvioBank;
+import org.jlab.coda.jevio.EvioException;
+import org.lcsim.detector.tracker.silicon.SiSensor;
+import org.lcsim.event.EventHeader;
+import org.lcsim.event.RawTrackerHit;
+import org.lcsim.hps.recon.tracking.FpgaData;
+import org.lcsim.hps.recon.tracking.HPSSVTConstants;
+import org.lcsim.hps.recon.tracking.HPSSVTData;
+import org.lcsim.hps.recon.tracking.SvtUtils;
+
+/**
+ *
+ * @author Sho Uemura <[log in to unmask]>
+ * @version $Id: SVTHitWriter_RTH.java,v 1.1 2012/08/16 01:06:30 meeg Exp $
+ */
+public class SVTHitWriter_RTH implements HitWriter {
+
+ boolean debug = false;
+ private String hitCollectionName = "SVTRawTrackerHits";
+
+ public SVTHitWriter_RTH() {
+ }
+
+ public void setHitCollectionName(String hitCollectionName) {
+ this.hitCollectionName = hitCollectionName;
+ }
+
+ public boolean hasData(EventHeader event) {
+ return event.hasCollection(RawTrackerHit.class, hitCollectionName);
+ }
+
+ public void writeData(EventHeader event, EventBuilder builder) {
+ double[] temps = new double[HPSSVTConstants.TOTAL_HYBRIDS_PER_FPGA * HPSSVTConstants.TOTAL_TEMPS_PER_HYBRID];
+ for (int i = 0; i < HPSSVTConstants.TOTAL_HYBRIDS_PER_FPGA * HPSSVTConstants.TOTAL_TEMPS_PER_HYBRID; i++) {
+ temps[i] = 23.0;
+ }
+
+ List<RawTrackerHit> hits = event.get(RawTrackerHit.class, hitCollectionName);
+ List<FpgaData> fpgaData = new ArrayList<FpgaData>();
+
+ System.out.println("Writing " + hits.size() + " SVT hits");
+
+ List<List<int[]>> fpgaHits = new ArrayList<List<int[]>>();
+ for (int fpgaNumber = 0; fpgaNumber < SVT_TOTAL_NUMBER_FPGAS; fpgaNumber++) {
+ fpgaHits.add(new ArrayList<int[]>());
+ fpgaData.add(new FpgaData(fpgaNumber, temps, 0));
+ }
+
+ for (RawTrackerHit hit : hits) {
+ int fpgaAddress = SvtUtils.getInstance().getFPGA((SiSensor) hit.getDetectorElement());
+ int hybridNumber = SvtUtils.getInstance().getHybrid((SiSensor) hit.getDetectorElement());
+ int sensorChannel = hit.getIdentifierFieldValue("strip");
+ int apvNumber = HPSSVTData.getAPV(sensorChannel);
+ int channelNumber = HPSSVTData.getAPVChannel(sensorChannel);
+
+ int[] data = new int[4];
+ HPSSVTData.createSVTDataPacket(hybridNumber, apvNumber, channelNumber, fpgaAddress, hit.getADCValues(), data);
+ fpgaHits.get(fpgaAddress).add(data);
+ }
+
+ // SVT container bank.
+ EvioBank svtBank = new EvioBank(SVT_BANK_TAG, DataType.BANK, SVT_BANK_NUMBER);
+
+ // Iterate over FPGA's 0 - 6
+ for (int fpgaNumber = 0; fpgaNumber < SVT_TOTAL_NUMBER_FPGAS; fpgaNumber++) {
+
+ // Skip FPGA 7 for now
+ if (fpgaNumber == 7) {
+ continue;
+ }
+ FpgaData fpgaDatum = fpgaData.get(fpgaNumber);
+ int[] header = fpgaDatum.extractData();
+
+ // Get the raw int data buffer for this FPGA.
+ int[] dataBuffer = new int[header.length + 4 * fpgaHits.get(fpgaNumber).size() + 2];
+ int ptr = 0;
+
+ dataBuffer[ptr++] = 0;
+
+ System.arraycopy(header, 0, dataBuffer, ptr, header.length);
+ ptr += header.length;
+
+ for (int[] data : fpgaHits.get(fpgaNumber)) {
+ System.arraycopy(data, 0, dataBuffer, ptr, data.length);
+ ptr += data.length;
+ }
+
+ dataBuffer[ptr++] = fpgaDatum.getTail();
+
+ if (ptr != dataBuffer.length) {
+ throw new RuntimeException("tried to fill SVT buffer of length " + dataBuffer.length + " with " + ptr + " ints");
+ }
+
+ if (debug) {
+ System.out.println(this.getClass().getSimpleName() + ": FPGA " + fpgaNumber + " : Data size: " + dataBuffer.length);
+ }
+
+ // Bank for this FPGA's frame data.
+ EvioBank frameBank = new EvioBank(fpgaNumber, DataType.UINT32, fpgaNumber);
+ try {
+ // Add the FPGA bank to the SVT bank
+ builder.addChild(svtBank, frameBank);
+ // Add the SVT data to the FPGA bank
+ frameBank.appendIntData(dataBuffer);
+ builder.getEvent().setAllHeaderLengths();
+ System.out.println(frameBank.getTotalBytes());
+ System.out.println(svtBank.getTotalBytes());
+ System.out.println(builder.getEvent().getTotalBytes());
+ } catch (EvioException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ // Add the SVT bank to the Main EVIO bank
+ try {
+ builder.addChild(builder.getEvent(), svtBank);
+ } catch (EvioException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @Override
+ public void writeData(EventHeader event, EventHeader toEvent) {
+ List<RawTrackerHit> rawTrackerHits = event.get(RawTrackerHit.class, hitCollectionName);
+ System.out.println("Writing " + rawTrackerHits.size() + " SVT hits");
+ toEvent.put(hitCollectionName, rawTrackerHits, RawTrackerHit.class, 0);
+ }
+}
hps-java/src/main/java/org/lcsim/hps/evio
diff -u -r1.2 -r1.3
--- ECalHitWriter.java 3 Aug 2012 21:37:12 -0000 1.2
+++ ECalHitWriter.java 16 Aug 2012 01:06:30 -0000 1.3
@@ -25,7 +25,7 @@
/**
*
* @author Sho Uemura <[log in to unmask]>
- * @version $Id: ECalHitWriter.java,v 1.2 2012/08/03 21:37:12 meeg Exp $
+ * @version $Id: ECalHitWriter.java,v 1.3 2012/08/16 01:06:30 meeg Exp $
*/
public class ECalHitWriter implements HitWriter {
@@ -419,10 +419,12 @@
case EventConstants.ECAL_WINDOW_MODE:
case EventConstants.ECAL_PULSE_MODE:
List<RawTrackerHit> rawTrackerHits = event.get(RawTrackerHit.class, hitCollectionName);
+ System.out.println("Writing " + rawTrackerHits.size() + " ECal hits");
toEvent.put(hitCollectionName, rawTrackerHits, RawTrackerHit.class, 0, readoutName);
break;
case EventConstants.ECAL_PULSE_INTEGRAL_MODE:
List<RawCalorimeterHit> rawCalorimeterHits = event.get(RawCalorimeterHit.class, hitCollectionName);
+ System.out.println("Writing " + rawCalorimeterHits.size() + " ECal hits in integral format");
toEvent.put(hitCollectionName, rawCalorimeterHits, RawCalorimeterHit.class, 0, readoutName);
break;
default:
hps-java/src/main/java/org/lcsim/hps/evio
diff -u -r1.17 -r1.18
--- TestRunTriggeredReconToEvio.java 16 Aug 2012 00:58:52 -0000 1.17
+++ TestRunTriggeredReconToEvio.java 16 Aug 2012 01:06:30 -0000 1.18
@@ -28,7 +28,7 @@
private int eventsWritten = 0;
HPSEcalConditions ecalIDConverter = null;
ECalHitWriter ecalWriter = null;
- SVTHitWriter_RTH svtWriter = null;
+ SVTHitWriter svtWriter = null;
TriggerDataWriter triggerWriter = null;
List<HitWriter> writers = null;
private int ecalMode = EventConstants.ECAL_PULSE_INTEGRAL_MODE;
@@ -74,8 +74,7 @@
ecalWriter.setHitCollectionName(rawCalorimeterHitCollectionName);
writers.add(ecalWriter);
- svtWriter = new SVTHitWriter_RTH();
- svtWriter.debug = true;
+ svtWriter = new SVTHitWriter();
writers.add(svtWriter);
triggerWriter = new TriggerDataWriter();
hps-java/src/main/resources/org/lcsim/hps/steering
diff -u -r1.12 -r1.13
--- HPSTestRunReconToEvio.lcsim 14 Aug 2012 01:02:07 -0000 1.12
+++ HPSTestRunReconToEvio.lcsim 16 Aug 2012 01:06:30 -0000 1.13
@@ -79,9 +79,9 @@
<addNoise>true</addNoise>
</driver>
<!-- <driver name="SVTReadout"
- type="org.lcsim.hps.recon.tracking.apv25.SvtReadout">
- </driver>
- <driver name="SVT_RTM"
+ type="org.lcsim.hps.recon.tracking.SimpleSvtReadout">
+ </driver>-->
+<!-- <driver name="SVT_RTM"
type="org.lcsim.hps.recon.tracking.RearTransitionModule">
</driver>
<driver name="SVT_DPM"
CVSspam 0.2.12