SlicDiagnostics/src/org/lcsim/slic/diagnostics
diff -u -r1.8 -r1.9
--- CalorimeterHitPlots.java 18 Aug 2005 00:50:00 -0000 1.8
+++ CalorimeterHitPlots.java 20 Aug 2005 05:24:18 -0000 1.9
@@ -36,7 +36,6 @@
String collName;
- /** Creates a new instance of CalorimeterHitPlots */
public CalorimeterHitPlots(LCMetaData meta)
{
super(meta.getName());
@@ -52,10 +51,10 @@
{
super.definePlots();
- mcpCountPerHit = aida.cloud1D(makePlotName("Contributing MCParticles per Hit"));
- mcpPDG = aida.cloud1D(makePlotName("MCParticle PDGID"));
- mcpSingleContribPDG = aida.cloud1D(makePlotName("MCParticle Single Contribution PDGID"));
- hitCorrectedEnergy = aida.cloud1D(makePlotName("Hit Corrected Energy"));
+ mcpCountPerHit = aida.cloud1D(makePlotName("Contributing MCParticles per Hit"));
+ mcpPDG = aida.cloud1D(makePlotName("MCParticle PDGID"));
+ mcpSingleContribPDG = aida.cloud1D(makePlotName("MCParticle Single Contribution PDGID"));
+ hitCorrectedEnergy = aida.cloud1D(makePlotName("Hit Corrected Energy"));
hitRawVsCorrectedEnergy = aida.cloud2D(makePlotName("Hit Raw vs Corrected Energy"));
}
@@ -79,7 +78,8 @@
for ( SimCalorimeterHit hit : hits)
{
decoder.setID(hit.getCellID());
-
+
+ /* segmentation plots */
if ( segmentation instanceof ProjectiveCylinder ||
segmentation instanceof NonprojectiveCylinder ||
segmentation instanceof ProjectiveZPlane )
@@ -96,7 +96,7 @@
decoder.getTheta(),
(double)decoder.getValue("theta"));
}
- else if ( segmentation instanceof NonprojectiveCylinder )
+ else if ( segmentation instanceof NonprojectiveCylinder)
{
aida.cloud2D(makePlotName("Z vs Z Bin")).fill(
decoder.getZ(),
SlicDiagnostics/src/org/lcsim/slic/diagnostics
diff -u -r1.9 -r1.10
--- GenericHitPlots.java 18 Aug 2005 00:50:00 -0000 1.9
+++ GenericHitPlots.java 20 Aug 2005 05:24:18 -0000 1.10
@@ -1,6 +1,8 @@
package org.lcsim.slic.diagnostics;
import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
import hep.aida.IHistogram1D;
import hep.aida.ICloud1D;
import hep.aida.ICloud2D;
@@ -22,7 +24,7 @@
IHistogram1D layer;
ICloud1D hitCount;
ICloud1D hitAvgEnergy;
- ICloud1D layerEnergy;
+ IHistogram1D layerEnergy;
ICloud1D layerHitCount;
int nlayers = 0;
@@ -47,15 +49,16 @@
{
super.definePlots();
- energy = aida.cloud1D(makePlotName("Hit Energy"));
- hitAvgEnergy = aida.cloud1D(makePlotName("Hit Average Energy"));
- time = aida.histogram1D(makePlotName("Hit Time"), 100, 0, 50);
- thetaPhi = aida.cloud2D(makePlotName("Hit Theta vs. Phi"));
- xy = aida.cloud2D(makePlotName("Hit X vs. Y"));
- rz = aida.cloud2D(makePlotName("Hit R vs. Z"));
- layer = aida.histogram1D(makePlotName("Hit Layer"), nlayers, 0, nlayers);
- energyEvent = aida.cloud1D(makePlotName("Event Total Energy"));
- hitCount = aida.cloud1D(makePlotName("Event Total Hit Count"));
+ energy = aida.cloud1D(makePlotName("Hit Energies"));
+ hitAvgEnergy = aida.cloud1D(makePlotName("Hit Average Energy by Event"));
+ time = aida.histogram1D(makePlotName("Hit Time"), 100, 0, 50);
+ thetaPhi = aida.cloud2D(makePlotName("Hit Theta vs. Phi"));
+ xy = aida.cloud2D(makePlotName("Hit X vs. Y"));
+ rz = aida.cloud2D(makePlotName("Hit R vs. Z"));
+ layer = aida.histogram1D(makePlotName("Hit Layer"), nlayers, 0, nlayers);
+ layerEnergy = aida.histogram1D(makePlotName("Layer Energy"), nlayers, 0, nlayers);
+ energyEvent = aida.cloud1D(makePlotName("Event Total Energy"));
+ hitCount = aida.cloud1D(makePlotName("Event Total Hit Count"));
}
public void setGenericHitList(List<GenericHit> hits)
@@ -100,7 +103,10 @@
/* hit layer */
layer.fill(hit.getLayer());
-
+
+ /* hit layer energy */
+ layerEnergy.fill(hit.getLayer(), hit.getEnergy());
+
/* incr tot E */
eventTotEnergy += hit.getEnergy();
SlicDiagnostics/src/org/lcsim/slic/diagnostics
diff -u -r1.7 -r1.8
--- MCParticlePlots.java 18 Aug 2005 00:50:00 -0000 1.7
+++ MCParticlePlots.java 20 Aug 2005 05:24:19 -0000 1.8
@@ -51,6 +51,7 @@
IHistogram1D mcpVtxToEPDistGTMeV;
ICloud1D mcpEnergyFinalState;
IHistogram1D mcpKE;
+ ICloud1D mcpFSCount;
Map<String, Integer> particleCounts = new HashMap<String,Integer>();
@@ -74,18 +75,19 @@
{
super.definePlots();
- mcpCount = aida.cloud1D(makePlotName("Particle Count By Event"));
- mcpTotalEnergyFinalState = aida.cloud1D(makePlotName("Final State Energy Total by Event"));
- mcpEnergyFinalState = aida.cloud1D(makePlotName("Energy of Final State Particle"));
+ mcpCount = aida.cloud1D(makePlotName("Count"));
+ mcpTotalEnergyFinalState = aida.cloud1D(makePlotName("Final State Energy Total"));
+ mcpEnergyFinalState = aida.cloud1D(makePlotName("Final State Energies"));
+ mcpFSCount = aida.cloud1D(makePlotName("Final State Count"));
mcpSimStatus = aida.histogram1D(makePlotName("Simulator Status Code"), 7, 1.0, 8.0);
mcpGenStatus = aida.histogram1D(makePlotName("Generator Status Code"), 4, 0.0, 4.0);
mcpSimVsGenStatus = aida.histogram2D(makePlotName("Simulator vs Generator Status"), 7, 1.0, 8.0, 4, 0.0, 4.0);
- mcpCosTheta = aida.cloud1D(makePlotName("Momentum CosTheta"));
- mcpPhi = aida.cloud1D(makePlotName("Momentum Phi"));
+ mcpCosTheta = aida.cloud1D(makePlotName("Final State Momentum CosTheta"));
+ mcpPhi = aida.cloud1D(makePlotName("Final State Momentum Phi"));
mcpVtxToEPDist = aida.cloud1D(makePlotName("Vertex to Endpoint Distance"));
mcpVtxToEPDistLTMeV = aida.histogram1D(makePlotName("Vertex to Endpoint Distance for kE < 1 MeV"), 500, 0., 2000.0);
mcpVtxToEPDistGTMeV = aida.histogram1D(makePlotName("Vertex to Endpoint Distance for kE > 1 MeV"), 200, 0., 24000.0);
- mcpKE = aida.histogram1D(makePlotName("Kinetic Energy"), 200, 0.0, 10.0);
+ mcpKE = aida.histogram1D(makePlotName("Kinetic Energy"), 200, 0.0, 10.0);
}
public void fill()
@@ -102,6 +104,7 @@
if ( particles.size() > 0 )
{
particleCounts.clear();
+ int FSCount = 0;
totE = 0;
for ( MCParticle particle : particles)
{
@@ -152,6 +155,7 @@
/* fill plots for each final state particle type */
if ( particle.getGeneratorStatus() == MCParticle.FINAL_STATE )
{
+ FSCount += 1;
totE += particle.getEnergy();
mcpEnergyFinalState.fill(particle.getEnergy());
@@ -170,17 +174,33 @@
if ( !particleName.equals("") && particleName != null)
{
/* particle energy */
- aida.cloud1D(particleName + ": Energy").fill(particle.getEnergy());
+ aida.cloud1D(makePlotName(particleName + ": Energy")).fill(particle.getEnergy());
+
+ /* momentum = x2 + y2 + z2 */
+ aida.cloud1D(makePlotName(particleName + ": Momentum")).fill(
+ particle.getPX() * particle.getPX() +
+ particle.getPY() + particle.getPY() +
+ particle.getPZ() + particle.getPZ()
+ );
/* particle momentum -> theta, phi */
- aida.cloud2D(particleName + ": Momentum Theta vs. Phi").fill(
+ aida.cloud2D(makePlotName(particleName + ": Momentum Theta vs. Phi")).fill(
HitUtil.getTheta(particle.getMomentum().v()),
HitUtil.getPhi(particle.getMomentum().v())
);
/* particle cosTheta */
- aida.cloud1D(particleName + ": Momentum CosTheta").fill(
+ aida.cloud1D(makePlotName(particleName + ": Momentum CosTheta")).fill(
VecOp.cosTheta(particle.getMomentum()));
+
+ /* vertex to endpoint distance */
+ aida.cloud1D(makePlotName(particleName + ": Vertex to Endpoint Distance")).fill(
+ vtxEPdist);
+
+ /* endpoint RZ */
+ aida.cloud2D(makePlotName(particleName + ": Endpoint R vs Z")).fill(
+ HitUtil.getCylindricalRadius(particle.getEndPoint().v()),
+ particle.getEndPoint().z());
/* increment particle count */
if ( particleCounts.containsKey(particleName) )
@@ -203,7 +223,7 @@
for ( String k : particleCounts.keySet() )
{
tree.cd(k);
- aida.cloud1D(k + ": Particle Count by Event").fill(particleCounts.get(k));
+ aida.cloud1D(makePlotName(k + ": Particle Count by Event")).fill(particleCounts.get(k));
tree.cd("..");
}
@@ -212,6 +232,9 @@
/* energy total per event */
mcpTotalEnergyFinalState.fill(totE);
+
+ /* total number of FS particles */
+ mcpFSCount.fill(FSCount);
}
}