Commit in lcsim/src/org/lcsim/recon/tracking/seedtracker on MAIN
HelixFitter.java+11-61.3 -> 1.4
MultipleScattering.java+11.3 -> 1.4
+12-6
2 modified files
Fix a couple bugs in new multiple scattering calculations

lcsim/src/org/lcsim/recon/tracking/seedtracker
HelixFitter.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- HelixFitter.java	13 Oct 2008 01:05:27 -0000	1.3
+++ HelixFitter.java	13 Oct 2008 17:31:27 -0000	1.4
@@ -65,8 +65,11 @@
         //  Retrieve list of hits to be fit
         List<HelicalTrackHit> hitlist = seed.getHits();
         
+        //  Retrieve the old helix
+        HelicalTrackFit oldhelix = seed.getHelix();
+        
         //  If this is the candidate's first helix fit, first do a fit without MS errors
-        if (seed.getHelix() == null) {
+        if (oldhelix == null) {
             
             //  Reset the stereo hit positions to their nominal value
             for (HelicalTrackHit hit : hitlist) {
@@ -82,18 +85,19 @@
                 return false;
             }
             
-            //  Retrieve the helix parameters from this fit
-            seed.setHelix(_fitter.getFit());
+            //  Retrieve the helix parameters from this fit and save them in the seed
+            oldhelix = _fitter.getFit();
+            seed.setHelix(oldhelix);
             
             //  Calculate the multiple scattering angles for this helix
-            seed.setScatterAngles(_scattering.FindScatters(seed.getHelix()));
+            seed.setScatterAngles(_scattering.FindScatters(oldhelix));
         }
         
         //  Update the stereo hit positions and covariance matrices
-        CorrectStereoHits(hitlist, seed.getHelix());
+        CorrectStereoHits(hitlist, oldhelix);
         
         //  Do a helix fit including MS errors
-        _status = _fitter.fit(hitlist, seed.getMSMap(), seed.getHelix());
+        _status = _fitter.fit(hitlist, seed.getMSMap(), oldhelix);
         SaveFit();
         
         //  Check for unrecoverable fit errors and call appropriate diagnostic
@@ -104,6 +108,7 @@
         
         //  Retrieve and save the new helix fit
         _helix = _fitter.getFit();
+        seed.setHelix(_helix);
         
         //  Set the non-holonomic constraint chi square
         _constrain.setConstraintChisq(strategy, _helix, hitlist);

lcsim/src/org/lcsim/recon/tracking/seedtracker
MultipleScattering.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- MultipleScattering.java	13 Oct 2008 01:05:28 -0000	1.3
+++ MultipleScattering.java	13 Oct 2008 17:31:27 -0000	1.4
@@ -68,6 +68,7 @@
         List<Double> slist = HelixUtils.PathToCylinder(helix, rmax, smax, 1);
         if (slist.size() > 0) smax = Math.min(smax, slist.get(0));
         double zmax = _materialmanager.getZMax();
+        if (helix.slope() < 0.) zmax = -zmax;
         smax = Math.min(smax, HelixUtils.PathToZPlane(helix, zmax));
         
         for (MaterialDisk disk : matdsk) {
CVSspam 0.2.8