Commit in lcsim-analysis/src/main/java/org/lcsim/analysis on MAIN | |||
ReconstructedParticleAnalysis.java | +12 | 1.1 -> 1.2 |
added simple MC Particle access
diff -u -r1.1 -r1.2 --- ReconstructedParticleAnalysis.java 14 Feb 2013 22:21:44 -0000 1.1 +++ ReconstructedParticleAnalysis.java 14 Feb 2013 22:32:56 -0000 1.2 @@ -2,6 +2,7 @@
import java.util.List; import org.lcsim.event.EventHeader;
+import org.lcsim.event.MCParticle;
import org.lcsim.event.ReconstructedParticle; import org.lcsim.util.Driver; import org.lcsim.util.aida.AIDA;
@@ -20,6 +21,17 @@
@Override protected void process(EventHeader event) {
+ // The Monte carlo Particles + List<MCParticle> mcparts = event.getMCParticles(); + for(MCParticle mcp : mcparts) + { + // only book final state particles here... + if(mcp.getGeneratorStatus() == MCParticle.FINAL_STATE) + { + aida.cloud1D("MC final state PDG ID").fill(mcp.getPDGID()); + } + } + // the ReconstructedParticles
List<ReconstructedParticle> rplist = event.get(ReconstructedParticle.class, "PandoraPFOCollection"); aida.cloud1D("Number of ReconstructedParticles found").fill(rplist.size()); for (ReconstructedParticle rp : rplist) {
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