Print

Print


Commit in lcsim/src/org/lcsim/recon/tracking/seedtracker on MAIN
ConfirmerExtender.java+9-91.2 -> 1.3
HelixFitter.java+11.4 -> 1.5
SeedTrackFinder.java+8-61.3 -> 1.4
+18-15
3 modified files
Speed up tracking code

lcsim/src/org/lcsim/recon/tracking/seedtracker
ConfirmerExtender.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- ConfirmerExtender.java	13 Oct 2008 01:05:27 -0000	1.2
+++ ConfirmerExtender.java	13 Jan 2009 06:12:44 -0000	1.3
@@ -66,7 +66,7 @@
     }
     
     private boolean doTask(SeedCandidate seed, Task task, boolean optimize, SeedStrategy strategy){
-        
+
         //  Create a list to hold the confirmed / extended seeds
         this.result = new ArrayList<SeedCandidate>();
         
@@ -87,17 +87,17 @@
         
         //  Loop over the confirmation/extension layers
         for (SeedLayer lyr : lyrs) {
-            
+
             //  Get the hits on this confirmation/extension layer
             List<HelicalTrackHit> hitlist = hmanager.getTrackerHits(lyr);
             if (hitlist.size() == 0) continue;
             
             //  Create a list for seeds that are confirmed/extended using the current layer
             List<SeedCandidate> newlist = new ArrayList<SeedCandidate>();
-            
+
             //  Loop over the input seeds for this layer search
             for (SeedCandidate seedin : seedlist) {
-                
+
                 //  Sort the hits
                 if(optimize) {
                     SortHits comp = new SortHits(seedin.getHelix());
@@ -108,7 +108,7 @@
                 double oldchisq = seedin.getHelix().chisqtot();
                 double oldcirclechisq = seedin.getHelix().chisq()[0];
                 double chisqbest = 1.e6;
-                
+
                 if(diag!=null) diag.fireConfirmerExtenderWorkingSeedInfo(task, seedin, hitlist);
                 
                 //  For each hit in this confirmation/extension layer, make a test seed including the new hit
@@ -119,9 +119,9 @@
                     
                     //  See if we have a successful fit
                     boolean success = fitter.FitCandidate(test, strategy);
-                    
+
                     if (!success ) {
-                        
+
                         if(diag!=null) diag.fireConfirmerExtenderFitNoSuccess(task, seedin, hit, fitter, optimize);
                         if (optimize){
                             if (fitter.getFitStatus() != FitStatus.CircleFitFailed) {
@@ -138,9 +138,9 @@
                         if(diag!=null) diag.fireConfirmerExtenderFitSuccess(task, seedin, hit, fitter, chisqbest, optimize);
                         newlist.add(test);
                         chisqbest = Math.min(chisqbest, fitter.getHelix().chisqtot());
-                    }
+                     }
                 }
-                
+
                 //  If all fit tries for this layer are potentially bad hits, include the starting seed in the list
                 if (chisqbest - oldchisq > strategy.getBadHitChisq()) {
                     newlist.add(seedin);

lcsim/src/org/lcsim/recon/tracking/seedtracker
HelixFitter.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- HelixFitter.java	13 Oct 2008 17:31:27 -0000	1.4
+++ HelixFitter.java	13 Jan 2009 06:12:44 -0000	1.5
@@ -167,6 +167,7 @@
         _circlefit = _fitter.getCircleFit();
         
         //  If we have a circle fit, try to save the line fit / zsegment fit results
+        if (_status == FitStatus.InconsistentSeed) return;
         if (_status == FitStatus.LineFitFailed) return;
         if (_status == FitStatus.ZSegmentFitFailed) return;
         _linefit = _fitter.getLineFit();

lcsim/src/org/lcsim/recon/tracking/seedtracker
SeedTrackFinder.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- SeedTrackFinder.java	10 Jan 2009 01:21:03 -0000	1.3
+++ SeedTrackFinder.java	13 Jan 2009 06:12:44 -0000	1.4
@@ -76,10 +76,10 @@
         int maxseeds = _hitmanager.getTrackerHits(seedlayerlist.get(0)).size() *
                 _hitmanager.getTrackerHits(seedlayerlist.get(1)).size() *
                 _hitmanager.getTrackerHits(seedlayerlist.get(2)).size();
-        
+
         //  Loop over the first seed layer
         for (HelicalTrackHit hit1 : _hitmanager.getTrackerHits(seedlayerlist.get(0))) {
-            
+
             //  Loop over the second seed layer and check that we have a hit pair consistent with our strategy
             for (HelicalTrackHit hit2 : _hitmanager.getTrackerHits(seedlayerlist.get(1))) {
                 if (!HitCheck(2, hit1, hit2)) continue;
@@ -95,7 +95,7 @@
                     seed.addHit(hit2);
                     seed.addHit(hit3);
                     nseed++;
-                    
+
                     //  See if we can fit a helix to this seed candidate
                     boolean success = _helixfitter.FitCandidate(seed, strategy);
                     if (!success) continue;
@@ -188,8 +188,10 @@
 
     private boolean checkz0(double s1, double zmin1, double zmax1, double s2, double zmin2, double zmax2) {
         //  Check the minimum and maximum value for z0
-        double z0min = (zmin1*s2 - zmax2*s1) / (s2 - s1);
-        double z0max = (zmax1*s2 - zmin2*s1) / (s2 - s1);
-        return (z0min <= _z0Max) && (z0max >= -_z0Max);
+        double zlim1 = (zmin1*s2 - zmax2*s1) / (s2 - s1);
+        double zlim2 = (zmax1*s2 - zmin2*s1) / (s2 - s1);
+        boolean checkz0 = (zlim1 <= _z0Max) && (zlim2 >= -_z0Max);
+        if (s2 < s1) checkz0 = (zlim2 <= _z0Max) && (zlim1 >= -_z0Max);
+        return checkz0;
     }
 }
\ No newline at end of file
CVSspam 0.2.8