Print

Print


Author: [log in to unmask]
Date: Wed Sep 21 12:41:44 2016
New Revision: 4489

Log:
fixed bug in time dependent ecal gains driver

Modified:
    java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/TimeDependentEcalGains2016.java

Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/TimeDependentEcalGains2016.java
 =============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/TimeDependentEcalGains2016.java	(original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/TimeDependentEcalGains2016.java	Wed Sep 21 12:41:44 2016
@@ -41,10 +41,15 @@
             15844.2,
             25784.6
     };
+    
+    private double beamEnergy2016 = 2.306;
     protected double getGain(long timeStamp) {
         for(int i = 0; i<rangeStarts.length; i++){
             if(timeStamp > rangeStarts[i] && timeStamp<rangeEnds[i]){
-                return A[i]-B[i]*Math.exp(-(timeStamp-rangeStarts[i])/C[i]);
+            	
+            	//this is from fitting the fee peak position as a function of time.  
+            	double fittedFeePeak = A[i]-B[i]*Math.exp(-(timeStamp-rangeStarts[i])/C[i]);
+                return beamEnergy2016/fittedFeePeak;
             }
         }
         return 1;