hps-java/src/main/java/org/lcsim/hps/users/omoreno
diff -u -r1.2 -r1.3
--- PlotUtils.java 5 Oct 2012 19:48:18 -0000 1.2
+++ PlotUtils.java 6 Feb 2013 21:10:38 -0000 1.3
@@ -49,10 +49,6 @@
plotter.region(region).style().xAxisStyle().setLabel(xTitle);
plotter.region(region).style().xAxisStyle().labelStyle().setFontSize(14);
- String[] pars = plotter.region(region).style().xAxisStyle().availableParameters();
- for(String par : pars){
- System.out.println("Parameter: " + par);
- }
plotter.region(region).style().yAxisStyle().setLabel(yTitle);
plotter.region(region).style().yAxisStyle().labelStyle().setFontSize(14);
plotter.region(region).style().xAxisStyle().setVisible(true);
@@ -72,9 +68,6 @@
plotter.region(region).style().xAxisStyle().setLabel(xTitle);
plotter.region(region).style().xAxisStyle().labelStyle().setFontSize(14);
String[] pars = plotter.region(region).style().xAxisStyle().availableParameters();
- for(String par : pars){
- System.out.println("Parameter: " + par);
- }
plotter.region(region).style().yAxisStyle().setLabel(yTitle);
plotter.region(region).style().yAxisStyle().labelStyle().setFontSize(14);
plotter.region(region).style().xAxisStyle().setVisible(true);
@@ -90,6 +83,8 @@
plotter.region(region).style().xAxisStyle().setLabel(xTitle);
plotter.region(region).style().xAxisStyle().labelStyle().setFontSize(14);
plotter.region(region).style().xAxisStyle().setVisible(true);
+ plotter.region(region).style().dataStyle().fillStyle().setVisible(false);
+ plotter.region(region).style().dataStyle().lineStyle().setThickness(3);
if(histo != null) plotter.region(region).plot(histo);
}
hps-java/src/main/java/org/lcsim/hps/users/omoreno
diff -u -r1.9 -r1.10
--- SvtTrackRecoEfficiency.java 21 Dec 2012 09:26:05 -0000 1.9
+++ SvtTrackRecoEfficiency.java 6 Feb 2013 21:10:38 -0000 1.10
@@ -52,7 +52,7 @@
/**
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: SvtTrackRecoEfficiency.java,v 1.9 2012/12/21 09:26:05 omoreno Exp $
+ * @version $Id: SvtTrackRecoEfficiency.java,v 1.10 2013/02/06 21:10:38 omoreno Exp $
*/
public class SvtTrackRecoEfficiency extends Driver {
@@ -87,6 +87,7 @@
double topPossibleTracks, bottomPossibleTracks, possibleTracks;
double totalTopTracks, totalBottomTracks, totalTracks;
int totalLayersHit = 10;
+ int totalSvtLayers = 10;
String efficiencyOutputFile = null;
String momentumOutputFile = null;
@@ -158,6 +159,12 @@
}
}
+ // Get the total number of SVT layers
+ // TODO: Get the total number of Si planes from the SVT geometry
+ totalSvtLayers = SvtUtils.getInstance().getSensors().size()/2;
+ System.out.println("The SVT has a total of " + totalSvtLayers + " layers");
+
+
// Initialize the Layer to RawTrackerHit maps
for(int index = 0; index < 10; index++){
topSimTrackerHitsList.put(index + 1, new ArrayList<SimTrackerHit>());
@@ -168,10 +175,7 @@
plotters.add(PlotUtils.setupPlotter("Track Momentum", 0, 0));
histo1D.add(aida.histogram1D("Momentum - Reconstructed Tracks", 14, 0, 5.6));
PlotUtils.setup1DRegion(plotters.get(plotterIndex), "Reconstructed Tracks", 0, "Momentum [GeV]", histo1D.get(histo1DIndex));
- histo1DIndex++;
- plotterIndex++;
-
- plotters.add(PlotUtils.setupPlotter("Momentum", 0, 0));
+ histo1DIndex++;
histo1D.add(aida.histogram1D("Momentum - Findable Tracks", 14, 0, 5.6));
PlotUtils.setup1DRegion(plotters.get(plotterIndex), "Findable Tracks", 0, "Momentum [GeV]", histo1D.get(histo1DIndex));
plotterIndex++;
@@ -255,7 +259,7 @@
//this.printDebug("BField: " + event.getDetector().getFieldMap().getField(IP).y());
// Check if the MC particle track should be found by the tracking algorithm
- findable = new FindableTrack(event, simTrackerHits);
+ findable = new FindableTrack(event, simTrackerHits, totalSvtLayers);
// Use an iterator to avoid ConcurrentModificationException
Iterator<MCParticle> mcParticleIterator = mcParticles.iterator();
@@ -314,7 +318,7 @@
// Check if there is a stereo hit associated with every pair of layers hit by the MC particle
Set<SimTrackerHit> simHits = findable.getSimTrackerHits(mcParticle);
- boolean[] planesHit = new boolean[10];
+ boolean[] planesHit = new boolean[totalSvtLayers];
// Clear the sensor readout's and then add the SimTrackerHits from the MC particles to them
for(SiSensor sensor : SvtUtils.getInstance().getSensors()) sensor.getReadout().clear();
@@ -346,7 +350,8 @@
for(SimTrackerHit simHit : simHits){
planesHit[simHit.getLayer()-1] = true;
}
- boolean[] layerHit = new boolean[5];
+ // TODO: Get the number of SVT layers from the geometry
+ boolean[] layerHit = new boolean[6];
int layerN = 0;
for(int index = 0; index < planesHit.length; index+=2){
if(planesHit[index] && planesHit[index+1]){
@@ -357,8 +362,9 @@
}
// Check which layers have a stereo hit associated with them
- boolean[] topStereoLayerHit = new boolean[5];
- boolean[] bottomStereoLayerHit = new boolean[5];
+ // TODO: Get the number of detector layers from the geometry
+ boolean[] topStereoLayerHit = new boolean[6];
+ boolean[] bottomStereoLayerHit = new boolean[6];
for(HelicalTrackHit stereoHit : stereoHits){
if(stereoHit.getCorrectedPosition().z() > 0){
topStereoLayerHit[(stereoHit.Layer() - 1)/2] = true;