Commit in lcsim/src/org/lcsim/contrib/Cassell/recon/DTPhotons on MAIN
IdentifyDTPhotonClustersSid01.java+325added 1.1
RonDTPhotonFinderSid01.java+102added 1.1
Sid01DTPhotonFinder.java+33added 1.1
TestRonDTPhotonFinder.java+112added 1.1
+572
4 added files
First pass at photon finding using DT clusters reclustered

lcsim/src/org/lcsim/contrib/Cassell/recon/DTPhotons
IdentifyDTPhotonClustersSid01.java added at 1.1
diff -N IdentifyDTPhotonClustersSid01.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ IdentifyDTPhotonClustersSid01.java	26 Feb 2008 18:12:26 -0000	1.1
@@ -0,0 +1,325 @@
+package org.lcsim.contrib.Cassell.recon.DTPhotons;
+import org.lcsim.contrib.uiowa.RonPhotonFinder.*;
+import java.util.*;
+import org.lcsim.event.Cluster;
+import org.lcsim.event.CalorimeterHit;
+import org.lcsim.event.SimCalorimeterHit;
+import hep.physics.vec.*;
+import org.lcsim.geometry.IDDecoder;
+
+/**
+ * Photon identifier
+ */
+public class IdentifyDTPhotonClustersSid01
+{
+    int nhitcut = 5;
+    int[] sizes = {7,10,15,22,30,35,50,100,200,400};
+    HMatrixVars hmv;
+    double[][][] cuts;
+    int failcut;
+    public IdentifyDTPhotonClustersSid01(HMatrixVars HMV)
+    {
+       cuts = new double[sizes.length+1][2][10];
+//
+//  Separate cuts for cluster size, and whether layer 0 is hit.
+//  Cut 0 - Hmatrix chisq
+//  Cut 1 - First layer hit
+//  Cut 2 - Shape 0 (transverse spread)
+//  Cut 3 - Shape2-Shape1 (Asymmetry)
+//  Cut 4 - Shape2-Shape0 (Long-Trans Spread)
+//  Cut 5 - DOCA
+//  Cut 6 - mean # hits in first 5 layers
+//  Cut 7 - lower bound on chisq for small clusters
+//  Cut 8 - lower bound on Shape 0 for small clusters
+//  Cut 9 - upper bound on Shape 1 for small clusters
+//
+       cuts[0][0][0] = 0;
+       cuts[0][1][0] = 800;
+       cuts[1][0][0] = 300;
+       cuts[1][1][0] = 800;
+       cuts[2][0][0] = 150;
+       cuts[2][1][0] = 250;
+       cuts[3][0][0] = 150;
+       cuts[3][1][0] = 180;
+       cuts[4][0][0] = 100;
+       cuts[4][1][0] = 170;
+       cuts[5][0][0] = 90;
+       cuts[5][1][0] = 150;
+       cuts[6][0][0] = 90;
+       cuts[6][1][0] = 260;
+       cuts[7][0][0] = 82.;
+       cuts[7][1][0] = 190;
+       cuts[8][0][0] = 76;
+       cuts[8][1][0] = 76;
+       cuts[9][0][0] = 75;
+       cuts[9][1][0] = 44;
+       cuts[10][0][0] = 30;
+       cuts[10][1][0] = 42;
+       cuts[0][0][1] = 17.;
+       cuts[0][1][1] = 7.;
+       cuts[1][0][1] = 17.;
+       cuts[1][1][1] = 8.;
+       cuts[2][0][1] = 17.;
+       cuts[2][1][1] = 9.;
+       cuts[3][0][1] = 17.;
+       cuts[3][1][1] = 9.;
+       cuts[4][0][1] = 17.;
+       cuts[4][1][1] = 9.;
+       cuts[5][0][1] = 17.;
+       cuts[5][1][1] = 9.;
+       cuts[6][0][1] = 17.;
+       cuts[6][1][1] = 11.;
+       cuts[7][0][1] = 17.;
+       cuts[7][1][1] = 12.;
+       cuts[8][0][1] = 17.;
+       cuts[8][1][1] = 7.;
+       cuts[9][0][1] = 17.;
+       cuts[9][1][1] = 6.;
+       cuts[10][0][1] = 17.;
+       cuts[10][1][1] = 6.;
+       cuts[0][0][2] = 15.;
+       cuts[0][1][2] = 10.;
+       cuts[1][0][2] = 10.;
+       cuts[1][1][2] = 12.;
+       cuts[2][0][2] = 15.;
+       cuts[2][1][2] = 30.;
+       cuts[3][0][2] = 15.;
+       cuts[3][1][2] = 30.;
+       cuts[4][0][2] = 30.;
+       cuts[4][1][2] = 40.;
+       cuts[5][0][2] = 30.;
+       cuts[5][1][2] = 41.;
+       cuts[6][0][2] = 30.;
+       cuts[6][1][2] = 45.;
+       cuts[7][0][2] = 33.;
+       cuts[7][1][2] = 80.;
+       cuts[8][0][2] = 40.;
+       cuts[8][1][2] = 76.;
+       cuts[9][0][2] = 56.;
+       cuts[9][1][2] = 85.;
+       cuts[10][0][2] = 95.;
+       cuts[10][1][2] = 120.;
+       cuts[0][0][3] = 8.;
+       cuts[0][1][3] = 10.;
+       cuts[1][0][3] = 4.;
+       cuts[1][1][3] = 13.;
+       cuts[2][0][3] = 8.;
+       cuts[2][1][3] = 30.;
+       cuts[3][0][3] = 10.;
+       cuts[3][1][3] = 30.;
+       cuts[4][0][3] = 20.;
+       cuts[4][1][3] = 31.;
+       cuts[5][0][3] = 20.;
+       cuts[5][1][3] = 46.;
+       cuts[6][0][3] = 25.;
+       cuts[6][1][3] = 80.;
+       cuts[7][0][3] = 20.;
+       cuts[7][1][3] = 80.;
+       cuts[8][0][3] = 20.;
+       cuts[8][1][3] = 55.;
+       cuts[9][0][3] = 35.;
+       cuts[9][1][3] = 55.;
+       cuts[10][0][3] = 43.;
+       cuts[10][1][3] = 45.;
+       cuts[0][0][4] = 90.;
+       cuts[0][1][4] = 60.;
+       cuts[1][0][4] = 90.;
+       cuts[1][1][4] = 80.;
+       cuts[2][0][4] = 90.;
+       cuts[2][1][4] = 100.;
+       cuts[3][0][4] = 200.;
+       cuts[3][1][4] = 200.;
+       cuts[4][0][4] = 200.;
+       cuts[4][1][4] = 280.;
+       cuts[5][0][4] = 300.;
+       cuts[5][1][4] = 580.;
+       cuts[6][0][4] = 400.;
+       cuts[6][1][4] = 510.;
+       cuts[7][0][4] = 600.;
+       cuts[7][1][4] = 1100.;
+       cuts[8][0][4] = 1100.;
+       cuts[8][1][4] = 900.;
+       cuts[9][0][4] = 800.;
+       cuts[9][1][4] = 800.;
+       cuts[10][0][4] = 800.;
+       cuts[10][1][4] = 9999.;
+       cuts[0][0][5] = 2000.;
+       cuts[0][1][5] = 1360.;
+       cuts[1][0][5] = 2000.;
+       cuts[1][1][5] = 1300.;
+       cuts[2][0][5] = 2000.;
+       cuts[2][1][5] = 2000.;
+       cuts[3][0][5] = 2000.;
+       cuts[3][1][5] = 1800.;
+       cuts[4][0][5] = 2000.;
+       cuts[4][1][5] = 1800.;
+       cuts[5][0][5] = 2000.;
+       cuts[5][1][5] = 1500.;
+       cuts[6][0][5] = 2000.;
+       cuts[6][1][5] = 850.;
+       cuts[7][0][5] = 910.;
+       cuts[7][1][5] = 500.;
+       cuts[8][0][5] = 490.;
+       cuts[8][1][5] = 650.;
+       cuts[9][0][5] = 350.;
+       cuts[9][1][5] = 510.;
+       cuts[10][0][5] = 320.;
+       cuts[10][1][5] = 600.;
+       cuts[0][0][6] = 1.3;
+       cuts[0][1][6] = 0.;
+       cuts[1][0][6] = 1.5;
+       cuts[1][1][6] = 0.;
+       cuts[2][0][6] = 1.3;
+       cuts[2][1][6] = 0.;
+       cuts[3][0][6] = 1.3;
+       cuts[3][1][6] = 1.1;
+       cuts[4][0][6] = 1.3;
+       cuts[4][1][6] = 0.;
+       cuts[5][0][6] = 0.;
+       cuts[5][1][6] = 0.;
+       cuts[6][0][6] = 0.;
+       cuts[6][1][6] = 0.;
+       cuts[7][0][6] = 0.;
+       cuts[7][1][6] = 0.;
+       cuts[8][0][6] = 0.;
+       cuts[8][1][6] = 0.;
+       cuts[9][0][6] = 0.;
+       cuts[9][1][6] = 0.;
+       cuts[10][0][6] =0.;
+       cuts[10][1][6] = 0.;
+       cuts[0][0][7] = 0.;
+       cuts[0][1][7] = 46.;
+       cuts[1][0][7] = 32.;
+       cuts[1][1][7] = 24.;
+       cuts[2][0][7] = 0.;
+       cuts[2][1][7] = 0.;
+       cuts[3][0][7] = 0.;
+       cuts[3][1][7] = 0.;
+       cuts[4][0][7] = 0.;
+       cuts[4][1][7] = 0.;
+       cuts[5][0][7] = 0.;
+       cuts[5][1][7] = 0.;
+       cuts[6][0][7] = 0.;
+       cuts[6][1][7] = 0.;
+       cuts[7][0][7] = 0.;
+       cuts[7][1][7] = 0.;
+       cuts[8][0][7] = 0.;
+       cuts[8][1][7] = 0.;
+       cuts[9][0][7] = 0.;
+       cuts[9][1][7] = 0.;
+       cuts[10][0][7] = 0.;
+       cuts[10][1][7] = 0.;
+       cuts[0][0][8] = 0.;
+       cuts[0][1][8] = 0.;
+       cuts[1][0][8] = 2.;
+       cuts[1][1][8] = 0.;
+       cuts[2][0][8] = 0.;
+       cuts[2][1][8] = 0.;
+       cuts[3][0][8] = 0.;
+       cuts[3][1][8] = 0.;
+       cuts[4][0][8] = 0.;
+       cuts[4][1][8] = 0.;
+       cuts[5][0][8] = 0.;
+       cuts[5][1][8] = 0.;
+       cuts[6][0][8] = 0.;
+       cuts[6][1][8] = 0.;
+       cuts[7][0][8] = 0.;
+       cuts[7][1][8] = 0.;
+       cuts[8][0][8] = 0.;
+       cuts[8][1][8] = 0.;
+       cuts[9][0][8] = 0.;
+       cuts[9][1][8] = 0.;
+       cuts[10][0][8] = 0.;
+       cuts[10][1][8] = 0.;
+       cuts[0][0][9] = 9990.;
+       cuts[0][1][9] = 9990.;
+       cuts[1][0][9] = 70.;
+       cuts[1][1][9] = 9990.;
+       cuts[2][0][9] = 9990.;
+       cuts[2][1][9] = 9990.;
+       cuts[3][0][9] = 9990.;
+       cuts[3][1][9] = 9990.;
+       cuts[4][0][9] = 9990.;
+       cuts[4][1][9] = 9990.;
+       cuts[5][0][9] = 9990.;
+       cuts[5][1][9] = 9990.;
+       cuts[6][0][9] = 9990.;
+       cuts[6][1][9] = 9990.;
+       cuts[7][0][9] = 9990.;
+       cuts[7][1][9] = 9990.;
+       cuts[8][0][9] = 9990.;
+       cuts[8][1][9] = 9990.;
+       cuts[9][0][9] = 9990.;
+       cuts[9][1][9] = 9990.;
+       cuts[10][0][9] = 9990.;
+       cuts[10][1][9] = 9990.;
+
+       hmv = HMV;
+    }
+    public boolean isPhoton(Cluster c)
+    {
+       int nhits = c.getSize();
+       if(nhits <= nhitcut)return false;
+       int sbin = 0;
+       for(int i=0;i<sizes.length;i++)
+       {
+          if(nhits <= sizes[i])break;
+          sbin++;
+       }
+       int fl = 30;
+       int ll = -1;
+       int[] hpl = new int[31];
+       for(CalorimeterHit h:c.getCalorimeterHits())
+       {
+          SimCalorimeterHit sh = (SimCalorimeterHit) h;
+          IDDecoder iddc = h.getIDDecoder();
+          iddc.setID(h.getCellID());
+          int lay = iddc.getValue("layer");
+          if(lay < fl)fl = lay;
+          if(lay > ll)ll = lay;
+          hpl[lay]++;
+       }
+       double[] sp = c.getShape();
+       double del0 = sp[1] - sp[0];
+       double del1 = sp[2] - sp[0];
+       double del2 = sp[2] - sp[1];
+       double[] pos = c.getPosition();
+       double phi = c.getIPhi();
+       double theta = c.getITheta();
+       double cp = Math.cos(phi);
+       double ssp = Math.sin(phi);
+       double ct = Math.cos(theta);
+       double st = Math.sin(theta);
+       double dcasq = pos[0]*pos[0]*(1.-st*st*cp*cp) +
+                                           pos[1]*pos[1]*(1.-st*st*ssp*ssp) +
+                                           pos[2]*pos[2]*(1.-ct*ct) -
+                                           2.*pos[0]*pos[1]*st*st*ssp*cp -
+                                           2.*pos[0]*pos[2]*st*ct*cp -
+                                           2.*pos[1]*pos[2]*st*ct*ssp;
+       double dca = -1;
+       if(dcasq > 0.)dca = Math.sqrt(dcasq);
+       int xll = ll;
+       if(fl+4 < ll)xll = fl+4;
+       double t5 = 0.;
+       for(int i=fl;i<=xll;i++){t5+=hpl[i];}
+       double mhpl5 = t5/(1. + xll - fl);
+       hmv.setCluster(c);
+       double chi = hmv.getChisq();
+       int flb = 0;
+       if(fl > 0)flb = 1;
+       failcut = 0;
+       if(chi > cuts[sbin][flb][0])failcut = 1;
+       else if(fl > cuts[sbin][flb][1])failcut = 2;
+       else if(sp[0] > cuts[sbin][flb][2])failcut = 3;
+       else if( sp[2]-sp[1] > cuts[sbin][flb][3])failcut = 4;
+       else if( sp[2] - sp[0] > cuts[sbin][flb][4])failcut = 5;
+       else if(dca > cuts[sbin][flb][5])failcut = 6;
+       else if(mhpl5 < cuts[sbin][flb][6])failcut = 7;
+       else if(chi < cuts[sbin][flb][7])failcut = 8;
+       else if(sp[0] < cuts[sbin][flb][8])failcut = 9;
+       else if(sp[1] > cuts[sbin][flb][9])failcut = 10;
+       if(failcut == 0)return true;
+       return false;
+    }
+    public int getFailcut(){return failcut;}
+}

lcsim/src/org/lcsim/contrib/Cassell/recon/DTPhotons
RonDTPhotonFinderSid01.java added at 1.1
diff -N RonDTPhotonFinderSid01.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ RonDTPhotonFinderSid01.java	26 Feb 2008 18:12:26 -0000	1.1
@@ -0,0 +1,102 @@
+/*
+ * RonDTPhotonFinderSid01.java
+ *
+ * Created on February 25, 2008, 10:28 AM
+ *
+ */
+
+package org.lcsim.contrib.Cassell.recon.DTPhotons;
+import org.lcsim.contrib.uiowa.RonPhotonFinder.*;
+import java.util.*;
+import org.lcsim.util.Driver;
+import org.lcsim.event.EventHeader;
+import org.lcsim.event.CalorimeterHit;
+import org.lcsim.event.Cluster;
+import org.lcsim.util.hitmap.HitMap;
+import org.lcsim.recon.cluster.nn.*;
+import org.lcsim.digisim.*;
+import org.lcsim.recon.cluster.util.*;
+import org.lcsim.util.lcio.LCIOConstants;
+import org.lcsim.recon.cluster.directedtree.*;
+
+/**
+ *
+ * @author cassell
+ */
+public class RonDTPhotonFinderSid01 extends Driver
+{
+    String inName;
+    String outHName;
+    String outCName;
+    HMatrixVars hmv;
+    Sid01DTPhotonFinder finder;
+    String[] clusternames1 = {"EcalBarrDigiHitsDTreeClusters","EcalEndcapDigiHitsDTreeClusters"};
+    String DTclName = "DTEcalClusters";
+    String ReDTclName = "Re"+DTclName;
+    Clusterer clusterer;
+    
+    /** Creates a new instance of RonDTPhotonFinderSid01 */
+    public RonDTPhotonFinderSid01(String in, String outH, String outC)
+    {
+        inName = in;
+        outHName = outH;
+        outCName = outC;
+        clusterer = new NearestNeighborClusterer(1,1,1,0,0.);
+        hmv = new HMatrixVars();
+        add(hmv);
+        finder = new Sid01DTPhotonFinder(hmv);
+        add(new DigiPackageDriver());
+        add(new DirectedTreeDriver());
+        add(new CombineClLists(clusternames1,DTclName));
+        add(new CoreReclusterDriver(DTclName,ReDTclName));
+    }
+    protected void process(EventHeader event)
+    {
+        super.process(event);
+        HitMap inmap = (HitMap) event.get(inName);
+        List<Cluster> inlist = event.get(Cluster.class,ReDTclName);
+        List<Cluster> sublist = new ArrayList<Cluster>();
+        Map<Cluster,Cluster> submap = new HashMap<Cluster,Cluster>();
+        for(Cluster c:inlist)
+        {
+           List<Cluster> nncl = clusterer.createClusters(c.getCalorimeterHits());
+           int maxh = 0;
+           Cluster maxc = null;
+           for(Cluster nnc:nncl)
+           {
+              if(nnc.getCalorimeterHits().size() > maxh)
+              {
+                 maxh = nnc.getCalorimeterHits().size();
+                 maxc = nnc;
+              }
+           }
+           sublist.add(maxc);
+           submap.put(maxc,c);
+        }
+        List<Cluster> subphotons = finder.findPhotons(sublist);
+        List<Cluster> photons = new ArrayList<Cluster>();
+        for(Cluster subp:subphotons)
+        {
+           BasicCluster pc = new BasicCluster();
+           for(Cluster subc:subp.getClusters())
+           {
+              pc.addCluster(submap.get(subc));
+           }
+           photons.add(pc);
+        }
+        int flag = 1<<LCIOConstants.CLBIT_HITS;
+        event.put(outCName, photons, Cluster.class, flag );
+        HitMap outputHitMap = new HitMap(inmap);
+//   Remove photon hits
+        for (Cluster clus : photons) 
+        {
+            for (CalorimeterHit hit : clus.getCalorimeterHits())
+            {
+               Long cellID = new Long(hit.getCellID());
+               outputHitMap.remove(cellID);
+            }
+         }
+         event.put(outHName, outputHitMap);
+    }
+    
+}

lcsim/src/org/lcsim/contrib/Cassell/recon/DTPhotons
Sid01DTPhotonFinder.java added at 1.1
diff -N Sid01DTPhotonFinder.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Sid01DTPhotonFinder.java	26 Feb 2008 18:12:26 -0000	1.1
@@ -0,0 +1,33 @@
+package org.lcsim.contrib.Cassell.recon.DTPhotons;
+import org.lcsim.contrib.uiowa.RonPhotonFinder.*;
+import java.util.*;
+import org.lcsim.event.Cluster;
+import org.lcsim.recon.cluster.util.BasicCluster;
+import hep.physics.vec.*;
+
+/**
+ * Photon finder
+ */
+public class Sid01DTPhotonFinder
+{
+    IdentifyDTPhotonClustersSid01 ider;
+    AssociatePhotonFragmentsSid01 ass;
+    HMatrixVars hmv;
+    public Sid01DTPhotonFinder(HMatrixVars HMV)
+    {
+       hmv = HMV;
+       ider = new IdentifyDTPhotonClustersSid01(hmv);
+       ass = new AssociatePhotonFragmentsSid01();
+    }
+    public List<Cluster> findPhotons(List<Cluster> cllist)
+    {
+       List<Cluster> photons = new ArrayList<Cluster>();
+       List<Cluster> fragments = new ArrayList<Cluster>();
+       for(Cluster c:cllist)
+       {
+          if(ider.isPhoton(c))photons.add(c);
+          else fragments.add(c);
+       }
+       return ass.associateFragments(photons,fragments);
+    }
+}

lcsim/src/org/lcsim/contrib/Cassell/recon/DTPhotons
TestRonDTPhotonFinder.java added at 1.1
diff -N TestRonDTPhotonFinder.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ TestRonDTPhotonFinder.java	26 Feb 2008 18:12:26 -0000	1.1
@@ -0,0 +1,112 @@
+package org.lcsim.contrib.Cassell.recon.DTPhotons;
+import org.lcsim.util.aida.*;
+import org.lcsim.event.EventHeader;
+import org.lcsim.util.Driver;
+import org.lcsim.recon.cluster.directedtree.*;
+import org.lcsim.digisim.*;
+import java.util.*;
+import org.lcsim.event.Cluster;
+import org.lcsim.event.MCParticle;
+import org.lcsim.contrib.Cassell.recon.Cheat.*;
+import org.lcsim.contrib.Cassell.recon.analysis.*;
+import hep.physics.vec.*;
+import org.lcsim.util.hitmap.*;
+
+public class TestRonDTPhotonFinder extends Driver
+{
+   private AIDA aida = AIDA.defaultInstance();
+   String eventHitMapEcal = "inputHitMapEcal";
+   String eventHitMapEcalout = "HitMapEcalminusPhotons";
+   String phCl = "DTPhotonClusters";
+   CalorimeterHitCollectionEnergies ECalHitEnergies;
+   ClusterCollectionEnergies DTPhotonClusterEnergies;
+    String CheatReconFSname = "ReconFSParticles";
+    String CheatReconFSTrackedname = "TrackedReconFSParticles";
+    String[] DigisimCollNames =
+    {"EcalBarrDigiHits", "EcalEndcapDigiHits"};
+   int ievt;
+    String[] type;
+    ParticleType pt;
+   public TestRonDTPhotonFinder()
+   {
+        CheatReconDriver crd = new CheatReconDriver();
+        crd.setCheatFSParticleOutputName(CheatReconFSname);
+        crd.setCheatTrackedFSParticleOutputName(CheatReconFSTrackedname);
+        add(crd);
+      add(new DigiPackageDriver());
+      HitListToHitMapDriver hitmapEcal = new HitListToHitMapDriver();
+      hitmapEcal.addInputList("EcalBarrDigiHits");
+      hitmapEcal.addInputList("EcalEndcapDigiHits");
+      hitmapEcal.setOutput(eventHitMapEcal);
+      add(hitmapEcal);
+      add(new RonDTPhotonFinderSid01(eventHitMapEcal, eventHitMapEcalout, phCl ));
+        ECalHitEnergies = new CalorimeterHitCollectionEnergies(
+            "ECalHits",CheatReconFSname,CheatReconFSTrackedname,DigisimCollNames,true);
+        add(ECalHitEnergies);
+        DTPhotonClusterEnergies = new ClusterCollectionEnergies(
+                CheatReconFSname,CheatReconFSTrackedname,phCl,true);
+        add(DTPhotonClusterEnergies);
+        pt = new ParticleType();
+        type = pt.getTypes();
+        ievt = 0;
+   }
+   public void process(EventHeader event)
+   {
+//
+// Process events with both quarks costheta < .8
+//
+        List<MCParticle> mcl = event.get(MCParticle.class,"MCParticle");
+        boolean keepit = true;
+        double Zmass = 0.;
+        for(MCParticle p:mcl)
+        {
+            int id = Math.abs(p.getPDGID());
+            if( (id == 1 )||(id == 2 )||(id == 3 ) )
+            {
+                if(p.getParents().get(0).getPDGID() == 23 )
+                {
+                    Zmass = p.getParents().get(0).getMass();
+                    Hep3Vector pp = p.getMomentum();
+                    double cost = Math.abs(pp.z()/pp.magnitude());
+                    if(cost > .8)
+                    {
+                        keepit = false;
+                        continue;
+                    }
+                }
+            }
+        }
+        if(!keepit)
+        {
+            ievt++;
+            if(ievt%1000 == 0)printSums();
+            return;
+        }
+        System.out.println("Processing event "+ievt);
+      super.process(event);
+      ievt++;
+      if(ievt%1000 == 0)printSums();
+   }
+   protected void printSums()
+   {
+       String outtypes = "FSParticle types: ";
+       for(int i=0;i<type.length;i++){outtypes += type[i]+"  ";}
+       System.out.println(outtypes);
+       double[] calsums = ECalHitEnergies.getRunEnergies();
+       String ecalout = "All Ecal hits: ";
+       for(int i=0;i<type.length;i++)
+       {
+          int E = (int) (calsums[i] + .5);
+          ecalout += E + "  ";
+       }
+       System.out.println(ecalout);
+       double[] DTsums = DTPhotonClusterEnergies.getRunEnergies();
+       String DTout = "  DT photons: ";
+       for(int i=0;i<type.length;i++)
+       {
+          int E = (int) (DTsums[i] + .5);
+          DTout += E + "  ";
+       }
+       System.out.println(DTout);
+   }
+}
\ No newline at end of file
CVSspam 0.2.8