1 added + 1 removed + 12 modified, total 14 files
hps-java/src/main/java/org/lcsim/hps/recon/ecal
diff -u -r1.1 -r1.2
--- HPSEcalConverter.java 4 Nov 2011 00:51:19 -0000 1.1
+++ HPSEcalConverter.java 9 Dec 2011 23:40:21 -0000 1.2
@@ -11,7 +11,7 @@
/**
*
* @author Sho Uemura <[log in to unmask]>
- * @version $Id: HPSEcalConverter.java,v 1.1 2011/11/04 00:51:19 meeg Exp $
+ * @version $Id: HPSEcalConverter.java,v 1.2 2011/12/09 23:40:21 meeg Exp $
*/
public class HPSEcalConverter {
@@ -43,6 +43,6 @@
public RawCalorimeterHit HitAtoD(CalorimeterHit hit) {
dec.setID(hit.getCellID());
- return new HPSFADCCalorimeterHit(hit.getCellID(), AtoD(hit.getRawEnergy(), hit.getCellID()), (int) Math.round(hit.getTime() / period));
+ return new HPSFADCCalorimeterHit(hit.getCellID(), AtoD(hit.getRawEnergy(), hit.getCellID()), (int) Math.round(hit.getTime() / period),0);
}
}
hps-java/src/main/java/org/lcsim/hps/recon/ecal
diff -u -r1.2 -r1.3
--- HPSFADCCalorimeterHit.java 19 Nov 2011 00:52:55 -0000 1.2
+++ HPSFADCCalorimeterHit.java 9 Dec 2011 23:40:21 -0000 1.3
@@ -11,19 +11,21 @@
/**
*
* @author Sho Uemura <[log in to unmask]>
- * @version $Id: HPSFADCCalorimeterHit.java,v 1.2 2011/11/19 00:52:55 meeg Exp $
+ * @version $Id: HPSFADCCalorimeterHit.java,v 1.3 2011/12/09 23:40:21 meeg Exp $
*/
public class HPSFADCCalorimeterHit implements RawCalorimeterHit {
long cellID;
int amplitude;
- int timestamp;
+ int timeStamp;
+ int windowSize;
CalorimeterHit analogHit = null;
- public HPSFADCCalorimeterHit(long cellID, int amplitude, int timestamp) {
+ public HPSFADCCalorimeterHit(long cellID, int amplitude, int timeStamp, int windowSize) {
this.cellID = cellID;
this.amplitude = amplitude;
- this.timestamp = timestamp;
+ this.timeStamp = timeStamp;
+ this.windowSize = windowSize;
}
public long getCellID() {
@@ -35,7 +37,11 @@
}
public int getTimeStamp() {
- return timestamp;
+ return timeStamp;
+ }
+
+ public int getWindowSize() {
+ return windowSize;
}
public CalorimeterHit getAnalogHit() {
hps-java/src/main/java/org/lcsim/hps/recon/ecal
diff -u -r1.14 -r1.15
--- HPSEcalReadoutDriver.java 4 Nov 2011 00:51:19 -0000 1.14
+++ HPSEcalReadoutDriver.java 9 Dec 2011 23:40:21 -0000 1.15
@@ -15,7 +15,7 @@
* Performs readout of ECal hits.
*
* @author Sho Uemura <[log in to unmask]>
- * @version $Id: HPSEcalReadoutDriver.java,v 1.14 2011/11/04 00:51:19 meeg Exp $
+ * @version $Id: HPSEcalReadoutDriver.java,v 1.15 2011/12/09 23:40:21 meeg Exp $
*/
public abstract class HPSEcalReadoutDriver<T> extends Driver {
@@ -113,13 +113,13 @@
//if at the end of a readout cycle, write buffers to hits
if (readoutCycle > 0) {
if ((ClockSingleton.getClock() + 1) % readoutCycle == 0) {
- readoutCounter++;
readHits(newHits);
+ readoutCounter++;
}
} else {
while (ClockSingleton.getTime() - readoutTime() + ClockSingleton.getDt() >= readoutPeriod) {
- readoutCounter++;
readHits(newHits);
+ readoutCounter++;
}
}
hps-java/src/main/java/org/lcsim/hps/recon/ecal
diff -u -r1.3 -r1.4
--- HPSEcalFADCReadoutDriver.java 22 Nov 2011 01:12:41 -0000 1.3
+++ HPSEcalFADCReadoutDriver.java 9 Dec 2011 23:40:21 -0000 1.4
@@ -18,7 +18,7 @@
* Simulates time evolution of preamp output pulse.
*
* @author Sho Uemura <[log in to unmask]>
- * @version $Id: HPSEcalFADCReadoutDriver.java,v 1.3 2011/11/22 01:12:41 meeg Exp $
+ * @version $Id: HPSEcalFADCReadoutDriver.java,v 1.4 2011/12/09 23:40:21 meeg Exp $
*/
public class HPSEcalFADCReadoutDriver extends HPSEcalReadoutDriver<RawCalorimeterHit> {
//buffer for deposited energy
@@ -35,7 +35,7 @@
//shaper time constant in ns; negative values generate square pulses of the given width
double t0 = 18.0;
//delay (number of readout periods) between start of summing window and output of hit to clusterer
- int delay0 = 32;
+ int delay0 = 128;
HPSEcalConverter converter = null;
//output buffer for hits
LinkedList<HPSFADCCalorimeterHit> buffer = new LinkedList<HPSFADCCalorimeterHit>();
@@ -74,7 +74,10 @@
if (sum != null) {
if (eDepBuffer.currentValue() < threshold || timeMap.get(cellID) + delay0 == readoutCounter) {
// System.out.printf("sum = %f\n",sum);
- outputQueue.add(new HPSFADCCalorimeterHit(cellID, converter.AtoD((sum + eDepBuffer.currentValue()) / pulseIntegral, cellID), timeMap.get(cellID)));
+ outputQueue.add(new HPSFADCCalorimeterHit(cellID,
+ converter.AtoD((sum + eDepBuffer.currentValue()) / pulseIntegral, cellID),
+ timeMap.get(cellID),
+ readoutCounter-timeMap.get(cellID)+1));
sumMap.remove(cellID);
} else
sumMap.put(cellID, sum + eDepBuffer.currentValue());
hps-java/src/main/java/org/lcsim/hps/recon/ecal
diff -N HPSFADCClusterer.java
--- HPSFADCClusterer.java 22 Nov 2011 01:12:41 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,69 +0,0 @@
-package org.lcsim.hps.recon.ecal;
-
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.lcsim.event.CalorimeterHit;
-import org.lcsim.event.Cluster;
-import org.lcsim.event.EventHeader;
-import org.lcsim.event.RawCalorimeterHit;
-import org.lcsim.geometry.Detector;
-import org.lcsim.geometry.subdetector.HPSEcal3;
-import org.lcsim.util.lcio.LCIOConstants;
-
-/**
- * This Driver creates clusters from the CalorimeterHits of an
- * {@link org.lcsim.geometry.subdetectur.HPSEcal3} detector.
- *
- * The clustering algorithm is from pages 83 and 84 of the HPS Proposal.
- *
- * @author Sho Uemura <[log in to unmask]>
- *
- * @version $Id: HPSFADCClusterer.java,v 1.4 2011/11/22 01:12:41 meeg Exp $
- */
-public class HPSFADCClusterer extends HPSEcalClusterer {
-
- HPSEcalConverter converter = null;
-
- public HPSFADCClusterer() {
- }
-
- public void detectorChanged(Detector detector) {
- // Get the Subdetector.
- ecal = (HPSEcal3) detector.getSubdetector(ecalName);
-
- // Cache ref to neighbor map.
- neighborMap = ecal.getNeighborMap();
-
- converter = new HPSEcalConverter(ecal.getIDDecoder());
-
- //System.out.println(ecal.getName());
- //System.out.println(" nx="+ecal.nx());
- //System.out.println(" ny="+ecal.ny());
- //System.out.println(" beamgap="+ecal.beamGap());
- //System.out.println(" dface="+ecal.distanceToFace());
-
- //System.out.println(neighborMap.toString());
- }
-
- public void process(EventHeader event) {
- //System.out.println(this.getClass().getCanonicalName() + " - process");
-
- // Get the list of raw ECal hits.
- List<HPSFADCCalorimeterHit> hits = event.get(HPSFADCCalorimeterHit.class, ecalCollectionName);
- if (hits == null)
- throw new RuntimeException("Event is missing ECal raw hits collection!");
-
- // Make a hit map for quick lookup by ID.
- Map<Long, CalorimeterHit> hitMap = new HashMap<Long, CalorimeterHit>();
- for (HPSFADCCalorimeterHit hit : hits) {
- hitMap.put(hit.getCellID(), converter.HitDtoA(hit));
- }
-
- // Put Cluster collection into event.
- int flag = 1 << LCIOConstants.CLBIT_HITS;
- event.put(clusterCollectionName, createClusters(hitMap), Cluster.class, flag);
- }
-}
\ No newline at end of file
hps-java/src/main/java/org/lcsim/hps/analysis/ecal
diff -N HPSMCParticlePlotsDriver.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ HPSMCParticlePlotsDriver.java 9 Dec 2011 23:40:21 -0000 1.1
@@ -0,0 +1,166 @@
+package org.lcsim.hps.analysis.ecal;
+
+import hep.aida.ICloud1D;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.lcsim.event.EventHeader;
+import org.lcsim.event.MCParticle;
+import org.lcsim.event.util.ParticleTypeClassifier;
+import org.lcsim.util.Driver;
+import org.lcsim.util.aida.AIDA;
+
+/**
+ * Diagnostic plots for HPS ECal.
+ *
+ * @author Jeremy McCormick <[log in to unmask]>
+ * @version $Id: HPSMCParticlePlotsDriver.java,v 1.1 2011/12/09 23:40:21 meeg Exp $
+ */
+public class HPSMCParticlePlotsDriver extends Driver {
+ AIDA aida = AIDA.defaultInstance();
+ // MCParticle plots.
+ ICloud1D primaryEPlot;
+ ICloud1D fsCountPlot;
+ ICloud1D fsEPlot;
+ ICloud1D fsGammaEPlot;
+ ICloud1D fsElectronEPlot;
+ ICloud1D fsPositronEPlot;
+ ICloud1D fsGammaThetaPlot;
+ ICloud1D fsElectronThetaPlot;
+ ICloud1D fsPositronThetaPlot;
+ ICloud1D eventEPlot;
+
+ class MCParticleEComparator implements Comparator<MCParticle> {
+
+ public int compare(MCParticle p1, MCParticle p2) {
+ double e1 = p1.getEnergy();
+ double e2 = p2.getEnergy();
+ if (e1 < e2) {
+ return -1;
+ } else if (e1 == e2) {
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+ }
+
+
+ public void startOfData() {
+ fsCountPlot = aida.cloud1D("MCParticle: Number of Final State Particles");
+ fsCountPlot.annotation().addItem("xAxisLabel", "Number of FS Particles");
+
+ fsEPlot = aida.cloud1D("MCParticle: FS Particle E");
+ fsEPlot.annotation().addItem("xAxisLabel", "Particle E [GeV]");
+
+ fsGammaEPlot = aida.cloud1D("MCParticle: FS Gamma E");
+ fsGammaEPlot.annotation().addItem("xAxisLabel", "Particle E [GeV]");
+
+ fsElectronEPlot = aida.cloud1D("MCParticle: FS Electron E");
+ fsElectronEPlot.annotation().addItem("xAxisLabel", "Particle E [GeV]");
+
+ fsPositronEPlot = aida.cloud1D("MCParticle: FS Positron E");
+ fsPositronEPlot.annotation().addItem("xAxisLabel", "Particle E [GeV]");
+
+ fsGammaThetaPlot = aida.cloud1D("MCParticle: FS Gamma Theta");
+ fsGammaThetaPlot.annotation().addItem("xAxisLabel", "Particle angle [degrees]");
+
+ fsElectronThetaPlot = aida.cloud1D("MCParticle: FS Electron Theta");
+ fsElectronThetaPlot.annotation().addItem("xAxisLabel", "Particle angle [degrees]");
+
+ fsPositronThetaPlot = aida.cloud1D("MCParticle: FS Positron Theta");
+ fsPositronThetaPlot.annotation().addItem("xAxisLabel", "Particle angle [degrees]");
+
+ primaryEPlot = aida.cloud1D("MCParticle: Highest Primary E in Event");
+ primaryEPlot.annotation().addItem("xAxisLabel", "E [GeV]");
+
+ eventEPlot = aida.cloud1D("MCParticle: Total Gen FS Electron E in Event");
+ eventEPlot.annotation().addItem("xAxisLabel", "E [GeV]");
+
+ }
+
+ public void process(EventHeader event) {
+
+ // MCParticles
+ List<MCParticle> mcparticles = event.get(MCParticle.class).get(0);
+
+ // Final State particles.
+ List<MCParticle> fsParticles = makeGenFSParticleList(mcparticles);
+
+ //System.out.println("fsParticles="+fsParticles.size());
+ fsCountPlot.fill(fsParticles.size());
+
+ for (MCParticle fs : fsParticles) {
+ double fsE = fs.getEnergy();
+ double theta = Math.atan2(Math.sqrt(fs.getPX()*fs.getPX()+fs.getPY()*fs.getPY()),fs.getPZ());
+ int fsPdg = fs.getPDGID();
+ fsEPlot.fill(fsE);
+ if (ParticleTypeClassifier.isElectron(fsPdg)) {
+ fsElectronEPlot.fill(fsE);
+ fsElectronThetaPlot.fill(Math.toDegrees(theta));
+ } else if (ParticleTypeClassifier.isPositron(fsPdg)) {
+ fsPositronEPlot.fill(fsE);
+ fsPositronThetaPlot.fill(Math.toDegrees(theta));
+ } else if (ParticleTypeClassifier.isPhoton(fsPdg)) {
+ fsGammaEPlot.fill(fsE);
+ fsGammaThetaPlot.fill(Math.toDegrees(theta));
+ }
+ }
+
+ // Sort MCParticles on energy.
+ Collections.sort(fsParticles, new MCParticleEComparator());
+
+ // Energy of top two FS particles.
+ //double e2 = fsParticles.get(0).getEnergy() + fsParticles.get(1).getEnergy();
+
+ // Energy of top three FS particles.
+ //double e3 = e2 + fsParticles.get(2).getEnergy();
+
+ // primary particle with most E
+ MCParticle primary = getPrimary(mcparticles);
+ double primaryE = primary.getEnergy();
+ primaryEPlot.fill(primaryE);
+
+ // event energy
+ double eventE = getPrimaryE(mcparticles);
+ eventEPlot.fill(eventE);
+
+ }
+
+ private double getPrimaryE(List<MCParticle> particles) {
+ double electronE = 0;
+ for (MCParticle particle : particles) {
+ if (particle.getGeneratorStatus() == MCParticle.FINAL_STATE
+ && Math.abs(particle.getPDGID()) == 11) {
+ electronE += particle.getEnergy();
+ }
+ }
+ return electronE;
+ }
+
+ private MCParticle getPrimary(List<MCParticle> particles) {
+ double maxE = 0;
+ MCParticle primary = null;
+ for (MCParticle particle : particles) {
+ if (particle.getGeneratorStatus() == MCParticle.FINAL_STATE
+ && particle.getEnergy() > maxE) {
+ maxE = particle.getEnergy();
+ primary = particle;
+ }
+ }
+ return primary;
+ }
+
+ private static List<MCParticle> makeGenFSParticleList(List<MCParticle> mcparticles) {
+ List<MCParticle> fsParticles = new ArrayList<MCParticle>();
+ for (MCParticle mcparticle : mcparticles) {
+ if (mcparticle.getGeneratorStatus() == MCParticle.FINAL_STATE) {
+ fsParticles.add(mcparticle);
+ }
+ }
+ return fsParticles;
+ }
+}
hps-java/src/main/java/org/lcsim/hps/analysis/ecal
diff -u -r1.2 -r1.3
--- HPSEcalTriggerPlotsDriver.java 19 Nov 2011 00:52:56 -0000 1.2
+++ HPSEcalTriggerPlotsDriver.java 9 Dec 2011 23:40:21 -0000 1.3
@@ -19,7 +19,7 @@
* Diagnostic plots for HPS ECal.
*
* @author Sho Uemura <[log in to unmask]>
- * @version $Id: HPSEcalTriggerPlotsDriver.java,v 1.2 2011/11/19 00:52:56 meeg Exp $
+ * @version $Id: HPSEcalTriggerPlotsDriver.java,v 1.3 2011/12/09 23:40:21 meeg Exp $
*/
public class HPSEcalTriggerPlotsDriver extends Driver {
@@ -43,19 +43,19 @@
public void startOfData() {
hitXYPlot = aida.histogram2D(
- clusterCollectionName + " : Hits",
+ "Trigger plots: " + ecalCollectionName + " : Hits",
47, -23.5, 23.5, 11, -5.5, 5.5);
clusterHitXYPlot = aida.histogram2D(
- clusterCollectionName + " : Crystals in clusters",
+ "Trigger plots: " + clusterCollectionName + " : Crystals in clusters",
47, -23.5, 23.5, 11, -5.5, 5.5);
seedHitXYPlot = aida.histogram2D(
- clusterCollectionName + " : Seed hits",
+ "Trigger plots: " + clusterCollectionName + " : Seed hits",
47, -23.5, 23.5, 11, -5.5, 5.5);
triggerClusterHitXYPlot = aida.histogram2D(
- clusterCollectionName + " : Crystals in clusters, with trigger",
+ "Trigger plots: " + clusterCollectionName + " : Crystals in clusters, with trigger",
47, -23.5, 23.5, 11, -5.5, 5.5);
triggerSeedHitXYPlot = aida.histogram2D(
- clusterCollectionName + " : Seed hits, with trigger",
+ "Trigger plots: " + clusterCollectionName + " : Seed hits, with trigger",
47, -23.5, 23.5, 11, -5.5, 5.5);
}
hps-java/src/main/java/org/lcsim/hps/analysis/ecal
diff -u -r1.2 -r1.3
--- HPSEcalFADCPlotsDriver.java 19 Nov 2011 00:52:56 -0000 1.2
+++ HPSEcalFADCPlotsDriver.java 9 Dec 2011 23:40:21 -0000 1.3
@@ -1,5 +1,6 @@
package org.lcsim.hps.analysis.ecal;
+import hep.aida.ICloud2D;
import hep.aida.IHistogram1D;
import java.util.List;
@@ -7,8 +8,8 @@
import org.lcsim.event.CalorimeterHit;
import org.lcsim.event.Cluster;
import org.lcsim.event.EventHeader;
-import org.lcsim.event.RawCalorimeterHit;
import org.lcsim.hps.recon.ecal.HPSEcalCluster;
+import org.lcsim.hps.recon.ecal.HPSFADCCalorimeterHit;
import org.lcsim.util.Driver;
import org.lcsim.util.aida.AIDA;
@@ -16,7 +17,7 @@
* Diagnostic plots for HPS ECal.
*
* @author Sho Uemura <[log in to unmask]>
- * @version $Id: HPSEcalFADCPlotsDriver.java,v 1.2 2011/11/19 00:52:56 meeg Exp $
+ * @version $Id: HPSEcalFADCPlotsDriver.java,v 1.3 2011/12/09 23:40:21 meeg Exp $
*/
public class HPSEcalFADCPlotsDriver extends Driver {
@@ -29,6 +30,7 @@
IHistogram1D rawE;
IHistogram1D ecalE;
IHistogram1D clusterE;
+ ICloud2D window_E;
double edepThreshold = 0.05;
public void setEdepThreshold(double edepThreshold) {
@@ -49,20 +51,21 @@
public void startOfData() {
edepE = aida.histogram1D(
- edepCollectionName + " : Hits",
+ "FADC plots: " + edepCollectionName + " : Hits",
500, 0.0, 5.0);
if (rawCollectionName != null) {
rawE = aida.histogram1D(
- rawCollectionName + " : Hits",
+ "FADC plots: " + rawCollectionName + " : Hits",
500, 0.0, 500.0);
+ window_E = aida.cloud2D("FADC plots: " + rawCollectionName + " : Window vs. E");
}
if (ecalCollectionName != null) {
ecalE = aida.histogram1D(
- ecalCollectionName + " : Hits",
+ "FADC plots: " + ecalCollectionName + " : Hits",
500, 0.0, 5.0);
}
clusterE = aida.histogram1D(
- clusterCollectionName + " : Clusters",
+ "FADC plots: " + clusterCollectionName + " : Clusters",
500, 0.0, 5.0);
}
@@ -76,12 +79,13 @@
throw new RuntimeException("Missing hit collection!");
if (rawCollectionName != null) {
- List<RawCalorimeterHit> rawHits = event.get(RawCalorimeterHit.class, rawCollectionName);
+ List<HPSFADCCalorimeterHit> rawHits = event.get(HPSFADCCalorimeterHit.class, rawCollectionName);
if (rawHits == null)
throw new RuntimeException("Missing hit collection!");
- for (RawCalorimeterHit hit : rawHits) {
+ for (HPSFADCCalorimeterHit hit : rawHits) {
rawE.fill(hit.getAmplitude());
+ window_E.fill(hit.getAmplitude(),hit.getWindowSize());
}
}
hps-java/src/main/java/org/lcsim/hps/analysis/ecal
diff -u -r1.13 -r1.14
--- HPSEcalPlotsDriver.java 7 Oct 2011 23:14:55 -0000 1.13
+++ HPSEcalPlotsDriver.java 9 Dec 2011 23:40:21 -0000 1.14
@@ -6,7 +6,6 @@
import hep.aida.IHistogram2D;
import hep.physics.vec.Hep3Vector;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
@@ -22,7 +21,6 @@
import org.lcsim.event.Cluster;
import org.lcsim.event.EventHeader;
import org.lcsim.event.MCParticle;
-import org.lcsim.event.util.ParticleTypeClassifier;
import org.lcsim.hps.recon.ecal.HPSEcalCluster;
import org.lcsim.hps.recon.ecal.HPSRawCalorimeterHit;
import org.lcsim.hps.util.ClockSingleton;
@@ -34,24 +32,16 @@
* Diagnostic plots for HPS ECal.
*
* @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: HPSEcalPlotsDriver.java,v 1.13 2011/10/07 23:14:55 meeg Exp $
+ * @version $Id: HPSEcalPlotsDriver.java,v 1.14 2011/12/09 23:40:21 meeg Exp $
*/
public class HPSEcalPlotsDriver extends Driver {
String ecalCollectionName = "EcalHits";
String ecalClusterCollectionName = "EcalClusters";
AIDA aida = AIDA.defaultInstance();
- // MCParticle plots.
- ICloud1D primaryEPlot;
- ICloud1D fsCountPlot;
- ICloud1D fsEPlot;
- ICloud1D fsGammaEPlot;
- ICloud1D fsElectronEPlot;
- ICloud1D fsPositronEPlot;
// CalHit plots.
IHistogram1D hitEPlot;
ICloud1D ecalEPlot;
- ICloud1D eventEPlot;
ICloud2D hitXZPlot;
ICloud2D hitYZPlot;
ICloud1D hitUnder100MeVPlot;
@@ -117,21 +107,6 @@
}
public void startOfData() {
- fsCountPlot = aida.cloud1D("MCParticle: Number of Final State Particles");
- fsCountPlot.annotation().addItem("xAxisLabel", "Number of FS Particles");
-
- fsEPlot = aida.cloud1D("MCParticle: FS Particle E");
- fsEPlot.annotation().addItem("xAxisLabel", "Particle E [GeV]");
-
- fsGammaEPlot = aida.cloud1D("MCParticle: FS Gamma E");
- fsGammaEPlot.annotation().addItem("xAxisLabel", "Particle E [GeV]");
-
- fsElectronEPlot = aida.cloud1D("MCParticle: FS Electron E");
- fsElectronEPlot.annotation().addItem("xAxisLabel", "Particle E [GeV]");
-
- fsPositronEPlot = aida.cloud1D("MCParticle: FS Positron E");
- fsPositronEPlot.annotation().addItem("xAxisLabel", "Particle E [GeV]");
-
timePlot = aida.cloud1D(ecalCollectionName + " : Hit Time");
timePlot.annotation().addItem("yAxisScale", "log");
timePlot.annotation().addItem("xAxisLabel", "Time [ns]");
@@ -156,12 +131,6 @@
ecalEPlot = aida.cloud1D(ecalCollectionName + " : Total E in Event");
ecalEPlot.annotation().addItem("xAxisLabel", "E [GeV]");
- primaryEPlot = aida.cloud1D("MCParticle: Highest Primary E in Event");
- primaryEPlot.annotation().addItem("xAxisLabel", "E [GeV]");
-
- eventEPlot = aida.cloud1D("MCParticle: Total Gen FS Electron E in Event");
- eventEPlot.annotation().addItem("xAxisLabel", "E [GeV]");
-
hitYZPlot = aida.cloud2D(ecalCollectionName + " : Y vs Z");
hitYZPlot.annotation().addItem("xAxisLabel", "Y [mm]");
hitYZPlot.annotation().addItem("yAxisLabel", "Z [mm]");
@@ -226,42 +195,9 @@
// MCParticles
List<MCParticle> mcparticles = event.get(MCParticle.class).get(0);
- // Final State particles.
- List<MCParticle> fsParticles = makeGenFSParticleList(mcparticles);
-
- //System.out.println("fsParticles="+fsParticles.size());
- fsCountPlot.fill(fsParticles.size());
-
- for (MCParticle fs : fsParticles) {
- double fsE = fs.getEnergy();
- int fsPdg = fs.getPDGID();
- fsEPlot.fill(fsE);
- if (ParticleTypeClassifier.isElectron(fsPdg)) {
- fsElectronEPlot.fill(fsE);
- } else if (ParticleTypeClassifier.isPositron(fsPdg)) {
- fsPositronEPlot.fill(fsE);
- } else if (ParticleTypeClassifier.isPhoton(fsPdg)) {
- fsGammaEPlot.fill(fsE);
- }
- }
-
- // Sort MCParticles on energy.
- Collections.sort(fsParticles, new MCParticleEComparator());
-
- // Energy of top two FS particles.
- //double e2 = fsParticles.get(0).getEnergy() + fsParticles.get(1).getEnergy();
-
- // Energy of top three FS particles.
- //double e3 = e2 + fsParticles.get(2).getEnergy();
-
// primary particle with most E
MCParticle primary = getPrimary(mcparticles);
double primaryE = primary.getEnergy();
- primaryEPlot.fill(primaryE);
-
- // event energy
- double eventE = getPrimaryE(mcparticles);
- eventEPlot.fill(eventE);
List<HPSEcalCluster> clusters = event.get(HPSEcalCluster.class, ecalClusterCollectionName);
if (clusters == null)
@@ -430,16 +366,6 @@
idCountPlot.fill(ids.size());
}
- private double getPrimaryE(List<MCParticle> particles) {
- double electronE = 0;
- for (MCParticle particle : particles) {
- if (particle.getGeneratorStatus() == MCParticle.FINAL_STATE
- && Math.abs(particle.getPDGID()) == 11) {
- electronE += particle.getEnergy();
- }
- }
- return electronE;
- }
private MCParticle getPrimary(List<MCParticle> particles) {
double maxE = 0;
@@ -453,14 +379,4 @@
}
return primary;
}
-
- private static List<MCParticle> makeGenFSParticleList(List<MCParticle> mcparticles) {
- List<MCParticle> fsParticles = new ArrayList<MCParticle>();
- for (MCParticle mcparticle : mcparticles) {
- if (mcparticle.getGeneratorStatus() == MCParticle.FINAL_STATE) {
- fsParticles.add(mcparticle);
- }
- }
- return fsParticles;
- }
}
hps-java/src/main/resources/org/lcsim/hps/steering
diff -u -r1.1 -r1.2
--- ecal_fadc_ap.lcsim 19 Nov 2011 00:52:55 -0000 1.1
+++ ecal_fadc_ap.lcsim 9 Dec 2011 23:40:21 -0000 1.2
@@ -1,7 +1,7 @@
<!--
Example LCSim steering file to run simple HPS ECal clustering and analysis.
@author Sho Uemura <[log in to unmask]>
- @version $Id: ecal_fadc_ap.lcsim,v 1.1 2011/11/19 00:52:55 meeg Exp $
+ @version $Id: ecal_fadc_ap.lcsim,v 1.2 2011/12/09 23:40:21 meeg Exp $
-->
<lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
@@ -24,6 +24,7 @@
<driver name="EcalPlots"/>
<driver name="EcalFADCPlots"/>
<driver name="EcalTriggerPlots"/>
+ <driver name="MCParticlePlots"/>
<!--<driver name="Writer"/>-->
<driver name="AidaSaveDriver"/>
<driver name="ClockDriver"/>
@@ -64,6 +65,9 @@
<driver name="EcalTriggerPlots"
type="org.lcsim.hps.analysis.ecal.HPSEcalTriggerPlotsDriver">
</driver>
+ <driver name="MCParticlePlots"
+ type="org.lcsim.hps.analysis.ecal.HPSMCParticlePlotsDriver">
+ </driver>
<driver name="EventMarkerDriver"
type="org.lcsim.job.EventMarkerDriver">
<eventInterval>100</eventInterval>
hps-java/src/main/resources/org/lcsim/hps/steering
diff -u -r1.6 -r1.7
--- ecal_1bit_bkgd.lcsim 19 Nov 2011 00:52:55 -0000 1.6
+++ ecal_1bit_bkgd.lcsim 9 Dec 2011 23:40:21 -0000 1.7
@@ -1,7 +1,7 @@
<!--
Example LCSim steering file to run simple HPS ECal clustering and analysis.
@author Sho Uemura <[log in to unmask]>
- @version $Id: ecal_1bit_bkgd.lcsim,v 1.6 2011/11/19 00:52:55 meeg Exp $
+ @version $Id: ecal_1bit_bkgd.lcsim,v 1.7 2011/12/09 23:40:21 meeg Exp $
-->
<lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
@@ -38,7 +38,7 @@
<ecalName>Ecal</ecalName>
<ecalCollectionName>EcalHits</ecalCollectionName>
<ecalRawCollectionName>EcalRawHits</ecalRawCollectionName>
- <threshold>0.2</threshold>
+ <threshold>0.3</threshold>
</driver>
<driver name="EcalClusterer"
type="org.lcsim.hps.recon.ecal.HPSEcal1BitClusterer">
hps-java/src/main/resources/org/lcsim/hps/steering
diff -u -r1.5 -r1.6
--- ecal_1bit_ap.lcsim 19 Nov 2011 00:52:55 -0000 1.5
+++ ecal_1bit_ap.lcsim 9 Dec 2011 23:40:21 -0000 1.6
@@ -1,7 +1,7 @@
<!--
Example LCSim steering file to run simple HPS ECal clustering and analysis.
@author Sho Uemura <[log in to unmask]>
- @version $Id: ecal_1bit_ap.lcsim,v 1.5 2011/11/19 00:52:55 meeg Exp $
+ @version $Id: ecal_1bit_ap.lcsim,v 1.6 2011/12/09 23:40:21 meeg Exp $
-->
<lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/lcsim/1.0/lcsim.xsd">
@@ -36,7 +36,7 @@
<ecalName>Ecal</ecalName>
<ecalCollectionName>EcalHits</ecalCollectionName>
<ecalRawCollectionName>EcalRawHits</ecalRawCollectionName>
- <threshold>0.2</threshold>
+ <threshold>0.3</threshold>
</driver>
<driver name="EcalClusterer"
type="org.lcsim.hps.recon.ecal.HPSEcal1BitClusterer">
hps-java/src/main/resources/org/lcsim/hps/steering
diff -u -r1.2 -r1.3
--- ecal_fadc_bkgd.lcsim 22 Nov 2011 01:12:42 -0000 1.2
+++ ecal_fadc_bkgd.lcsim 9 Dec 2011 23:40:21 -0000 1.3
@@ -1,7 +1,7 @@
<!--
Example LCSim steering file to run simple HPS ECal clustering and analysis.
@author Sho Uemura <[log in to unmask]>
- @version $Id: ecal_fadc_bkgd.lcsim,v 1.2 2011/11/22 01:12:42 meeg Exp $
+ @version $Id: ecal_fadc_bkgd.lcsim,v 1.3 2011/12/09 23:40:21 meeg Exp $
-->
<lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
@@ -22,9 +22,10 @@
<driver name="EcalConverter"/>
<driver name="EcalClusterer"/>
<driver name="EcalTrigger"/>
- <driver name="EcalPlots"/>
+<!-- <driver name="EcalPlots"/>-->
<driver name="EcalFADCPlots"/>
<driver name="EcalTriggerPlots"/>
+ <driver name="MCParticlePlots"/>
<!--<driver name="Writer"/>-->
<driver name="AidaSaveDriver"/>
<driver name="ClockDriver"/>
@@ -73,6 +74,9 @@
<driver name="EcalTriggerPlots"
type="org.lcsim.hps.analysis.ecal.HPSEcalTriggerPlotsDriver">
</driver>
+ <driver name="MCParticlePlots"
+ type="org.lcsim.hps.analysis.ecal.HPSMCParticlePlotsDriver">
+ </driver>
<driver name="EventMarkerDriver"
type="org.lcsim.job.EventMarkerDriver">
<eventInterval>100</eventInterval>
hps-java
diff -u -r1.9 -r1.10
--- pom.xml 28 Jul 2011 18:30:50 -0000 1.9
+++ pom.xml 9 Dec 2011 23:40:21 -0000 1.10
@@ -1,115 +1,121 @@
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>hps-java</artifactId>
- <groupId>org.lcsim</groupId>
- <name>Heavy Photon Search Java Project</name>
- <version>1.0-SNAPSHOT</version>
- <description>Heavy Photon Search java code that uses lcsim infrastructure.</description>
- <scm>
- <connection>scm:cvs:pserver:[log in to unmask]:/cvs/lcd:hps-java</connection>
- <developerConnection>scm:cvs:pserver:[log in to unmask]:/cvs/lcd:hps-java</developerConnection>
- <url>http://source.freehep.org/jcvsweb/ilc/LCSIM/list/hps-java</url>
- </scm>
- <distributionManagement>
- <site>
- <id>hps-java</id>
- <name>hps-java</name>
- <url>scp://svn.slac.stanford.edu///nfs/slac/g/lcd/mc/prj/www/lcsim/software/hps-java/${project.version}</url>
- </site>
- <repository>
- <id>lcsim-maven-slac-linux</id>
- <name>org.lcsim Maven Repository</name>
- <url>scpexe://svn.slac.stanford.edu///nfs/slac/g/lcd/mc/prj/www/lcsim/maven2/</url>
- </repository>
- </distributionManagement>
- <repositories>
- <repository>
- <id>lcsim-maven</id>
- <name>org.lcsim Maven Repository</name>
- <url>http://lcsim.org/maven2</url>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- <checksumPolicy>ignore</checksumPolicy>
- </snapshots>
- </repository>
- <repository>
- <id>freehep-maven</id>
- <name>FreeHEP Maven 2 Repository</name>
- <url>http://java.freehep.org/maven2</url>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>freehep-maven</id>
- <name>Freehep Plugin Repository</name>
- <url>http://java.freehep.org/maven2</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </pluginRepository>
- </pluginRepositories>
- <build>
- <defaultGoal>install</defaultGoal>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- <showDeprecation>true</showDeprecation>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Xmx1024m</argLine>
- <forkMode>pertest</forkMode>
- <excludes>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>hps-java</artifactId>
+ <groupId>org.lcsim</groupId>
+ <name>Heavy Photon Search Java Project</name>
+ <version>1.0-SNAPSHOT</version>
+ <description>Heavy Photon Search java code that uses lcsim infrastructure.</description>
+ <scm>
+ <connection>scm:cvs:pserver:[log in to unmask]:/cvs/lcd:hps-java</connection>
+ <developerConnection>scm:cvs:pserver:[log in to unmask]:/cvs/lcd:hps-java</developerConnection>
+ <url>http://source.freehep.org/jcvsweb/ilc/LCSIM/list/hps-java</url>
+ </scm>
+ <distributionManagement>
+ <site>
+ <id>hps-java</id>
+ <name>hps-java</name>
+ <url>scp://svn.slac.stanford.edu///nfs/slac/g/lcd/mc/prj/www/lcsim/software/hps-java/${project.version}</url>
+ </site>
+ <repository>
+ <id>lcsim-maven-slac-linux</id>
+ <name>org.lcsim Maven Repository</name>
+ <url>scpexe://svn.slac.stanford.edu///nfs/slac/g/lcd/mc/prj/www/lcsim/maven2/</url>
+ </repository>
+ </distributionManagement>
+ <repositories>
+ <repository>
+ <id>lcsim-maven</id>
+ <name>org.lcsim Maven Repository</name>
+ <url>http://lcsim.org/maven2</url>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>always</updatePolicy>
+ <checksumPolicy>ignore</checksumPolicy>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>freehep-maven</id>
+ <name>FreeHEP Maven 2 Repository</name>
+ <url>http://java.freehep.org/maven2</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>freehep-maven</id>
+ <name>Freehep Plugin Repository</name>
+ <url>http://java.freehep.org/maven2</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>true</showDeprecation>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Xmx1024m</argLine>
+ <forkMode>pertest</forkMode>
+ <excludes>
<!-- Fix for http://jira.codehaus.org/browse/SUREFIRE-288 -->
- <exclude>**/*$*</exclude>
- </excludes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.freehep</groupId>
- <artifactId>freehep-jas-plugin</artifactId>
- <version>2.0.1</version>
- <executions>
- <execution>
- <goals>
- <goal>install</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <jarName>hps-java</jarName>
- <includes>
- <include>org.lcsim:hps-java</include>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.lcsim</groupId>
- <artifactId>lcsim</artifactId>
- <version>1.19-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.lcsim</groupId>
- <artifactId>hps-detectors</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.lcsim</groupId>
- <artifactId>jevio-base</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
+ <exclude>**/*$*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.freehep</groupId>
+ <artifactId>freehep-jas-plugin</artifactId>
+ <version>2.0.1</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>install</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <jarName>hps-java</jarName>
+ <includes>
+ <include>org.lcsim:hps-java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.lcsim</groupId>
+ <artifactId>lcsim</artifactId>
+ <version>1.19-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.lcsim</groupId>
+ <artifactId>hps-detectors</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.lcsim</groupId>
+ <artifactId>jevio-base</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.lcsim</groupId>
+ <artifactId>GeomConverter</artifactId>
+ <version>1.14-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
</project>
CVSspam 0.2.12