Commit in projects/lcsim/trunk/recon-drivers on MAIN
pom.xml+52839 -> 2840
src/main/java/org/lcsim/util/OverlayDriver.java+7-42839 -> 2840
+12-4
2 modified files
change for compatibility with Apache commons-math 2.2 instead of 1.2; ***needs verification***

projects/lcsim/trunk/recon-drivers
pom.xml 2839 -> 2840
--- projects/lcsim/trunk/recon-drivers/pom.xml	2013-12-10 21:28:50 UTC (rev 2839)
+++ projects/lcsim/trunk/recon-drivers/pom.xml	2013-12-10 22:16:39 UTC (rev 2840)
@@ -28,5 +28,10 @@
             <artifactId>lcsim-tracking</artifactId>
             <version>${org.lcsim.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-math</artifactId>
+            <version>2.2</version>
+        </dependency>
     </dependencies>
 </project>

projects/lcsim/trunk/recon-drivers/src/main/java/org/lcsim/util
OverlayDriver.java 2839 -> 2840
--- projects/lcsim/trunk/recon-drivers/src/main/java/org/lcsim/util/OverlayDriver.java	2013-12-10 21:28:50 UTC (rev 2839)
+++ projects/lcsim/trunk/recon-drivers/src/main/java/org/lcsim/util/OverlayDriver.java	2013-12-10 22:16:39 UTC (rev 2840)
@@ -16,8 +16,9 @@
 import java.util.Map;
 
 import org.apache.commons.math.MathException;
-import org.apache.commons.math.distribution.DistributionFactory;
+//import org.apache.commons.math.distribution.DistributionFactory;
 import org.apache.commons.math.distribution.PoissonDistribution;
+import org.apache.commons.math.distribution.PoissonDistributionImpl;
 import org.freehep.record.source.NoSuchRecordException;
 import org.lcsim.detector.IDetectorElement;
 import org.lcsim.event.EventHeader;
@@ -51,7 +52,7 @@
 
 	static protected double c = 299.792458; // speed of light in mm/ns
 	static protected SpacePoint interactionPoint = new SpacePoint(); // assuming 0 0 0 as IP
-	protected DistributionFactory df;
+	//protected DistributionFactory df;
 	protected double tofCaloOffset = -0.25; // tolerance for keeping calo hits: tof is calculated to center of cell, but interaction can happen earlier
 	protected int bunchCrossings;
 	protected double bunchSpacing;
@@ -79,7 +80,7 @@
 	 * Default constructor
 	 */
 	public OverlayDriver() {
-		df = DistributionFactory.newInstance();
+		//df = DistributionFactory.newInstance();
 		bunchCrossings = 1;
 		bunchSpacing = 1.;
 		randomSignal = true;
@@ -254,7 +255,9 @@
 	@Override
 	protected void startOfData() {
 		if (overlayWeight != 0.) {
-			backgroundDistribution = df.createPoissonDistribution(overlayWeight);
+		        // backgroundDistribution = df.createPoissonDistribution(overlayWeight);
+		        // Changed for compatibility with commons-math 2.2 instead of 1.2.  Needs verification!
+                        backgroundDistribution = new PoissonDistributionImpl(overlayWeight);
 		}
 	}
 	
SVNspam 0.1


Use REPLY-ALL to reply to list

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