Commit in hps-java/src/main/java/org/lcsim/HPSUsers/Example on MAIN
HeavyPhotonLLDriver.java+7-41.5 -> 1.6
FastTrackAnalysisDriver.java+18-81.2 -> 1.3
+25-12
2 modified files
make some variables in FastTrackAnalysisDriver configurable

hps-java/src/main/java/org/lcsim/HPSUsers/Example
HeavyPhotonLLDriver.java 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- HeavyPhotonLLDriver.java	20 Apr 2011 20:07:39 -0000	1.5
+++ HeavyPhotonLLDriver.java	21 Apr 2011 17:07:38 -0000	1.6
@@ -32,7 +32,8 @@
     ////////////////////////////////////////
     //  everything below will
     //  get overwritten by setPName
-    int nlayers = 9;
+    int nlayers = 10;
+     int fitlayers = 10;
     // bfield needs to be set because tracking doesn't 
     // seme to deal with fields in the negative 
     //  z-direction well (need to fix this)
@@ -55,7 +56,7 @@
         add(trd);
 
         jad = new JasAnalysisDriver(nlayers);
-        ftad = new FastTrackAnalysisDriver(nlayers);
+        ftad = new FastTrackAnalysisDriver(nlayers,fitlayers,detType);
          dad = new DetailedAnalysisDriver(nlayers);
 //        add(ftad);  //uncomment to run the fasttrackanalysisdriver (text file output)
 //        add(jad);
@@ -86,6 +87,7 @@
             detType = "Full";
             bfield = 1.0;
             nlayers = 12;
+            fitlayers=10;
             axialStrategy = "DarkPhoton-Axial-HPS3pt2.xml";
             finalStrategy = "DarkPhoton-HPS3pt2.xml";
             llStrategy = "DarkPhoton-HPS3pt2-LongLived.xml";
@@ -108,6 +110,7 @@
             detType = "Full";
             bfield = 0.5;
             nlayers = 12;
+              fitlayers=10;
             axialStrategy = "DarkPhoton-Axial-HPS3pt2.xml";
             finalStrategy = "DarkPhoton-HPS3pt2.xml";
             llStrategy = "none";
@@ -131,7 +134,7 @@
             detType = "Test";
             nlayers = 10;
             bfield = 0.5;
-
+            fitlayers=10;
             axialStrategy = "none";   //  don't fit tracks axially first
             finalStrategy = "HPS-Test-1pt3.xml";
             llStrategy = "none";//  don't fit tracks ignoring first plane
@@ -154,7 +157,7 @@
             detType = "Test";
             nlayers = 10;
             bfield = 0.25;
-
+            fitlayers=10;
             axialStrategy = "none";   //  don't fit tracks axially first
             finalStrategy = "HPS-Test-1pt3.xml";
             llStrategy = "none";//  don't fit tracks ignoring first plane

hps-java/src/main/java/org/lcsim/HPSUsers/Example
FastTrackAnalysisDriver.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- FastTrackAnalysisDriver.java	18 Apr 2011 16:07:45 -0000	1.2
+++ FastTrackAnalysisDriver.java	21 Apr 2011 17:07:38 -0000	1.3
@@ -53,6 +53,7 @@
 public class FastTrackAnalysisDriver extends Driver {
 
     String[] detNames = {"Tracker"};
+    Integer _minLayers=8;
     Integer[] nlayers = {8};
     int nevt = 0;
     double xref = 50.0; //mm
@@ -60,10 +61,19 @@
     FileWriter fw;
     PrintWriter pw;
     double[] beamsize = {0.001, 0.02, 0.02};
-    int flipSign=-1;
-    public FastTrackAnalysisDriver(int layers) {
-        nlayers[0] = layers;
 
+    String _config="3pt4";
+// flipSign is a kludge...
+//  HelicalTrackFitter doesn't deal with B-fields in -ive Z correctly
+//  so we set the B-field in +iveZ and flip signs of fitted tracks
+//  note:  this should be -1 for Test configurations and +1 for Full (v3.X and lower) configurations
+//  this is set by the _config variable (detType in HeavyPhotonDriver)
+      int flipSign=1;
+    public FastTrackAnalysisDriver(int trackerLayers, int mintrkLayers, String config) {
+        nlayers[0] = trackerLayers;
+        _minLayers=mintrkLayers;
+        _config=config;
+        if(_config.contains("Test")) flipSign=-1;
     }
 
     
@@ -80,7 +90,9 @@
         //  Increment the event counter
         nevt++;
 
-        Hep3Vector IP = new BasicHep3Vector(200., 0., 0.);
+      
+
+        Hep3Vector IP = new BasicHep3Vector(0., 0., 0.);
         double bfield = event.getDetector().getFieldMap().getField(IP).z();
 
         List<RawTrackerHit> rawHits = event.get(RawTrackerHit.class, "RawTrackerHitMaker_RawTrackerHits");
@@ -575,8 +587,7 @@
         pxMCE = mcEle.getPX();
          pyMCE = mcEle.getPY();
          pzMCE = mcEle.getPZ();
-//        if (findable.InnerTrackerIsFindable(mcEle, nlayers[0] - 2))
-        if (findable.InnerTrackerIsFindable(mcEle, nlayers[0]))
+        if (findable.InnerTrackerIsFindable(mcEle, _minLayers))
             findableE = 1;
         Set<Track> trklistE = trktomc.allTo(mcEle);
         foundE = trklistE.size();//can be greater than 1 if more than 1 track shares hits
@@ -584,8 +595,7 @@
         pxMCP = mcPos.getPX();
         pyMCP = mcPos.getPY();
         pzMCP = mcPos.getPZ();
-//        if (findable.InnerTrackerIsFindable(mcPos, nlayers[0] - 2))
-        if (findable.InnerTrackerIsFindable(mcPos, nlayers[0]))
+        if (findable.InnerTrackerIsFindable(mcPos, _minLayers))
             findableP = 1;
         Set<Track> trklistP = trktomc.allTo(mcPos);
         foundP = trklistP.size();//can be greater than 1 if more than 1 track shares hits
CVSspam 0.2.8