Commit in java/trunk/hps-java/src/main/java/org/lcsim/hps/readout/ecal on MAIN
FADCEcalReadoutDriver.java+3-11143 -> 144
change shaping function so integral = 1

java/trunk/hps-java/src/main/java/org/lcsim/hps/readout/ecal
FADCEcalReadoutDriver.java 143 -> 144
--- java/trunk/hps-java/src/main/java/org/lcsim/hps/readout/ecal/FADCEcalReadoutDriver.java	2014-01-31 00:13:49 UTC (rev 143)
+++ java/trunk/hps-java/src/main/java/org/lcsim/hps/readout/ecal/FADCEcalReadoutDriver.java	2014-01-31 02:07:09 UTC (rev 144)
@@ -210,9 +210,9 @@
             //normalization constant from cal gain (MeV/integral bit) to amplitude gain (amplitude bit/GeV)
             double gain;
             if (fixedGain > 0) {
-                gain = 1.0 / (fixedGain * ECalUtils.MeV * (pulseIntegral() / readoutPeriod));
+                gain = readoutPeriod / (fixedGain * ECalUtils.MeV);
             } else {
-                gain = 1.0 / (EcalConditions.physicalToGain(cellID) * ECalUtils.MeV * (pulseIntegral() / readoutPeriod));
+                gain = readoutPeriod / (EcalConditions.physicalToGain(cellID) * ECalUtils.MeV);
             }
 
             double currentValue = gain * eDepBuffer.currentValue();
@@ -458,7 +458,7 @@
                 return 0.0;
             }
             if (tp > 0.0) {
-                return (time / tp) * Math.exp(1.0 - time / tp);
+                return ((time / tp) * Math.exp(1.0 - time / tp)) / (tp * Math.E);
             } else {
                 if (time < -tp) {
                     return 1.0;
@@ -471,14 +471,6 @@
         }
     }
 
-    private double pulseIntegral() {
-        if (useCRRCShape) {
-            return tp * Math.E;
-        } else {
-            return 0.0; //TODO: new pulse shape definition for 2014
-        }
-    }
-
     private class FADCPipeline {
 
         private int[] array;
SVNspam 0.1