Commit in projects/lcsim/trunk/cal-recon/src/main/java/org/lcsim/recon/cluster/localequivalence on MAIN | |||
NNAlgoClusterAnalysisDriver.java | +47 | added 2997 | |
NNAlgoClusterDriver.java | +4 | -2 | 2996 -> 2997 |
+51 | -2 |
Added BeamCal and LumiCal to default list of calorimeters. Added simplest analysis Driver as an example.
--- projects/lcsim/trunk/cal-recon/src/main/java/org/lcsim/recon/cluster/localequivalence/NNAlgoClusterAnalysisDriver.java (rev 0) +++ projects/lcsim/trunk/cal-recon/src/main/java/org/lcsim/recon/cluster/localequivalence/NNAlgoClusterAnalysisDriver.java 2014-02-14 18:41:56 UTC (rev 2997) @@ -0,0 +1,47 @@
+package org.lcsim.recon.cluster.localequivalence; + +import static java.lang.Math.abs; +import java.util.List; +import org.lcsim.event.CalorimeterHit; +import org.lcsim.event.EventHeader; +import org.lcsim.event.Cluster; +import org.lcsim.event.base.BaseCluster; +import org.lcsim.geometry.IDDecoder; +import org.lcsim.math.moments.CentralMomentsCalculator; +import org.lcsim.spacegeom.CartesianPoint; +import org.lcsim.spacegeom.SpacePoint; +import org.lcsim.util.Driver; +import org.lcsim.util.aida.AIDA; + +/** + * Simplest Analysis Driver showing how to access list of clusters + * from the event. + * + * @author Norman A Graf + * + * @version $Id: + */ +public class NNAlgoClusterAnalysisDriver extends Driver +{ + + private AIDA _aida = AIDA.defaultInstance(); + + @Override + protected void process(EventHeader event) + { + try + { + List<Cluster> clusters = event.get(Cluster.class, "BeamCalHitsEMClusters"); + if (clusters != null) + { + for (Cluster c : clusters) + { + _aida.cloud1D("Cluster Energy").fill(c.getEnergy()); + } + } + } catch (Exception e) + { + + } + } +}
--- projects/lcsim/trunk/cal-recon/src/main/java/org/lcsim/recon/cluster/localequivalence/NNAlgoClusterDriver.java 2014-02-14 07:07:11 UTC (rev 2996) +++ projects/lcsim/trunk/cal-recon/src/main/java/org/lcsim/recon/cluster/localequivalence/NNAlgoClusterDriver.java 2014-02-14 18:41:56 UTC (rev 2997) @@ -55,10 +55,12 @@
_dV = dV; _dLayer = dLayer; _thresh = threshold;
- _doall = false; - _collNames = new String[2];
+ _doall = true; + _collNames = new String[4];
_collNames[0] = "EcalBarrelHits"; _collNames[1] = "EcalEndcapHits";
+ _collNames[2] = "BeamCalHits"; + _collNames[3] = "LumiCalHits";
_nameExt = "EMClusters"; _clusterer = new NNAlgo(_thresh, _dLayer, _dU, _dV); }
Use REPLY-ALL to reply to list
To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1