From 5c0e1cf69494862272e3cfbe0a366dfac1700514 Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Thu, 28 Dec 2017 19:35:25 -0500 Subject: [PATCH] Time corrections --- .../src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java | 5 ++--- .../dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java index 6c89c53436..0e6197405b 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java @@ -381,13 +381,12 @@ public DataBank fillTBHitsBank(DataEvent event, List hitlist) { bank.setFloat("B", i, (float) hitlist.get(i).get_B()); if(hitlist.get(i).get_AssociatedTBTrackID()>-1 && event.hasBank("MC::Particle")==false) { - - if(hitlist.get(i).getSignalPropagTimeAlongWire()==0) { + if(hitlist.get(i).getSignalPropagTimeAlongWire()==0 || hitlist.get(i).get_AssociatedTBTrackID()<1) { bank.setFloat("TProp", i, (float) hitlist.get(i).getTProp()); //old value if track fit failed } else { bank.setFloat("TProp", i, (float) hitlist.get(i).getSignalPropagTimeAlongWire()); //new calculated value } - if(hitlist.get(i).getSignalTimeOfFlight()==0) { + if(hitlist.get(i).getSignalTimeOfFlight()==0 || hitlist.get(i).get_AssociatedTBTrackID()<1) { bank.setFloat("TFlight", i, (float) hitlist.get(i).getTFlight()); } else { bank.setFloat("TFlight", i, (float) hitlist.get(i).getSignalTimeOfFlight()); diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java index a3b4faa0ef..665ed97637 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java @@ -498,7 +498,7 @@ public void set_AssociatedClusterID(int _AssociatedClusterID) { this._AssociatedClusterID = _AssociatedClusterID; } - private int _AssociatedHBTrackID; + private int _AssociatedHBTrackID =-1; public void set_AssociatedHBTrackID(int _id) { _AssociatedHBTrackID = _id;