Commit in lcsim/src/org/lcsim/contrib/CalAnal on MAIN
AnalyzeNeutralsZpole.java-3161.2 removed
CheatClusterAnalysisDriver.java-421.2 removed
CheckNeutralCalibrations.java-1621.2 removed
ConeClusterAnalysisDriver.java-491.2 removed
DTClusterAnalysisDriver.java-531.4 removed
FindSamplingFractions.java-1911.2 removed
MSTClusterAnalysisDriver.java-581.2 removed
SimpleClusterAnalysisDriver.java-481.2 removed
-919
8 removed files


lcsim/src/org/lcsim/contrib/CalAnal
AnalyzeNeutralsZpole.java removed after 1.2
diff -N AnalyzeNeutralsZpole.java
--- AnalyzeNeutralsZpole.java	21 Feb 2007 00:50:53 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,316 +0,0 @@
-package org.lcsim.contrib.CalAnal;
-
-import java.util.*;
-import hep.aida.*;
-import org.lcsim.event.MCParticle;
-import org.lcsim.event.Cluster;
-import org.lcsim.event.EventHeader;
-import org.lcsim.recon.cluster.cheat.*;
-import org.lcsim.recon.cluster.util.*;
-import org.lcsim.util.Driver;
-import org.lcsim.util.aida.AIDA;
-import org.lcsim.event.CalorimeterHit;
-import org.lcsim.event.SimCalorimeterHit;
-import org.lcsim.geometry.IDDecoder;
-import hep.physics.vec.*;
-import org.lcsim.event.util.*;
-import org.lcsim.event.util.MCParticleClassifier.MCPClass;
-
-/**
- * Reconstruction: Clusters
- */
-public class AnalyzeNeutralsZpole extends Driver
-{
-   private AIDA aida = AIDA.defaultInstance();
-    IDDecoder _decoder;
-   String EMBname = "EcalBarrHitsClusters";
-   String HADBname = "HcalBarrHitsClusters";
-   String EMBhitsname = "EcalBarrHits";
-   String HADBhitsname = "HcalBarrHits";
-   String EMEname = "EcalEndcapHitsClusters";
-   String HADEname = "HcalEndcapHitsClusters";
-   String EMEhitsname = "EcalEndcapHits";
-   String HADEhitsname = "HcalEndcapHits";
-   CheatClusterer _clusterer;
-   int cloudmax = 200000;
-      int ntypes;
-      String[] partnames = {"neutron","k0L","nbar","gamma"};
-      int[] pdg = {2112,130,-2112,22};
-    int ncalculators = 1;
-    double[] emeas;
-    DetailedNeutralHadronClusterEnergyCalculator calc;
-    PhotonClusterEnergyCalculator scalc;
-    MCPClass fs;
-    MCParticleClassifier cl;
-    double emtimecut = 100.;
-    double hadtimecut = 100.;
-    double photonnorm = 1.011531;
-    double nhadnorm;
-
-   Map<MCParticle,CheatCluster> embclmap;
-   Map<MCParticle,CheatCluster> hadbclmap;
-   Map<MCParticle,CheatCluster> emeclmap;
-   Map<MCParticle,CheatCluster> hadeclmap;
-   List<MCParticle> plist;
-   double tanthcut = .25;
-   String hEcut = "Eventcuts/";
-   boolean first;
-   public AnalyzeNeutralsZpole()
-   {
-
-        CreateFinalStateMCParticleList fsDriver = new CreateFinalStateMCParticleList("Gen");
-        add(fsDriver);
-        ntypes = 4;
-        _clusterer = new CheatClusterer();
-       emeas = new double[ncalculators];
-       first = true;
-   }
-   protected void process(EventHeader event)
-   {
-      super.process(event);
-//
-// Cannot instantiate ClusterEnergyCalculators until we have an event
-//
-       if(first)
-       {
-          first = false;
-          scalc = new PhotonClusterEnergyCalculator();
-          calc = new DetailedNeutralHadronClusterEnergyCalculator();
-       }
-//
-// Make event cut
-//
-      double all_all_energy = 0.;
-      double all_gamma_energy = 0.;
-      double all_nh_energy = 0.;
-      double all_neutral_energy = 0.;
-      double cut_all_energy = 0.;
-      double cut_gamma_energy = 0.;
-      double cut_nh_energy = 0.;
-      double cut_neutral_energy = 0.;
-      String fslistname = "GenFinalStateParticles";
-      plist = event.get(MCParticle.class,fslistname);
-      for(MCParticle p:plist)
-      {
-            all_all_energy += p.getEnergy();
-            int pindex = -1;
-            int pdgid = p.getPDGID();
-            for(int i=0;i<ntypes;i++)
-            {
-               if(pdgid == pdg[i])pindex = i;
-            }
-            if(pindex > -1)
-            {
-               all_neutral_energy += p.getEnergy();
-               if(pindex == ntypes-1)
-               {
-                  all_gamma_energy += p.getEnergy();
-               }
-               else
-               {
-                  all_nh_energy += p.getEnergy();
-               }
-            }
-            Hep3Vector pp = p.getMomentum();
-            double pperp = Math.sqrt(pp.x()*pp.x() + pp.y()*pp.y());
-            double tanth = 999.;
-            if(Math.abs(pp.z()) > 0.001)tanth = pperp/Math.abs(pp.z());
-            if(tanth > tanthcut)
-            {
-               cut_all_energy += p.getEnergy();
-               if(pindex > -1)
-               {
-                  cut_neutral_energy += p.getEnergy();
-                  if(pindex == ntypes-1)
-                  {
-                     cut_gamma_energy += p.getEnergy();
-                  }
-                  else
-                  {
-                     cut_nh_energy += p.getEnergy();
-                  }
-               }
-            }
-      }
-      aida.cloud1D(hEcut+"Sum of all FS energies per event").fill(all_all_energy);
-      aida.cloud1D(hEcut+"Sum of all FS neutral energies per event").fill(all_neutral_energy);
-      aida.cloud1D(hEcut+"Sum of all FS gamma energies per event").fill(all_gamma_energy);
-      aida.cloud1D(hEcut+"Sum of all FS neut hadron energies per event").fill(all_nh_energy);
-      aida.cloud1D(hEcut+"Sum of cut FS energies per event").fill(cut_all_energy);
-      aida.cloud1D(hEcut+"Sum of cut FS neutral energies per event").fill(cut_neutral_energy);
-      aida.cloud1D(hEcut+"Sum of cut FS gamma energies per event").fill(cut_gamma_energy);
-      aida.cloud1D(hEcut+"Sum of cut FS neut hadron energies per event").fill(cut_nh_energy);
-      if(cut_all_energy > 89.)
-      {
-         aida.cloud1D(hEcut+"Cut event Sum of cut FS neutral energies per event").fill(cut_neutral_energy);
-         aida.cloud1D(hEcut+"Cut event Sum of cut FS gamma energies per event").fill(cut_gamma_energy);
-         aida.cloud1D(hEcut+"Cut event Sum of cut FS neut hadron energies per event").fill(cut_nh_energy);
-
-
-
-         double missed_neutral_energy = 0.;
-         double missed_nh_energy = 0.;
-         double missed_gamma_energy = 0.;
-         double[] measured_neutral_energy = new double[ncalculators];
-         double[] measured_nh_energy = new double[ncalculators];
-         double[] measured_gamma_energy = new double[ncalculators];
-         for(int i=0;i<ncalculators;i++)
-         {
-            measured_neutral_energy[i] = 0.;
-            measured_nh_energy[i] = 0.;
-            measured_gamma_energy[i] = 0.;
-         }
-//
-// Use the cluster cheater on the EMBarrel and HADBarrel collections
-//
-         List<List<SimCalorimeterHit>> collections = event.get(SimCalorimeterHit.class);
-         for (List<SimCalorimeterHit> collection : collections)
-         {
-            String name = event.getMetaData(collection).getName();
-            if( (name.compareTo(EMBhitsname) == 0) || (name.compareTo(HADBhitsname) == 0) ||
-                (name.compareTo(EMEhitsname) == 0) || (name.compareTo(HADEhitsname) == 0))
-            {
-               Map<MCParticle,CheatCluster> result = _clusterer.findClusters(collection);
-               if (result.size() > 0) event.put(name+"Clusters",new ArrayList(result.values()));
-               if( (name.compareTo(EMBhitsname) == 0))embclmap = result;
-               if( (name.compareTo(HADBhitsname) == 0))hadbclmap = result;
-               if( (name.compareTo(EMEhitsname) == 0))emeclmap = result;
-               if( (name.compareTo(HADEhitsname) == 0))hadeclmap = result;
-            }
-         }
-         for(MCParticle p:plist)
-         {
-            int pindex = -1;
-            int pdgid = p.getPDGID();
-            for(int i=0;i<ntypes;i++)
-            {
-               if(pdgid == pdg[i])pindex = i;
-            }
-            if(pindex > -1)
-            {
-//
-// Make angle cut
-//               
-               Hep3Vector pp = p.getMomentum();
-               double pperp = Math.sqrt(pp.x()*pp.x() + pp.y()*pp.y());
-               double tanth = 999.;
-               if(Math.abs(pp.z()) > 0.001)tanth = pperp/Math.abs(pp.z());
-               if(tanth > tanthcut)
-               {
-//
-// Particle survived cuts, look for hits
-//
-                  aida.cloud1D(partnames[pindex]+"/Energy",cloudmax).fill(p.getEnergy());
-                  aida.cloud1D("Neutrals/Energy",cloudmax).fill(p.getEnergy());
-                  aida.cloud1D(partnames[pindex]+"/wted Energy",cloudmax).fill(p.getEnergy(),p.getEnergy());
-                  aida.cloud1D("Neutrals/wted Energy",cloudmax).fill(p.getEnergy(),p.getEnergy());
-                  if(pindex < ntypes-1)
-                  {
-                     aida.cloud1D("NHadron/Energy",cloudmax).fill(p.getEnergy());
-                     aida.cloud1D("NHadron/wted Energy",cloudmax).fill(p.getEnergy(),p.getEnergy());
-                  }
-                  List<MCParticle> plist = new ArrayList<MCParticle>();
-                  plist.add(p);
-                  int next = 0;
-                  while(next < plist.size())
-                  {
-                     List<MCParticle> dlist = plist.get(next).getDaughters();
-                     for(MCParticle d:dlist)
-                     {
-                        plist.add(d);
-                     }
-                     next++;
-                  }
-                  BasicCluster cl = new BasicCluster();
-                  for(MCParticle ap:plist)
-                  {
-                     if(embclmap.containsKey(ap))cl.addCluster(embclmap.get(ap));
-                     if(hadbclmap.containsKey(ap))cl.addCluster(hadbclmap.get(ap));
-                     if(emeclmap.containsKey(ap))cl.addCluster(emeclmap.get(ap));
-                     if(hadeclmap.containsKey(ap))cl.addCluster(hadeclmap.get(ap));
-                  }
-                  if( cl.getSize() == 0 )
-                  {
-                     for(int i=0;i<ncalculators;i++)
-                     {
-                        emeas[i] = 0.;
-                     }
-                     missed_neutral_energy += p.getEnergy();
-                     aida.cloud1D("Neutrals/Missed energy").fill(p.getEnergy());
-                     aida.cloud1D(partnames[pindex]+"/Missed energy").fill(p.getEnergy());
-                     if(pindex == ntypes-1)missed_gamma_energy += p.getEnergy();
-                     else
-                     {
-                        missed_nh_energy += p.getEnergy();
-                        aida.cloud1D("NHadron/Missed energy").fill(p.getEnergy());
-                     }
-                  }
-                  else
-                  {
-                     if(pindex == ntypes-1)
-                     {
-                        emeas[0] = scalc.getEnergy(cl);
-                        for(int i=0;i<ncalculators;i++)
-                        {
-                           measured_gamma_energy[i] += emeas[i];
-                           measured_neutral_energy[i] += emeas[i];
-                           double dE = emeas[i] - p.getEnergy();
-                           aida.cloud1D(partnames[pindex]+"/dE"+i,cloudmax).fill(dE);
-                           aida.cloud1D(partnames[pindex]+"/dE over E"+i,cloudmax).fill(dE/p.getEnergy());
-                           aida.cloud1D(partnames[pindex]+"/dE over rootE"+i,cloudmax).fill(dE/Math.sqrt(p.getEnergy()));
-                           aida.cloud1D("Neutrals/dE"+i,cloudmax).fill(dE);
-                           aida.cloud1D("Neutrals/dE over E"+i,cloudmax).fill(dE/p.getEnergy());
-                           aida.cloud1D("Neutrals/dE over rootE"+i,cloudmax).fill(dE/Math.sqrt(p.getEnergy()));
-                        }
-                     }
-                     else
-                     {
-                        emeas[0] = calc.getEnergy(cl);
-                        for(int i=0;i<ncalculators;i++)
-                        {
-                           measured_neutral_energy[i] += emeas[i];
-                           measured_nh_energy[i] += emeas[i];
-                           double dE = emeas[i] - p.getEnergy();
-                           aida.cloud1D(partnames[pindex]+"/dE"+i,cloudmax).fill(dE);
-                           aida.cloud1D(partnames[pindex]+"/dE over E"+i,cloudmax).fill(dE/p.getEnergy());
-                           aida.cloud1D(partnames[pindex]+"/dE over rootE"+i,cloudmax).fill(dE/Math.sqrt(p.getEnergy()));
-                           aida.cloud1D("Neutrals/dE"+i,cloudmax).fill(dE);
-                           aida.cloud1D("Neutrals/dE over E"+i,cloudmax).fill(dE/p.getEnergy());
-                           aida.cloud1D("Neutrals/dE over rootE"+i,cloudmax).fill(dE/Math.sqrt(p.getEnergy()));
-                           aida.cloud1D("NHadron/dE"+i,cloudmax).fill(dE);
-                           aida.cloud1D("NHadron/dE over E"+i,cloudmax).fill(dE/p.getEnergy());
-                           aida.cloud1D("NHadron/dE over rootE"+i,cloudmax).fill(dE/Math.sqrt(p.getEnergy()));
-                        }
-                     }
-                  }
-               }
-            }
-         }
-         String hp = "Event/";
-         for(int i=0;i<ncalculators;i++)
-         {
-            double dh = measured_neutral_energy[i] - cut_neutral_energy;
-            double dhoe = dh/cut_neutral_energy;
-            double dhore = dh/Math.sqrt(cut_neutral_energy);
-            aida.cloud1D(hp+"Neutral dE"+i).fill(dh);
-            aida.cloud1D(hp+"Neutral dE"+i+" over E").fill(dhoe);
-            aida.cloud1D(hp+"Neutral dE"+i+" over rootE").fill(dhore);
-            dh = measured_nh_energy[i] - cut_nh_energy;
-            dhoe = dh/cut_nh_energy;
-            dhore = dh/Math.sqrt(cut_nh_energy);
-            aida.cloud1D(hp+"NHadron dE"+i).fill(dh);
-            aida.cloud1D(hp+"NHadron dE"+i+" over E").fill(dhoe);
-            aida.cloud1D(hp+"NHadron dE"+i+" over rootE").fill(dhore);
-            dh = measured_gamma_energy[i] - cut_gamma_energy;
-            dhoe = dh/cut_gamma_energy;
-            dhore = dh/Math.sqrt(cut_gamma_energy);
-            aida.cloud1D(hp+"Gamma dE"+i).fill(dh);
-            aida.cloud1D(hp+"Gamma dE"+i+" over E").fill(dhoe);
-            aida.cloud1D(hp+"Gamma dE"+i+" over rootE").fill(dhore);
-         }
-         aida.cloud1D(hp+"Neutral missed Energy").fill(missed_neutral_energy);
-         aida.cloud1D(hp+"NHadron missed Energy").fill(missed_nh_energy);
-         aida.cloud1D(hp+"Gamma missed Energy").fill(missed_gamma_energy);
-      }
-   }
-}

lcsim/src/org/lcsim/contrib/CalAnal
CheatClusterAnalysisDriver.java removed after 1.2
diff -N CheatClusterAnalysisDriver.java
--- CheatClusterAnalysisDriver.java	20 Feb 2007 20:38:49 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
-package org.lcsim.contrib.CalAnal;
-
-import org.lcsim.recon.cluster.analysis.*;
-import java.util.*;
-import org.lcsim.util.Driver;
-import org.lcsim.event.EventHeader;
-import org.lcsim.event.util.*;
-import org.lcsim.recon.cluster.util.*;
-import org.lcsim.recon.cluster.cheat.*;
-import org.lcsim.recon.cluster.fixedcone.*;
-import org.lcsim.recon.cluster.nn.*;
-import org.lcsim.util.aida.AIDA;
-
-/**
- * Cluster analysis driver
- */
-public class CheatClusterAnalysisDriver extends Driver
-{
-    private AIDA aida = AIDA.defaultInstance();
-    int ievt;
-    public CheatClusterAnalysisDriver()
-    {
-       ievt = 0;
-//
-// Create the cluster list(s)
-//
-      add(new CheatClusterDriver());
-      String[] Cheatclusternames = {"RefinedCheatClusters"};
-      add(new ClusterAnalysisDriver(Cheatclusternames));
-    }
-    protected void process(EventHeader event)
-    {
-        System.out.println(" Processing event "+ievt);
-        super.process(event);
-        ievt ++;
-//
-// Debug
-//
-/*
-*/
-    }
-}

lcsim/src/org/lcsim/contrib/CalAnal
CheckNeutralCalibrations.java removed after 1.2
diff -N CheckNeutralCalibrations.java
--- CheckNeutralCalibrations.java	20 Feb 2007 20:38:49 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,162 +0,0 @@
-package org.lcsim.contrib.CalAnal;
-
-import org.lcsim.recon.cluster.analysis.*;
-import java.util.*;
-import org.lcsim.util.Driver;
-import org.lcsim.event.EventHeader;
-import org.lcsim.event.util.*;
-import org.lcsim.event.*;
-import org.lcsim.recon.cluster.util.*;
-import org.lcsim.recon.cluster.cheat.*;
-import org.lcsim.util.aida.AIDA;
-import hep.physics.vec.*;
-
-/**
- * Make resolution plots from neutrals, as a usage example of the
- * neutral calibrations
- */
-public class CheckNeutralCalibrations extends Driver
-{
-    private AIDA aida = AIDA.defaultInstance();
-    int ievt;
-    int mx = 200000;
-    double tanthcut = 0.25;
-    double Ecutnh = 1.;
-    double Ecutg = .1;
-    double eprcut = 1270.;
-    double epzcut = 1680.;
-    ClusterEnergyCalculator generic_calc;
-    ClusterEnergyCalculator photon_calc;
-    ClusterEnergyCalculator nh_calc;
-    int hitcut = 10;
-    List<MCParticle> plist;
-    boolean first;
-    public CheckNeutralCalibrations()
-    {
-        CreateFinalStateMCParticleList fsDriver = new CreateFinalStateMCParticleList("Gen");
-        add(fsDriver);
-       add(new CheatClusterDriver());
-       ievt = 0;
-       first = true;
-    }
-    protected void process(EventHeader event)
-    {
-//       System.out.println(" Processing event "+ievt);
-       super.process(event);
-       ievt ++;
-//
-// Cannot instantiate ClusterEnergyCalculators until we have an event
-//
-       if(first)
-       {
-          first = false;
-          generic_calc = new GenericClusterEnergyCalculator();
-          photon_calc = new PhotonClusterEnergyCalculator();
-          nh_calc = new DetailedNeutralHadronClusterEnergyCalculator();
-       }
-//
-// Make a map of MCParticle to RefinedCheatClusters
-//
-       Map<MCParticle,Cluster> clmap = new HashMap<MCParticle,Cluster>();
-       List<List<Cluster>> cllists = event.get(Cluster.class);
-       for(List<Cluster> cllist:cllists)
-       {
-          if(event.getMetaData(cllist).getName().compareTo("RefinedCheatClusters") == 0)
-          {
-             for(Cluster c:cllist)
-             {
-                CheatCluster chc = (CheatCluster) c;
-                clmap.put(chc.getMCParticle(),c);
-             }
-          }
-       }
-//
-// Get the final state particle list
-//
-       String fslistname = "GenFinalStateParticles";
-       plist = event.get(MCParticle.class,fslistname);
-       for(MCParticle p:plist)
-       {
-//
-// Only look at neutrals
-//
-          if(p.getType().getCharge() == 0)
-          {
-//
-// Require some calorimeter hits
-//
-             if(clmap.containsKey(p))
-             {
-                double Ecut = Ecutnh;
-                boolean photon = false;
-                if(p.getPDGID() == 22)
-                {
-                   Ecut = Ecutg;
-                   photon = true;
-                }
-//
-// Cut out the extreme low energy particles
-//
-                if(p.getEnergy() > Ecut)
-                {
-                   Hep3Vector pp = p.getMomentum();
-                   double pperp = Math.sqrt(pp.x()*pp.x() + pp.y()*pp.y());
-                   double tanth = 999.;
-                   if(Math.abs(pp.z()) > 0.001)tanth = pperp/Math.abs(pp.z());
-//
-// Cut around the beampipe (.97 cos theta cut)
-//
-                   if(tanth > tanthcut)
-                   {
-                      Cluster cl = clmap.get(p);
-                      double Eest = generic_calc.getEnergy(cl);
-//
-// Require at least 1 hit in the HAD+EM calorimeters
-//
-                      if(Eest > 0.)
-                      {
-                         Hep3Vector ep = p.getEndPoint();
-                         double epr = Math.sqrt(ep.x()*ep.x() + ep.y()*ep.y());
-//
-// Require the particle to make it to the EM calorimeter before
-// interacting or decaying
-//
-                         if( (epr > eprcut)||(Math.abs(ep.z()) > epzcut) )
-                         {
-//
-// Particle passed cuts, get the measured Energy and make plots
-//
-                            double Emeas;
-                            String pname;
-                            if(photon)
-                            {
-                               pname = "Photon";
-                               Emeas = photon_calc.getEnergy(cl);
-                            }
-                            else
-                            {
-                               pname = "nHad";
-                               Emeas = nh_calc.getEnergy(cl);
-                            }
-                            double Eact = p.getEnergy();
-                            double gdE = Eest - Eact;
-                            double dE = Emeas - Eact;
-                            aida.cloud1D(pname+":delta E",mx).fill(dE);
-                            aida.cloud1D(pname+":delta E over E",mx).fill(dE/Eact);
-                            aida.cloud1D(pname+":delta E over rootE",mx).fill(dE/Math.sqrt(Eact));
-                            aida.profile1D(pname+": mean dE vs E",45,0.,45.).fill(Eact,dE);
-                            aida.profile1D(pname+": mean dE over E vs E",45,0.,45.).fill(Eact,dE/Eact);
-                            aida.cloud1D(pname+":generic delta E",mx).fill(gdE);
-                            aida.cloud1D(pname+":generic delta E over E",mx).fill(gdE/Eact);
-                            aida.cloud1D(pname+":generic delta E over rootE",mx).fill(gdE/Math.sqrt(Eact));
-                            aida.profile1D(pname+": mean generic dE vs E",45,0.,45.).fill(Eact,gdE);
-                            aida.profile1D(pname+": mean generic dE over E vs E",45,0.,45.).fill(Eact,gdE/Eact);
-                         }
-                      }
-                   }
-                }
-             }
-          }
-       }
-    }
-}

lcsim/src/org/lcsim/contrib/CalAnal
ConeClusterAnalysisDriver.java removed after 1.2
diff -N ConeClusterAnalysisDriver.java
--- ConeClusterAnalysisDriver.java	21 Feb 2007 00:50:53 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,49 +0,0 @@
-package org.lcsim.contrib.CalAnal;
-
-import org.lcsim.recon.cluster.analysis.*;
-import java.util.*;
-import org.lcsim.util.Driver;
-import org.lcsim.event.EventHeader;
-import org.lcsim.event.util.*;
-import org.lcsim.recon.cluster.util.*;
-import org.lcsim.recon.cluster.cheat.*;
-import org.lcsim.recon.cluster.fixedcone.*;
-import org.lcsim.recon.cluster.nn.*;
-import org.lcsim.util.aida.AIDA;
-
-/**
- * Cluster analysis driver
- */
-public class ConeClusterAnalysisDriver extends Driver
-{
-    private AIDA aida = AIDA.defaultInstance();
-    int ievt;
-    public ConeClusterAnalysisDriver()
-    {
-       ievt = 0;
-//
-// Create the cluster list(s)
-//
-      double radius = 0.1;
-      double seed = 0.;
-      double minE = 0.;
-      FixedConeClusterDriver driver = new FixedConeClusterDriver(radius, seed, minE);
-      String[] hitcollnames = {"EcalBarrHits","EcalEndcapHits"};
-      driver.setCollectionNames(hitcollnames);
-      driver.setClusterNameExtension("FCp100");
-      add(driver);
-      String[] FCclusternames = {"EcalBarrHitsFCp100","EcalEndcapHitsFCp100"};
-      add(new ClusterAnalysisDriver(FCclusternames,hitcollnames));
-    }
-    protected void process(EventHeader event)
-    {
-        System.out.println(" Processing event "+ievt);
-        super.process(event);
-        ievt ++;
-//
-// Debug
-//
-/*
-*/
-    }
-}

lcsim/src/org/lcsim/contrib/CalAnal
DTClusterAnalysisDriver.java removed after 1.4
diff -N DTClusterAnalysisDriver.java
--- DTClusterAnalysisDriver.java	20 Feb 2007 20:38:49 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,53 +0,0 @@
-package org.lcsim.contrib.CalAnal;
-
-import org.lcsim.recon.cluster.analysis.*;
-import java.util.*;
-import org.lcsim.util.Driver;
-import org.lcsim.event.EventHeader;
-import org.lcsim.event.util.*;
-import org.lcsim.digisim.*;
-import org.lcsim.recon.cluster.util.*;
-import org.lcsim.recon.cluster.cheat.*;
-import org.lcsim.recon.cluster.fixedcone.*;
-import org.lcsim.recon.cluster.directedtree.*;
-import org.lcsim.recon.cluster.nn.*;
-import org.lcsim.util.aida.AIDA;
-
-/**
- * Cluster analysis driver
- */
-public class DTClusterAnalysisDriver extends Driver
-{
-    private AIDA aida = AIDA.defaultInstance();
-    int ievt;
-    public DTClusterAnalysisDriver()
-    {
-       ievt = 0;
-//
-// Do the digitization
-//
-       add(new CalHitMapDriver());
-       DigiSimDriver d = new DigiSimDriver();
-//       d.setHistogramLevel(1);
-       add(d);
-       add(new SimCalorimeterHitsDriver());
-//
-// Create the cluster list(s)
-//
-      add(new DirectedTreeDriver());
-        String[] hitcollnames = {"EcalBarrDigiHits","EcalEndcapDigiHits"};
-        String[] DTclusternames = {"EcalBarrDigiHitsDTreeClusters","EcalEndcapDigiHitsDTreeClusters"};
-      add(new ClusterAnalysisDriver(DTclusternames,hitcollnames));
-    }
-    protected void process(EventHeader event)
-    {
-        System.out.println(" Processing event "+ievt);
-        super.process(event);
-        ievt ++;
-//
-// Debug
-//
-/*
-*/
-    }
-}

lcsim/src/org/lcsim/contrib/CalAnal
FindSamplingFractions.java removed after 1.2
diff -N FindSamplingFractions.java
--- FindSamplingFractions.java	20 Feb 2007 20:38:49 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,191 +0,0 @@
-package org.lcsim.contrib.CalAnal;
-
-import java.util.*;
-import hep.aida.*;
-import org.lcsim.event.MCParticle;
-import org.lcsim.event.Cluster;
-import org.lcsim.event.EventHeader;
-import org.lcsim.recon.cluster.cheat.*;
-import org.lcsim.recon.cluster.util.*;
-import org.lcsim.util.Driver;
-import org.lcsim.util.aida.AIDA;
-import org.lcsim.event.CalorimeterHit;
-import org.lcsim.event.SimCalorimeterHit;
-import org.lcsim.geometry.IDDecoder;
-import hep.physics.vec.*;
-
-/**
- * Reconstruction: Clusters
- */
-public class FindSamplingFractions extends Driver
-{
-   private AIDA aida = AIDA.defaultInstance();
-    IDDecoder _decoder;
-   String EMname = "EcalBarrHitsClusters";
-   String HADname = "HcalBarrHitsClusters";
-   String EMhitsname = "EcalBarrHits";
-   String HADhitsname = "HcalBarrHits";
-   CheatClusterer _clusterer;
-      IAnalysisFactory     af ;
-      ITree                tree ;
-      IDataPointSetFactory dpsf ;
-      IFunctionFactory     funcF ;
-      IFitFactory          fitF ;
-      IFitter              fitter;
-
-       IHistogramFactory hf;
-       ICloud2D c2g ;
-       ICloud2D c2n ;
-       ICloud2D c2nh ;
-      IDataPointSet dataPointSetg;
-      IDataPointSet dataPointSetn;
-      IDataPointSet dataPointSetnh;
-      int npg;
-      int npn;
-      int npnh;
-   
-   public FindSamplingFractions()
-   {
-      af     = IAnalysisFactory.create();
-      tree   = af.createTreeFactory().create();
-      dpsf   = af.createDataPointSetFactory(tree);
-      funcF  = af.createFunctionFactory(tree);
-      fitF   = af.createFitFactory();
-      fitter = fitF.createFitter("Chi2","jminuit");
-
-       hf = af.createHistogramFactory(tree);
-       c2g = hf.createCloud2D("gamma Edep vs Egen");
-       c2n = hf.createCloud2D("neutron Edep vs Egen");
-       c2nh = hf.createCloud2D("neutron #hits vs Egen");
-
-      // Create a two dimensional IDataPointSet.
-      dataPointSetg = dpsf.create("gamma dps","gamma Edep vs Egen",2);
-      dataPointSetn = dpsf.create("neutron dps","neutron Edep vs Egen",2);
-      dataPointSetnh = dpsf.create("neutron dps2","neutron #hits vs Egen",2);
-      npg = 0;
-      npn = 0;
-      npnh = 0;
-      
-        _clusterer = new CheatClusterer();
-   }
-   protected void process(EventHeader event)
-   {
-        List<List<SimCalorimeterHit>> collections = event.get(SimCalorimeterHit.class);
-        for (List<SimCalorimeterHit> collection : collections)
-        {
-            String name = event.getMetaData(collection).getName();
-            if( (name.compareTo(EMhitsname) == 0) |  (name.compareTo(HADhitsname) == 0))
-            {
-               Map<MCParticle,CheatCluster> result = _clusterer.findClusters(collection);
-               if (result.size() > 0) event.put(name+"Clusters",new ArrayList(result.values()));
-            }
-        }
-      List<List<Cluster>> clusterlists = event.get(Cluster.class);
-      for (List<Cluster> clcollection : clusterlists)
-      {
-         String name = event.getMetaData(clcollection).getName();
-         if(name.compareTo(EMname) == 0)
-         {
-            for(Cluster cl:clcollection)
-            {
-               CheatCluster chcl = (CheatCluster) cl;
-               MCParticle p = chcl.getMCParticle();
-               if(p.getPDGID() == 22)
-               {
-                  if(p.getEnergy() > 1.0)
-                  {
-                     Hep3Vector pp = p.getMomentum();
-                     double pperp = Math.sqrt(pp.x()*pp.x() + pp.y()*pp.y());
-                     if(pperp > Math.abs(pp.z()))
-                     {
-                        Hep3Vector vtx = p.getOrigin();
-                        double rsq = vtx.x()*vtx.x() + vtx.y()*vtx.y() + vtx.z()*vtx.z();
-                        if(rsq < 1.)
-                        {
-                           dataPointSetg.addPoint();
-                           IDataPoint dp = dataPointSetg.point(npg);
-                           dp.coordinate(0).setValue(p.getEnergy());
-                           dp.coordinate(1).setValue(chcl.getRawEnergy());
-                           double err = .2*Math.sqrt(p.getEnergy())*.012;
-                           dp.coordinate(1).setErrorPlus(err);
-                           dp.coordinate(1).setErrorMinus(err);
-                        
-                           c2g.fill(p.getEnergy(),chcl.getRawEnergy());
-                           npg++;
-                        }
-                     }
-                  }
-               }
-            }
-         }
-
-         if(name.compareTo(HADname) == 0)
-         {
-            for(Cluster cl:clcollection)
-            {
-               CheatCluster chcl = (CheatCluster) cl;
-               MCParticle p = chcl.getMCParticle();
-               if(p.getPDGID() == 2112)
-               {
-                  if((p.getEnergy()-p.getMass() > 1.0)&(p.getEnergy()-p.getMass() < 10.0))
-                  {
-                     Hep3Vector ep = p.getEndPoint();
-                     double eR = Math.sqrt(ep.x()*ep.x() + ep.y()*ep.y());
-                     if( (eR > 1390.) & (eR < 1810.) )
-                     {
-                        Hep3Vector pp = p.getMomentum();
-                        double pperp = Math.sqrt(pp.x()*pp.x() + pp.y()*pp.y());
-                        if(pperp > Math.abs(pp.z()))
-                        {
-                           Hep3Vector vtx = p.getOrigin();
-                           double rsq = vtx.x()*vtx.x() + vtx.y()*vtx.y() + vtx.z()*vtx.z();
-                           if(rsq < 1.)
-                           {
-                              double cutE = 0.;
-                              int cutN = 0;
-                              List<CalorimeterHit> chl = chcl.getCalorimeterHits();
-                              for(CalorimeterHit hit:chl)
-                              {
-                                 if(hit.getRawEnergy() > .0003)
-                                 {
-                                    cutN++;
-                                    cutE += hit.getRawEnergy();
-                                 }
-                              }
-                              dataPointSetn.addPoint();
-                              IDataPoint dp = dataPointSetn.point(npn);
-                              dp.coordinate(0).setValue(p.getEnergy() - p.getMass());
-                              dp.coordinate(1).setValue(cutE);
-                              double err = (Math.sqrt(p.getEnergy() - p.getMass())*.035)*.50;
-                              dp.coordinate(1).setErrorPlus(err);
-                              dp.coordinate(1).setErrorMinus(err);
-
-                              c2n.fill(p.getEnergy() - p.getMass(),cutE);
-                              npn++;
-/*
-                              List<CalorimeterHit> hits = chcl.getCalorimeterHits();
-                              int nhits = hits.size();
-                              double nhd = (double) nhits;
-*/
-                              double nhd = (double) cutN;
-                              dataPointSetnh.addPoint();
-                              dp = dataPointSetnh.point(npnh);
-                              dp.coordinate(0).setValue(p.getEnergy() - p.getMass());
-                              dp.coordinate(1).setValue(nhd);
-//                              err = (Math.sqrt(p.getEnergy() - p.getMass())*8.3 - 3.4)*.78;
-                              err = (Math.sqrt(p.getEnergy() - p.getMass())*12.)*.50;
-                              dp.coordinate(1).setErrorPlus(err);
-                              dp.coordinate(1).setErrorMinus(err);
-                              c2nh.fill(p.getEnergy() - p.getMass(),nhd);
-                              npnh++;
-                           }
-                        }
-                     }
-                  }
-               }
-            }
-         }
-
-      }
-   }
-}

lcsim/src/org/lcsim/contrib/CalAnal
MSTClusterAnalysisDriver.java removed after 1.2
diff -N MSTClusterAnalysisDriver.java
--- MSTClusterAnalysisDriver.java	20 Feb 2007 20:38:49 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,58 +0,0 @@
-package org.lcsim.contrib.CalAnal;
-
-import org.lcsim.recon.cluster.analysis.*;
-import java.util.*;
-import org.lcsim.util.Driver;
-import org.lcsim.event.EventHeader;
-import org.lcsim.event.util.*;
-import org.lcsim.digisim.*;
-import org.lcsim.recon.cluster.util.*;
-import org.lcsim.recon.cluster.cheat.*;
-import org.lcsim.recon.cluster.fixedcone.*;
-import org.lcsim.recon.cluster.directedtree.*;
-import org.lcsim.recon.cluster.nn.*;
-import org.lcsim.recon.cluster.mst.*;
-import org.lcsim.util.aida.AIDA;
-
-/**
- * Cluster analysis driver
- */
-public class MSTClusterAnalysisDriver extends Driver
-{
-    private AIDA aida = AIDA.defaultInstance();
-    int ievt;
-    public MSTClusterAnalysisDriver()
-    {
-       ievt = 0;
-//
-// Do the digitization
-//
-//       add(new DigiSimDriver());
-//
-// Create the cluster list(s)
-//
-      String[] MSTClusternames1 = {"EMMSTClusters"};
-      String[] MSTClusternames2 = {"HADMSTClusters"};
-      MSTClusterDriver d1 = new MSTClusterDriver("EMCal");
-      d1.setClusterName(MSTClusternames1[0]);
-      add(d1);
-      MSTClusterDriver d2 = new MSTClusterDriver("HCal");
-      d2.setClusterName(MSTClusternames2[0]);
-      add(d2);
-        String[] hitcollnames1 = {"EcalBarrHits","EcalEndcapHits"};
-        String[] hitcollnames2 = {"HcalBarrHits","HcalEndcapHits"};
-      add(new ClusterAnalysisDriver(MSTClusternames1,hitcollnames1));
-      add(new ClusterAnalysisDriver(MSTClusternames2,hitcollnames2));
-    }
-    protected void process(EventHeader event)
-    {
-        System.out.println(" Processing event "+ievt);
-        super.process(event);
-        ievt ++;
-//
-// Debug
-//
-/*
-*/
-    }
-}

lcsim/src/org/lcsim/contrib/CalAnal
SimpleClusterAnalysisDriver.java removed after 1.2
diff -N SimpleClusterAnalysisDriver.java
--- SimpleClusterAnalysisDriver.java	20 Feb 2007 20:38:49 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,48 +0,0 @@
-package org.lcsim.contrib.CalAnal;
-
-import org.lcsim.recon.cluster.analysis.*;
-import java.util.*;
-import org.lcsim.util.Driver;
-import org.lcsim.event.EventHeader;
-import org.lcsim.event.util.*;
-import org.lcsim.recon.cluster.util.*;
-import org.lcsim.recon.cluster.cheat.*;
-import org.lcsim.recon.cluster.fixedcone.*;
-import org.lcsim.recon.cluster.nn.*;
-import org.lcsim.util.aida.AIDA;
-
-/**
- * Cluster analysis driver
- */
-public class SimpleClusterAnalysisDriver extends Driver
-{
-    private AIDA aida = AIDA.defaultInstance();
-    int ievt;
-    public SimpleClusterAnalysisDriver()
-    {
-       ievt = 0;
-//
-// Create the cluster list(s)
-//
-        String[] hitcollnames = {"EcalBarrHits","EcalEndcapHits"};
-        String[] hitcollnames2 = {"HcalBarrHits","HcalEndcapHits"};
-        NearestNeighborClusterDriver nnd = new NearestNeighborClusterDriver(2,2,5,5);
-        nnd.setClusterNameExtension("NN2255");
-        add(nnd);
-        String[] NN2255clusternames = {"EcalBarrHitsNN2255","EcalEndcapHitsNN2255"};
-        String[] NN2255clusternames2 = {"HcalBarrHitsNN2255","HcalEndcapHitsNN2255"};
-        add(new ClusterAnalysisDriver(NN2255clusternames,hitcollnames));
-        add(new ClusterAnalysisDriver(NN2255clusternames2,hitcollnames2));
-    }
-    protected void process(EventHeader event)
-    {
-        System.out.println(" Processing event "+ievt);
-        super.process(event);
-        ievt ++;
-//
-// Debug
-//
-/*
-*/
-    }
-}
CVSspam 0.2.8