5 modified files
hps-java/src/main/java/org/lcsim/hps/recon/tracking/apv25
diff -u -r1.4 -r1.5
--- Apv25Full.java 16 Aug 2012 01:11:50 -0000 1.4
+++ Apv25Full.java 17 Aug 2012 01:17:07 -0000 1.5
@@ -5,6 +5,7 @@
import static org.lcsim.hps.recon.tracking.apv25.Apv25Constants.FRONT_END_GAIN;
import static org.lcsim.hps.recon.tracking.apv25.Apv25Constants.MIP;
import static org.lcsim.hps.recon.tracking.apv25.Apv25Constants.SAMPLING_INTERVAL;
+import static org.lcsim.hps.recon.tracking.apv25.Apv25Constants.MULTIPLEXER_GAIN;
//--- hps-java ---//
import org.lcsim.hps.util.ClockSingleton;
@@ -13,7 +14,7 @@
/**
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: Apv25Full.java,v 1.4 2012/08/16 01:11:50 omoreno Exp $
+ * @version $Id: Apv25Full.java,v 1.5 2012/08/17 01:17:07 omoreno Exp $
*/
public class Apv25Full {
@@ -77,7 +78,8 @@
// Only readout the channel if the channel isn't bad
if(!this.getChannel(channel).isBadChannel()){
- data.setChannelData(channel, channels[channel].pipeline.readout());
+ double sample = (channels[channel].pipeline.readout()/FRONT_END_GAIN)*MULTIPLEXER_GAIN;
+ data.setChannelData(channel, sample);
}
}
return data;
@@ -147,6 +149,20 @@
}
/**
+ *
+ */
+ public double getBaseline(){
+ return this.baseline;
+ }
+
+ /**
+ *
+ */
+ public double getNoise(){
+ return this.noise;
+ }
+
+ /**
* Shape the injected charge
*
* @param charge
@@ -186,7 +202,7 @@
// Note: ptr gives the position of the trigger pointer
- private int triggerLatency = (int) Math.floor(100 /* ns */ / SAMPLING_INTERVAL);
+ private int triggerLatency = 0;
private int writerPointer = 0;
/**
@@ -197,7 +213,7 @@
// Initialize the pipeline to the APV25 pipeline length
super(ANALOG_PIPELINE_LENGTH);
- System.out.println("Trigger Latency: " + triggerLatency);
+ triggerLatency = (int) Math.floor(220 /* ns */ / SAMPLING_INTERVAL);
// Initialize the position of the trigger pointer to a random position
this.ptr = (int) (Math.random()*ANALOG_PIPELINE_LENGTH);
@@ -280,7 +296,6 @@
Apv25ShaperSignal(double charge) {
// Find the maximum amplitude of the shaper signal
maxAmp = (charge/MIP)*FRONT_END_GAIN; // mV
- System.out.println(this.getClass().getSimpleName()+ ": Maximum shaper signal: " + maxAmp);
}
/**
hps-java/src/main/java/org/lcsim/hps/recon/tracking/apv25
diff -u -r1.2 -r1.3
--- Apv25AnalogData.java 13 Aug 2012 23:09:42 -0000 1.2
+++ Apv25AnalogData.java 17 Aug 2012 01:17:08 -0000 1.3
@@ -6,7 +6,7 @@
/**
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: Apv25AnalogData.java,v 1.2 2012/08/13 23:09:42 omoreno Exp $
+ * @version $Id: Apv25AnalogData.java,v 1.3 2012/08/17 01:17:08 omoreno Exp $
*/
public class Apv25AnalogData {
@@ -19,24 +19,24 @@
private double[] address = {-4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0};
private double error = 4.0;
private double[] samples = new double[128];
-
/**
* Default Ctor
*/
public Apv25AnalogData(){
- // Create the array which will contain the output. The array values will range
- // from -4 microAmps to 4 microAmps
- for(int index = 0; index < samples.length; index++){
- samples[index] = -4.0; // microAmps
- }
+
// Copy the header, address, error and samples
System.arraycopy(header, 0, apv25AnalogOutput, 0, header.length);
System.arraycopy(address, 0, apv25AnalogOutput, 3, address.length);
apv25AnalogOutput[11] = error;
- System.arraycopy(samples, 0, apv25AnalogOutput, 12, samples.length);
+
+ // Create the array which will contain the output. The array values will range
+ // from -4 microAmps to 4 microAmps
+ for(int index = 12; index < apv25AnalogOutput.length; index++){
+ apv25AnalogOutput[index] = -4.0; // microAmps
+ }
}
/**
@@ -54,8 +54,7 @@
*
*/
public void setChannelData(int channel, double data){
- samples[channel] = data;
- apv25AnalogOutput[12 + channel] = data;
+ apv25AnalogOutput[12 + channel] += data;
}
/**
@@ -97,6 +96,7 @@
*
*/
public double[] getSamples(){
+ System.arraycopy(apv25AnalogOutput, 12, samples, 0, samples.length);
return samples;
}
@@ -117,7 +117,7 @@
/**
*
*/
- public int getApv(){
+ public int getApvNumber(){
return this.apv25;
}
}
hps-java/src/main/java/org/lcsim/hps/recon/tracking/apv25
diff -u -r1.3 -r1.4
--- Apv25Constants.java 15 Aug 2012 02:52:59 -0000 1.3
+++ Apv25Constants.java 17 Aug 2012 01:17:08 -0000 1.4
@@ -3,7 +3,7 @@
/**
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: Apv25Constants.java,v 1.3 2012/08/15 02:52:59 omoreno Exp $
+ * @version $Id: Apv25Constants.java,v 1.4 2012/08/17 01:17:08 omoreno Exp $
*/
public class Apv25Constants {
@@ -23,4 +23,7 @@
// Length of the APV25 analog pipeline
public static final int ANALOG_PIPELINE_LENGTH = 192;
+ // The APV25 gain after multiplexing
+ public static final double MULTIPLEXER_GAIN = 1;
+
}
hps-java/src/main/java/org/lcsim/hps/recon/tracking/apv25
diff -u -r1.2 -r1.3
--- Apv25DigitalData.java 13 Aug 2012 23:09:42 -0000 1.2
+++ Apv25DigitalData.java 17 Aug 2012 01:17:08 -0000 1.3
@@ -6,7 +6,7 @@
/**
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: Apv25DigitalData.java,v 1.2 2012/08/13 23:09:42 omoreno Exp $
+ * @version $Id: Apv25DigitalData.java,v 1.3 2012/08/17 01:17:08 omoreno Exp $
*/
public class Apv25DigitalData {
@@ -30,6 +30,7 @@
if(apv25DigitalOutput.length != this.apv25DigitalOutput.length)
throw new RuntimeException("APV25 output format is invalid!");
+ System.arraycopy(apv25DigitalOutput, 0, this.apv25DigitalOutput, 0, apv25DigitalOutput.length);
System.arraycopy(apv25DigitalOutput, 0, header, 0, header.length);
System.arraycopy(apv25DigitalOutput, 3, address, 0, address.length);
error = apv25DigitalOutput[11];
hps-java/src/main/java/org/lcsim/hps/recon/tracking/apv25
diff -u -r1.4 -r1.5
--- SvtReadout.java 16 Aug 2012 01:11:50 -0000 1.4
+++ SvtReadout.java 17 Aug 2012 01:17:08 -0000 1.5
@@ -37,7 +37,7 @@
/**
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: SvtReadout.java,v 1.4 2012/08/16 01:11:50 omoreno Exp $
+ * @version $Id: SvtReadout.java,v 1.5 2012/08/17 01:17:08 omoreno Exp $
*/
public class SvtReadout extends Driver {
@@ -154,7 +154,8 @@
}
}
- event.put(apv25AnalogDataCollectioName, analogData, Apv25AnalogData.class, 0);
+ if(!analogData.isEmpty())
+ event.put(apv25AnalogDataCollectioName, analogData, Apv25AnalogData.class, 0);
}
/**
@@ -249,8 +250,6 @@
+ halfModule.getAPV25Number(physicalChannel)*TOTAL_APV25_CHANNELS + (TOTAL_APV25_CHANNELS - 1);
System.out.println(this.getClass().getSimpleName() + ": Channel " + physicalChannel + " pipeline: " + halfModule.getAPV25(physicalChannel).getChannel(channel).getPipeline().toString() );
}
-
- sensorToChannel.get(sensor).remove(physicalChannel);
}
}
@@ -264,6 +263,8 @@
analogDatum.setApv(apvN);
analogData.add(analogDatum);
}
+ // Increment the pointer positions
+ halfModule.incrementPointerPositions();
}
return analogData;
CVSspam 0.2.12