Print

Print


Commit in lcsim on MAIN
project.xml+7-71.28 -> 1.29
src/org/lcsim/plugin/web/examples.html+31-231.8 -> 1.9
src/org/lcsim/plugin/web/examples/EventGenerator.java+19added 1.1
                                 /FastMC.java+23added 1.1
                                 /HeprepPoints.java+31added 1.1
                                 /LCIOOutput.java+24added 1.1
                                 /PrintEventHeader.java+20added 1.1
                                 /Analysis101.java+81.2 -> 1.3
                                 /BooleanCondition.java+3-31.2 -> 1.3
                                 /ClusterFinding.java+6-11.4 -> 1.5
                                 /DigiSimExample.java+4-21.4 -> 1.5
                                 /JetFinding.java+5-11.4 -> 1.5
                                 /NestedDriverExample.java+6-21.1 -> 1.2
                                 /ExtraHeprepExample.java-291.1 removed
                                 /Simple.java-121.2 removed
                                 /SimpleFastMC.java-181.1 removed
                                 /SimpleGenerator.java-141.1 removed
                                 /SimpleOutput.java-191.1 removed
+187-131
5 added + 5 removed + 8 modified, total 18 files
JM: Reorganize org.lcsim examples; add Javadocs; better names for a few example files

lcsim
project.xml 1.28 -> 1.29
diff -u -r1.28 -r1.29
--- project.xml	8 Feb 2006 22:18:57 -0000	1.28
+++ project.xml	14 Feb 2006 19:45:10 -0000	1.29
@@ -137,18 +137,18 @@
    <sourceModification>
     <className>fakeClass</className>
     <excludes>
-     <exclude>org/lcsim/plugin/web/**</exclude>
-     <exclude>org/lcsim/contrib/**</exclude> 
-     <!--<exclude>org/lcsim/contrib/CalAnal/**</exclude>
+     <!--<exclude>org/lcsim/plugin/web/**</exclude>-->
+     <!--<exclude>org/lcsim/contrib/**</exclude> -->
+     <exclude>org/lcsim/contrib/CalAnal/**</exclude>
      <exclude>org/lcsim/contrib/CarstenHensel/**</exclude>
      <exclude>org/lcsim/contrib/JanStrube/**</exclude>
      <exclude>org/lcsim/contrib/LeiXia/**</exclude>
      <exclude>org/lcsim/contrib/SteveKuhlmann/**</exclude>
      <exclude>org/lcsim/contrib/compile/**</exclude>
-     <exclude>org/lcsim/contrib/garfield/**</exclude>-->
-     <!-- <exclude>org/lcsim/contrib/proulx/**</exclude> -->
-     <!--<exclude>org/lcsim/contrib/tracking/**</exclude>
-     <exclude>org/lcsim/contrib/uiowa/**</exclude>-->
+     <!--<exclude>org/lcsim/contrib/garfield/**</exclude>-->
+     <exclude>org/lcsim/contrib/proulx/**</exclude> 
+     <exclude>org/lcsim/contrib/tracking/**</exclude>
+     <exclude>org/lcsim/contrib/uiowa/**</exclude>
     </excludes>
    </sourceModification>
   </sourceModifications>

lcsim/src/org/lcsim/plugin/web
examples.html 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- examples.html	9 Feb 2006 20:04:29 -0000	1.8
+++ examples.html	14 Feb 2006 19:45:10 -0000	1.9
@@ -3,50 +3,58 @@
 <p>These examples are written using the Java language. After opening
 them you need to compile and load them, and then use feed data to them using
 the Run menu.</p>
-<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" height="237" width="523">
+<table border="1" cellpadding="0" cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" height="237" width="523">
   <tr>
-    <td><a href="examples/SimpleGenerator.java">SimpleGenerator.java</a></td>
-    <td>Simple diagnostic event generator.</td>
+    <td><a href="examples/Analysis101.java">Analysis101</a></td>
+    <td>Intro to analysis with AIDA.</td>
   </tr>
   <tr>
-    <td><a href="examples/Simple.java">Simple.java</a></td>
-    <td>Simply prints the event header of each event analyzed.</td>
+    <td><a href="examples/BooleanCondition.java">BooleanCondition</a></td>
+    <td>Add a boolean value to the EventHeader and read it back again from a different Driver.</td>
   </tr>
   <tr>
-    <td><a href="examples/Analysis101.java">Analysis101.java</a></td>
-    <td>Intro to analysis with AIDA.</td>
+    <td><a href="examples/Cheater.java">Cheater</a></td>
+    <td>ReconCheater example that makes perfect clusters, tracks, and reconstructed particles.</td>
   </tr>
   <tr>
-    <td><a href="examples/SimpleFastMC.java">SimpleFastMC.java</a></td>
-    <td>Running the Fast MC.</td>
+    <td><a href="examples/ClusterFinding.java">ClusterFinding</a></td>
+    <td>Find clusters using the Nearest Neighbor clusterer.</td>
   </tr>
   <tr>
-    <td><a href="examples/SimpleOutput.java">SimpleOutput.java</a></td>
-    <td>Example of writing LCIO output</td>
+    <td><a href="examples/DigiSimExample.java">DigiSimExample</a></td>
+    <td>Digitization example using the Digisim package.</td>
   </tr>
   <tr>
-    <td><a href="examples/JetFinding.java">JetFinding.java</a></td>
-    <td>Using the Jet Finder</td>
+    <td><a href="examples/EventGenerator.java">EventGenerator</a></td>
+    <td>Simple diagnostic event generator.</td>
   </tr>
   <tr>
-    <td><a href="examples/ClusterFinding.java">ClusterFinding.java</a></td>
-    <td>Cluster Finding example</td>
+    <td><a href="examples/FastMC.java">FastMC</a></td>
+    <td>Run the Fast MC.</td>
   </tr>
   <tr>
-    <td><a href="examples/DigiSimExample.java">DigiSimExample.java</a></td>
-    <td>Digitization example</td>
+    <td><a href="examples/FilterExample.java">FilterExample</a></td>
+    <td>Execute child drivers conditionally.</td>
   </tr>
   <tr>
-    <td><a href="examples/FilterExample.java">FilterExample.java</a></td>
-    <td>Example of executing child drivers conditionally</td>
+    <td><a href="examples/JetFinding.java">JetFinding</a></td>
+    <td>Use the Jet Finder.</td>
   </tr>
   <tr>
-    <td><a href="examples/SkipEvent.java">SkipEvent.java</a></td>
-    <td>Skip events using the NextEventException</td>
+    <td><a href="examples/LCIOOutput.java">LCIOOutput</a></td>
+    <td>Write LCIO output.</td>
   </tr>
   <tr>
-    <td><a href="examples/BooleanCondition.java">BooleanCondition.java</a></td>
-    <td>Add a boolean value to the EventHeader and read it back again from a different Driver</td>
+    <td><a href="examples/NestedDriverExample.java">NestedDriverExample</a></td>
+    <td>Nest analysis Drivers.</td>
+  </tr>
+  <tr>
+    <td><a href="examples/PrintEventHeader.java">PrintEventHeader</a></td>
+    <td>Print the EventHeader of each event</td>
+  </tr>
+  <tr>
+    <td><a href="examples/SkipEvent.java">SkipEvent.java</a></td>
+    <td>Skip events using the NextEventException</td>
   </tr>
 </table>
 <h2>org.lcsim Jython examples for advanced users</h2>

lcsim/src/org/lcsim/plugin/web/examples
EventGenerator.java added at 1.1
diff -N EventGenerator.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ EventGenerator.java	14 Feb 2006 19:45:11 -0000	1.1
@@ -0,0 +1,19 @@
+import org.lcsim.util.event.LCSimEventGenerator;
+
+/*
+ * A basic example of event generation using the diagnostic particle generator.
+ * 
+ * @author Norman Graf
+ * @version $Id: EventGenerator.java,v 1.1 2006/02/14 19:45:11 jeremy Exp $
+ */
+public class EventGenerator extends LCSimEventGenerator
+{
+   public EventGenerator()
+   {
+      super("sdjan03");
+      
+      setMomentumRange(10,20);
+      setNumberOfParticles(10);
+      setParticleType(getParticlePropertyProvider().get(22));
+   }
+}

lcsim/src/org/lcsim/plugin/web/examples
FastMC.java added at 1.1
diff -N FastMC.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ FastMC.java	14 Feb 2006 19:45:11 -0000	1.1
@@ -0,0 +1,23 @@
+import org.lcsim.mc.fast.MCFast;
+import org.lcsim.util.Driver;
+
+/**
+ * An example that shows how to use the Fast Monte Carlo.
+ *
+ * @see org.lcsim.mc.fast
+ * 
+ * @author Norman Graf
+ * @version $Id: FastMC.java,v 1.1 2006/02/14 19:45:11 jeremy Exp $
+ */
+public class FastMC extends Driver
+{
+   public FastMC()
+   {
+      // Create MCFast with standard options
+      Driver fast = new MCFast();
+      // Turn on diagnostic histograms
+      fast.setHistogramLevel(1);
+      // Add as sub-driver
+      add(fast);
+   }
+}

lcsim/src/org/lcsim/plugin/web/examples
HeprepPoints.java added at 1.1
diff -N HeprepPoints.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ HeprepPoints.java	14 Feb 2006 19:45:11 -0000	1.1
@@ -0,0 +1,31 @@
+import hep.physics.vec.BasicHep3Vector;
+import hep.physics.vec.Hep3Vector;
+import java.util.ArrayList;
+import java.util.List;
+import org.lcsim.event.EventHeader;
+import org.lcsim.util.Driver;
+
+/**
+ * An example that shows how to add points to the WIRED display.
+ *
+ * @author tonyj
+ * @version $Id: HeprepPoints.java,v 1.1 2006/02/14 19:45:11 jeremy Exp $
+ */
+public class HeprepPoints extends Driver
+{
+   public void process(EventHeader e) 
+   {
+      List<Hep3Vector> list = new ArrayList<Hep3Vector>();
+      // Make some (example) points and add to event
+      for (double p = 0; p < Math.PI*2; p += Math.PI/50)
+      {
+         double r = 1000;
+         double x = r*Math.sin(p);
+         double y = r*Math.cos(p);
+         double z = 0;
+         Hep3Vector v = new BasicHep3Vector(x,y,z);
+         list.add(v);
+      }
+      e.put("MyPoints",list);
+   }
+}

lcsim/src/org/lcsim/plugin/web/examples
LCIOOutput.java added at 1.1
diff -N LCIOOutput.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LCIOOutput.java	14 Feb 2006 19:45:11 -0000	1.1
@@ -0,0 +1,24 @@
+import java.io.File;
+import org.lcsim.mc.fast.MCFast;
+import org.lcsim.util.Driver;
+import org.lcsim.util.loop.LCIODriver;
+
+/**
+ * A example of writing LCIO output.
+ * 
+ * @see org.lcsim.util.loop.LCIODriver
+ * 
+ * @author Tony Johnson
+ * @version $Id: LCIOOutput.java,v 1.1 2006/02/14 19:45:11 jeremy Exp $
+ */
+public class LCIOOutput extends Driver
+{
+   public LCIOOutput()
+   {
+      // Create MCFast with standard options
+      add(new MCFast());
+      // Write the file in users home directory
+      File output = new File(System.getProperty("user.home"),"fastmc.slcio");
+      add(new LCIODriver(output));
+   }
+}

lcsim/src/org/lcsim/plugin/web/examples
PrintEventHeader.java added at 1.1
diff -N PrintEventHeader.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ PrintEventHeader.java	14 Feb 2006 19:45:12 -0000	1.1
@@ -0,0 +1,20 @@
+import org.lcsim.event.EventHeader;
+import org.lcsim.util.Driver;
+
+/**
+ * A simple example that prints the EventHeader to the JAS console.
+ * 
+ * @see org.lcsim.event.EventHeader
+ * 
+ * @author Norman Graf
+ * @version $Id: PrintEventHeader.java,v 1.1 2006/02/14 19:45:12 jeremy Exp $
+ */
+public class PrintEventHeader extends Driver
+{
+   // This method will be called for each event
+   protected void process(EventHeader event)
+   {
+      // Just print the event header to the JAS console
+      System.out.println(event);
+   }
+}

lcsim/src/org/lcsim/plugin/web/examples
Analysis101.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- Analysis101.java	18 Jul 2005 19:18:27 -0000	1.2
+++ Analysis101.java	14 Feb 2006 19:45:11 -0000	1.3
@@ -5,6 +5,14 @@
 import org.lcsim.event.MCParticle;
 import org.lcsim.util.Driver;
 
+/*
+ * An example showing how to access MCParticles from the EventHeader and
+ * make some simple histograms from the data.
+ * 
+ * @author Norman Graf
+ * @version $Id: Analysis101.java,v 1.3 2006/02/14 19:45:11 jeremy Exp $
+ * 
+ */
 public class Analysis101 extends Driver
 {
    private AIDA aida = AIDA.defaultInstance();

lcsim/src/org/lcsim/plugin/web/examples
BooleanCondition.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- BooleanCondition.java	9 Feb 2006 19:42:41 -0000	1.2
+++ BooleanCondition.java	14 Feb 2006 19:45:11 -0000	1.3
@@ -2,10 +2,10 @@
 import org.lcsim.util.Driver;
 
 /**
- * An example of setting and retrieving a boolean value from the EventHeader.
+ * An example showing how to set and retrieve a boolean value from the EventHeader.
  * 
- * @author jeremym
- * @version $Id: BooleanCondition.java,v 1.2 2006/02/09 19:42:41 jeremy Exp $
+ * @author Jeremy McCormick
+ * @version $Id: BooleanCondition.java,v 1.3 2006/02/14 19:45:11 jeremy Exp $
  */
 public class BooleanCondition extends Driver
 {

lcsim/src/org/lcsim/plugin/web/examples
ClusterFinding.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- ClusterFinding.java	9 Aug 2005 13:46:45 -0000	1.4
+++ ClusterFinding.java	14 Feb 2006 19:45:11 -0000	1.5
@@ -6,7 +6,12 @@
 import org.lcsim.util.aida.AIDA;
 
 /**
- * Reconstruction: Clusters
+ * An example that shows how to find clusters and make some simple plots
+ * of the results.
+ * 
+ * @author Norman Graf
+ * @version $Id: ClusterFinding.java,v 1.5 2006/02/14 19:45:11 jeremy Exp $
+ * 
  */
 public class ClusterFinding extends Driver
 {

lcsim/src/org/lcsim/plugin/web/examples
DigiSimExample.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- DigiSimExample.java	24 Jan 2006 18:05:45 -0000	1.4
+++ DigiSimExample.java	14 Feb 2006 19:45:11 -0000	1.5
@@ -5,10 +5,12 @@
 import org.lcsim.util.Driver;
 
 /**
- * The simplest DigiSim example
+ * An example showing how to use the DigiSim package. 
+ * 
+ * @see org.lcsim.digisim
  *
  * @author Guilherme Lima
- * @version $Id: DigiSimExample.java,v 1.4 2006/01/24 18:05:45 lima Exp $
+ * @version $Id: DigiSimExample.java,v 1.5 2006/02/14 19:45:11 jeremy Exp $
  */
 public class DigiSimExample extends Driver
 {

lcsim/src/org/lcsim/plugin/web/examples
JetFinding.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- JetFinding.java	6 Jan 2006 22:46:03 -0000	1.4
+++ JetFinding.java	14 Feb 2006 19:45:11 -0000	1.5
@@ -6,7 +6,11 @@
 import org.lcsim.util.Driver;
 import org.lcsim.util.aida.AIDA;
 /**
- * Example of using the Jet Finder
+ * An example showing how to use the Jet Finder.
+ * 
+ * @author Tony Johnson
+ * @version $Id: JetFinding.java,v 1.5 2006/02/14 19:45:11 jeremy Exp $
+ * 
  */
 public class JetFinding extends Driver
 {

lcsim/src/org/lcsim/plugin/web/examples
NestedDriverExample.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- NestedDriverExample.java	9 Aug 2005 01:34:01 -0000	1.1
+++ NestedDriverExample.java	14 Feb 2006 19:45:11 -0000	1.2
@@ -1,8 +1,12 @@
-package org.lcsim.plugin.web.examples;
-
 import org.lcsim.event.EventHeader;
 import org.lcsim.util.Driver;
 
+/**
+ * An example showing how to nest drivers inside a parent driver.
+ * 
+ * @author Jan Strube
+ * @version $Id: NestedDriverExample.java,v 1.2 2006/02/14 19:45:11 jeremy Exp $
+ */
 public class NestedDriverExample extends Driver
 {
    public NestedDriverExample()

lcsim/src/org/lcsim/plugin/web/examples
ExtraHeprepExample.java removed after 1.1
diff -N ExtraHeprepExample.java
--- ExtraHeprepExample.java	26 Jan 2006 00:00:47 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-import hep.physics.vec.BasicHep3Vector;
-import hep.physics.vec.Hep3Vector;
-import java.util.ArrayList;
-import java.util.List;
-import org.lcsim.event.EventHeader;
-import org.lcsim.util.Driver;
-
-/**
- *
- * @author tonyj
- */
-public class ExtraHeprepExample extends Driver
-{
-   public void process(EventHeader e) 
-   {
-      List<Hep3Vector> list = new ArrayList<Hep3Vector>();
-      // Make some (example) points and add to event
-      for (double p = 0; p < Math.PI*2; p += Math.PI/50)
-      {
-         double r = 1000;
-         double x = r*Math.sin(p);
-         double y = r*Math.cos(p);
-         double z = 0;
-         Hep3Vector v = new BasicHep3Vector(x,y,z);
-         list.add(v);
-      }
-      e.put("MyPoints",list);
-   }
-}

lcsim/src/org/lcsim/plugin/web/examples
Simple.java removed after 1.2
diff -N Simple.java
--- Simple.java	18 Jul 2005 19:18:27 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-import org.lcsim.event.EventHeader;
-import org.lcsim.util.Driver;
-
-public class Simple extends Driver
-{
-   // This method will be called for each event
-   protected void process(EventHeader event)
-   {
-      // Just print the event header to the JAS console
-      System.out.println(event);
-   }
-}

lcsim/src/org/lcsim/plugin/web/examples
SimpleFastMC.java removed after 1.1
diff -N SimpleFastMC.java
--- SimpleFastMC.java	16 Mar 2005 02:06:40 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-import org.lcsim.mc.fast.MCFast;
-import org.lcsim.util.Driver;
-
-/**
- * A simple FastMC example
- */
-public class SimpleFastMC extends Driver
-{
-   public SimpleFastMC()
-   {
-      // Create MCFast with standard options
-      Driver fast = new MCFast();
-      // Turn on diagnostic histograms
-      fast.setHistogramLevel(1);
-      // Add as sub-driver
-      add(fast);
-   }
-}

lcsim/src/org/lcsim/plugin/web/examples
SimpleGenerator.java removed after 1.1
diff -N SimpleGenerator.java
--- SimpleGenerator.java	14 Mar 2005 16:11:35 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-import hep.physics.particle.properties.ParticlePropertyManager;
-import org.lcsim.util.event.LCSimEventGenerator;
-
-public class SimpleGenerator extends LCSimEventGenerator
-{
-   public SimpleGenerator()
-   {
-      super("sdjan03");
-      
-      setMomentumRange(10,20);
-      setNumberOfParticles(10);
-      setParticleType(getParticlePropertyProvider().get(22));
-   }
-}

lcsim/src/org/lcsim/plugin/web/examples
SimpleOutput.java removed after 1.1
diff -N SimpleOutput.java
--- SimpleOutput.java	16 Mar 2005 02:06:40 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-import java.io.File;
-import org.lcsim.mc.fast.MCFast;
-import org.lcsim.util.Driver;
-import org.lcsim.util.loop.LCIODriver;
-
-/**
- * A example of writing LCIO output
- */
-public class SimpleOutput extends Driver
-{
-   public SimpleOutput()
-   {
-      // Create MCFast with standard options
-      add(new MCFast());
-      // Write the file in users home directory
-      File output = new File(System.getProperty("user.home"),"fastmc.slcio");
-      add(new LCIODriver(output));
-   }
-}
CVSspam 0.2.8