SlicDiagnostics/src/org/lcsim/slic/diagnostics
diff -u -r1.13 -r1.14
--- MCParticlePlots.java 7 Sep 2005 05:47:03 -0000 1.13
+++ MCParticlePlots.java 30 Sep 2005 20:06:28 -0000 1.14
@@ -32,6 +32,7 @@
= ParticlePropertyManager.getParticlePropertyProvider();
/* double values for sim status plot */
+ public static final double NO_STATUS = 0.0;
public static final double SIMULATION = 1.0;
public static final double BACKSCATTER = 2.0;
public static final double VERTEX_NOT_ENDPOINT = 3.0;
@@ -76,7 +77,7 @@
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);
+ mcpSimStatus = aida.histogram1D(makePlotName("Simulator Status Code"), 8, 0.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("Final State Momentum CosTheta"));
@@ -139,7 +140,7 @@
mcpSimStatus.fill(d);
/* fill sim vs gen */
- this.mcpSimVsGenStatus.fill(d, particle.getGeneratorStatus());
+ mcpSimVsGenStatus.fill(d, particle.getGeneratorStatus());
}
/* cosTheta of momentum */
@@ -198,7 +199,6 @@
mcpEnergyFinalState.fill(particle.getEnergy());
-// String particleName = mcpLkp.get(particle.getPDGID()).getName();
String particleName = info.getName();
try
@@ -232,6 +232,16 @@
aida.cloud1D(makePlotName(particleName + ": Momentum CosTheta")).fill(
VecOp.cosTheta(particle.getMomentum()));
+ /* simulator status */
+ for ( double d : statusList )
+ {
+ /* simulator status */
+ aida.histogram1D(makePlotName(particleName + ": Simulator Status"), 8, 0.0, 8.0).fill(d);
+
+ /* simulator vs generator status */
+ aida.cloud2D(makePlotName(particleName + ": Simulator vs Generator Status")).fill(d, particle.getGeneratorStatus() );
+ }
+
/* vertex to endpoint distance */
if ( hasEndpoint )
{
@@ -258,15 +268,15 @@
aida.cloud2D(makePlotName(particleName + ": Final State Particle Energy vs Total Energy of Endpoint Daughters")).fill(
particle.getEnergy(), dauE);
}
- }
+ }
}
tree.cd("..");
}
- }
+ }
for ( MCParticleInfo info : mcpMap.values() )
{
- String k = info.getName();
+ String k = info.getName();
tree.cd(k);
int numHits = info.getEventNumHits();
@@ -278,15 +288,15 @@
{
aida.cloud1D(makePlotName(k + ": Percentage of Total Final State Energy in Event")).fill(percFSE);
}
-
+
/* percentage of FS particles */
double percFSParticles = ((double)numHits) / ((double)FSCount);
if ( percFSParticles != 0 )
- {
+ {
aida.cloud1D(makePlotName(k + ": Percentage of Final State Particle Count in Event")).fill(percFSParticles);
}
-
+
/* particle counts */
aida.cloud1D(makePlotName(k + ": Particle Count by Event")).fill(numHits);
@@ -351,6 +361,11 @@
statusList.add(STOPPED);
}
+ if ( statusList.size() == 0 )
+ {
+ statusList.add(NO_STATUS);
+ }
+
return statusList;
}