hps-java/src/main/java/org/lcsim/hps/recon/tracking
diff -u -r1.2 -r1.3
--- TrackerDigiDriver.java 18 Jan 2012 00:53:23 -0000 1.2
+++ TrackerDigiDriver.java 19 Jan 2012 00:31:46 -0000 1.3
@@ -28,7 +28,10 @@
*/
public class TrackerDigiDriver extends Driver
{
- // Collections required by digi algo.
+ // Debug switch for development.
+ private static final boolean DEBUG = true;
+
+ // Collections required by digi algo.
private List<String> readouts = new ArrayList<String>();
private List<String> processPaths = new ArrayList<String>();
private List<IDetectorElement> processDEs = new ArrayList<IDetectorElement>();
@@ -71,6 +74,91 @@
// TODO: All parameters with default arguments above should have setters.
+ public void setReadoutCollectionName(String readoutCollectionName)
+ {
+ this.readoutCollectionName = readoutCollectionName;
+ }
+
+ public void setSubdetectorName(String subdetectorName)
+ {
+ this.subdetectorName = subdetectorName;
+ }
+
+ public void setReadoutNoiseIntercept(double readoutNoiseIntercept)
+ {
+ this.readoutNoiseIntercept = readoutNoiseIntercept;
+ }
+
+ public void setReadoutNoiseSlope(double readoutNoiseSlope)
+ {
+ this.readoutNoiseSlope = readoutNoiseSlope;
+ }
+
+ public void setReadoutNeighborThreshold(double readoutNeighborThreshold)
+ {
+ this.readoutNeighborThreshold = readoutNeighborThreshold;
+ }
+
+ public void setReadoutNBits(int readoutNBits)
+ {
+ this.readoutNBits = readoutNBits;
+ }
+
+ public void setReadoutDynamicRange(int readoutDynamicRange)
+ {
+ this.readoutDynamicRange = readoutDynamicRange;
+ }
+
+ public void setClusterSeedThreshold(double clusterSeedThreshold)
+ {
+ this.clusterSeedThreshold = clusterSeedThreshold;
+ }
+
+ public void setClusterNeighborThreshold(double clusterNeighborThreshold)
+ {
+ this.clusterNeighborThreshold = clusterNeighborThreshold;
+ }
+
+ public void setClusterThreshold(double clusterThreshold)
+ {
+ this.clusterThreshold = clusterThreshold;
+ }
+
+ public void setClusterMaxSize(int clusterMaxSize)
+ {
+ this.clusterMaxSize = clusterMaxSize;
+ }
+
+ public void setClusterCentralStripAveragingThreshold(int clusterCentralStripAveragingThreshold)
+ {
+ this.clusterCentralStripAveragingThreshold = clusterCentralStripAveragingThreshold;
+ }
+
+ public void setOneClusterErr(double oneClusterErr)
+ {
+ this.oneClusterErr = oneClusterErr;
+ }
+
+ public void setTwoClusterErr(double twoClusterErr)
+ {
+ this.twoClusterErr = twoClusterErr;
+ }
+
+ public void setThreeClusterErr(double threeClusterErr)
+ {
+ this.threeClusterErr = threeClusterErr;
+ }
+
+ public void setFourClusterErr(double fourClusterErr)
+ {
+ this.fourClusterErr = fourClusterErr;
+ }
+
+ public void setFiveClusterErr(double fiveClusterErr)
+ {
+ this.fiveClusterErr = fiveClusterErr;
+ }
+
/**
* Creates a new instance of TrackerHitDriver
*/
@@ -126,7 +214,6 @@
// Process detectors specified by path, otherwise process entire detector
IDetectorElement deDetector = detector.getDetectorElement();
- //System.out.println("detector_de Name =" + deDetector.getName());
for (String path : processPaths) {
processDEs.add(deDetector.findDetectorElement(path));
@@ -138,9 +225,11 @@
for (IDetectorElement detectorElement : processDEs) {
processSensors.addAll(detectorElement.findDescendants(SiSensor.class));
- System.out.println("added " + processSensors.size() + " sensors");
+ if (DEBUG)
+ System.out.println("added " + processSensors.size() + " sensors");
processModules.addAll(detectorElement.findDescendants(SiTrackerModule.class));
- System.out.println("added " + processModules.size() + " modules");
+ if (DEBUG)
+ System.out.println("added " + processModules.size() + " modules");
}
}
@@ -166,15 +255,16 @@
rawHits.addAll(stripDigitizer.makeHits(sensor));
}
- // DEBUG
- System.out.println(this.getClass().getSimpleName() + " got " + rawHits.size() + " raw hits in coll " + getRawHitsName());
+ if (DEBUG)
+ System.out.println(this.getClass().getSimpleName() + " got " + rawHits.size() + " raw hits in coll " + getRawHitsName());
for (SiSensor sensor : processSensors) {
stripHits1D.addAll(stripClusterer.makeHits(sensor));
}
// DEBUG
- System.out.println(this.getClass().getSimpleName() + " got " + stripHits1D.size() + " strip hits in coll " + getStripHits1DName());
+ if (DEBUG)
+ System.out.println(this.getClass().getSimpleName() + " got " + stripHits1D.size() + " strip hits in coll " + getStripHits1DName());
// Put hits into collection.
int flag = 0;