Commit in hps-java/src/main/java/org/lcsim/hps/recon/ecal on MAIN
HPSEcalRawConverter.java+19-11.8 -> 1.9
Added overloaded function to supply gain as parameter.

hps-java/src/main/java/org/lcsim/hps/recon/ecal
HPSEcalRawConverter.java 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- HPSEcalRawConverter.java	22 Jun 2012 22:39:36 -0000	1.8
+++ HPSEcalRawConverter.java	25 Jul 2012 15:57:06 -0000	1.9
@@ -79,4 +79,22 @@
         //+0.0000001 is a horrible hack to ensure rawEnergy!=BaseCalorimeterHit.UNSET_CORRECTED_ENERGY
         return h;
     }
-}
+
+     public CalorimeterHit HitDtoA(BaseRawCalorimeterHit hit, int window,double g) {
+        if (hit.getTimeStamp()%64 !=0) {
+            System.out.println("unexpected timestamp "+hit.getTimeStamp());
+        }
+        double time = hit.getTimeStamp()/16.0;
+        long id = hit.getCellID();
+        double rawEnergy = g*(hit.getAmplitude() - window * getPedestal(hit));
+//                Hep3Vector pvec = hit.getDetectorElement().getGeometry().getPosition();
+//                double [] pos = new double[3];
+//                pos[0] = pvec.x();
+//                pos[1] = pvec.y();
+//                pos[2] = pvec.z();
+        CalorimeterHit h = new HPSRawCalorimeterHit(rawEnergy + 0.0000001, hit.getPosition(), time, id, 0);
+        //+0.0000001 is a horrible hack to ensure rawEnergy!=BaseCalorimeterHit.UNSET_CORRECTED_ENERGY
+        return h;
+    }
+
+ }
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1