hps-java/src/main/java/org/lcsim/hps/recon/tracking
diff -u -r1.5 -r1.6
--- RearTransitionModule.java 15 Sep 2012 01:21:02 -0000 1.5
+++ RearTransitionModule.java 9 Nov 2012 01:40:52 -0000 1.6
@@ -22,7 +22,7 @@
/**
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: RearTransitionModule.java,v 1.5 2012/09/15 01:21:02 omoreno Exp $
+ * @version $Id: RearTransitionModule.java,v 1.6 2012/11/09 01:40:52 omoreno Exp $
*/
public class RearTransitionModule extends Driver {
@@ -37,6 +37,8 @@
double resistorValue = 100; // Ohms
double inputStageGain = 1.5;
+
+ boolean noiseless = false;
/**
* Default Ctor
@@ -74,6 +76,13 @@
// Find the ADC voltage resolution
adcVoltageResolution = (adcVHighRef - adcVLowRef)/quantizationLevels; // mV
}
+
+ /**
+ * Turn readout noise on/off
+ */
+ public void setNoiseless(boolean noiseless){
+ this.noiseless = noiseless;
+ }
/**
*
@@ -116,7 +125,10 @@
// Add pedestal and noise
double pedestal = HPSSVTCalibrationConstants.getPedestal(analogDatum.getSensor(), physicalChannel);
double noise = HPSSVTCalibrationConstants.getNoise(analogDatum.getSensor(), physicalChannel);
- apv25Output[index] += RandomGaussian.getGaussian(pedestal, noise);
+ if(!noiseless)
+ apv25Output[index] += RandomGaussian.getGaussian(pedestal, noise);
+ else
+ apv25Output[index] += pedestal;
}
// Add the digital data to the list