hps-java/src/main/java/org/lcsim/hps/examples
diff -N HeavyPhotonLLDriver.java
--- HeavyPhotonLLDriver.java 1 Jun 2011 17:17:57 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,180 +0,0 @@
-package org.lcsim.hps.examples;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.lcsim.hps.recon.tracking.MakeSensorsDriver;
-import org.lcsim.hps.recon.tracking.MultiTrackReco;
-import org.lcsim.hps.recon.tracking.OccupancyDriver;
-import org.lcsim.util.Driver;
-import org.lcsim.util.loop.LCIODriver;
-
-/**
- * Driver for track reconstruction and analysis of sATLAS detector
- *
- * @author M. Graham and R. Partridge
- */
-public final class HeavyPhotonLLDriver extends Driver {
-
- //********************
- // set pname to the detector you want to run...HPS1pt8 is the default test detector (uses strategy file 1.3)
- // see "setPName" method for list
- public String pName = "HPS1pt8";
-// public String pName = "HPS3pt4";
- JasAnalysisDriver jad;
- DetailedAnalysisDriver dad;
- FastTrackAnalysisDriver ftad;
- List<int[]> pairs = new ArrayList();
- List<Integer> passLayers = new ArrayList();
- //// Change the prefix for your site
-// String strategyPrefix = "/nfs/sulky21/g.ec.u12/users/mgraham/AtlasUpgrade/hps-java/src/main/resources/";
- String strategyPrefix = "/Users/mgraham/NetBeansProjects/hps-java/src/main/resources/";
- ////////////////////////////////////////
- // everything below will
- // get overwritten by setPName
- 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)
- double bfield = 0.5;
- String detType = "Full";
- String axialStrategy = "HPS-Test-1pt8.xml";
- String finalStrategy = "HPS-Test-1pt8.xml";
- String llStrategy = "HPS-Test-1pt8.xml";
- public String outputFile = "foobar.slcio";
- public String plotsFile = "myplots.aida";
- public String outputTextName = "myevents.txt";
- ///////////////
-
- public HeavyPhotonLLDriver() {
- add(new MakeSensorsDriver());
-
- setPName(pName);
-
- MultiTrackReco trd = new MultiTrackReco(strategyPrefix, detType, bfield, axialStrategy, finalStrategy, llStrategy, pairs, passLayers);
- add(trd);
-
- jad = new JasAnalysisDriver(nlayers,fitlayers,detType);
- ftad = new FastTrackAnalysisDriver(nlayers,fitlayers,detType);
- dad = new DetailedAnalysisDriver(nlayers,fitlayers,detType);
-// add(ftad); //uncomment to run the fasttrackanalysisdriver (text file output)
-// add(jad);
- add(dad);
-// uncomment this to look at occupancies
- add(new OccupancyDriver());
- }
-
- public void setOutputFile(String outputFile) {
- System.out.println("Will output events to " + outputFile);
- add(new LCIODriver(outputFile));
- }
-
- public void setPlotsFile(String plotsFile) {
- System.out.println("Will output plots to " + plotsFile);
- jad.setOutputPlots(plotsFile);
- }
-
- public void setOutputTextName(String outputTextName) {
- System.out.println("Will output selected events to " + outputTextName);
- ftad.setOutputText(outputTextName);
- }
-
- public void setPName(String pName) {
- System.out.println("Setting parameter set to " + pName);
- pairs.clear();
- if (pName.contentEquals("HPS3pt2")) {
- detType = "Full";
- bfield = 1.0;
- nlayers = 12;
- fitlayers=10;
- axialStrategy = "DarkPhoton-Axial-HPS3pt2.xml";
- finalStrategy = "DarkPhoton-HPS3pt2.xml";
- llStrategy = "DarkPhoton-HPS3pt2-LongLived.xml";
-
- int[] p1 = {1, 2};
- int[] p2 = {3, 4};
- int[] p3 = {5, 6};
- int[] p4 = {7, 8};
- int[] p5 = {9, 10};
- int[] p6 = {11, 12};
- pairs.add(p1);
- pairs.add(p2);
- pairs.add(p3);
- pairs.add(p4);
- pairs.add(p5);
- pairs.add(p6);
- passLayers.add(11);
- }
- if (pName.contentEquals("HPS3pt4")) {
- detType = "Full";
- bfield = 0.5;
- nlayers = 12;
- fitlayers=10;
- axialStrategy = "DarkPhoton-Axial-HPS3pt2.xml";
- finalStrategy = "DarkPhoton-HPS3pt2.xml";
- llStrategy = "none";
-
- int[] p1 = {1, 2};
- int[] p2 = {3, 4};
- int[] p3 = {5, 6};
- int[] p4 = {7, 8};
- int[] p5 = {9, 10};
- int[] p6 = {11, 12};
- pairs.add(p1);
- pairs.add(p2);
- pairs.add(p3);
- pairs.add(p4);
- pairs.add(p5);
- pairs.add(p6);
- passLayers.add(11);
- }
-
- if (pName.contentEquals("HPS1pt8")) {
- 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
-
- int[] p1 = {1, 2};
- int[] p2 = {3, 4};
- int[] p3 = {5, 6};
- int[] p4 = {7, 8};
- int[] p5 = {9, 10};
-
- pairs.add(p1);
- pairs.add(p2);
- pairs.add(p3);
- pairs.add(p4);
- pairs.add(p5);
-// passLayers.add(11);
- }
-
- if (pName.contentEquals("HPS1pt9")) {
- 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
-
- int[] p1 = {1, 2};
- int[] p2 = {3, 4};
- int[] p3 = {5, 6};
- int[] p4 = {7, 8};
- int[] p5 = {9, 10};
-
- pairs.add(p1);
- pairs.add(p2);
- pairs.add(p3);
- pairs.add(p4);
- pairs.add(p5);
-// passLayers.add(11);
- }
-
- }
-}
hps-java/sandbox
diff -N HeavyPhotonLLDriver.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ HeavyPhotonLLDriver.java 29 Apr 2012 23:41:13 -0000 1.1
@@ -0,0 +1,180 @@
+package org.lcsim.hps.examples;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.lcsim.hps.recon.tracking.MakeSensorsDriver;
+import org.lcsim.hps.recon.tracking.MultiTrackReco;
+import org.lcsim.hps.recon.tracking.OccupancyDriver;
+import org.lcsim.util.Driver;
+import org.lcsim.util.loop.LCIODriver;
+
+/**
+ * Driver for track reconstruction and analysis of sATLAS detector
+ *
+ * @author M. Graham and R. Partridge
+ */
+public final class HeavyPhotonLLDriver extends Driver {
+
+ //********************
+ // set pname to the detector you want to run...HPS1pt8 is the default test detector (uses strategy file 1.3)
+ // see "setPName" method for list
+ public String pName = "HPS1pt8";
+// public String pName = "HPS3pt4";
+ JasAnalysisDriver jad;
+ DetailedAnalysisDriver dad;
+ FastTrackAnalysisDriver ftad;
+ List<int[]> pairs = new ArrayList();
+ List<Integer> passLayers = new ArrayList();
+ //// Change the prefix for your site
+// String strategyPrefix = "/nfs/sulky21/g.ec.u12/users/mgraham/AtlasUpgrade/hps-java/src/main/resources/";
+ String strategyPrefix = "/Users/mgraham/NetBeansProjects/hps-java/src/main/resources/";
+ ////////////////////////////////////////
+ // everything below will
+ // get overwritten by setPName
+ 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)
+ double bfield = 0.5;
+ String detType = "Full";
+ String axialStrategy = "HPS-Test-1pt8.xml";
+ String finalStrategy = "HPS-Test-1pt8.xml";
+ String llStrategy = "HPS-Test-1pt8.xml";
+ public String outputFile = "foobar.slcio";
+ public String plotsFile = "myplots.aida";
+ public String outputTextName = "myevents.txt";
+ ///////////////
+
+ public HeavyPhotonLLDriver() {
+ add(new MakeSensorsDriver());
+
+ setPName(pName);
+
+ MultiTrackReco trd = new MultiTrackReco(strategyPrefix, detType, bfield, axialStrategy, finalStrategy, llStrategy, pairs, passLayers);
+ add(trd);
+
+ jad = new JasAnalysisDriver(nlayers,fitlayers,detType);
+ ftad = new FastTrackAnalysisDriver(nlayers,fitlayers,detType);
+ dad = new DetailedAnalysisDriver(nlayers,fitlayers,detType);
+// add(ftad); //uncomment to run the fasttrackanalysisdriver (text file output)
+// add(jad);
+ add(dad);
+// uncomment this to look at occupancies
+ add(new OccupancyDriver());
+ }
+
+ public void setOutputFile(String outputFile) {
+ System.out.println("Will output events to " + outputFile);
+ add(new LCIODriver(outputFile));
+ }
+
+ public void setPlotsFile(String plotsFile) {
+ System.out.println("Will output plots to " + plotsFile);
+ jad.setOutputPlots(plotsFile);
+ }
+
+ public void setOutputTextName(String outputTextName) {
+ System.out.println("Will output selected events to " + outputTextName);
+ ftad.setOutputText(outputTextName);
+ }
+
+ public void setPName(String pName) {
+ System.out.println("Setting parameter set to " + pName);
+ pairs.clear();
+ if (pName.contentEquals("HPS3pt2")) {
+ detType = "Full";
+ bfield = 1.0;
+ nlayers = 12;
+ fitlayers=10;
+ axialStrategy = "DarkPhoton-Axial-HPS3pt2.xml";
+ finalStrategy = "DarkPhoton-HPS3pt2.xml";
+ llStrategy = "DarkPhoton-HPS3pt2-LongLived.xml";
+
+ int[] p1 = {1, 2};
+ int[] p2 = {3, 4};
+ int[] p3 = {5, 6};
+ int[] p4 = {7, 8};
+ int[] p5 = {9, 10};
+ int[] p6 = {11, 12};
+ pairs.add(p1);
+ pairs.add(p2);
+ pairs.add(p3);
+ pairs.add(p4);
+ pairs.add(p5);
+ pairs.add(p6);
+ passLayers.add(11);
+ }
+ if (pName.contentEquals("HPS3pt4")) {
+ detType = "Full";
+ bfield = 0.5;
+ nlayers = 12;
+ fitlayers=10;
+ axialStrategy = "DarkPhoton-Axial-HPS3pt2.xml";
+ finalStrategy = "DarkPhoton-HPS3pt2.xml";
+ llStrategy = "none";
+
+ int[] p1 = {1, 2};
+ int[] p2 = {3, 4};
+ int[] p3 = {5, 6};
+ int[] p4 = {7, 8};
+ int[] p5 = {9, 10};
+ int[] p6 = {11, 12};
+ pairs.add(p1);
+ pairs.add(p2);
+ pairs.add(p3);
+ pairs.add(p4);
+ pairs.add(p5);
+ pairs.add(p6);
+ passLayers.add(11);
+ }
+
+ if (pName.contentEquals("HPS1pt8")) {
+ 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
+
+ int[] p1 = {1, 2};
+ int[] p2 = {3, 4};
+ int[] p3 = {5, 6};
+ int[] p4 = {7, 8};
+ int[] p5 = {9, 10};
+
+ pairs.add(p1);
+ pairs.add(p2);
+ pairs.add(p3);
+ pairs.add(p4);
+ pairs.add(p5);
+// passLayers.add(11);
+ }
+
+ if (pName.contentEquals("HPS1pt9")) {
+ 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
+
+ int[] p1 = {1, 2};
+ int[] p2 = {3, 4};
+ int[] p3 = {5, 6};
+ int[] p4 = {7, 8};
+ int[] p5 = {9, 10};
+
+ pairs.add(p1);
+ pairs.add(p2);
+ pairs.add(p3);
+ pairs.add(p4);
+ pairs.add(p5);
+// passLayers.add(11);
+ }
+
+ }
+}