Commit in projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking on MAIN | |||
spacegeom/CartesianPointTensorTest.java | +5 | -5 | 2968 -> 2969 |
/CylindricalPointTensorTest.java | +3 | -3 | 2968 -> 2969 |
/SpacePointTensorTest.java | +2 | -2 | 2968 -> 2969 |
/SphericalPointTensorTest.java | +3 | -3 | 2968 -> 2969 |
trffit/FullFitKalman_Test.java | +4 | -4 | 2968 -> 2969 |
trfzp/PropZZRKTest.java | +36 | -36 | 2968 -> 2969 |
+53 | -53 |
Turned off console output from tests
--- projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/spacegeom/CartesianPointTensorTest.java 2014-02-10 22:56:38 UTC (rev 2968) +++ projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/spacegeom/CartesianPointTensorTest.java 2014-02-10 23:09:20 UTC (rev 2969) @@ -13,7 +13,7 @@
*/ public class CartesianPointTensorTest extends TestCase {
-
+ boolean debug = false;
public void testCartesianPointTensor() { int np = 10; // Number of points data.
@@ -126,8 +126,8 @@
t[it][0][0], t[it][0][1], t[it][0][2], t[it][1][0], t[it][1][1], t[it][1][2], t[it][2][0], t[it][2][1], t[it][2][2]);
- System.out.println("Cartesian coordinates."); - System.out.println(tensor0);
+ if(debug) System.out.println("Cartesian coordinates."); + if(debug) System.out.println(tensor0);
CartesianPoint point0 = new CartesianPoint(p[ip][0], p[ip][1], p[ip][2]); CartesianPointTensor tensor0a = new CartesianPointTensor(point0, t[it][0][0], t[it][0][1], t[it][0][2],
@@ -135,8 +135,8 @@
t[it][2][0], t[it][2][1], t[it][2][2]); Assert.assertTrue(tensor0.equals(tensor0a)); SpacePointTensor tensor0b = new SpacePointTensor(tensor0);
- System.out.println("tensor0: \n" + tensor0); - System.out.println("tensor0b: \n" +tensor0b);
+ if(debug) System.out.println("tensor0: \n" + tensor0); + if(debug) System.out.println("tensor0b: \n" +tensor0b);
Assert.assertTrue(tensor0.equals(tensor0b)); tensor0b = tensor0; Assert.assertTrue(tensor0.equals(tensor0b));
--- projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/spacegeom/CylindricalPointTensorTest.java 2014-02-10 22:56:38 UTC (rev 2968) +++ projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/spacegeom/CylindricalPointTensorTest.java 2014-02-10 23:09:20 UTC (rev 2969) @@ -12,7 +12,7 @@
*/ public class CylindricalPointTensorTest extends TestCase {
-
+ boolean debug = false;
public void testCylindricalPointTensor() { int np = 10; // Number of points data.
@@ -123,8 +123,8 @@
t[it][0][0], t[it][0][1], t[it][0][2], t[it][1][0], t[it][1][1], t[it][1][2], t[it][2][0], t[it][2][1], t[it][2][2]);
- System.out.println("Cylindrical coordinates."); - System.out.println(tensor1);
+ if(debug) System.out.println("Cylindrical coordinates."); + if(debug) System.out.println(tensor1);
CylindricalPoint point1 = new CylindricalPoint(p[ip][0], p[ip][1], p[ip][2]); CylindricalPointTensor tensor1a = new CylindricalPointTensor (point1, t[it][0][0], t[it][0][1], t[it][0][2],
--- projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/spacegeom/SpacePointTensorTest.java 2014-02-10 22:56:38 UTC (rev 2968) +++ projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/spacegeom/SpacePointTensorTest.java 2014-02-10 23:09:20 UTC (rev 2969) @@ -10,11 +10,11 @@
*/ public class SpacePointTensorTest extends TestCase {
-
+ boolean debug = false;
public void testSpacePointTensor() { SpacePointTensor spt = new SpacePointTensor();
- System.out.println(spt);
+ if(debug) System.out.println(spt);
//TODO should check that everything is initialized to zero // trust Java for now. }
--- projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/spacegeom/SphericalPointTensorTest.java 2014-02-10 22:56:38 UTC (rev 2968) +++ projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/spacegeom/SphericalPointTensorTest.java 2014-02-10 23:09:20 UTC (rev 2969) @@ -12,7 +12,7 @@
*/ public class SphericalPointTensorTest extends TestCase {
-
+ boolean debug = false;
public void testSphericalPointTensor() { int np = 10; // Number of points data.
@@ -124,8 +124,8 @@
t[it][0][0], t[it][0][1], t[it][0][2], t[it][1][0], t[it][1][1], t[it][1][2], t[it][2][0], t[it][2][1], t[it][2][2]);
- System.out.println("Spherical coordinates."); - System.out.println(tensor2);
+ if(debug) System.out.println("Spherical coordinates."); + if(debug) System.out.println(tensor2);
SphericalPoint point2 = new SphericalPoint(p[ip][0], p[ip][1], p[ip][2]); SphericalPointTensor tensor2a = new SphericalPointTensor(point2, t[it][0][0], t[it][0][1], t[it][0][2],
--- projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/trffit/FullFitKalman_Test.java 2014-02-10 22:56:38 UTC (rev 2968) +++ projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/trffit/FullFitKalman_Test.java 2014-02-10 23:09:20 UTC (rev 2969) @@ -29,7 +29,7 @@
*/ public class FullFitKalman_Test extends TestCase {
- private boolean debug;
+ private boolean debug = false;
/** Creates a new instance of FullFitKalman_Test */ public void testFullFitKalman() {
@@ -37,7 +37,7 @@
String ok_prefix = component + " (I): "; String error_prefix = component + " test (E): ";
- System.out.println(ok_prefix + "-------- Testing component " + component
+ if(debug) System.out.println(ok_prefix + "-------- Testing component " + component
+ ". --------" ); //********************************************************************
@@ -61,7 +61,7 @@
//********************************************************************
- System.out.println(ok_prefix + "Create clusters and generate prediction."
+ if(debug) System.out.println(ok_prefix + "Create clusters and generate prediction."
); List clusters = new ArrayList(); int nmsmt = 5;
@@ -73,7 +73,7 @@
clusters.add( new ClusTestFit1(stest,msmt[i],emsmt[i]) ); avg.addPair(msmt[i],emsmt[i]); };
- System.out.println("avg = "+avg );
+ if(debug) System.out.println("avg = "+avg );
//********************************************************************
--- projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/trfzp/PropZZRKTest.java 2014-02-10 22:56:38 UTC (rev 2968) +++ projects/lcsim/trunk/trf/src/test/java/org/lcsim/recon/tracking/trfzp/PropZZRKTest.java 2014-02-10 23:09:20 UTC (rev 2969) @@ -18,13 +18,13 @@
public class PropZZRKTest extends TestCase {
- private boolean debug = true;
+ private boolean debug = false;
public void testPropZZRK() { ConstantMagneticField field = new ConstantMagneticField(0., 0., 2.); PropZZRK prop = new PropZZRK(field);
- System.out.println(prop);
+ if(debug) System.out.println(prop);
// Construct equivalent PropZZ propagator. PropZZ prop0 = new PropZZ(2.0);
@@ -35,7 +35,7 @@
// Here we propagate some tracks both forward and backward and then // each back to the original track. We check that the returned // track parameters match those of the original track.
- System.out.println("Check reversibility.");
+ if(debug) System.out.println("Check reversibility.");
double z1[] = {100.0, -100.0, 100.0, -100.0, 100.0, -100.0, 100.0, 100.0}; double z2[] = {150.0, -50.0, 50.0, -150.0, 50.0, -50.0, 150.0, 50.0}; double x[] = {10.0, 1.0, -1.0, 2.0, 2.0, -2.0, 3.0, 0.0};
@@ -52,7 +52,7 @@
for (i = 0; i < ntrk; ++i) {
- System.out.println("********** Propagate track " + i + ". **********");
+ if(debug) System.out.println("********** Propagate track " + i + ". **********");
PropStat pstat = new PropStat(); SurfZPlane sz1 = new SurfZPlane(z1[i]); SurfZPlane sz2 = new SurfZPlane(z2[i]);
@@ -69,7 +69,7 @@
tdir = TrackSurfaceDirection.TSD_BACKWARD; } VTrack trv1 = new VTrack(sz1.newPureSurface(), vec1, tdir);
- System.out.println(" starting: " + trv1);
+ if(debug) System.out.println(" starting: " + trv1);
// // Find the direction that will propagate this track from z1 to z2. //
@@ -86,8 +86,8 @@
VTrack trv2f = trv1; pstat = prop.vecDirProp(trv2f, sz2, dir); assert (pstat.success());
- System.out.println(" forward: " + trv2f); - System.out.println(pstat);
+ if(debug) System.out.println(" forward: " + trv2f); + if(debug) System.out.println(pstat);
if (dir == PropDir.FORWARD) { assert (pstat.forward()); }
@@ -100,11 +100,11 @@
VTrack trv2f0 = trv1; pstat = prop0.vecDirProp(trv2f0, sz2, dir); assert (pstat.success());
- System.out.println(" forward: " + trv2f0); - System.out.println(pstat);
+ if(debug) System.out.println(" forward: " + trv2f0); + if(debug) System.out.println(pstat);
double diff0 = sz2.vecDiff(trv2f.vector(), trv2f0.vector()).amax();
- System.out.println("diff: " + diff0);
+ if(debug) System.out.println("diff: " + diff0);
assert (diff0 < maxdiff); //
@@ -112,8 +112,8 @@
VTrack trv2fb = trv2f; pstat = prop.vecDirProp(trv2fb, sz1, rdir); assert (pstat.success());
- System.out.println(" f return: " + trv2fb); - System.out.println(pstat);
+ if(debug) System.out.println(" f return: " + trv2fb); + if(debug) System.out.println(pstat);
if (rdir == PropDir.FORWARD) { assert (pstat.forward()); }
@@ -123,15 +123,15 @@
// Check the return differences. double difff = sz1.vecDiff(trv2fb.vector(), trv1.vector()).amax();
- System.out.println("diff: " + difff);
+ if(debug) System.out.println("diff: " + difff);
assert (difff < maxdiff); // // Check no-move forward propagation to the same surface. VTrack trv1s = trv1; pstat = prop.vecDirProp(trv1s, sz1, PropDir.FORWARD); assert (pstat.success());
- System.out.println(" same f: " + trv1s); - System.out.println(pstat);
+ if(debug) System.out.println(" same f: " + trv1s); + if(debug) System.out.println(pstat);
assert (pstat.same()); assert (pstat.pathDistance() == 0); //
@@ -139,8 +139,8 @@
trv1s = trv1; pstat = prop.vecDirProp(trv1s, sz1, PropDir.BACKWARD); assert (pstat.success());
- System.out.println(" same b: " + trv1s); - System.out.println(pstat);
+ if(debug) System.out.println(" same b: " + trv1s); + if(debug) System.out.println(pstat);
assert (pstat.same()); assert (pstat.pathDistance() == 0); //
@@ -150,16 +150,16 @@
int successes = 0; trv1s = trv1; pstat = prop.vecDirProp(trv1s, sz1, PropDir.FORWARD_MOVE);
- System.out.println(" forward move: " + trv1s); - System.out.println(pstat);
+ if(debug) System.out.println(" forward move: " + trv1s); + if(debug) System.out.println(pstat);
if (pstat.forward()) { ++successes; } // backward trv1s = trv1; pstat = prop.vecDirProp(trv1s, sz1, PropDir.BACKWARD_MOVE);
- System.out.println(" backward move: " + trv1s); - System.out.println(pstat);
+ if(debug) System.out.println(" backward move: " + trv1s); + if(debug) System.out.println(pstat);
if (pstat.backward()) { ++successes; }
@@ -169,8 +169,8 @@
// nearest trv1s = trv1; pstat = prop.vecDirProp(trv1s, sz1, PropDir.NEAREST_MOVE);
- System.out.println(" nearest move: " + trv1s); - System.out.println(pstat);
+ if(debug) System.out.println(" nearest move: " + trv1s); + if(debug) System.out.println(pstat);
assert (!pstat.success());
@@ -256,7 +256,7 @@
//******************************************************************** // Repeat the above with errors.
- System.out.println("Check reversibility with errors.");
+ if(debug) System.out.println("Check reversibility with errors.");
double exx[] = {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1}; double exy[] = {0.05, -0.05, 0.05, -0.05, 0.05, -0.05, 0.05, 0.05}; double eyy[] = {0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25};
@@ -273,7 +273,7 @@
double eyvc[] = {0.004, -0.004, 0.004, -0.004, 0.004, -0.004, 0.004, 0.004}; double ecc[] = {0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01}; for (i = 0; i < ntrk; ++i) {
- System.out.println("********** Propagate track " + i + ". **********");
+ if(debug) System.out.println("********** Propagate track " + i + ". **********");
PropStat pstat = new PropStat(); SurfZPlane dz1 = new SurfZPlane(z1[i]); SurfZPlane dz2 = new SurfZPlane(z2[i]);
@@ -306,7 +306,7 @@
tdir = TrackSurfaceDirection.TSD_BACKWARD; } ETrack tre1 = new ETrack((dz1.newPureSurface()), vec1, err1, tdir);
- System.out.println(" starting: " + tre1);
+ if(debug) System.out.println(" starting: " + tre1);
// // Find the direction that will propagate this track from r1 to r2. //
@@ -323,8 +323,8 @@
ETrack tre2f = tre1; pstat = prop.errDirProp(tre2f, dz2, dir); assert (pstat.success());
- System.out.println(" forward: " + tre2f); - System.out.println(pstat);
+ if(debug) System.out.println(" forward: " + tre2f); + if(debug) System.out.println(pstat);
if (dir == PropDir.FORWARD) { assert (pstat.forward()); }
@@ -337,15 +337,15 @@
ETrack tre2f0 = tre1; pstat = prop0.errDirProp(tre2f0, dz2, dir); assert (pstat.success());
- System.out.println(" forward: " + tre2f0); - System.out.println(pstat);
+ if(debug) System.out.println(" forward: " + tre2f0); + if(debug) System.out.println(pstat);
double vdiff0 = dz2.vecDiff(tre2f.vector(), tre2f0.vector()).amax();
- System.out.println("vec diff: " + vdiff0);
+ if(debug) System.out.println("vec diff: " + vdiff0);
assert (vdiff0 < maxdiff); TrackError df0 = tre2f.error().minus(tre2f0.error()); double ediff0 = df0.amax();
- System.out.println("err diff: " + ediff0);
+ if(debug) System.out.println("err diff: " + ediff0);
assert (ediff0 < maxdiff); //
@@ -353,8 +353,8 @@
ETrack tre2fb = tre2f; pstat = prop.errDirProp(tre2fb, dz1, rdir); assert (pstat.success());
- System.out.println(" f return: " + tre2fb); - System.out.println(pstat);
+ if(debug) System.out.println(" f return: " + tre2fb); + if(debug) System.out.println(pstat);
if (rdir == PropDir.FORWARD) { assert (pstat.forward()); }
@@ -363,11 +363,11 @@
} double difff = dz1.vecDiff(tre2fb.vector(), tre1.vector()).amax();
- System.out.println("vec diff: " + difff);
+ if(debug) System.out.println("vec diff: " + difff);
assert (difff < maxdiff); TrackError dfb = tre2fb.error().minus(tre1.error()); double edifff = dfb.amax();
- System.out.println("err diff: " + edifff);
+ if(debug) System.out.println("err diff: " + edifff);
assert (edifff < maxdiff); }
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