From 515dd5c9ecd822448312a745684f48a0608f1ce0 Mon Sep 17 00:00:00 2001 From: raffaelladevita Date: Fri, 9 Aug 2024 15:52:39 -0400 Subject: [PATCH] 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