Commit in mcd-analysis/src/main/java/org/lcsim/mcd/analysis on MAIN | |||
MCFastClusterAnalysis.java | +40 | added 1.1 |
simple driver that loops over the calorimeter hits and sums up the total energy
diff -N MCFastClusterAnalysis.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ MCFastClusterAnalysis.java 19 Dec 2012 17:12:43 -0000 1.1 @@ -0,0 +1,40 @@
+package org.lcsim.mcd.analysis; + +import hep.aida.ICloud1D; +import java.util.List; +import org.lcsim.event.Cluster; +import org.lcsim.event.EventHeader; +import org.lcsim.mc.fast.MCFast; +import org.lcsim.util.Driver; +import org.lcsim.util.aida.AIDA; + +public class MCFastClusterAnalysis extends Driver { + + AIDA aida = AIDA.defaultInstance(); + ICloud1D totEnergyPlot; + + @Override + public void startOfData() { + totEnergyPlot = aida.cloud1D(" Total Energy"); + } + + public MCFastClusterAnalysis() { + // Create MCFast with standard options + Driver fast = new MCFast(); +// add(new MCFast()); + add(fast); + } + + @Override + protected void process(EventHeader event) { + super.process(event); +/* List<Cluster> clusters = event.getClusters(); + double TotEnergy = 0.0; + for (int ii = 0; ii < clusters.size(); ii++) { + Cluster cluster = clusters.get(ii); + TotEnergy = TotEnergy + cluster.getEnergy(); + } + totEnergyPlot.fill(TotEnergy); + */ + } +}
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1