From 177ffd53c1449318e5a077cfd1bd2ec2ab06d064 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Tue, 30 Jul 2024 10:22:09 -0400 Subject: [PATCH 01/13] fix: Missing rho- definition in PDGDatabase class --- .../src/main/java/org/jlab/clas/pdg/PDGDatabase.java | 1 + 1 file changed, 1 insertion(+) diff --git a/common-tools/clas-physics/src/main/java/org/jlab/clas/pdg/PDGDatabase.java b/common-tools/clas-physics/src/main/java/org/jlab/clas/pdg/PDGDatabase.java index 7b313edfb..b2080041b 100644 --- a/common-tools/clas-physics/src/main/java/org/jlab/clas/pdg/PDGDatabase.java +++ b/common-tools/clas-physics/src/main/java/org/jlab/clas/pdg/PDGDatabase.java @@ -71,6 +71,7 @@ private static HashMap initDatabase() { particleMap.put(223, new PDGParticle("omega", 223, 0.78265, 0)); particleMap.put(333, new PDGParticle("phi", 333, 0.1019455, 0)); particleMap.put(213, new PDGParticle("rho+", 213, 0.7754, 1)); + particleMap.put(-213, new PDGParticle("rho-", -213, 0.7754, -1)); particleMap.put(211, new PDGParticle("pi+", 211, 8, 0.13957018, 1)); particleMap.put(-211, new PDGParticle("pi-", -211, 9, 0.13957018, -1)); particleMap.put(321, new PDGParticle("K+", 321, 11, 0.49367716, 1)); From 515dd5c9ecd822448312a745684f48a0608f1ce0 Mon Sep 17 00:00:00 2001 From: raffaelladevita Date: Fri, 9 Aug 2024 15:52:39 -0400 Subject: [PATCH 02/13] Fixes to DC geometry (#299) * account for the fact the R3 reference wire is ministaggered * accounting for the wire feedthroughs in DC geometry * account for tilt * account for tilt * account for tilt * moved feedthrough parameters to CCDB, code cleanups * removed unnecessary code * more cleanups and comments * introduced yaml variables to turn on/off ministagger and feedthrough fixes gor compatibility with old alignment * bug fix * another bug fix * making R3 Geant4 volumes independent from ministagger * Changed ministagger status enum name to more meaningful set * version bump * added printouts and comments * added comments and printouts as per review bullets 1, 2, and 3 * added comments addressing review points 5,6,8, and 9 * few more comments improvement * added examples of usage of new dc geometry variables to yaml files * version bump --------- Co-authored-by: Christopher Dilks Co-authored-by: Nathan Baltzell --- common-tools/clara-io/pom.xml | 4 +- common-tools/clas-analysis/pom.xml | 20 +- common-tools/clas-detector/pom.xml | 10 +- .../jlab/detector/base/GeometryFactory.java | 1 + common-tools/clas-geometry/pom.xml | 4 +- common-tools/clas-io/pom.xml | 8 +- common-tools/clas-jcsg/pom.xml | 8 +- .../detector/geant4/v2/DCGeant4Factory.java | 273 ++++++++++++++++-- .../jlab/detector/geom/dc/DCGeantFactory.java | 2 +- common-tools/clas-logging/pom.xml | 4 +- common-tools/clas-math/pom.xml | 4 +- common-tools/clas-physics/pom.xml | 4 +- common-tools/clas-reco/pom.xml | 16 +- common-tools/clas-tracking/pom.xml | 6 +- common-tools/clas-utils/pom.xml | 6 +- common-tools/cnuphys/magfield/pom.xml | 2 +- common-tools/cnuphys/swimmer/pom.xml | 2 +- common-tools/coat-lib/deployDistribution.sh | 2 +- common-tools/coat-lib/pom.xml | 24 +- common-tools/parent/pom.xml | 2 +- common-tools/pom.xml | 4 +- common-tools/swim-tools/pom.xml | 6 +- etc/services/data-ai.yaml | 5 +- etc/services/data-aicv.yaml | 5 +- etc/services/data-cv.yaml | 7 +- etc/services/denoise.yaml | 5 +- etc/services/mc-ai.yaml | 6 +- etc/services/mc-aicv.yaml | 4 + etc/services/mc-cv.yaml | 4 +- parent/pom.xml | 2 +- pom.xml | 4 +- reconstruction/alert/pom.xml | 10 +- reconstruction/band/pom.xml | 4 +- reconstruction/cnd/pom.xml | 2 +- reconstruction/cvt/pom.xml | 6 +- reconstruction/dc/pom.xml | 14 +- .../main/java/org/jlab/rec/dc/Constants.java | 29 +- .../java/org/jlab/service/dc/DCEngine.java | 12 + reconstruction/eb/pom.xml | 10 +- reconstruction/ec/pom.xml | 6 +- reconstruction/fmt/pom.xml | 6 +- reconstruction/ft/pom.xml | 4 +- reconstruction/htcc/pom.xml | 4 +- reconstruction/ltcc/pom.xml | 4 +- reconstruction/mc/pom.xml | 4 +- reconstruction/mltn/pom.xml | 6 +- reconstruction/pom.xml | 4 +- reconstruction/raster/pom.xml | 4 +- reconstruction/rich/pom.xml | 6 +- reconstruction/rtpc/pom.xml | 6 +- reconstruction/swaps/pom.xml | 8 +- reconstruction/tof/pom.xml | 4 +- reconstruction/urwell/pom.xml | 6 +- reconstruction/vtx/pom.xml | 6 +- 54 files changed, 439 insertions(+), 180 deletions(-) diff --git a/common-tools/clara-io/pom.xml b/common-tools/clara-io/pom.xml index 8a20d4694..b52690dae 100644 --- a/common-tools/clara-io/pom.xml +++ b/common-tools/clara-io/pom.xml @@ -3,14 +3,14 @@ 4.0.0 org.jlab.clas clara-io - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/clas-analysis/pom.xml b/common-tools/clas-analysis/pom.xml index ec397899a..a8a4a241c 100644 --- a/common-tools/clas-analysis/pom.xml +++ b/common-tools/clas-analysis/pom.xml @@ -3,63 +3,63 @@ 4.0.0 org.jlab.clas clas-analysis - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-utils - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-physics - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-io - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-geometry - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-jcsg - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas swim-tools - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-detector - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/clas-detector/pom.xml b/common-tools/clas-detector/pom.xml index a248a3824..b42c05462 100644 --- a/common-tools/clas-detector/pom.xml +++ b/common-tools/clas-detector/pom.xml @@ -3,21 +3,21 @@ 4.0.0 org.jlab.clas clas-detector - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-utils - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -29,13 +29,13 @@ org.jlab.clas clas-io - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-geometry - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/clas-detector/src/main/java/org/jlab/detector/base/GeometryFactory.java b/common-tools/clas-detector/src/main/java/org/jlab/detector/base/GeometryFactory.java index 6a14e9c45..6b3ab66f8 100644 --- a/common-tools/clas-detector/src/main/java/org/jlab/detector/base/GeometryFactory.java +++ b/common-tools/clas-detector/src/main/java/org/jlab/detector/base/GeometryFactory.java @@ -48,6 +48,7 @@ public static ConstantProvider getConstants(DetectorType type, int run, String v provider.loadTable("/geometry/dc/alignment"); provider.loadTable("/geometry/dc/ministagger"); provider.loadTable("/geometry/dc/endplatesbow"); + provider.loadTable("/geometry/dc/feedthroughs"); } if(type==DetectorType.ECAL){ diff --git a/common-tools/clas-geometry/pom.xml b/common-tools/clas-geometry/pom.xml index 0335aabb7..f55d17013 100644 --- a/common-tools/clas-geometry/pom.xml +++ b/common-tools/clas-geometry/pom.xml @@ -3,14 +3,14 @@ 4.0.0 org.jlab.clas clas-geometry - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/clas-io/pom.xml b/common-tools/clas-io/pom.xml index 3dce75673..3fdff270e 100644 --- a/common-tools/clas-io/pom.xml +++ b/common-tools/clas-io/pom.xml @@ -3,14 +3,14 @@ 4.0.0 org.jlab.clas clas-io - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -90,13 +90,13 @@ org.jlab.clas clas-utils - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-logging - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT compile diff --git a/common-tools/clas-jcsg/pom.xml b/common-tools/clas-jcsg/pom.xml index 42d34049c..652f031ac 100644 --- a/common-tools/clas-jcsg/pom.xml +++ b/common-tools/clas-jcsg/pom.xml @@ -3,14 +3,14 @@ 4.0.0 org.jlab.clas clas-jcsg - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -27,12 +27,12 @@ org.jlab.clas clas-geometry - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-detector - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT java3d diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/DCGeant4Factory.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/DCGeant4Factory.java index 45b2d62e6..947ba6479 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/DCGeant4Factory.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/DCGeant4Factory.java @@ -2,6 +2,10 @@ import eu.mihosoft.vrl.v3d.Vector3d; import java.util.HashMap; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.jlab.detector.base.DetectorType; +import org.jlab.detector.base.GeometryFactory; import org.jlab.detector.units.SystemOfUnits.Length; import org.jlab.detector.volume.G4Trap; import org.jlab.detector.volume.G4World; @@ -10,6 +14,7 @@ import org.jlab.geom.prim.Line3D; import org.jlab.geom.prim.Point3D; import org.jlab.geom.prim.Trap3D; +import org.jlab.logging.DefaultLogger; /** * @@ -52,7 +57,7 @@ final class DCdatabase { private int nsensewires; private int nguardwires; - private boolean ministaggerStatus = false; + private DCGeant4Factory.MinistaggerStatus ministaggerStatus = DCGeant4Factory.MinistaggerStatus.ON; private double ministagger ; private boolean endplatesStatus = false; @@ -60,8 +65,15 @@ final class DCdatabase { private final String dcdbpath = "/geometry/dc/"; private static DCdatabase instance = null; - private DCdatabase() { - } + private final double[][] feedThroughExt = new double[nSectors][nSupers]; // extension from the endplate, inside the chamber volume + private final double[][] feedThroughLength = new double[nSectors][nSupers]; // length of the curved, trumpet-like, part of the feedthrough + private final double[][] feedThroughRmin = new double[nSectors][nSupers]; // inner radius at the beginning of the curved part + private final double[][] feedThroughRmax = new double[nSectors][nSupers]; // inner radius at the end of the curved part, i.e. on the surface + private final double[][] feedThroughRcurv = new double[nSectors][nSupers]; // curvature radius of the trumpet-like part + private DCGeant4Factory.FeedthroughsStatus feedthroughsStatus = DCGeant4Factory.FeedthroughsStatus.SHIFT; + + + private DCdatabase() {} public static DCdatabase getInstance() { if (instance == null) { @@ -100,6 +112,17 @@ public void connect(ConstantProvider cp, double[][] shifts) { superwidth[isuper] = wpdist[isuper] * (nsenselayers[isuper] + nguardlayers[isuper] - 1) * cellthickness[isuper]; } + int feedthroughrows = cp.length(dcdbpath+"feedthroughs/sector"); + for(int irow = 0; irow< feedthroughrows; irow++) { + int isec = cp.getInteger(dcdbpath + "feedthroughs/sector",irow)-1; + int isl = cp.getInteger(dcdbpath + "feedthroughs/superlayer",irow)-1; + feedThroughExt[isec][isl] = cp.getDouble(dcdbpath + "feedthroughs/extension", irow); + feedThroughLength[isec][isl] = cp.getDouble(dcdbpath + "feedthroughs/length", irow); + feedThroughRmin[isec][isl] = cp.getDouble(dcdbpath + "feedthroughs/rmin", irow); + feedThroughRmax[isec][isl] = cp.getDouble(dcdbpath + "feedthroughs/rmax", irow); + feedThroughRcurv[isec][isl] = (Math.pow(feedThroughRmax[isec][isl]-feedThroughRmin[isec][isl], 2)+Math.pow(feedThroughLength[isec][isl], 2)) + /(feedThroughRmax[isec][isl]-feedThroughRmin[isec][isl])/2; + } double scaleTest=1; int alignrows = cp.length(dcdbpath+"alignment/dx"); for(int irow = 0; irow< alignrows; irow++) { @@ -218,11 +241,11 @@ public double ministagger() { return ministagger; } - public void setMinistaggerStatus(boolean ministaggerStatus) { + public void setMinistaggerType(DCGeant4Factory.MinistaggerStatus ministaggerStatus) { this.ministaggerStatus = ministaggerStatus; } - public boolean getMinistaggerStatus(){ + public DCGeant4Factory.MinistaggerStatus getMinistaggerStatus(){ return ministaggerStatus; } @@ -237,6 +260,34 @@ public void setEndPlatesStatus(boolean endplatesStatus) { public boolean getEndPlatesStatus(){ return endplatesStatus; } + + public DCGeant4Factory.FeedthroughsStatus feedthroughsStatus() { + return feedthroughsStatus; + } + + public void setFeedthroughsStatus(DCGeant4Factory.FeedthroughsStatus feedthroughsStatus) { + this.feedthroughsStatus = feedthroughsStatus; + } + + public double feedThroughExt(int isec, int isl) { + return feedThroughExt[isec][isl]; + } + + public double feedThroughLength(int isec, int isl) { + return feedThroughLength[isec][isl]; + } + + public double feedThroughRmin(int isec, int isl) { + return feedThroughRmin[isec][isl]; + } + + public double feedThroughRmax(int isec, int isl) { + return feedThroughRmax[isec][isl]; + } + + public double feedThroughRcurv(int isec, int isl) { + return feedThroughRcurv[isec][isl]; + } public double getAlignmentThetaX(int isec, int ireg) { return align_dthetax[isec][ireg]; @@ -264,9 +315,9 @@ final class Wire { private final int wire; private final DCdatabase dbref = DCdatabase.getInstance(); - private final Vector3d midpoint; - private final Vector3d center; - private final Vector3d direction; + private Vector3d midpoint; + private Vector3d center; + private Vector3d direction; private Vector3d leftend; private Vector3d rightend; @@ -306,22 +357,67 @@ public Wire rotateZ(double rotZ) { } private void findEnds() { - // define vector from wire midpoint to chamber tip (z is wrong!!) - Vector3d vnum = new Vector3d(0, dbref.xdist(ireg), 0); - vnum.sub(midpoint); double copen = Math.cos(dbref.thopen(ireg) / 2.0); double sopen = Math.sin(dbref.thopen(ireg) / 2.0); - // define unit vector normal to the sides of the chamber and pointing inside + // define unit vector normal to the endplates of the chamber and pointing inside, projected onto the z=0 plane in the sector frame Vector3d rnorm = new Vector3d(copen, sopen, 0); Vector3d lnorm = new Vector3d(-copen, sopen, 0); + // define unit vector parallel to the sides of the chamber and pointing to the chamber tip, projected onto the z=0 plane in the sector frame + Vector3d rpar = new Vector3d(sopen, -copen, 0); + Vector3d lpar = new Vector3d(-sopen, -copen, 0); + // define unit vector perpendicular to the layer plane, pointing upstream in the sector frame + Vector3d vperp = rnorm.cross(rpar).rotateX(-dbref.thtilt(ireg)); + // define unit vectors perpendicular to the end plates in the sector frame + Vector3d rperp = rnorm.clone().rotateX(-dbref.thtilt(ireg)); + Vector3d lperp = lnorm.clone().rotateX(-dbref.thtilt(ireg)); + + // define vector from wire midpoint to chamber tip in the sector frame, projected onto the z=0 plane + Vector3d vnum = new Vector3d(0, dbref.xdist(ireg), 0); + if(dbref.feedthroughsStatus()!=DCGeant4Factory.FeedthroughsStatus.OFF) + vnum.add(0, dbref.feedThroughExt(sector-1,isuper)/copen, 0); + vnum.sub(midpoint); + // calculate the end points, exploiting the identity between the component perpendicular to the end plates, projected onto the z=0 plane, + // of the vector connecting the chamber tip to the midpoint and the vector connecting the midpoint and the endpoint double wlenl = vnum.dot(lnorm) / direction.dot(lnorm); leftend = direction.times(wlenl).add(midpoint); - double wlenr = vnum.dot(rnorm) / direction.dot(rnorm); rightend = direction.times(wlenr).add(midpoint); + + if(dbref.feedthroughsStatus()==DCGeant4Factory.FeedthroughsStatus.OFF) return; + + // define the center of the circles that describe the trumpet-like part of the feedthrough in the sector frame + Vector3d rcirc = rnorm.times(-dbref.feedThroughLength(sector-1, isuper)).add(rpar.times(dbref.feedThroughRmin(sector-1, isuper)+dbref.feedThroughRcurv(sector-1, isuper))).rotateX(-dbref.thtilt(ireg)).add(rightend); + Vector3d lcirc = lnorm.times(-dbref.feedThroughLength(sector-1, isuper)).add(lpar.times(dbref.feedThroughRmin(sector-1, isuper)+dbref.feedThroughRcurv(sector-1, isuper))).rotateX(-dbref.thtilt(ireg)).add(leftend); + + // recalculate the wire direction assuming the wire is tangent to the left and right circles in the sector frame + Vector3d newDirection = lcirc.minus(rcirc).normalized(); + + // update the wire direction only if the flag is >1 + if(dbref.feedthroughsStatus()==DCGeant4Factory.FeedthroughsStatus.SHIFTANDDIR) + direction = newDirection; + + // recalculate the wire end point in the sector frame + // first define a vector parallel to the one connecting the circle center and the point at the beginning of the trumpet-like part + Vector3d rtang = rpar.times(-dbref.feedThroughRcurv(sector-1, isuper)).rotateX(-dbref.thtilt(ireg)); + // rotate rtang to be parallel to the vector connecting the circle center to the point where the wire is tangent to the circle + double rangle = newDirection.angle(rperp); + double langle = newDirection.negated().angle(lperp); //not used but kept for reference + vperp.rotate(rtang,rangle); + // shift the origin to coincide with the circle center so that the end point is where the wire is tangent to the circle + rtang = rtang.add(rcirc); + // recalculate the wire midpoint as the point on the wire line defined by rtang and newDirection with x=0 + midpoint = rtang.plus(newDirection.times(-rtang.x/newDirection.x)); + + // recalculate the wire endpoints + vnum = new Vector3d(0, dbref.xdist(ireg)+dbref.feedThroughExt(sector-1,isuper)/copen, 0); + vnum.sub(midpoint); + wlenl = vnum.dot(lnorm) / direction.dot(lnorm); + leftend = direction.times(wlenl).add(midpoint); + wlenr = vnum.dot(rnorm) / direction.dot(rnorm); + rightend = direction.times(wlenr).add(midpoint); } /** @@ -397,8 +493,13 @@ public Wire(int sector, int isuperl, int layer, int wire) { // hh: wire distance in the wire plane double hh = (wire-1 + ((double)(layer % 2)) / 2.0) * dw2; - if(ireg==2 && isSensitiveWire(isuper, layer, wire) && dbref.getMinistaggerStatus()) + if(ireg==2 && isSensitiveWire(isuper, layer, wire)) { // apply the ministagger only to sense wires because guard wires are actually used to define the geant4 volumes + if(dbref.getMinistaggerStatus()==DCGeant4Factory.MinistaggerStatus.ON) + hh += ((layer%2)*2)*dbref.ministagger(); + else if(dbref.getMinistaggerStatus()==DCGeant4Factory.MinistaggerStatus.NOTONREFWIRE) hh += ((layer%2)*2-1)*dbref.ministagger(); + } + // ll: layer distance double tt = dbref.cellthickness(isuper) * dbref.wpdist(isuper); @@ -473,8 +574,9 @@ public Vector3d center() { /////////////////////////////////////////////////// public final class DCGeant4Factory extends Geant4Factory { - DCdatabase dbref = DCdatabase.getInstance(); - + private static final Logger LOGGER = Logger.getLogger("DCGeant4Factory"); + DCdatabase dbref = null; + private final HashMap properties = new HashMap<>(); private int nsgwires; @@ -485,29 +587,108 @@ public final class DCGeant4Factory extends Geant4Factory { private final Wire[][][][] wires; private final Vector3d[][][] layerMids; private final Vector3d[][] regionMids; - - public static boolean MINISTAGGERON=true; - public static boolean MINISTAGGEROFF=false; + public static enum MinistaggerStatus { + OFF ( 0, "OFF"), // no ministagger + NOTONREFWIRE ( 1, "NOTONREFWIRE"), // ministagger is applied assuming the reference wire position, defined by dist2tgt and thmin, has no ministagger + ON ( 2, "ON"); // ministagger is applied assuming the reference wire position, defined by dist2tgt and thmin, HAS ministagger (default) + + private final int id; + private final String name; + private final static MinistaggerStatus DEFAULT = ON; + + private MinistaggerStatus(int id, String name) { + this.id = id; + this.name = name; + } + + public int getId() { return id; } + public String getName() { return name; } + + public static MinistaggerStatus getStatus(String name) { + if(name!=null) { + name = name.trim(); + for(MinistaggerStatus status: MinistaggerStatus.values()) + if (status.getName().equalsIgnoreCase(name)) + return status; + } + LOGGER.log(Level.WARNING, "Invalid MinistaggerStatus value, setting default status " + DEFAULT.getName()); + return DEFAULT; + } + + // this method is to support the old API that was accepting booleans as inputs + public static MinistaggerStatus getStatus(boolean status) { + return status ? ON : OFF; + } + } + + public static enum FeedthroughsStatus { + OFF ( 0, "OFF"), // do not account for the feedthroughs + SHIFT ( 1, "SHIFT"), // account for wire midpoint shift only (default) + SHIFTANDDIR ( 2, "SHIFTANDDIR"); // account for wire shift and tilt + + private final int id; + private final String name; + private final static FeedthroughsStatus DEFAULT = SHIFT; + + private FeedthroughsStatus(int id, String name) { + this.id = id; + this.name = name; + } + + public int getId() { return id; } + public String getName() { return name; } + + public static FeedthroughsStatus getStatus(String name) { + if(name!=null) { + name = name.trim(); + for(FeedthroughsStatus status: FeedthroughsStatus.values()) + if (status.getName().equalsIgnoreCase(name)) + return status; + } + LOGGER.log(Level.WARNING, "Invalid FeedthroughsStatus value, setting default status " + DEFAULT.getName()); + return DEFAULT; + } + } + public static boolean ENDPLATESBOWON=true; public static boolean ENDPLATESBOWOFF=false; /////////////////////////////////////////////////// public DCGeant4Factory(ConstantProvider provider) { - this(provider, MINISTAGGEROFF, ENDPLATESBOWOFF, null); + this(provider, MinistaggerStatus.OFF, FeedthroughsStatus.SHIFT, ENDPLATESBOWOFF, null); } /////////////////////////////////////////////////// - public DCGeant4Factory(ConstantProvider provider, boolean ministaggerStatus, - boolean endplatesStatus) { - this(provider, ministaggerStatus, endplatesStatus, null); + public DCGeant4Factory(ConstantProvider provider, + boolean ministaggerStatus, + boolean endplatesStatus) { + this(provider, MinistaggerStatus.getStatus(ministaggerStatus), FeedthroughsStatus.SHIFT, endplatesStatus, null); + } + + /////////////////////////////////////////////////// + public DCGeant4Factory(ConstantProvider provider, + boolean ministaggerStatus, + boolean endplatesStatus, + double[][] shifts) { + this(provider, MinistaggerStatus.getStatus(ministaggerStatus), FeedthroughsStatus.SHIFT, endplatesStatus, shifts); } /////////////////////////////////////////////////// - public DCGeant4Factory(ConstantProvider provider, boolean ministaggerStatus, - boolean endplatesStatus, double[][] shifts) { - dbref.setMinistaggerStatus(ministaggerStatus); + public DCGeant4Factory(ConstantProvider provider, + MinistaggerStatus ministaggerStatus, + FeedthroughsStatus feedthroughsStatus, + boolean endplatesStatus, + double[][] shifts) { + DefaultLogger.debug(); + dbref = DCdatabase.getInstance(); + dbref.setMinistaggerType(ministaggerStatus); + dbref.setFeedthroughsStatus(feedthroughsStatus); dbref.setEndPlatesStatus(endplatesStatus); + LOGGER.log(Level.INFO, "DC Geometry Factory configured with:" + + "\n\t ministagger: " + dbref.getMinistaggerStatus().getName() + + "\n\t feedthroughs: " + dbref.feedthroughsStatus().getName() + + "\n\t endplates bow: " + dbref.getEndPlatesStatus()); motherVolume = new G4World("fc"); @@ -588,7 +769,7 @@ public DCGeant4Factory(ConstantProvider provider, boolean ministaggerStatus, wires[isec][isuper][ilayer][iwire].rotateX(Math.toRadians(dbref.getAlignmentThetaX(isec, isuper/2))); wires[isec][isuper][ilayer][iwire].rotateY(Math.toRadians(dbref.getAlignmentThetaY(isec, isuper/2))); wires[isec][isuper][ilayer][iwire].translate(regionMids[isec][isuper/2]); - } + } } } @@ -770,4 +951,42 @@ public void printWires(){ } } */ + + public static void main(String[] args) { + + ConstantProvider provider = GeometryFactory.getConstants(DetectorType.DC, 11, "default"); + DCGeant4Factory dc0 = new DCGeant4Factory(provider, MinistaggerStatus.ON, FeedthroughsStatus.OFF, false, null); + DCGeant4Factory dc1 = new DCGeant4Factory(provider, MinistaggerStatus.ON, FeedthroughsStatus.SHIFT, false, null); + DCGeant4Factory dc2 = new DCGeant4Factory(provider, MinistaggerStatus.ON, FeedthroughsStatus.SHIFTANDDIR, false, null); + + for(int il=0; il<36; il++) { + for(int iw=0; iw<112; iw=iw+111) { + int sector = 1; + int layer = il+1; + int wire = iw+1; + int isuper = il/6; + int ilayer = il%6; + + + System.out.println(sector + " " + layer + " " + wire + " " + + Math.toDegrees(Math.acos(-dc0.getWireDirection(isuper, ilayer, iw).y))*Math.signum(dc0.getWireDirection(isuper, ilayer, iw).x) + " " + + dc0.getWireMidpoint(isuper, ilayer, iw) + " " + + dc0.getWireDirection(isuper, ilayer, iw) + " " + + dc0.getWireLeftend(isuper, ilayer, iw) + " " + + dc0.getWireRightend(isuper, ilayer, iw) + " "); + System.out.println(sector + " " + layer + " " + wire + " " + + Math.toDegrees(Math.acos(-dc1.getWireDirection(isuper, ilayer, iw).y))*Math.signum(dc1.getWireDirection(isuper, ilayer, iw).x) + " " + + dc1.getWireMidpoint(isuper, ilayer, iw) + " " + + dc1.getWireDirection(isuper, ilayer, iw) + " " + + dc1.getWireLeftend(isuper, ilayer, iw) + " " + + dc1.getWireRightend(isuper, ilayer, iw) + " "); + System.out.println(sector + " " + layer + " " + wire + " " + + Math.toDegrees(Math.acos(-dc2.getWireDirection(isuper, ilayer, iw).y))*Math.signum(dc2.getWireDirection(isuper, ilayer, iw).x) + " " + + dc2.getWireMidpoint(isuper, ilayer, iw) + " " + + dc2.getWireDirection(isuper, ilayer, iw) + " " + + dc2.getWireLeftend(isuper, ilayer, iw) + " " + + dc2.getWireRightend(isuper, ilayer, iw) + " "); + } + } + } } diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geom/dc/DCGeantFactory.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geom/dc/DCGeantFactory.java index 95aaaa32b..864302aca 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geom/dc/DCGeantFactory.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geom/dc/DCGeantFactory.java @@ -38,7 +38,7 @@ public class DCGeantFactory implements Factory4.0.0 org.jlab.clas clas-logging - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/clas-math/pom.xml b/common-tools/clas-math/pom.xml index b19ce93ef..bc38a112f 100644 --- a/common-tools/clas-math/pom.xml +++ b/common-tools/clas-math/pom.xml @@ -3,14 +3,14 @@ 4.0.0 org.jlab.clas clas-math - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/clas-physics/pom.xml b/common-tools/clas-physics/pom.xml index 8f9b0fc16..23187d747 100644 --- a/common-tools/clas-physics/pom.xml +++ b/common-tools/clas-physics/pom.xml @@ -4,14 +4,14 @@ org.jlab.clas clas-physics - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/clas-reco/pom.xml b/common-tools/clas-reco/pom.xml index 01fdab690..5fb4f694d 100644 --- a/common-tools/clas-reco/pom.xml +++ b/common-tools/clas-reco/pom.xml @@ -3,14 +3,14 @@ 4.0.0 org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -42,37 +42,37 @@ org.jlab.clas clas-math - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-io - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-logging - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-physics - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-utils - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-detector - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/clas-tracking/pom.xml b/common-tools/clas-tracking/pom.xml index e70be6027..cc8b89ed8 100644 --- a/common-tools/clas-tracking/pom.xml +++ b/common-tools/clas-tracking/pom.xml @@ -3,14 +3,14 @@ 4.0.0 org.jlab.clas clas-tracking - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -22,7 +22,7 @@ org.jlab.clas swim-tools - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar diff --git a/common-tools/clas-utils/pom.xml b/common-tools/clas-utils/pom.xml index cbbd5b7ae..be6fc8859 100644 --- a/common-tools/clas-utils/pom.xml +++ b/common-tools/clas-utils/pom.xml @@ -3,21 +3,21 @@ 4.0.0 org.jlab.clas clas-utils - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-logging - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.apache.commons diff --git a/common-tools/cnuphys/magfield/pom.xml b/common-tools/cnuphys/magfield/pom.xml index 186ad3a2d..6e0557f22 100644 --- a/common-tools/cnuphys/magfield/pom.xml +++ b/common-tools/cnuphys/magfield/pom.xml @@ -23,7 +23,7 @@ org.jlab.clas clas-math - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/cnuphys/swimmer/pom.xml b/common-tools/cnuphys/swimmer/pom.xml index 15e04cdb1..5623cf55f 100644 --- a/common-tools/cnuphys/swimmer/pom.xml +++ b/common-tools/cnuphys/swimmer/pom.xml @@ -35,7 +35,7 @@ org.jlab.clas clas-math - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/coat-lib/deployDistribution.sh b/common-tools/coat-lib/deployDistribution.sh index d240b8718..6d686d138 100755 --- a/common-tools/coat-lib/deployDistribution.sh +++ b/common-tools/coat-lib/deployDistribution.sh @@ -8,7 +8,7 @@ cd `dirname $0` # Script is exporting existing Jar files to repository #------------------------------------------------------------------------------------------------- -VERSION=10.1.2 +VERSION=11.0.0 mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file \ -Dfile=target/coat-libs-${VERSION}-SNAPSHOT.jar \ diff --git a/common-tools/coat-lib/pom.xml b/common-tools/coat-lib/pom.xml index 144cf39b6..c955dd875 100644 --- a/common-tools/coat-lib/pom.xml +++ b/common-tools/coat-lib/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.jlab.clas coat-libs - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT pom @@ -94,67 +94,67 @@ org.jlab.clas clas-io - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clara-io - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-utils - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-jcsg - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-detector - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-analysis - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-geometry - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-physics - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas swim-tools - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-tracking - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/parent/pom.xml b/common-tools/parent/pom.xml index a596f94e0..edb910611 100644 --- a/common-tools/parent/pom.xml +++ b/common-tools/parent/pom.xml @@ -3,7 +3,7 @@ org.jlab.clas common-tools - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT pom diff --git a/common-tools/pom.xml b/common-tools/pom.xml index 6da86be8b..17ac306a9 100644 --- a/common-tools/pom.xml +++ b/common-tools/pom.xml @@ -2,14 +2,14 @@ 4.0.0 org.jlab.clas common-tools - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT pom org.jlab.clas clas12rec ../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/common-tools/swim-tools/pom.xml b/common-tools/swim-tools/pom.xml index 029b1eae6..fa24dfd50 100644 --- a/common-tools/swim-tools/pom.xml +++ b/common-tools/swim-tools/pom.xml @@ -3,21 +3,21 @@ 4.0.0 org.jlab.clas swim-tools - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/etc/services/data-ai.yaml b/etc/services/data-ai.yaml index 8e76ac900..b15891fcc 100644 --- a/etc/services/data-ai.yaml +++ b/etc/services/data-ai.yaml @@ -62,7 +62,10 @@ services: configuration: global: variation: rgb_spring2019 -# timestamp: 12/31/2020-00:00:00 +# timestamp: 12/31/2020-00:00:00 +## uncomment the following two lines for compatibility with alignments before the DC fixes +# dcMinistagger: "NOTONREFWIRE" +# dcFeedthroughs: "OFF" # io-services: # writer: # schema_dir: "absolute-path-to-schema-folder" diff --git a/etc/services/data-aicv.yaml b/etc/services/data-aicv.yaml index 8728bd6d8..45e18a65a 100644 --- a/etc/services/data-aicv.yaml +++ b/etc/services/data-aicv.yaml @@ -73,7 +73,10 @@ services: configuration: global: variation: rgb_spring2019 -# timestamp: 12/31/2020-00:00:00 +# timestamp: 12/31/2020-00:00:00 +## uncomment the following two lines for compatibility with alignments before the DC fixes +# dcMinistagger: "NOTONREFWIRE" +# dcFeedthroughs: "OFF" # io-services: # writer: # schema_dir: "absolute-path-to-schema-folder" diff --git a/etc/services/data-cv.yaml b/etc/services/data-cv.yaml index 2f56001ec..510742ae0 100644 --- a/etc/services/data-cv.yaml +++ b/etc/services/data-cv.yaml @@ -60,8 +60,11 @@ services: configuration: global: variation: rgb_spring2019 -# timestamp: 12/31/2020-00:00:00 -# triggerMask: "0x1" +# timestamp: 12/31/2020-00:00:00 +# triggerMask: "0x1" +## uncomment the following two lines for compatibility with alignments before the DC fixes +# dcMinistagger: "NOTONREFWIRE" +# dcFeedthroughs: "OFF" # io-services: # writer: # schema_dir: "absolute-path-to-schema-folder" diff --git a/etc/services/denoise.yaml b/etc/services/denoise.yaml index 6d0c5b046..97d1c8d89 100644 --- a/etc/services/denoise.yaml +++ b/etc/services/denoise.yaml @@ -77,7 +77,10 @@ services: configuration: global: variation: rgb_spring2019 -# timestamp: 12/31/2020-00:00:00 +# timestamp: 12/31/2020-00:00:00 +## uncomment the following two lines for compatibility with alignments before the DC fixes +# dcMinistagger: "NOTONREFWIRE" +# dcFeedthroughs: "OFF" # io-services: # writer: # schema_dir: "absolute-path-to-schema-folder" diff --git a/etc/services/mc-ai.yaml b/etc/services/mc-ai.yaml index 02e90cf2b..ec8018add 100644 --- a/etc/services/mc-ai.yaml +++ b/etc/services/mc-ai.yaml @@ -61,8 +61,10 @@ services: name: RTPC configuration: # global: -# variation: rgb_spring2019 -# timestamp: 12/31/2020-00:00:00 +# variation: rga_fall2018_mc +# timestamp: 12/31/2020-00:00:00 +# dcMinistagger: "NOTONREFWIRE" +# dcFeedthroughs: "OFF" # io-services: # writer: # schema_dir: "absolute-path-to-schema-folder" diff --git a/etc/services/mc-aicv.yaml b/etc/services/mc-aicv.yaml index f5215c451..3481142e3 100644 --- a/etc/services/mc-aicv.yaml +++ b/etc/services/mc-aicv.yaml @@ -71,6 +71,10 @@ services: - class: org.jlab.service.rtpc.RTPCEngine name: RTPC configuration: +# global: +# variation: rga_fall2018_mc +# dcMinistagger: "NOTONREFWIRE" +# dcFeedthroughs: "OFF" # io-services: # writer: # schema_dir: "absolute-path-to-schema-folder" diff --git a/etc/services/mc-cv.yaml b/etc/services/mc-cv.yaml index 8abeb544d..01126121f 100644 --- a/etc/services/mc-cv.yaml +++ b/etc/services/mc-cv.yaml @@ -59,7 +59,9 @@ services: name: RTPC configuration: # global: -# variation: rga_fall2018_bg +# variation: rga_fall2018_mc +# dcMinistagger: "NOTONREFWIRE" +# dcFeedthroughs: "OFF" # io-services: # writer: # schema_dir: "absolute-path-to-schema-folder" diff --git a/parent/pom.xml b/parent/pom.xml index 4a870e71c..f2fd95532 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -3,7 +3,7 @@ org.jlab.clas clas12rec - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT pom diff --git a/pom.xml b/pom.xml index cd341cc8e..9093d9550 100644 --- a/pom.xml +++ b/pom.xml @@ -2,14 +2,14 @@ 4.0.0 org.jlab.clas clas12 - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT pom org.jlab.clas clas12rec parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/alert/pom.xml b/reconstruction/alert/pom.xml index d0a2a6a53..8b96340a1 100644 --- a/reconstruction/alert/pom.xml +++ b/reconstruction/alert/pom.xml @@ -13,31 +13,31 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-io - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT compile org.jlab.clas clas-tracking - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT compile org.jlab.clas clas-geometry - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT compile diff --git a/reconstruction/band/pom.xml b/reconstruction/band/pom.xml index 2da190fe4..39d28d395 100644 --- a/reconstruction/band/pom.xml +++ b/reconstruction/band/pom.xml @@ -13,14 +13,14 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/cnd/pom.xml b/reconstruction/cnd/pom.xml index b8a574589..8a0bab6cf 100644 --- a/reconstruction/cnd/pom.xml +++ b/reconstruction/cnd/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/cvt/pom.xml b/reconstruction/cvt/pom.xml index 1016c6e1c..0d2d8c7b1 100644 --- a/reconstruction/cvt/pom.xml +++ b/reconstruction/cvt/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,7 +21,7 @@ org.jlab.clas clas-jcsg - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -47,7 +47,7 @@ org.jlab.clas clas-tracking - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/dc/pom.xml b/reconstruction/dc/pom.xml index 6eb3261dd..64d5a57f4 100644 --- a/reconstruction/dc/pom.xml +++ b/reconstruction/dc/pom.xml @@ -14,7 +14,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -28,25 +28,25 @@ org.jlab.clas clas-tracking - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-jcsg - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-analysis - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -75,13 +75,13 @@ org.jlab.clas swim-tools - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-math - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/Constants.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/Constants.java index c406da212..d02032247 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/Constants.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/Constants.java @@ -17,7 +17,6 @@ import org.jlab.geom.base.Detector; import org.jlab.rec.dc.trajectory.TrajectorySurfaces; import org.jlab.utils.groups.IndexedTable; -import org.jlab.detector.banks.RawBank.OrderType; /** * Constants used in the reconstruction @@ -88,6 +87,8 @@ public static Constants getInstance() { // CONFIGURABLE PARAMETERS private String GEOVARIATION = "default"; + public DCGeant4Factory.MinistaggerStatus MINISTAGGERSTATUS = null; + public DCGeant4Factory.FeedthroughsStatus FEEDTHROUGHSSTATUS = null; private boolean ENDPLATESBOWING = false; private double WIREDIST = 0.0; public int SECTORSELECT = 0; @@ -369,6 +370,8 @@ public void setSWAPDCRBBITS(boolean SWAPDCRBBITS) { public synchronized void initialize(String engine, String variation, + String ministaggerStatus, + String feedthroughsStatus, boolean wireDistortion, boolean useStartTime, boolean useBetaCut, @@ -383,16 +386,18 @@ public synchronized void initialize(String engine, printConfig(engine); } else { - GEOVARIATION = variation; - ENDPLATESBOWING = wireDistortion; - USETSTART = useStartTime; - CHECKBETA = useBetaCut; - T2D = t2d; - USEDOUBLETS = useDoublets; - DCRBJITTER = dcrbJitter; - SWAPDCRBBITS = swapDCRBBits; + GEOVARIATION = variation; + MINISTAGGERSTATUS = DCGeant4Factory.MinistaggerStatus.getStatus(ministaggerStatus); + FEEDTHROUGHSSTATUS = DCGeant4Factory.FeedthroughsStatus.getStatus(feedthroughsStatus); + ENDPLATESBOWING = wireDistortion; + USETSTART = useStartTime; + CHECKBETA = useBetaCut; + T2D = t2d; + USEDOUBLETS = useDoublets; + DCRBJITTER = dcrbJitter; + SWAPDCRBBITS = swapDCRBBits; NSUPERLAYERTRACKING = nSuperLayer; - SECTORSELECT = selectedSector; + SECTORSELECT = selectedSector; LoadConstants(); @@ -421,6 +426,8 @@ public void printConfig(String engine) { LOGGER.log(Level.INFO, "["+engine+"] run with variation = " + GEOVARIATION); LOGGER.log(Level.INFO, "["+engine+"] run with sector selection = " + SECTORSELECT); LOGGER.log(Level.INFO, "["+engine+"] run with start time option = " + USETSTART); + LOGGER.log(Level.INFO, "["+engine+"] run with wire ministagger = " + MINISTAGGERSTATUS.getName()); + LOGGER.log(Level.INFO, "["+engine+"] run with wire feedthroughs = " + FEEDTHROUGHSSTATUS.getName()); LOGGER.log(Level.INFO, "["+engine+"] run with wire distortions = " + ENDPLATESBOWING); LOGGER.log(Level.INFO, "["+engine+"] run with with time Beta correction (is false for doca Beta correction) = " + USETIMETBETA); LOGGER.log(Level.INFO, "["+engine+"] run with with Beta cut = " + CHECKBETA); @@ -527,7 +534,7 @@ private void addReverseTT(int run, IndexedTable tt) { private synchronized void LoadGeometry(String geoVariation, double[][] shifts) { // Load the geometry ConstantProvider provider = GeometryFactory.getConstants(DetectorType.DC, 11, geoVariation); - dcDetector = new DCGeant4Factory(provider, DCGeant4Factory.MINISTAGGERON, ENDPLATESBOWING, shifts); + dcDetector = new DCGeant4Factory(provider, MINISTAGGERSTATUS, FEEDTHROUGHSSTATUS, ENDPLATESBOWING, shifts); for(int l=0; l<6; l++) { wpdist[l] = provider.getDouble("/geometry/dc/superlayer/wpdist", l); } diff --git a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCEngine.java b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCEngine.java index 80064a036..cdc44a372 100644 --- a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCEngine.java +++ b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCEngine.java @@ -20,6 +20,8 @@ public class DCEngine extends ReconstructionEngine { // options configured from yaml private int selectedSector = 0; + private String ministaggerStatus = null; + private String feedthroughsStatus = null; private boolean wireDistortion = false; private boolean useStartTime = true; private boolean useBetaCut = false; @@ -60,6 +62,14 @@ else if(this.getEngineConfigString("variation")!=null) if(this.getEngineConfigString("dcUseStartTime")!=null) useStartTime = Boolean.valueOf(this.getEngineConfigString("dcUseStartTime")); + // R3 ministagger + if(this.getEngineConfigString("dcMinistagger")!=null) + ministaggerStatus = this.getEngineConfigString("dcMinistagger"); + + // Wire feedthroughs + if(this.getEngineConfigString("dcFeedthroughs")!=null) + feedthroughsStatus = this.getEngineConfigString("dcFeedthroughs"); + // Wire distortions if(this.getEngineConfigString("dcWireDistortion")!=null) wireDistortion = Boolean.parseBoolean(this.getEngineConfigString("dcWireDistortion")); @@ -169,6 +179,8 @@ public boolean init() { this.setOptions(); Constants.getInstance().initialize(this.getName(), geoVariation, + ministaggerStatus, + feedthroughsStatus, wireDistortion, useStartTime, useBetaCut, diff --git a/reconstruction/eb/pom.xml b/reconstruction/eb/pom.xml index 30c6bdca3..19920fadf 100644 --- a/reconstruction/eb/pom.xml +++ b/reconstruction/eb/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,25 +21,25 @@ org.jlab.clas clas-utils - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-io - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-analysis - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/ec/pom.xml b/reconstruction/ec/pom.xml index 84ee2af3b..1389e761d 100644 --- a/reconstruction/ec/pom.xml +++ b/reconstruction/ec/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,13 +21,13 @@ org.jlab.clas clas-detector - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-analysis - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/fmt/pom.xml b/reconstruction/fmt/pom.xml index 3d9f9ae16..84bbed2fb 100644 --- a/reconstruction/fmt/pom.xml +++ b/reconstruction/fmt/pom.xml @@ -15,21 +15,21 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-jcsg - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas swim-tools - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/ft/pom.xml b/reconstruction/ft/pom.xml index 0779e8811..2947fcbc4 100644 --- a/reconstruction/ft/pom.xml +++ b/reconstruction/ft/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,7 +21,7 @@ org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/htcc/pom.xml b/reconstruction/htcc/pom.xml index bcedb567a..9bfca69af 100644 --- a/reconstruction/htcc/pom.xml +++ b/reconstruction/htcc/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,7 +21,7 @@ org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/ltcc/pom.xml b/reconstruction/ltcc/pom.xml index c3e594e71..b7673788b 100644 --- a/reconstruction/ltcc/pom.xml +++ b/reconstruction/ltcc/pom.xml @@ -13,14 +13,14 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/mc/pom.xml b/reconstruction/mc/pom.xml index ed56bd8c4..1d96e73e3 100644 --- a/reconstruction/mc/pom.xml +++ b/reconstruction/mc/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,7 +21,7 @@ org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/mltn/pom.xml b/reconstruction/mltn/pom.xml index 6f50ff2e0..5642944d7 100644 --- a/reconstruction/mltn/pom.xml +++ b/reconstruction/mltn/pom.xml @@ -14,7 +14,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -34,13 +34,13 @@ org.jlab.clas clas-io - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/pom.xml b/reconstruction/pom.xml index 0e2c556c9..f34336a7b 100644 --- a/reconstruction/pom.xml +++ b/reconstruction/pom.xml @@ -3,14 +3,14 @@ org.jlab.clas reconstruction - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT pom org.jlab.clas clas12rec ../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/raster/pom.xml b/reconstruction/raster/pom.xml index cce67f303..e2dad6dd9 100644 --- a/reconstruction/raster/pom.xml +++ b/reconstruction/raster/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,7 +21,7 @@ org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/rich/pom.xml b/reconstruction/rich/pom.xml index 34219bb0a..3b1695702 100644 --- a/reconstruction/rich/pom.xml +++ b/reconstruction/rich/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,13 +21,13 @@ org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-jcsg - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/rtpc/pom.xml b/reconstruction/rtpc/pom.xml index af7e9b915..416590d49 100644 --- a/reconstruction/rtpc/pom.xml +++ b/reconstruction/rtpc/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,12 +21,12 @@ org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-tracking - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT compile diff --git a/reconstruction/swaps/pom.xml b/reconstruction/swaps/pom.xml index ffc95ac2e..8b194d0a8 100644 --- a/reconstruction/swaps/pom.xml +++ b/reconstruction/swaps/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,19 +21,19 @@ org.jlab.clas clas-detector - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-io - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-reco - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/tof/pom.xml b/reconstruction/tof/pom.xml index 7ead27814..64f7bb6f1 100644 --- a/reconstruction/tof/pom.xml +++ b/reconstruction/tof/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,7 +21,7 @@ org.jlab.clas clas-jcsg - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/urwell/pom.xml b/reconstruction/urwell/pom.xml index 305b17164..76643fa1b 100644 --- a/reconstruction/urwell/pom.xml +++ b/reconstruction/urwell/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -21,13 +21,13 @@ org.jlab.clas clas-detector - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT org.jlab.clas clas-analysis - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT diff --git a/reconstruction/vtx/pom.xml b/reconstruction/vtx/pom.xml index 4b48f471b..9f0eea5c4 100644 --- a/reconstruction/vtx/pom.xml +++ b/reconstruction/vtx/pom.xml @@ -13,7 +13,7 @@ org.jlab.clas clas12rec ../../parent/pom.xml - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT @@ -33,13 +33,13 @@ org.jlab.clas swim-tools - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar org.jlab.clas clas-tracking - 10.1.2-SNAPSHOT + 11.0.0-SNAPSHOT jar From 04394399acf4ff911766cac015f49ec3e35c4459 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 07:37:04 +0000 Subject: [PATCH 03/13] build(deps): bump org.slf4j:slf4j-simple from 2.0.13 to 2.0.16 Bumps org.slf4j:slf4j-simple from 2.0.13 to 2.0.16. --- updated-dependencies: - dependency-name: org.slf4j:slf4j-simple dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- common-tools/clas-jcsg/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-tools/clas-jcsg/pom.xml b/common-tools/clas-jcsg/pom.xml index 652f031ac..fb7fcbdd2 100644 --- a/common-tools/clas-jcsg/pom.xml +++ b/common-tools/clas-jcsg/pom.xml @@ -42,7 +42,7 @@ org.slf4j slf4j-simple - 2.0.13 + 2.0.16 From 11eb5cc4253947b428394be071e88e5de26a94e4 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Mon, 29 Jul 2024 11:26:31 -0400 Subject: [PATCH 04/13] fix!: `env.sh` sourceable should not be in `$PATH` Having `env.sh` in one's `$PATH` means that when some shells run `source env.sh` from anywhere, it may prioritize the `env.sh` from the `coatjava` installation, rather than the `env.sh` in the caller's present working directory. Since both `coatjava`'s `env.sh` and the caller's `./env.sh` may be silent, this can lead to confusion as to why the local `./env.sh` is not working. This PR moves `env.sh` to `libexec/`, which should not be in one's `$PATH`. Any downstream code which calls `source env.sh` may be affected, which is why the conventional commit label is `fix!` rather than `fix` (_i.e._, potential breaking change). --- bin/bg-merger | 2 +- bin/bos2hipo | 2 +- bin/cvt-compare | 2 +- bin/daqEventViewer | 2 +- bin/dclayereffs-ana | 2 +- bin/decoder | 2 +- bin/dict-generator | 2 +- bin/dict-maker | 2 +- bin/dict-merger | 2 +- bin/dict-validator | 2 +- bin/evio-viewer | 2 +- bin/evio2hipo | 2 +- bin/eviocure | 2 +- bin/eviodump | 2 +- bin/hipo-add | 2 +- bin/hipo-browser | 2 +- bin/hipo-diff | 2 +- bin/hipo-json | 2 +- bin/hipo-utils | 2 +- bin/postprocess | 2 +- bin/rebuild-scalers | 2 +- bin/recon-util | 2 +- bin/run-groovy | 2 +- bin/run-groovysh | 2 +- bin/run-jshell | 2 +- bin/trigger-filter | 2 +- bin/trigger-splitter | 2 +- build-coatjava.sh | 5 +++-- {bin => libexec}/env.sh | 0 validation/advanced-tests/run-eb-tests.sh | 2 +- 30 files changed, 31 insertions(+), 30 deletions(-) rename {bin => libexec}/env.sh (100%) diff --git a/bin/bg-merger b/bin/bg-merger index f7811527a..469d48796 100755 --- a/bin/bg-merger +++ b/bin/bg-merger @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/bos2hipo b/bin/bos2hipo index 8dd8b72a6..4f818369a 100755 --- a/bin/bos2hipo +++ b/bin/bos2hipo @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh java -Xms1024m -XX:+UseSerialGC \ -cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/plugins/*" \ diff --git a/bin/cvt-compare b/bin/cvt-compare index b918e42ee..161061720 100755 --- a/bin/cvt-compare +++ b/bin/cvt-compare @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/daqEventViewer b/bin/daqEventViewer index 158893146..5cdad5409 100755 --- a/bin/daqEventViewer +++ b/bin/daqEventViewer @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh java -Xms1024m \ -cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/services/*:$CLAS12DIR/lib/utils/*" \ diff --git a/bin/dclayereffs-ana b/bin/dclayereffs-ana index b37bc1f0b..b41ec34ff 100755 --- a/bin/dclayereffs-ana +++ b/bin/dclayereffs-ana @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh java -Dsun.java2d.pmoffscreen=false -Xmx2048m -Xms1024m \ -cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/utils/*:$CLAS12DIR/lib/services/*" \ diff --git a/bin/decoder b/bin/decoder index fa6321f5c..1ea3657a9 100755 --- a/bin/decoder +++ b/bin/decoder @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/dict-generator b/bin/dict-generator index 459c3cb7b..2d311f9bf 100755 --- a/bin/dict-generator +++ b/bin/dict-generator @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/dict-maker b/bin/dict-maker index 545db8188..652a87841 100755 --- a/bin/dict-maker +++ b/bin/dict-maker @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/dict-merger b/bin/dict-merger index 95e555307..f57611ad3 100755 --- a/bin/dict-merger +++ b/bin/dict-merger @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/dict-validator b/bin/dict-validator index c16a97fc8..57810fb5f 100755 --- a/bin/dict-validator +++ b/bin/dict-validator @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/evio-viewer b/bin/evio-viewer index f3b5a88f4..4e88b1eec 100755 --- a/bin/evio-viewer +++ b/bin/evio-viewer @@ -1,5 +1,5 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh java -cp "$CLAS12DIR/lib/clas/*" org.jlab.coda.eventViewer.EventTreeFrame $* diff --git a/bin/evio2hipo b/bin/evio2hipo index 3edc72dc4..1a7e71037 100755 --- a/bin/evio2hipo +++ b/bin/evio2hipo @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/eviocure b/bin/eviocure index a651ca944..fa01967c0 100755 --- a/bin/eviocure +++ b/bin/eviocure @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/eviodump b/bin/eviodump index 87024f5d8..c1d3495f3 100755 --- a/bin/eviodump +++ b/bin/eviodump @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh java -Xms1024m \ -cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/plugins/*" \ diff --git a/bin/hipo-add b/bin/hipo-add index 3cbaaf2ed..3b234699b 100755 --- a/bin/hipo-add +++ b/bin/hipo-add @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh java -Xms1024m \ -cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/plugins/*" \ diff --git a/bin/hipo-browser b/bin/hipo-browser index fc0e8c129..920d84c4b 100755 --- a/bin/hipo-browser +++ b/bin/hipo-browser @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh java -Xms1024m \ -cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/plugins/*" \ diff --git a/bin/hipo-diff b/bin/hipo-diff index b65fe07c7..96d47f9cf 100755 --- a/bin/hipo-diff +++ b/bin/hipo-diff @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/hipo-json b/bin/hipo-json index 9281af385..2077327fc 100755 --- a/bin/hipo-json +++ b/bin/hipo-json @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh java -Xms1024m \ -cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/plugins/*" \ diff --git a/bin/hipo-utils b/bin/hipo-utils index 1b3f35587..47e579389 100755 --- a/bin/hipo-utils +++ b/bin/hipo-utils @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/postprocess b/bin/postprocess index e49393584..7c33355ec 100755 --- a/bin/postprocess +++ b/bin/postprocess @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/rebuild-scalers b/bin/rebuild-scalers index 26c6aa62e..3155086d7 100755 --- a/bin/rebuild-scalers +++ b/bin/rebuild-scalers @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/recon-util b/bin/recon-util index b7b439da3..a11a11e8c 100755 --- a/bin/recon-util +++ b/bin/recon-util @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/run-groovy b/bin/run-groovy index e9fca29ec..b8412ce50 100755 --- a/bin/run-groovy +++ b/bin/run-groovy @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh groovy +. `dirname $0`/../libexec/env.sh groovy echo """ **************************************** diff --git a/bin/run-groovysh b/bin/run-groovysh index 4466e0134..d217dfbf4 100755 --- a/bin/run-groovysh +++ b/bin/run-groovysh @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh groovy +. `dirname $0`/../libexec/env.sh groovy echo """ *************************************** diff --git a/bin/run-jshell b/bin/run-jshell index e017b08fa..72bb3754c 100755 --- a/bin/run-jshell +++ b/bin/run-jshell @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh jshell +. `dirname $0`/../libexec/env.sh jshell echo """ ********************************* diff --git a/bin/trigger-filter b/bin/trigger-filter index 172bf880d..91c3221b1 100755 --- a/bin/trigger-filter +++ b/bin/trigger-filter @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/bin/trigger-splitter b/bin/trigger-splitter index 5821b29bf..8c64dda6a 100755 --- a/bin/trigger-splitter +++ b/bin/trigger-splitter @@ -1,6 +1,6 @@ #!/bin/bash -. `dirname $0`/env.sh +. `dirname $0`/../libexec/env.sh export MALLOC_ARENA_MAX=1 diff --git a/build-coatjava.sh b/build-coatjava.sh index cd05cfe04..a7e7341b5 100755 --- a/build-coatjava.sh +++ b/build-coatjava.sh @@ -61,9 +61,9 @@ download () { } -# download the default field maps, as defined in bin/env.sh: +# download the default field maps, as defined in libexec/env.sh: # (and duplicated in etc/services/reconstruction.yaml): -source `dirname $0`/bin/env.sh +source `dirname $0`/libexec/env.sh if [ $downloadMaps == "yes" ]; then echo 'Retrieving field maps ...' webDir=https://clasweb.jlab.org/clas12offline/magfield @@ -87,6 +87,7 @@ rm -rf coatjava mkdir -p coatjava cp -r bin coatjava/ cp -r etc coatjava/ +cp -r libexec coatjava/ # create schema directories for partial reconstruction outputs which python3 >& /dev/null && python=python3 || python=python diff --git a/bin/env.sh b/libexec/env.sh similarity index 100% rename from bin/env.sh rename to libexec/env.sh diff --git a/validation/advanced-tests/run-eb-tests.sh b/validation/advanced-tests/run-eb-tests.sh index a4221b5f8..450e28d4a 100755 --- a/validation/advanced-tests/run-eb-tests.sh +++ b/validation/advanced-tests/run-eb-tests.sh @@ -87,7 +87,7 @@ esac if [ $useClara -eq 0 ] then COAT=../../coatjava - source $COAT/bin/env.sh + source $COAT/libexec/env.sh else CLARA_HOME=$PWD/clara_installation/ COAT=$CLARA_HOME/plugins/clas12/ From 7eb28d8d8f94eefc3c5a99cd2687c5a5fb284758 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Tue, 30 Jul 2024 10:55:57 -0400 Subject: [PATCH 05/13] fix: kludge the clara coatjava plugin --- validation/advanced-tests/run-advanced-tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/validation/advanced-tests/run-advanced-tests.sh b/validation/advanced-tests/run-advanced-tests.sh index b3e85ecb6..a7c73099a 100755 --- a/validation/advanced-tests/run-advanced-tests.sh +++ b/validation/advanced-tests/run-advanced-tests.sh @@ -31,6 +31,7 @@ esac chmod +x install-claracre-clas.sh echo Y | ./install-claracre-clas.sh -f 5.0.2 -j 11 -l local if [ $? != 0 ] ; then echo "clara installation error" ; exit 1 ; fi +cp -rp ../../coatjava/libexec $CLARA_HOME/plugins/clas12/ # FIXME: should go in `install-claracre-clas.sh`, or can we use `../../install-clara` instead? rm install-claracre-clas.sh # download test files From fcb162d673e93d405d6b3a0231ccacbbb2da636e Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Mon, 12 Aug 2024 15:49:24 -0400 Subject: [PATCH 06/13] test: use local `install-clara` --- .../advanced-tests/run-advanced-tests.sh | 19 +------------------ validation/advanced-tests/run-eb-tests.sh | 6 +----- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/validation/advanced-tests/run-advanced-tests.sh b/validation/advanced-tests/run-advanced-tests.sh index a7c73099a..187eb8704 100755 --- a/validation/advanced-tests/run-advanced-tests.sh +++ b/validation/advanced-tests/run-advanced-tests.sh @@ -15,27 +15,10 @@ mv coatjava-local.tar.gz validation/advanced-tests/ cd - # install clara - -case $OS in - 'Linux') - wget --no-check-certificate https://claraweb.jlab.org/clara/_downloads/install-claracre-clas.sh - ;; - 'Darwin') - echo "Getting Clara..." - curl -OL "https://claraweb.jlab.org/clara/_downloads/install-claracre-clas.sh" -o install-claracre-clas.sh - ;; - *) ;; -esac - - -chmod +x install-claracre-clas.sh -echo Y | ./install-claracre-clas.sh -f 5.0.2 -j 11 -l local +../../install-clara -f 5.0.2 -j 11 -l $CLARA_HOME if [ $? != 0 ] ; then echo "clara installation error" ; exit 1 ; fi -cp -rp ../../coatjava/libexec $CLARA_HOME/plugins/clas12/ # FIXME: should go in `install-claracre-clas.sh`, or can we use `../../install-clara` instead? -rm install-claracre-clas.sh # download test files - case $OS in 'Linux') wget --no-check-certificate http://clasweb.jlab.org/clas12offline/distribution/coatjava/validation_files/twoTrackEvents_809_raw.evio.tar.gz diff --git a/validation/advanced-tests/run-eb-tests.sh b/validation/advanced-tests/run-eb-tests.sh index 450e28d4a..30645ecbd 100755 --- a/validation/advanced-tests/run-eb-tests.sh +++ b/validation/advanced-tests/run-eb-tests.sh @@ -117,11 +117,7 @@ then # install clara if ! [ -d clara_installation ] then - wget --no-check-certificate https://claraweb.jlab.org/clara/_downloads/install-claracre-clas.sh - chmod +x install-claracre-clas.sh - ./install-claracre-clas.sh -l local - if [ $? != 0 ] ; then echo "clara installation error" ; exit 1 ; fi - rm install-claracre-clas.sh + ../../install-clara clara_installation fi fi From db8c28f4c017835129909c075dbd2856dc568e15 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Mon, 12 Aug 2024 15:59:12 -0400 Subject: [PATCH 07/13] fix: unknown `-l` --- validation/advanced-tests/run-advanced-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validation/advanced-tests/run-advanced-tests.sh b/validation/advanced-tests/run-advanced-tests.sh index 187eb8704..5196eb1da 100755 --- a/validation/advanced-tests/run-advanced-tests.sh +++ b/validation/advanced-tests/run-advanced-tests.sh @@ -15,7 +15,7 @@ mv coatjava-local.tar.gz validation/advanced-tests/ cd - # install clara -../../install-clara -f 5.0.2 -j 11 -l $CLARA_HOME +../../install-clara -f 5.0.2 -j 11 $CLARA_HOME if [ $? != 0 ] ; then echo "clara installation error" ; exit 1 ; fi # download test files From aa6a2fff9dc1a6475d4215b449c4fc1278cd1ef4 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 13 Aug 2024 10:49:15 -0400 Subject: [PATCH 08/13] fix --- install-clara | 2 +- validation/advanced-tests/run-advanced-tests.sh | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/install-clara b/install-clara index d0d7e5490..4b681713d 100755 --- a/install-clara +++ b/install-clara @@ -119,7 +119,7 @@ then coatjava=./coatjava fi mkdir -p clara-cre/plugins/clas12/config -cp -Lr $coatjava/etc $coatjava/bin $coatjava/lib clara-cre/plugins/clas12 +cp -Lr $coatjava/etc $coatjava/bin $coatjava/lib $coatjava/libexec clara-cre/plugins/clas12 # GRAPES: echo -e "\nRetrieving GRAPES version $grapes ..." diff --git a/validation/advanced-tests/run-advanced-tests.sh b/validation/advanced-tests/run-advanced-tests.sh index 5196eb1da..239fc7263 100755 --- a/validation/advanced-tests/run-advanced-tests.sh +++ b/validation/advanced-tests/run-advanced-tests.sh @@ -8,14 +8,8 @@ CLARA_HOME=$PWD/clara_installation/ ; export CLARA_HOME COAT=$CLARA_HOME/plugins/clas12/ classPath="$COAT/lib/services/*:$COAT/lib/clas/*:$COAT/lib/utils/*:../lib/*:src/" -# tar the local coatjava build so it can be installed with clara -cd ../.. -tar -zcvf coatjava-local.tar.gz coatjava -mv coatjava-local.tar.gz validation/advanced-tests/ -cd - - # install clara -../../install-clara -f 5.0.2 -j 11 $CLARA_HOME +../../install-clara -c ../../coatjava $CLARA_HOME if [ $? != 0 ] ; then echo "clara installation error" ; exit 1 ; fi # download test files From aa025e0eae91282b280774b1be5ee8c0310d51c8 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 13 Aug 2024 11:19:53 -0400 Subject: [PATCH 09/13] backward compatibility --- install-clara | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-clara b/install-clara index 4b681713d..32e8fc3ed 100755 --- a/install-clara +++ b/install-clara @@ -119,7 +119,7 @@ then coatjava=./coatjava fi mkdir -p clara-cre/plugins/clas12/config -cp -Lr $coatjava/etc $coatjava/bin $coatjava/lib $coatjava/libexec clara-cre/plugins/clas12 +cp -Lr $coatjava/etc $coatjava/bin $coatjava/lib* clara-cre/plugins/clas12 # GRAPES: echo -e "\nRetrieving GRAPES version $grapes ..." From a5ad1e75ac741b29bbc3c154afab5907d7e50f88 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 13 Aug 2024 11:22:11 -0400 Subject: [PATCH 10/13] clara is not supported on macos --- validation/advanced-tests/run-advanced-tests.sh | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/validation/advanced-tests/run-advanced-tests.sh b/validation/advanced-tests/run-advanced-tests.sh index 239fc7263..eb954e50c 100755 --- a/validation/advanced-tests/run-advanced-tests.sh +++ b/validation/advanced-tests/run-advanced-tests.sh @@ -1,7 +1,6 @@ #!/bin/sh -f # coatjava must already be built at ../../coatjava/ -OS=$(uname) # set up environment CLARA_HOME=$PWD/clara_installation/ ; export CLARA_HOME @@ -13,17 +12,7 @@ classPath="$COAT/lib/services/*:$COAT/lib/clas/*:$COAT/lib/utils/*:../lib/*:src/ if [ $? != 0 ] ; then echo "clara installation error" ; exit 1 ; fi # download test files -case $OS in - 'Linux') - wget --no-check-certificate http://clasweb.jlab.org/clas12offline/distribution/coatjava/validation_files/twoTrackEvents_809_raw.evio.tar.gz - ;; - 'Darwin') - curl -OL "http://clasweb.jlab.org/clas12offline/distribution/coatjava/validation_files/twoTrackEvents_809_raw.evio.tar.gz" -o twoTrackEvents_809_raw.evio.tar.gz - ;; - *) ;; -esac - - +wget --no-check-certificate http://clasweb.jlab.org/clas12offline/distribution/coatjava/validation_files/twoTrackEvents_809_raw.evio.tar.gz if [ $? != 0 ] ; then echo "wget validation files failure" ; exit 1 ; fi tar -zxvf twoTrackEvents_809_raw.evio.tar.gz From aeaf80e16636e686b3c5a420c70e7037aeb2f4f4 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 13 Aug 2024 11:36:31 -0400 Subject: [PATCH 11/13] disable defunct test --- validation/advanced-tests/run-advanced-tests.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/validation/advanced-tests/run-advanced-tests.sh b/validation/advanced-tests/run-advanced-tests.sh index eb954e50c..13d83f11c 100755 --- a/validation/advanced-tests/run-advanced-tests.sh +++ b/validation/advanced-tests/run-advanced-tests.sh @@ -1,5 +1,9 @@ #!/bin/sh -f +# this test needs rewritten, with more useful data (not KPP), +# meanwhile not worth maintaining ... +exit 0 + # coatjava must already be built at ../../coatjava/ # set up environment From d190d22ddb076902a4561160222f8b7126e094b1 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 13 Aug 2024 11:38:29 -0400 Subject: [PATCH 12/13] stop using yamls from clara installations --- validation/advanced-tests/run-advanced-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validation/advanced-tests/run-advanced-tests.sh b/validation/advanced-tests/run-advanced-tests.sh index 13d83f11c..38cb800dc 100755 --- a/validation/advanced-tests/run-advanced-tests.sh +++ b/validation/advanced-tests/run-advanced-tests.sh @@ -2,7 +2,7 @@ # this test needs rewritten, with more useful data (not KPP), # meanwhile not worth maintaining ... -exit 0 +#exit 0 # coatjava must already be built at ../../coatjava/ @@ -35,7 +35,7 @@ echo "set session s_cook" >> cook.clara echo "set description d_cook" >> cook.clara ls twoTrackEvents_809.hipo > files.list echo "set fileList $PWD/files.list" >> cook.clara -echo "set servicesFile $CLARA_HOME/plugins/clas12/config/kpp.yaml" >> cook.clara +echo "set servicesFile $COAT/etc/services/kpp.yaml" >> cook.clara echo "run local" >> cook.clara echo "exit" >> cook.clara $CLARA_HOME/bin/clara-shell cook.clara From 5959855282f57bda441210657b00a2831e87033c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 18:22:25 +0000 Subject: [PATCH 13/13] build(deps): bump org.ejml:ejml-all from 0.39 to 0.43.1 Bumps [org.ejml:ejml-all](https://github.com/lessthanoptimal/ejml) from 0.39 to 0.43.1. - [Release notes](https://github.com/lessthanoptimal/ejml/releases) - [Changelog](https://github.com/lessthanoptimal/ejml/blob/SNAPSHOT/docs/release-checklist.txt) - [Commits](https://github.com/lessthanoptimal/ejml/compare/v0.39...v0.43.1) --- updated-dependencies: - dependency-name: org.ejml:ejml-all dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- common-tools/clas-tracking/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-tools/clas-tracking/pom.xml b/common-tools/clas-tracking/pom.xml index cc8b89ed8..609c24e16 100644 --- a/common-tools/clas-tracking/pom.xml +++ b/common-tools/clas-tracking/pom.xml @@ -17,7 +17,7 @@ org.ejml ejml-all - 0.39 + 0.43.1 org.jlab.clas