diff --git a/common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/AHDC/AlertDCDetector.java b/common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/AHDC/AlertDCDetector.java index 14f2220b49..cf570a7f6a 100644 --- a/common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/AHDC/AlertDCDetector.java +++ b/common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/AHDC/AlertDCDetector.java @@ -7,6 +7,8 @@ import org.jlab.geom.DetectorId; import org.jlab.geom.abs.AbstractDetector; +import org.jlab.geom.prim.Line3D; +import org.jlab.geom.prim.Point3D; /** * @author sergeyeva @@ -26,4 +28,32 @@ public String getType() { return "ALERT DC Detector"; } + public void print() { + System.out.println("/////////////////////////"); + System.out.println("AHDC geometry"); + System.out.println(""); + System.out.println("s : sector"); + System.out.println("sl : super layer"); + System.out.println("l : layer"); + System.out.println("c : component"); + System.out.println("/////////////////////////"); + System.out.println("------------------------------------------------------------------------------"); + System.out.println(" | origin | end"); + System.out.println("------------------------------------------------------------------------------"); + System.out.println("s sl l c | x y z | x y z"); + System.out.println("------------------------------------------------------------------------------"); + for (int s = 1; s <= getNumSectors(); s++) { + for (int sl = 1; sl <= getSector(s).getNumSuperlayers(); sl++) { + for (int l = 1; l <= getSector(s).getSuperlayer(sl).getNumLayers(); l++) { + for (int c = 1; c <= getSector(s).getSuperlayer(sl).getLayer(l).getNumComponents(); c++) { + Line3D line = getSector(s).getSuperlayer(sl).getLayer(l).getComponent(c).getLine(); + Point3D end = line.end(); + Point3D origin = line.origin(); + System.out.printf("%2d %2d %2d %2d | %7.3f %7.3f %7.3f | %7.3f %7.3f %7.3f\n", s, sl, l, c, origin.x(), origin.y(), origin.z(), end.x(), end.y(), end.z()); + } + } + } + } + } + } diff --git a/common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/AHDC/AlertDCFactory.java b/common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/AHDC/AlertDCFactory.java index 3cc32878cd..44587ff0f5 100644 --- a/common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/AHDC/AlertDCFactory.java +++ b/common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/AHDC/AlertDCFactory.java @@ -205,6 +205,35 @@ public AlertDCLayer createLayer(ConstantProvider cp, int sectorId, int superlaye Point3D p_9 = new Point3D(px_9, py_9, z_end); Point3D p_10 = new Point3D(px_10, py_10, z_end); Point3D p_11 = new Point3D(px_11, py_11, z_end); + + // !!! Alignment correction + int layer_row = AlertDCWireIdentifier.layer2number((superlayerId+1)*10 + (layerId+1)); + double upstream_rotZ = Math.toRadians(cp.getDouble("/geometry/alert/ahdc/layer_alignment/upstream_rotZ", layer_row)); + double downstream_rotZ = Math.toRadians(cp.getDouble("/geometry/alert/ahdc/layer_alignment/downstream_rotZ", layer_row)); + int wire_row = AlertDCWireIdentifier.slc2wire(sectorId+1, (superlayerId+1)*10 + (layerId+1), wireId+1); + double wire_rotZ = Math.toRadians(cp.getDouble("/geometry/alert/ahdc/wire_alignment/rotZ", wire_row)); + + //System.out.printf("%d %d %d, %f , %f, %f\n",sectorId+1, (superlayerId+1)*10 + (layerId+1), wireId+1, Math.toDegrees(upstream_rotZ), Math.toDegrees(downstream_rotZ), Math.toDegrees(wire_rotZ)); + + p_0.rotateZ(wire_rotZ + upstream_rotZ); + p_1.rotateZ(wire_rotZ + upstream_rotZ); + p_2.rotateZ(wire_rotZ + upstream_rotZ); + p_3.rotateZ(wire_rotZ + upstream_rotZ); + p_4.rotateZ(wire_rotZ + upstream_rotZ); + p_5.rotateZ(wire_rotZ + upstream_rotZ); + + p_6.rotateZ(wire_rotZ + downstream_rotZ); + p_7.rotateZ(wire_rotZ + downstream_rotZ); + p_8.rotateZ(wire_rotZ + downstream_rotZ); + p_9.rotateZ(wire_rotZ + downstream_rotZ); + p_10.rotateZ(wire_rotZ + downstream_rotZ); + p_11.rotateZ(wire_rotZ + downstream_rotZ); + + lPoint.rotateZ(wire_rotZ + upstream_rotZ); + rPoint.rotateZ(wire_rotZ + downstream_rotZ); + wireLine = new Line3D(lPoint, rPoint); + + // defining a cell around a wireLine, must be counter-clockwise! firstF.add(p_0); firstF.add(p_5); diff --git a/common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/AHDC/AlertDCWireIdentifier.java b/common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/AHDC/AlertDCWireIdentifier.java new file mode 100644 index 0000000000..fcf4caad2f --- /dev/null +++ b/common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/AHDC/AlertDCWireIdentifier.java @@ -0,0 +1,248 @@ +package org.jlab.geom.detector.alert.AHDC; + +public class AlertDCWireIdentifier { + /** Number between 0 and 575 */ + private int num; + + /** Always 1 */ + private int sector; + + /** Can be 11, 21, 22, 31, 32, 41, 42, 51 */ + private int layer; + + /** component id on a given layer, numerotation starting at 1 */ + private int component; + + /** + * Ahdc wire id defined with a num ranging from 0 to 575 + * @param _num + */ + public AlertDCWireIdentifier(int _num) { + num = _num; + int[] res = wire2slc(_num); + sector = res[0]; + layer = res[1]; + component = res[2]; + } + + /** + * Ahdc wire id defined with sector, layer, component identifiers + * @param _sector + * @param _layer can be 11, 21, 22, 31, 32, 41, 51 + * @param _component + */ + public AlertDCWireIdentifier(int _sector, int _layer, int _component) { + sector = _sector; + layer = _layer; + component = _component; + num = slc2wire(_sector, _layer, _component); + } + + /** Get unique number id. Number between 0 and 575 */ + public int getNumber() { return num;} + + /** Get sector id. Numbering start at 1 */ + public int getSectorId() {return sector;} + + /** Get layer id. Numbering start at 1 */ + public int getLayerId() {return layer;} + + /** Get component id. Numbering start at 1 */ + public int getComponentId() {return component;} + + /** + * Convert wire number (number from 0 to 575) to (sector,layer,component) ids + * + * This is the invert operation of {@link #slc2wire(int, int, int)} + * + * @param wire wire number between 0 and 575 + * @return a triplet (sector, layer, component) in int[] + */ + public static int[] wire2slc(int wire) { + int layer = -1; + int component = -1; + if (wire < 47) { + layer = 11; + component = wire + 1; + } + else if ((47 <= wire) && (wire < 47 + 56)) { + layer = 21; + component = wire - 47 + 1; + } + else if ((47 + 56 <= wire) && (wire < 47 + 56 + 56)) { + layer = 22; + component = wire - 47 - 56 + 1; + } + else if ((47 + 56 + 56 <= wire) && (wire < 47 + 56 + 56 + 72)) { + layer = 31; + component = wire - 47 - 56 - 56 + 1; + } + else if ((47 + 56 + 56 + 72 <= wire) && (wire < 47 + 56 + 56 + 72 + 72)) { + layer = 32; + component = wire - 47 - 56 - 56 - 72 + 1; + } + else if ((47 + 56 + 56 + 72 + 72 <= wire) && (wire < 47 + 56 + 56 + 72 + 72 + 87)) { + layer = 41; + component = wire - 47 - 56 - 56 - 72 - 72 + 1; + } + else if ((47 + 56 + 56 + 72 + 72 + 87 <= wire) && (wire < 47 + 56 + 56 + 72 + 72 + 87 + 87)) { + layer = 42; + component = wire - 47 - 56 - 56 - 72 - 72 - 87 + 1; + } + else { // ((47 + 56 + 56 + 72 + 72 + 87 + 87 <= wire) && (wire < 47 + 56 + 56 + 72 + 72 + 87 + 87 + 99)) { + layer = 51; + component = wire - 47 - 56 - 56 - 72 - 72 - 87 - 87 + 1; + } + return new int[] {1, layer, component}; + } + + /** + * Convert (sector, layer, component) to a unique wire id (number betwwen 0 and 575) + * + * @param sector (not used) + * @param layer + * @param component + * @return unique wire id + */ + public static int slc2wire(int sector, int layer, int component) { + if (layer == 11) { + return component - 1; + } + else if (layer == 21) { + return 47 + component - 1; + } + else if (layer == 22) { + return 47 + 56 + component - 1; + } + else if (layer == 31) { + return 47 + 56 + 56 + component - 1; + } + else if (layer == 32) { + return 47 + 56 + 56 + 72 + component - 1; + } + else if (layer == 41) { + return 47 + 56 + 56 + 72 + 72 + component - 1; + } + else if (layer == 42) { + return 47 + 56 + 56 + 72 + 72 + 87 + component - 1; + } + else if (layer == 51) { + return 47 + 56 + 56 + 72 + 72 + 87 + 87 + component - 1; + } else { + return -1; // not a ahdc wire + } + } + + /** + * Convert the layer digits (11,21,...,51) to layer number between 0 and 7 + * + * @param digit + * @return layer number + */ + public static int layer2number(int digit) { + if (digit == 11) { + return 0; + } + else if (digit == 21) { + return 1; + } + else if (digit == 22) { + return 2; + } + else if (digit == 31) { + return 3; + } + else if (digit == 32) { + return 4; + } + else if (digit == 41) { + return 5; + } + else if (digit == 42) { + return 6; + } + else if (digit == 51) { + return 7; + } else { + return -1; + } + } + + /** + * Convert layer number (from 0 to 7) to the superlayer-layer id (11,21,...,51) + * + * @param digit between 0 and 7 + * @return layer number between (11,21,...,51) + */ + public static int number2layer(int num) { + if (num == 0) { + return 11; + } + else if (num == 1) { + return 21; + } + else if (num == 2) { + return 22; + } + else if (num == 3) { + return 31; + } + else if (num == 4) { + return 32; + } + else if (num == 5) { + return 41; + } + else if (num == 6) { + return 42; + } + else if (num == 7) { + return 51; + } else { + return -1; + } + } + + /** + * + * @param _layer (number 11, 21, 22, ..., 51) + * @return the radius of the _layer + */ + public static double layer2Radius(int _layer) { + if (_layer == 11) { + return 32.0; + } + else if (_layer == 21) { + return 38.0; + } + else if (_layer == 22) { + return 42.0; + } + else if (_layer == 31) { + return 48.0; + } + else if (_layer == 32) { + return 52.0; + } + else if (_layer == 41) { + return 58.0; + } + else if (_layer == 42) { + return 62.0; + } + else if (_layer == 51) { + return 68.0; + } else { + return 0.0; + } + } + + /** + * + * @param _layer_num between 0 and 7 + * @return the radius of the _layer. See {@link #layer2Radius(int)} + */ + public static double layerNum2Radius(int _layer_num) { + return layer2Radius(number2layer(_layer_num)); + } +} diff --git a/etc/bankdefs/hipo4/alert.json b/etc/bankdefs/hipo4/alert.json index 580a54aecc..96c8b1666c 100644 --- a/etc/bankdefs/hipo4/alert.json +++ b/etc/bankdefs/hipo4/alert.json @@ -228,6 +228,10 @@ "name": "residual", "type": "D", "info": "residual (mm) calculated by the Kalman Filter" + }, { + "name": "residual_LR", + "type": "D", + "info": "residual Left-Right (mm) calculated by the Kalman Filter and used for the AHDC alignment" }, { "name": "time", "type": "D", diff --git a/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/Banks/RecoBankWriter.java b/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/Banks/RecoBankWriter.java index b276e4b605..82f0461748 100644 --- a/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/Banks/RecoBankWriter.java +++ b/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/Banks/RecoBankWriter.java @@ -12,7 +12,6 @@ import org.jlab.rec.alert.Track.Track; import java.util.ArrayList; -import java.util.List; public class RecoBankWriter { @@ -29,6 +28,7 @@ public DataBank fillAHDCHitsBank(DataEvent event, ArrayList hitList) { bank.setInt("wire", i, hitList.get(i).getWireId()); bank.setDouble("doca", i, hitList.get(i).getDoca()); bank.setDouble("residual", i, hitList.get(i).getResidual()); + bank.setDouble("residual_LR", i, hitList.get(i).getResidual_LR()); bank.setDouble("time", i, hitList.get(i).getTime()); bank.setInt("adc", i, (int) hitList.get(i).getADC()); bank.setDouble("timeOverThreshold", i, hitList.get(i).getToT()); diff --git a/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/Hit/Hit.java b/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/Hit/Hit.java index 3d9482b5a8..f1a6e7a9f7 100644 --- a/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/Hit/Hit.java +++ b/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/Hit/Hit.java @@ -32,6 +32,7 @@ public class Hit implements Comparable, KFHit { private double x; private double y; private double residual; + private double residual_LR; private int trackId; //updated constructor with ADC @@ -160,6 +161,14 @@ public void setResidual(double resid) { this.residual = resid; } + public double getResidual_LR() { + return residual_LR; + } + + public void setResidual_LR(double resid) { + this.residual_LR = resid; + } + /** Set calibrated ToT */ public void setToT(double _tot) { this.tot = _tot; @@ -257,13 +266,32 @@ public double distance(Point3D point3D) { } public static void main(String[] args) { - AlertDCDetector factory = (new AlertDCFactory()).createDetectorCLAS(new DatabaseConstantProvider()); + int run = 22712; + String variation = "default"; + DatabaseConstantProvider cp = new DatabaseConstantProvider(run, variation); + cp.loadTable("/geometry/alert/ahdc/layer_alignment"); + cp.loadTable("/geometry/alert/ahdc/wire_alignment"); + String upstream_rotZ = "/geometry/alert/ahdc/layer_alignment/upstream_rotZ"; + + System.out.println(cp.getDouble(upstream_rotZ, 0)); + System.out.println(cp.getDouble(upstream_rotZ, 1)); + System.out.println(cp.getDouble(upstream_rotZ, 2)); + System.out.println(cp.getDouble(upstream_rotZ, 3)); + System.out.println(cp.getDouble(upstream_rotZ, 4)); + System.out.println(cp.getDouble(upstream_rotZ, 5)); + System.out.println(cp.getDouble(upstream_rotZ, 6)); + System.out.println(cp.getDouble(upstream_rotZ, 7)); + + + AlertDCDetector AHDCdet = (new AlertDCFactory()).createDetectorCLAS(cp); + //AHDCdet.print(); + System.out.println("Run test: comparison between two hits."); Hit h1 = new Hit(1,1,1,1,0,0,0); Hit h2 = new Hit(1,1,1,47,0,0,0); Hit h3 = new Hit(1,2,1,47,0,0,0); - h1.setWirePosition(factory); - h2.setWirePosition(factory); + h1.setWirePosition(AHDCdet); + h2.setWirePosition(AHDCdet); System.out.println("h1 : " + h1); System.out.println("h2 : " + h2); System.out.println("h3 : " + h3); @@ -272,31 +300,6 @@ public static void main(String[] args) { System.out.println("h2 compare to h1 : " + h2.compareTo(h1)); System.out.println("h1 compare to h3 : " + h1.compareTo(h3)); - System.out.println("/////////////////////////"); - System.out.println("Test AHDC geometry"); - System.out.println(""); - System.out.println("s : sector"); - System.out.println("sl : super layer"); - System.out.println("l : layer"); - System.out.println("c : component"); - System.out.println("/////////////////////////"); - System.out.println("------------------------------------------------------------------------------"); - System.out.println(" | origin | end"); - System.out.println("------------------------------------------------------------------------------"); - System.out.println("s sl l c | x y z | x y z"); - System.out.println("------------------------------------------------------------------------------"); - for (int s = 1; s <= factory.getNumSectors(); s++) { - for (int sl = 1; sl <= factory.getSector(s).getNumSuperlayers(); sl++) { - for (int l = 1; l <= factory.getSector(s).getSuperlayer(sl).getNumLayers(); l++) { - for (int c = 1; c <= factory.getSector(s).getSuperlayer(sl).getLayer(l).getNumComponents(); c++) { - Line3D line = factory.getSector(s).getSuperlayer(sl).getLayer(l).getComponent(c).getLine(); - Point3D end = line.end(); - Point3D origin = line.origin(); - System.out.printf("%2d %2d %2d %2d | %7.3f %7.3f %7.3f | %7.3f %7.3f %7.3f\n", s, sl, l, c, origin.x(), origin.y(), origin.z(), end.x(), end.y(), end.z()); - } - } - } - } } } diff --git a/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/KalmanFilter/KFitter.java b/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/KalmanFilter/KFitter.java index 08b468522a..01007a63e2 100644 --- a/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/KalmanFilter/KFitter.java +++ b/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/KalmanFilter/KFitter.java @@ -7,6 +7,7 @@ import org.apache.commons.math3.linear.RealVector; import org.jlab.clas.pdg.PhysicsConstants; import org.jlab.clas.tracking.kalmanfilter.Material; +import org.jlab.geom.prim.Line3D; import org.jlab.geom.prim.Point3D; import org.jlab.rec.ahdc.Hit.Hit; @@ -120,6 +121,20 @@ public double residual(Hit hit) { return hit.getDoca()-d; } + // specific to AHDC hits + public double residual_LR(Hit hit) { + Line3D line = hit.getLine().distance( new Point3D( stateEstimation.getEntry(0), stateEstimation.getEntry(1), stateEstimation.getEntry(2) ) ); + //Point3D A = line.origin(); // point on the wire line + Point3D B = line.end(); // point on the track + Point3D C = line.lerpPoint(hit.getDoca()/line.length()); // measurement point on [AB) + + double phiC = Math.atan2(C.y(), C.x()); // between -pi and pi rad + double phiB = Math.atan2(B.y(), B.x()); + //double phiA = Math.atan2(A.y(), A.x()); + + return Math.signum(phiC - phiB)*Math.abs(hit.getDoca()-line.length()); + } + public void ResetErrorCovariance(final RealMatrix initialErrorCovariance){ this.errorCovariance = initialErrorCovariance; } diff --git a/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/KalmanFilter/KalmanFilter.java b/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/KalmanFilter/KalmanFilter.java index 7380ccefd6..3c65ae7cfb 100644 --- a/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/KalmanFilter/KalmanFilter.java +++ b/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/KalmanFilter/KalmanFilter.java @@ -145,6 +145,7 @@ public void propagation(ArrayList tracks, final double magfield, boolean for (Hit hit : AHDC_hits) { PostFitPropagator.predict(hit, true); hit.setResidual(PostFitPropagator.residual(hit)); // output: residual + hit.setResidual_LR(PostFitPropagator.residual_LR(hit)); // output: residual LR } // Fill values for AHDC::kftrack diff --git a/reconstruction/alert/src/main/java/org/jlab/service/ahdc/AHDCEngine.java b/reconstruction/alert/src/main/java/org/jlab/service/ahdc/AHDCEngine.java index d01d7385ad..104fc000a2 100644 --- a/reconstruction/alert/src/main/java/org/jlab/service/ahdc/AHDCEngine.java +++ b/reconstruction/alert/src/main/java/org/jlab/service/ahdc/AHDCEngine.java @@ -30,7 +30,7 @@ public class AHDCEngine extends ReconstructionEngine { static final Logger LOGGER = Logger.getLogger(AHDCEngine.class.getName()); - private AlertDCDetector factory = null; + private AlertDCDetector AHDCdet = null; private ModeAHDC ahdcExtractor = new ModeAHDC(); // AHDC calibration tables (instance-level, refreshed on run change) @@ -46,7 +46,10 @@ public class AHDCEngine extends ReconstructionEngine { @Override public void detectorChanged(int run) { - factory = (new AlertDCFactory()).createDetectorCLAS(new DatabaseConstantProvider(run,"default")); + DatabaseConstantProvider cp = new DatabaseConstantProvider(run, "default"); + cp.loadTable("/geometry/alert/ahdc/layer_alignment"); + cp.loadTable("/geometry/alert/ahdc/wire_alignment"); + AHDCdet = (new AlertDCFactory()).createDetectorCLAS(cp); } @Override @@ -90,7 +93,7 @@ public boolean processDataEventUser(DataEvent event) { if (event.hasBank("AHDC::adc")) { boolean simulation = event.hasBank("MC::Particle"); - HitReader hitReader = new HitReader(event, factory, simulation, + HitReader hitReader = new HitReader(event, AHDCdet, simulation, ahdcRawHitCutsTable, ahdcTimeOffsetsTable, ahdcTimeToDistanceWireTable, ahdcTimeOverThresholdTable, ahdcAdcGainsTable); ArrayList AHDC_Hits = hitReader.get_AHDCHits(); diff --git a/reconstruction/alert/src/main/java/org/jlab/service/alert/ALERTEngine.java b/reconstruction/alert/src/main/java/org/jlab/service/alert/ALERTEngine.java index 5f891a99c4..4a8f580f65 100644 --- a/reconstruction/alert/src/main/java/org/jlab/service/alert/ALERTEngine.java +++ b/reconstruction/alert/src/main/java/org/jlab/service/alert/ALERTEngine.java @@ -16,7 +16,6 @@ import org.jlab.clas.swimtools.Swim; import org.jlab.detector.calib.utils.DatabaseConstantProvider; import org.jlab.utils.groups.IndexedTable; -import org.jlab.geom.base.Detector; import org.jlab.geom.detector.alert.ATOF.AlertTOFDetector; import org.jlab.geom.detector.alert.ATOF.AlertTOFFactory; import org.jlab.io.base.DataBank; @@ -141,6 +140,8 @@ public ALERTEngine() { @Override public void detectorChanged(int run) { DatabaseConstantProvider cp = new DatabaseConstantProvider(run, "default"); + cp.loadTable("/geometry/alert/ahdc/layer_alignment"); + cp.loadTable("/geometry/alert/ahdc/wire_alignment"); ATOF = (new AlertTOFFactory()).createDetectorCLAS(cp); AHDC = (new AlertDCFactory()).createDetectorCLAS(cp); } @@ -352,7 +353,6 @@ public boolean processDataEventUser(DataEvent event) { /// --------------------------------------------------------------------------------------- /// Track matching using AI --------------------------------------------------------------- - if (event == null) return false; // TODO: is it useful? if (!event.hasBank("AHDC::track")) return false; DataBank bank_AHDCtracks = event.getBank("AHDC::track"); @@ -572,8 +572,9 @@ public boolean processDataEventUser(DataEvent event) { double doca = hitBank.getDouble("doca", hit_row); double time = hitBank.getDouble("time", hit_row); double tot = hitBank.getDouble("timeOverThreshold", hit_row); - // warning : adc is the calibrated one, we need the adc for the Kalman filter - Hit hit = new Hit(id, superlayer, layer, wire, doca, adc, time); + // use raw adc in the Kalman Filter + double gainCorr = ahdcAdcGainsTable.getDoubleValue("gainCorr", 1, 10*superlayer+layer, wire); + Hit hit = new Hit(id, superlayer, layer, wire, doca, adc/gainCorr, time); hit.setWirePosition(AHDC); hit.setTrackId(trackid); hit.setADC(adc); @@ -796,7 +797,7 @@ public static void main(String[] args) { int nEvent = 0; int maxEvent = 1000; - int myEvent = 3; + //int myEvent = 3; String inputFile = "alert_out_update.hipo"; String outputFile = "output.hipo";