hps-java/src/main/java/org/lcsim/hps/recon/tracking
diff -u -r1.8 -r1.9
--- TrackerDigiDriver.java 19 Mar 2012 21:59:24 -0000 1.8
+++ TrackerDigiDriver.java 7 Aug 2012 20:18:17 -0000 1.9
@@ -30,24 +30,20 @@
* algorithm like Seed Tracker.
*
* @author jeremym
- * @version $Id: TrackerDigiDriver.java,v 1.8 2012/03/19 21:59:24 jeremy Exp $
+ * @version $Id: TrackerDigiDriver.java,v 1.9 2012/08/07 20:18:17 meeg Exp $
*/
public class TrackerDigiDriver extends Driver {
// Debug switch for development.
- private boolean debug = false;
+ private boolean debug = false;
// Collection name.
private String readoutCollectionName = "TrackerHits";
-
// Subdetector name.
private String subdetectorName = "Tracker";
-
// Name of RawTrackerHit output collection.
private String rawTrackerHitOutputCollectionName = "RawTrackerHitMaker_RawTrackerHits";
-
// Name of StripHit1D output collection.
private String stripHitOutputCollectionName = "StripClusterer_SiTrackerHitStrip1D";
-
// Readout parameters.
private double readoutNoiseIntercept = 270.0;
private double readoutNoiseSlope = 36.0;
@@ -55,14 +51,12 @@
private double readoutNeighborThreshold = 4.0;
private int readoutNBits = 10;
private int readoutDynamicRange = 40;
-
// Clustering parameters.
private double clusterSeedThreshold = 4.0;
private double clusterNeighborThreshold = 3.0;
private double clusterThreshold = 4.0;
private int clusterMaxSize = 10;
private int clusterCentralStripAveragingThreshold = 4;
-
// Clustering errors by number of TrackerHits.
private static final double clusterErrorMultiplier = 1.0;
private double oneClusterErr = clusterErrorMultiplier / Math.sqrt(12.);
@@ -70,14 +64,12 @@
private double threeClusterErr = clusterErrorMultiplier / 3.0;
private double fourClusterErr = clusterErrorMultiplier / 2.0;
private double fiveClusterErr = clusterErrorMultiplier / 1.0;
-
// Various data lists required by digitization.
private List<String> readouts = new ArrayList<String>();
private List<String> processPaths = new ArrayList<String>();
private List<IDetectorElement> processDEs = new ArrayList<IDetectorElement>();
private Set<SiSensor> processSensors = new HashSet<SiSensor>();
private Set<SiTrackerModule> processModules = new HashSet<SiTrackerModule>();
-
// Digi class objects.
private SiDigitizer stripDigitizer;
private StripHitMaker stripClusterer;
@@ -284,10 +276,14 @@
// Debug prints.
if (debug) {
- List<SimTrackerHit> simHits = event.get(SimTrackerHit.class, this.readoutCollectionName);
- System.out.println("SimTrackerHit collection " + this.readoutCollectionName + " has " + simHits.size() + " hits.");
- System.out.println("RawTrackerHit collection " + this.rawTrackerHitOutputCollectionName + " has " + rawHits.size() + " hits.");
- System.out.println("TrackerHit collection " + this.stripHitOutputCollectionName + " has " + stripHits1D.size() + " hits.");
+ if (event.hasCollection(SimTrackerHit.class, this.readoutCollectionName)) {
+ List<SimTrackerHit> simHits = event.get(SimTrackerHit.class, this.readoutCollectionName);
+ System.out.println("SimTrackerHit collection " + this.readoutCollectionName + " has " + simHits.size() + " hits.");
+ System.out.println("RawTrackerHit collection " + this.rawTrackerHitOutputCollectionName + " has " + rawHits.size() + " hits.");
+ System.out.println("TrackerHit collection " + this.stripHitOutputCollectionName + " has " + stripHits1D.size() + " hits.");
+ } else {
+ System.out.println("SimTrackerHit collection " + this.readoutCollectionName + " not found.");
+ }
}
// Put output hits into collection.