From 3fe22f2631f3c78a0238cf5c590d3489af04fc9c Mon Sep 17 00:00:00 2001 From: PChatagnon <33055626+PChatagnon@users.noreply.github.com> Date: Thu, 1 Feb 2018 13:52:47 +0100 Subject: [PATCH] Update HitReader.java Fix a bug on adc/tdc matching --- .../main/java/org/jlab/rec/cnd/banks/HitReader.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/HitReader.java b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/HitReader.java index 80fc11c1a7..25b29f5937 100755 --- a/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/HitReader.java +++ b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/HitReader.java @@ -41,7 +41,7 @@ public static ArrayList getCndHalfHits(DataEvent event) { int layer = bankADC.getByte("layer",i); int order = bankADC.getByte("order",i); int component = order + 1; // get the component 1 is left 2 is right - int indextdc =0; + int indextdc = -1; adc = bankADC.getInt("ADC",i); boolean ignorePaddle = false; // whether to ignore or not the processing paddle (as there is already a half it in the paddle) @@ -58,8 +58,8 @@ public static ArrayList getCndHalfHits(DataEvent event) { if(ignorePaddle==false){ for(int j=0; j getCndHalfHits(DataEvent event) { HalfHit newhit = null; // First, carry out checks on the quality of the signals: - if (adc == 0 || tdc == 0 || tdc == Parameters.NullTDC) continue; // require good ADC and TDC values + if (adc == 0 || tdc == 0 || tdc == Parameters.NullTDC || indextdc==-1) continue; // require good ADC and TDC values newhit = new HalfHit(sector, layer, component, adc, tdc, i,indextdc); @@ -86,4 +86,4 @@ public static ArrayList getCndHalfHits(DataEvent event) { } -} \ No newline at end of file +}