Commit in hps-java/src/main on MAIN | |||
resources/org/lcsim/hps/steering/recon/HPS2014OfflineRecon.lcsim | +2 | -1 | 1.3 -> 1.4 |
java/org/lcsim/hps/recon/tracking/HPSRawTrackerHitFitterDriver.java | +14 | -5 | 1.17 -> 1.18 |
+16 | -6 |
don't use timestamps for test run reconstruction
diff -u -r1.3 -r1.4 --- HPS2014OfflineRecon.lcsim 17 Apr 2013 18:05:41 -0000 1.3 +++ HPS2014OfflineRecon.lcsim 19 Apr 2013 00:02:22 -0000 1.4 @@ -1,7 +1,7 @@
<!-- Offline reconstruction for 2014 (electron run) data. @author Sho Uemura <[log in to unmask]>
- @version $Id: HPS2014OfflineRecon.lcsim,v 1.3 2013/04/17 18:05:41 omoreno Exp $
+ @version $Id: HPS2014OfflineRecon.lcsim,v 1.4 2013/04/19 00:02:22 meeg Exp $
--> <lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/lcsim/1.0/lcsim.xsd">
@@ -28,6 +28,7 @@
<driver name="RawTrackerHitSensorSetup" type="org.lcsim.recon.tracking.digitization.sisim.config.RawTrackerHitSensorSetup"/> <driver name="RawTrackerHitFitterDriver" type="org.lcsim.hps.recon.tracking.HPSRawTrackerHitFitterDriver"> <fitAlgorithm>Analytic</fitAlgorithm>
+ <useTimestamps>true</useTimestamps>
<correctT0Shift>true</correctT0Shift> </driver> <driver name="TrackerHitDriver" type="org.lcsim.hps.users.mgraham.DataTrackerHitDriver" />
diff -u -r1.17 -r1.18 --- HPSRawTrackerHitFitterDriver.java 11 Apr 2013 19:16:05 -0000 1.17 +++ HPSRawTrackerHitFitterDriver.java 19 Apr 2013 00:02:22 -0000 1.18 @@ -24,6 +24,7 @@
private int genericObjectFlags = 1 << LCIOConstants.GOBIT_FIXED; private int relationFlags = 0; private boolean correctT0Shift = false;
+ private boolean useTimestamps = false;
public void setDebug(boolean debug) { this.debug = debug;
@@ -33,6 +34,10 @@
this.correctT0Shift = correctT0Shift; }
+ public void setUseTimestamps(boolean useTimestamps) { + this.useTimestamps = useTimestamps; + } +
public void setFitAlgorithm(String fitAlgorithm) { if (fitAlgorithm.equals("Analytic")) { _shaper = new HPSShaperAnalyticFitAlgorithm();
@@ -71,8 +76,8 @@
if (rawHits == null) { throw new RuntimeException("Event is missing SVT hits collection!"); }
- List<HPSFittedRawTrackerHit> hits = new ArrayList<HPSFittedRawTrackerHit>(); - List<HPSShapeFitParameters> fits = new ArrayList<HPSShapeFitParameters>();
+ List<HPSFittedRawTrackerHit> hits = new ArrayList<>(); + List<HPSShapeFitParameters> fits = new ArrayList<>();
// Make a fitted hit from this cluster for (RawTrackerHit hit : rawHits) {
@@ -80,9 +85,13 @@
ChannelConstants constants = HPSSVTCalibrationConstants.getChannelConstants((SiSensor) hit.getDetectorElement(), strip); HPSShapeFitParameters fit = _shaper.fitShape(hit, constants); if (correctT0Shift) {
- double t0Svt = ReadoutTimestamp.getTimestamp(ReadoutTimestamp.SYSTEM_TRACKER, event); - double t0Trig = ReadoutTimestamp.getTimestamp(ReadoutTimestamp.SYSTEM_TRIGGER, event); - double corMod = (t0Svt - t0Trig) - constants.getT0Shift();
+ double corMod = 0; + if (useTimestamps) { + double t0Svt = ReadoutTimestamp.getTimestamp(ReadoutTimestamp.SYSTEM_TRACKER, event); + double t0Trig = ReadoutTimestamp.getTimestamp(ReadoutTimestamp.SYSTEM_TRIGGER, event); + corMod += (t0Svt - t0Trig); + } + corMod -= constants.getT0Shift();
fit.setT0(fit.getT0() + corMod); // fit.setT0(fit.getT0() - constants.getT0Shift());
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1