Commit in GeomConverter/src/org/lcsim on MAIN | |||
detector/converter/compact/HPSEcal3Converter.java | +4 | -3 | 1.3 -> 1.4 |
geometry/compact/converter/lcdd/HPSEcal3.java | +11 | -7 | 1.6 -> 1.7 |
+15 | -10 |
break out geom tolerance into X and Y components; increase according to doc from Stepan
diff -u -r1.3 -r1.4 --- HPSEcal3Converter.java 4 Jun 2012 23:26:53 -0000 1.3 +++ HPSEcal3Converter.java 11 Jun 2012 22:32:04 -0000 1.4 @@ -37,7 +37,8 @@
static final double tolerance = 0.0; // Tolerance factor for separating crystals to avoid overlaps.
- static final double crystalTolerance = 0.15;
+ static final double crystalToleranceY = 0.35;
+ static final double crystalToleranceX = 0.2;
// Margin for mother volume. static final double margin = 1.1;
@@ -222,7 +223,7 @@
double thetax = coeffy * dthetax; double zcorry = dy1 * (2 * sin(coeffy * dthetax)); double ycorr = zcorry * tan((coeffy - 1) * dthetax);
- double ycenter = z0y * sin(coeffy * dthetax) + ycorr + ycorrtot + (crystalTolerance * iy);
+ double ycenter = z0y * sin(coeffy * dthetax) + ycorr + ycorrtot + (crystalToleranceY * iy);
double thetaz = 0; for (int ix = 0; ix <= nx; ix++) {
@@ -239,7 +240,7 @@
double thetay = coeffx * dthetay; double zcorrx = dx1 * (2 * sin(coeffx * dthetay)); double xcorr = zcorrx * tan((coeffx - 1) * dthetay);
- double xcenter = z0x * sin(coeffx * dthetay) + xcorr + xcorrtot + (crystalTolerance * ix);
+ double xcenter = z0x * sin(coeffx * dthetay) + xcorr + xcorrtot + (crystalToleranceX * ix);
double zcenter = z0y * (cos(coeffy * dthetax) - 1) + z0x * (cos(coeffx * dthetay) - 1) + zcorrx + zcorrtotx + zcorry + zcorrtoty; zcenter += dz;
diff -u -r1.6 -r1.7 --- HPSEcal3.java 4 Jun 2012 23:26:53 -0000 1.6 +++ HPSEcal3.java 11 Jun 2012 22:32:04 -0000 1.7 @@ -8,7 +8,6 @@
import java.util.ArrayList; import java.util.List;
-import org.jdom.DataConversionException;
import org.jdom.Element; import org.jdom.JDOMException; import org.lcsim.geometry.compact.converter.lcdd.util.Define;
@@ -57,14 +56,16 @@
* @author Jeremy McCormick * @author Tim Nelson *
- * @version $Id: HPSEcal3.java,v 1.6 2012/06/04 23:26:53 jeremy Exp $
+ * @version $Id: HPSEcal3.java,v 1.7 2012/06/11 22:32:04 jeremy Exp $
*/ public class HPSEcal3 extends LCDDSubdetector { // Tolerance factor for moving crystals to appropriate place in mom volume. static final double tolerance = 0.0; // Tolerance factor for separating crystals to avoid overlaps.
- static final double crystalTolerance = 0.15;
+ //static final double crystalTolerance = 0.15;
+ static final double crystalToleranceY = 0.35;
+ static final double crystalToleranceX = 0.2;
// Margin for mother volume. static final double margin = 1.1;
@@ -240,7 +241,7 @@
double thetax = coeffy * dthetax; double zcorry = dy1 * (2 * sin(coeffy * dthetax)); double ycorr = zcorry * tan((coeffy - 1) * dthetax);
- double ycenter = z0y * sin(coeffy * dthetax) + ycorr + ycorrtot + (crystalTolerance * iy);
+ double ycenter = z0y * sin(coeffy * dthetax) + ycorr + ycorrtot + (crystalToleranceY * iy);
double thetaz = 0; for (int ix = 0; ix <= nx; ix++) {
@@ -257,7 +258,7 @@
double thetay = coeffx * dthetay; double zcorrx = dx1 * (2 * sin(coeffx * dthetay)); double xcorr = zcorrx * tan((coeffx - 1) * dthetay);
- double xcenter = z0x * sin(coeffx * dthetay) + xcorr + xcorrtot + (crystalTolerance * ix);
+ double xcenter = z0x * sin(coeffx * dthetay) + xcorr + xcorrtot + (crystalToleranceX * ix);
double zcenter = z0y * (cos(coeffy * dthetax) - 1) + z0x * (cos(coeffx * dthetay) - 1) + zcorrx + zcorrtotx + zcorry + zcorrtoty; zcenter += dz;
@@ -270,8 +271,8 @@
if (checkRange(ix, -iy, ranges)) { // Transform of positive bottom crystal. Position iposBot = new Position(baseName + "_pos_pos_bot", xcenter + bdx, -(beamgap + ycenter + tolerance) + bdy, zcenter + tolerance + dface + bdz);
- // System.out.println("iposBot = " + iposBot.x() + ", " + iposBot.y() + " , " + - // iposBot.z() + " --> " + ix + ", " + -iy);
+ + System.out.println("iposBot = " + iposBot.x() + ", " + iposBot.y() + " , " + iposBot.z() + " --> " + ix + ", " + -iy);
Rotation irotBot = new Rotation(baseName + "_rot_pos_bot", -thetax, -thetay, thetaz); define.addPosition(iposBot); define.addRotation(irotBot);
@@ -290,6 +291,7 @@
if (checkRange(-ix, -iy, ranges)) { // Transform of negative. Position iposnegBot = new Position(baseName + "_pos_neg_bot", -xcenter + bdx, -(beamgap + ycenter + tolerance) + bdy, zcenter + tolerance + dface + bdz);
+ System.out.println("iposnegBot = " + iposnegBot.x() + ", " + iposnegBot.y() + " , " + iposnegBot.z() + " --> " + -ix + ", " + -iy);
Rotation irotnegBot = new Rotation(baseName + "_rot_neg_bot", -thetax, thetay, thetaz); define.addPosition(iposnegBot);
@@ -308,6 +310,7 @@
if (checkRange(ix, iy, ranges)) { // Transform of positive top crystal. Position iposTop = new Position(baseName + "_pos_pos_top", xcenter + tdx, beamgap + ycenter + tolerance + tdy, zcenter + tolerance + dface + tdz);
+ System.out.println("iposTop = " + iposTop.x() + ", " + iposTop.y() + " , " + iposTop.z() + " --> " + ix + ", " + iy);
Rotation irotTop = new Rotation(baseName + "_rot_pos_top", thetax, -thetay, thetaz); define.addPosition(iposTop); define.addRotation(irotTop);
@@ -326,6 +329,7 @@
if (checkRange(-ix, iy, ranges)) { // Transform of negative. Position iposnegTop = new Position(baseName + "_pos_neg_top", -xcenter + tdx, beamgap + ycenter + tolerance + tdy, zcenter + tolerance + dface + tdz);
+ System.out.println("iposTop = " + iposnegTop.x() + ", " + iposnegTop.y() + " , " + iposnegTop.z() + " --> " + -ix + ", " + iy);
Rotation irotnegTop = new Rotation(baseName + "_rot_neg_top", thetax, thetay, thetaz); define.addPosition(iposnegTop);
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1