java/trunk/steering-files/src/main/resources/org/hps/steering/recon
--- java/trunk/steering-files/src/main/resources/org/hps/steering/recon/HPS2014OfflineRecon.lcsim 2014-04-17 21:23:14 UTC (rev 502)
+++ java/trunk/steering-files/src/main/resources/org/hps/steering/recon/HPS2014OfflineRecon.lcsim 2014-04-18 00:06:43 UTC (rev 503)
@@ -4,7 +4,7 @@
@version $Id: HPS2014OfflineRecon.lcsim,v 1.7 2013/10/30 16:23:32 phansson Exp $
-->
<lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
- xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/lcsim/1.0/lcsim.xsd">
+ xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/lcsim/1.0/lcsim.xsd">
<execute>
<driver name="EventMarkerDriver"/>
<driver name="CalibrationDriver"/>
@@ -22,7 +22,7 @@
</execute>
<drivers>
<driver name="CalibrationDriver" type="org.hps.conditions.deprecated.CalibrationDriver">
-<!-- <runNumber>${runNumber}</runNumber>-->
+ <!-- <runNumber>${runNumber}</runNumber>-->
</driver>
<driver name="EventMarkerDriver" type="org.lcsim.job.EventMarkerDriver">
<eventInterval>1000</eventInterval>
@@ -42,6 +42,7 @@
<tolerance>1.0</tolerance>
</driver>
<driver name="TrackerReconDriver" type="org.hps.recon.tracking.TrackerReconDriver">
+ <strategyResource>HPS-Full.xml</strategyResource>
<debug>false</debug>
</driver>
<driver name="GBLDriver" type="org.hps.recon.tracking.gbl.GBLOutputDriver">
java/trunk/steering-files/src/main/resources/org/hps/steering/recon
--- java/trunk/steering-files/src/main/resources/org/hps/steering/recon/HPS2014OfflineTruthRecon.lcsim 2014-04-17 21:23:14 UTC (rev 502)
+++ java/trunk/steering-files/src/main/resources/org/hps/steering/recon/HPS2014OfflineTruthRecon.lcsim 2014-04-18 00:06:43 UTC (rev 503)
@@ -33,6 +33,7 @@
<useTimestamps>false</useTimestamps>
<correctT0Shift>false</correctT0Shift>
<useTruthTime>true</useTruthTime>
+ <subtractTOF>true</subtractTOF>
</driver>
<driver name="TrackerHitDriver" type="org.hps.recon.tracking.DataTrackerHitDriver" />
<driver name="HelicalTrackHitDriver" type="org.hps.recon.tracking.HelicalTrackHitDriver">
@@ -42,6 +43,7 @@
<tolerance>1.0</tolerance>
</driver>
<driver name="TrackerReconDriver" type="org.hps.recon.tracking.TrackerReconDriver">
+ <strategyResource>HPS-Full.xml</strategyResource>
<debug>false</debug>
</driver>
<driver name="GBLDriver" type="org.hps.recon.tracking.gbl.GBLOutputDriver">
java/trunk/tracking/src/main/java/org/hps/readout/svt
--- java/trunk/tracking/src/main/java/org/hps/readout/svt/SimpleSvtReadout.java 2014-04-17 21:23:14 UTC (rev 502)
+++ java/trunk/tracking/src/main/java/org/hps/readout/svt/SimpleSvtReadout.java 2014-04-18 00:06:43 UTC (rev 503)
@@ -46,7 +46,7 @@
private Map<SiSensor, PriorityQueue<StripHit>[]> hitMap = new HashMap<SiSensor, PriorityQueue<StripHit>[]>();
// readout period time offset in ns
private double readoutOffset = 0.0;
- private double readoutLatency = 240.0;
+ private double readoutLatency = 280.0;
private double pileupCutoff = 300.0;
private String readout = "TrackerHits";
private double timeOffset = 30.0;
@@ -92,6 +92,10 @@
this.dropBadChannels = dropBadChannels;
}
+ public void setReadoutLatency(double readoutLatency) {
+ this.readoutLatency = readoutLatency;
+ }
+
/**
*
*/
java/trunk/tracking/src/main/java/org/hps/recon/tracking
--- java/trunk/tracking/src/main/java/org/hps/recon/tracking/RawTrackerHitFitterDriver.java 2014-04-17 21:23:14 UTC (rev 502)
+++ java/trunk/tracking/src/main/java/org/hps/recon/tracking/RawTrackerHitFitterDriver.java 2014-04-18 00:06:43 UTC (rev 503)
@@ -11,15 +11,16 @@
import org.lcsim.event.EventHeader;
import org.lcsim.event.RawTrackerHit;
import org.lcsim.lcio.LCIOConstants;
+import org.lcsim.recon.cat.util.Const;
import org.lcsim.util.Driver;
/**
- *
+ *
* @author Matt Graham
*/
// TODO: Add class documentation.
public class RawTrackerHitFitterDriver extends Driver {
-
+
private boolean debug = false;
private ShaperFitAlgorithm _shaper = new DumbShaperFit();
private String rawHitCollectionName = "SVTRawTrackerHits";
@@ -30,28 +31,33 @@
private boolean correctT0Shift = false;
private boolean useTimestamps = false;
private boolean useTruthTime = false;
+ private boolean subtractTOF = false;
/**
* Report time relative to the nearest expected truth event time.
- *
+ *
* @param useTruthTime
*/
public void setUseTruthTime(boolean useTruthTime) {
this.useTruthTime = useTruthTime;
}
-
+
public void setDebug(boolean debug) {
this.debug = debug;
}
-
+
public void setCorrectT0Shift(boolean correctT0Shift) {
this.correctT0Shift = correctT0Shift;
}
-
+
public void setUseTimestamps(boolean useTimestamps) {
this.useTimestamps = useTimestamps;
}
-
+
+ public void setSubtractTOF(boolean subtractTOF) {
+ this.subtractTOF = subtractTOF;
+ }
+
public void setFitAlgorithm(String fitAlgorithm) {
if (fitAlgorithm.equals("Analytic")) {
_shaper = new ShaperAnalyticFitAlgorithm();
@@ -59,33 +65,33 @@
throw new RuntimeException("Unrecognized fitAlgorithm: " + fitAlgorithm);
}
}
-
+
public void setFitCollectionName(String fitCollectionName) {
this.fitCollectionName = fitCollectionName;
}
-
+
public void setFittedHitCollectionName(String fittedHitCollectionName) {
this.fittedHitCollectionName = fittedHitCollectionName;
}
-
+
public void setRawHitCollectionName(String rawHitCollectionName) {
this.rawHitCollectionName = rawHitCollectionName;
}
-
+
@Override
public void startOfData() {
if (rawHitCollectionName == null) {
throw new RuntimeException("The parameter ecalCollectionName was not set!");
}
}
-
+
@Override
public void process(EventHeader event) {
if (!event.hasCollection(RawTrackerHit.class, rawHitCollectionName)) {
// System.out.println(rawHitCollectionName + " does not exist; skipping event");
return;
}
-
+
List<RawTrackerHit> rawHits = event.get(RawTrackerHit.class, rawHitCollectionName);
if (rawHits == null) {
throw new RuntimeException("Event is missing SVT hits collection!");
@@ -101,6 +107,10 @@
if (correctT0Shift) {
fit.setT0(fit.getT0() - constants.getT0Shift());
}
+ if (subtractTOF) {
+ double tof = hit.getDetectorElement().getGeometry().getPosition().magnitude() / (Const.SPEED_OF_LIGHT * Const.nanosecond);
+ fit.setT0(fit.getT0() - tof);
+ }
if (useTimestamps) {
double t0Svt = ReadoutTimestamp.getTimestamp(ReadoutTimestamp.SYSTEM_TRACKER, event);
double t0Trig = ReadoutTimestamp.getTimestamp(ReadoutTimestamp.SYSTEM_TRIGGER, event);
@@ -111,7 +121,7 @@
double t0Svt = ReadoutTimestamp.getTimestamp(ReadoutTimestamp.SYSTEM_TRACKER, event);
double absoluteHitTime = fit.getT0() + t0Svt;
double relativeHitTime = ((absoluteHitTime + 250.0) % 500.0) - 250.0;
-
+
fit.setT0(relativeHitTime);
}
if (debug) {