GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
diff -u -r1.2 -r1.3
--- SiStripTrackerBarrel.java 29 Sep 2006 17:41:48 -0000 1.2
+++ SiStripTrackerBarrel.java 29 Sep 2006 21:37:20 -0000 1.3
@@ -114,6 +114,9 @@
// Radius of the module center.
double rc = rphi_layout.getAttribute("rc").getDoubleValue();
+ // The delta radius of every other module.
+ double rphi_dr = rphi_layout.getAttribute("dr").getDoubleValue();
+
// Phi increment for one module.
double phi_incr = (Math.PI * 2) / nphi;
@@ -132,7 +135,7 @@
assert (nz > 0);
// Radial displacement parameter, of every other module.
- double dr = z_layout.getAttribute("dr").getDoubleValue();
+ double z_dr = z_layout.getAttribute("dr").getDoubleValue();
// Z increment for module placement along Z axis.
// Adjust for z0 at center of module rather than
@@ -175,11 +178,11 @@
for (int ii = 0; ii < nphi; ii++)
{
// Delta x of module position.
- double dx = dr * cos(phic + phi_tilt);
+ double dx = z_dr * cos(phic + phi_tilt);
// Delta y of module position.
- double dy = dr * sin(phic + phi_tilt);
-
+ double dy = z_dr * sin(phic + phi_tilt);
+
// Basic x module position.
double x = rc * cos(phic);
@@ -247,6 +250,12 @@
// Increment the phi placement of module.
phic += phi_incr;
+
+ // Increment the center radius according to dr parameter.
+ rc += rphi_dr;
+
+ // Flip sign of dr parameter.
+ rphi_dr *= -1;
// Reset the Z placement parameter for module.
module_z = -z0;