LISTSERV mailing list manager LISTSERV 16.5

Help for LCDET-SVN Archives


LCDET-SVN Archives

LCDET-SVN Archives


LCDET-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

LCDET-SVN Home

LCDET-SVN Home

LCDET-SVN  November 2014

LCDET-SVN November 2014

Subject:

r3429 - /projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014GeometryDefinition.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the lcdet svn repository <[log in to unmask]>

Date:

Tue, 25 Nov 2014 01:20:24 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (674 lines)

Author: phansson
Date: Mon Nov 24 17:20:20 2014
New Revision: 3429

Log:
Adding top modules correctly. Fixed kin mount offsets for U-supports.

Modified:
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014GeometryDefinition.java

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014GeometryDefinition.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014GeometryDefinition.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014GeometryDefinition.java	Mon Nov 24 17:20:20 2014
@@ -246,16 +246,16 @@
     
     
     /**
-     * @SurveyVolume volume defining the coordinate system of the support ring in the SVT box coordinate system
-     *  Reference: tracker envelope coordinate system.
-     *  Origin: pin position of support ring (it's on the electron side)
-     *  Orientation: hole position is vee position (it's on the positron side).
+     * @SurveyVolume volume defining the coordinate system of the support ring
+     *  Reference: @SvtBoxBasePlate
+     *  Origin: pin position of support ring (electron side)
+     *  Orientation: slot position is vee position (positron side) i.e u points towards the positron side and v in the upstream beam direction
      *  
      * @author Per Hansson Adrian <[log in to unmask]>
      *
      */
     public static class SupportRing extends SurveyVolume {
-        private static final double plate_thickness = 0.25*inch; // TODO not sure if this is correct
+        private static final double plateThickness = 0.35*inch; 
 
         public SupportRing(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
            super(name, mother, alignmentCorrection, ref);
@@ -268,9 +268,6 @@
             // do nothing
         }
         protected void setPos() {
-
-            //if(debug) 
-            //System.out.printf("%s: setPos\n", this.getClass().getSimpleName());
 
             final double ball_pos_x = -SvtBoxBasePlate.kin_mount_to_edge_of_plate_x + SvtBoxBasePlate.width/2.0 - 6.622*inch;
             final double ball_pos_y = -SvtBoxBasePlate.kin_mount_to_edge_of_plate_y + SvtBoxBasePlate.length -28.531*inch;
@@ -285,23 +282,12 @@
             ballPos = new BasicHep3Vector(ball_pos_x, ball_pos_y, ball_pos_z);
             veePos = new BasicHep3Vector(vee_pos_x, vee_pos_y, vee_pos_z);
             flatPos = new BasicHep3Vector(0,0,0);
-            //if(debug) {
-            //System.out.printf("%s: before setting flat:\n", this.getClass().getSimpleName());
-            //printSurveyPos();
-            //}
+
             Hep3Vector uPrime = VecOp.unit(VecOp.sub(veePos, ballPos));
-            //TransformationUtils.getCardanAngles(new BasicHep3Vector(1,0,0), uPrime, u_prime, v_prime)
             Rotation r = new Rotation(new Vector3D(1,0,0),new Vector3D(0,0,1), new Vector3D(uPrime.v()), new Vector3D(0,0,1));
             Hep3Vector vPrime = new BasicHep3Vector(r.applyTo(new Vector3D(0, 1, 0)).toArray());
             flatPos = VecOp.add(ballPos, vPrime);
-            //if(debug) {
-            //System.out.printf("%s: after setting flat:\n", this.getClass().getSimpleName());
-            //printSurveyPos();
-            //}
-            
-            
-        }
-        
+        }
     }
    
     
@@ -314,7 +300,7 @@
      */
     public abstract static class SupportRingL13KinMount extends SurveyVolume {
 
-        public static final double kin_mount_offset_vertically = 0.113*inch; // TODO fix this offset
+        public static final double kin_mount_offset_vertically = 0.093*inch; 
         
         public SupportRingL13KinMount(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
            super(name, mother, alignmentCorrection, ref);
@@ -346,7 +332,7 @@
 
             final double ball_pos_x = (7.0 - 5.444) *inch;
             final double ball_pos_y = 0.574*inch;
-            final double ball_pos_z = SupportRing.plate_thickness + kin_mount_offset_vertically;
+            final double ball_pos_z = SupportRing.plateThickness + kin_mount_offset_vertically;
             ballPos = new BasicHep3Vector(ball_pos_x, ball_pos_y, ball_pos_z);
             
             final double vee_pos_x = (2*7.0)*inch;
@@ -372,9 +358,7 @@
      *
      */
     public static class SupportRingL13TopKinMount extends SupportRingL13KinMount {
-        
-        // TODO Check this offset
-        public static final double offset_vertically_wrt_bottom = 200.0;
+        public static final double mount_surface_wrt_baseplate_vertically = 5.388*inch;
 
         public SupportRingL13TopKinMount(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
            super(name, mother, alignmentCorrection, ref);
@@ -385,7 +369,7 @@
             // These are the same as for the bottom kin mounts except for the vertical offset
             final double ball_pos_x = (7.0 - 5.444) *inch;
             final double ball_pos_y = 0.574*inch;
-            final double ball_pos_z = SupportRing.plate_thickness + kin_mount_offset_vertically + offset_vertically_wrt_bottom;
+            final double ball_pos_z = mount_surface_wrt_baseplate_vertically + kin_mount_offset_vertically;
             ballPos = new BasicHep3Vector(ball_pos_x, ball_pos_y, ball_pos_z);
             
             final double vee_pos_x = (2*7.0)*inch;
@@ -462,10 +446,9 @@
             setCenter(x,y,z);
         }
         protected void setPos() {
-            //locate cone from pin hole
             final double ball_pos_x = 4*inch;
             final double ball_pos_y = (4.175 + 2*3.937) * inch; 
-            final double ball_pos_z = side_plate_cone_y; // TODO need to find distance to surface from kin mount
+            final double ball_pos_z = -SupportRingL13KinMount.kin_mount_offset_vertically + UChannelL13Plate.height + side_plate_cone_y; 
             
             ballPos = new BasicHep3Vector(ball_pos_x, ball_pos_y, ball_pos_z);
             veePos = new BasicHep3Vector(ballPos.x()-1, ballPos.y(), ballPos.z());
@@ -482,7 +465,8 @@
      * @SurveyVolume volume defining the coordinate system of the top L1-3 u-channel 
      *  Reference: SupportRingL13TopKinMount coordinate system
      *  Origin: midpoint between upstream survey cones
-     *  Orientation: u - width pointing towards electron side, v - pointing along the U-channel in the beam direction
+     *  Orientation: u - width pointing towards positron side, v - pointing along the U-channel in the beam direction
+     *  Note that this is flipped w.r.t. bottom support.
      *  
      *  @author Per Hansson Adrian <[log in to unmask]>
      *
@@ -490,7 +474,7 @@
     public static class UChannelL13Top extends UChannelL13 {
         public final static double length = UChannelL13TopPlate.length;
         public static final double kin_mount_to_edge_of_plate_y = length-15.8*inch;
-        public final static double cone_to_edge_of_plate_y = 12.25*inch; 
+        public final static double cone_to_edge_of_plate_y = 10.999*inch; 
         public final static double cone_to_L1_hole_y = cone_to_edge_of_plate_y - kin_mount_to_edge_of_plate_y; 
         public UChannelL13Top(String name, SurveyVolume m,
                 AlignmentCorrection alignmentCorrection,
@@ -505,16 +489,15 @@
             setCenter(x,y,z);
         }
         protected void setPos() {
-            //locate cone from pin hole
             final double ball_pos_x = 4*inch;
-            final double ball_pos_y = (4.175 + 2*3.937) * inch; 
-            final double ball_pos_z = side_plate_cone_y; // TODO need to find distance to surface from kin mount
-            
+            final double ball_pos_y = (4.175 + 2*3.937) * inch;
+            // TODO need to find proper position of from kin mount
+            final double ball_pos_z = SupportRingL13KinMount.kin_mount_offset_vertically - side_plate_cone_y; 
+            // The coordinate system is flipped pi around v compared to bottom
             ballPos = new BasicHep3Vector(ball_pos_x, ball_pos_y, ball_pos_z);
-            veePos = new BasicHep3Vector(ballPos.x()-1, ballPos.y(), ballPos.z());
+            veePos = new BasicHep3Vector(ballPos.x()+1, ballPos.y(), ballPos.z());
             flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()-1, ballPos.z());
         }
-        
         protected double getLength() {
            return length;
         }
@@ -536,6 +519,7 @@
         public final static double module_mounting_hole_to_hole_x =3.937*inch;
         public static final double width = 9.25*inch;
         public static final double height = 0.375*inch;
+        public final static double length = 16.0*inch;
         
         public UChannelL13Plate(String name, SurveyVolume m,
                 AlignmentCorrection alignmentCorrection) {
@@ -570,7 +554,9 @@
         public double getWidth() {
             return width;
         }
-        public abstract double getLength();
+        public double getLength() { 
+            return length;
+        }
         public double getHeight() {
             return height;
         }
@@ -588,7 +574,6 @@
      *
      */
     public static class UChannelL13BottomPlate extends UChannelL13Plate {
-        public final static double length = 16.0*inch;
         public UChannelL13BottomPlate(String name, SurveyVolume m,
                 AlignmentCorrection alignmentCorrection) {
             super(name, m, alignmentCorrection);
@@ -602,10 +587,6 @@
             setCenter(x,y,z);
         }
 
-        public double getLength() {
-            return length;
-        }
-       
     }
     
     /**
@@ -717,9 +698,9 @@
      */
     public static class UChannelL46Top extends UChannelL46 {
         // TODO change these to the top coordinates taken from Shawn's 3D model
-        protected static final double cone_x = UChannelL46Bottom.cone_x;
-        protected static final double cone_y = UChannelL46Bottom.cone_y;
-        protected static final double cone_z = UChannelL46Bottom.cone_z + 200.0;
+        protected static final double cone_x = -6.997*inch;
+        protected static final double cone_y = SvtBox.length/2.0 - 31.643*inch; //TODO is this 31.643 or 31.043?
+        protected static final double cone_z = -1*UChannelL46Bottom.cone_z;
         
         public UChannelL46Top(String name, SurveyVolume m,
                 AlignmentCorrection alignmentCorrection) {
@@ -738,7 +719,7 @@
             final double ball_pos_y = cone_y;
             final double ball_pos_z = cone_z;
             ballPos = new BasicHep3Vector(ball_pos_x, ball_pos_y, ball_pos_z);
-            veePos = new BasicHep3Vector(ballPos.x()-1, ballPos.y(), ballPos.z());
+            veePos = new BasicHep3Vector(ballPos.x()+1, ballPos.y(), ballPos.z());
             flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()-1, ballPos.z());
         }
     }
@@ -893,24 +874,44 @@
         protected void setBoxDim() {
             setBoxDim(width, length, height);
         }
-        protected void setPos() {
-            ballPos = getHole();
+        protected abstract void setPos();
+        
+        protected abstract Hep3Vector getHolePosition();
+    }
+    
+    public abstract static class ModuleL13Top extends ModuleL13 {
+        public ModuleL13Top(String name, SurveyVolume mother,
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+            super(name, mother, alignmentCorrection, ref);
+        }
+        protected void setPos() {
+            ballPos = getHolePosition();
+            veePos = new BasicHep3Vector(ballPos.x(), ballPos.y(), ballPos.z()-1.0);
+            flatPos = new BasicHep3Vector(ballPos.x()+1, ballPos.y(), ballPos.z());
+        }
+    }
+    
+    public abstract static class ModuleL13Bot extends ModuleL13 {
+        public ModuleL13Bot(String name, SurveyVolume mother,
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+            super(name, mother, alignmentCorrection, ref);
+        }
+        protected void setPos() {
+            ballPos = getHolePosition();
             veePos = new BasicHep3Vector(ballPos.x(), ballPos.y(), ballPos.z()-1.0);
             flatPos = new BasicHep3Vector(ballPos.x()-1, ballPos.y(), ballPos.z());
         }
-        protected abstract Hep3Vector getHole();
-    }
-    
-    
-    public static class ModuleL1 extends ModuleL13 {
-
-        public ModuleL1(String name, SurveyVolume mother,
+    }
+    
+    
+    public static class ModuleL1Bot extends ModuleL13Bot {
+
+        public ModuleL1Bot(String name, SurveyVolume mother,
                 AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, mother, alignmentCorrection, ref);
             init();
         }
-        protected Hep3Vector getHole() {
-            //hole position (sensor side)
+        protected Hep3Vector getHolePosition() {
             double x = hole_to_center_of_plate_width_dir;
             double y = 0.0; // TODO assume that cone and module mount pin hole is at same y. Check if true.
             double z = -UChannelL13.side_plate_cone_y - UChannelL13Plate.pocket_depth_L1;
@@ -919,15 +920,34 @@
         
     }
     
-    
-    public static class ModuleL2 extends ModuleL13 {
-
-        public ModuleL2(String name, SurveyVolume mother,
+   
+    public static class ModuleL1Top extends ModuleL13Top {
+
+        public ModuleL1Top(String name, SurveyVolume mother,
                 AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, mother, alignmentCorrection, ref);
             init();
         }
-        protected Hep3Vector getHole() {
+       
+        protected Hep3Vector getHolePosition() {
+            double x = -1.0*hole_to_center_of_plate_width_dir; // not minus sign compared to bottom
+            double y = 0.0; // TODO assume that cone and module mount pin hole is at same y. Check if true.
+            double z = -UChannelL13.side_plate_cone_y - UChannelL13Plate.pocket_depth_L1;
+            return new BasicHep3Vector(x, y, z);
+        }
+        
+    }
+    
+    
+    
+    public static class ModuleL2Bot extends ModuleL13Bot {
+
+        public ModuleL2Bot(String name, SurveyVolume mother,
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+            super(name, mother, alignmentCorrection, ref);
+            init();
+        }
+        protected Hep3Vector getHolePosition() {
             //hole position (sensor side)
             double x = hole_to_center_of_plate_width_dir;
             double y = UChannelL13Plate.module_mounting_hole_to_hole_x;
@@ -937,14 +957,34 @@
         
     }
     
-    public static class ModuleL3 extends ModuleL13 {
-
-        public ModuleL3(String name, SurveyVolume mother,
+    public static class ModuleL2Top extends ModuleL13Top {
+
+        public ModuleL2Top(String name, SurveyVolume mother,
                 AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, mother, alignmentCorrection, ref);
             init();
         }
-        protected Hep3Vector getHole() {
+       
+        protected Hep3Vector getHolePosition() {
+            double x = -1.0*hole_to_center_of_plate_width_dir; // not minus sign compared to bottom
+            double y = UChannelL13Plate.module_mounting_hole_to_hole_x; 
+            double z = -UChannelL13.side_plate_cone_y - UChannelL13Plate.pocket_depth_L2;
+            return new BasicHep3Vector(x, y, z);
+        }
+        
+    }
+    
+    
+    
+    
+    public static class ModuleL3Bot extends ModuleL13Bot {
+
+        public ModuleL3Bot(String name, SurveyVolume mother,
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+            super(name, mother, alignmentCorrection, ref);
+            init();
+        }
+        protected Hep3Vector getHolePosition() {
             //hole position (sensor side)
             double x = hole_to_center_of_plate_width_dir;
             double y = 2*UChannelL13Plate.module_mounting_hole_to_hole_x;
@@ -954,17 +994,29 @@
         
     }
         
-    
+    public static class ModuleL3Top extends ModuleL13Top {
+
+        public ModuleL3Top(String name, SurveyVolume mother,
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+            super(name, mother, alignmentCorrection, ref);
+            init();
+        }
+       
+        protected Hep3Vector getHolePosition() {
+            double x = -1.0*hole_to_center_of_plate_width_dir; // not minus sign compared to bottom
+            double y = 2*UChannelL13Plate.module_mounting_hole_to_hole_x; 
+            double z = -UChannelL13.side_plate_cone_y - UChannelL13Plate.pocket_depth_L2;
+            return new BasicHep3Vector(x, y, z);
+        }
+        
+    }
     
     
     
    
     
     /**
-     * @SurveyVolume volume defining the coordinate system of module L4-6
-     * Reference:  @UChannelL46Bottom coordinate system
-     * Origin:  hole position on mounting surface (electron side)
-     * Orientation: u - is normal to the surface pointing vertically down, v - points along module towards positron side.
+     * Abstract @SurveyVolume volume defining the coordinate system of module L4-6
      * 
      * @author Per Hansson Adrian <[log in to unmask]>
      *
@@ -996,20 +1048,59 @@
         protected void setBoxDim() {
             setBoxDim(width, length, height);
         }
+        protected abstract void setPos();
+        protected abstract Hep3Vector getHole();
+    }
+    
+    
+    /**
+     * Abstract @SurveyVolume volume defining the coordinate system of bottom modules for L4-6
+     * Reference:  @UChannelL46Bottom coordinate system
+     * Origin:  hole position on mounting surface (electron side)
+     * Orientation: u - is normal to the mounting surface pointing vertically down, v - points along module towards positron side.
+     * 
+     * @author Per Hansson Adrian <[log in to unmask]>
+     *
+     */
+    public static abstract class ModuleL46Bot extends ModuleL46 {
+
+        public ModuleL46Bot(String name, SurveyVolume mother,
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+            super(name, mother, alignmentCorrection, ref);
+        }
         protected void setPos() {
             ballPos = getHole();
             veePos = new BasicHep3Vector(ballPos.x(), ballPos.y(), ballPos.z()-1.0);
             flatPos = new BasicHep3Vector(ballPos.x()-1.0, ballPos.y(), ballPos.z());
         }
-        protected abstract Hep3Vector getHole();
-    }
-    
-    
-    
-    
-    public static class ModuleL4 extends ModuleL46 {
-
-        public ModuleL4(String name, SurveyVolume mother,
+    }
+    
+    /**
+     * Abstract @SurveyVolume volume defining the coordinate system of top modules for L4-6
+     * Reference:  @UChannelL46Top coordinate system
+     * Origin:  hole position on mounting surface (electron side when installed)
+     * Orientation: u - is normal to the mounting surface pointing vertically down, v - points along module towards electron side when installed.
+     * 
+     * @author Per Hansson Adrian <[log in to unmask]>
+     *
+     */
+    public static abstract class ModuleL46Top extends ModuleL46 {
+
+        public ModuleL46Top(String name, SurveyVolume mother,
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+            super(name, mother, alignmentCorrection, ref);
+        }
+        protected void setPos() {
+            ballPos = getHole();
+            veePos = new BasicHep3Vector(ballPos.x(), ballPos.y(), ballPos.z()-1.0);
+            flatPos = new BasicHep3Vector(ballPos.x()+1.0, ballPos.y(), ballPos.z());
+        }
+    }
+    
+    
+    public static class ModuleL4Bot extends ModuleL46Bot {
+
+        public ModuleL4Bot(String name, SurveyVolume mother,
                 AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, mother, alignmentCorrection, ref);
             init();
@@ -1024,10 +1115,27 @@
         
     }
     
-
-    public static class ModuleL5 extends ModuleL46 {
-
-        public ModuleL5(String name, SurveyVolume mother,
+    public static class ModuleL4Top extends ModuleL46Top {
+
+        public ModuleL4Top(String name, SurveyVolume mother,
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+            super(name, mother, alignmentCorrection, ref);
+            init();
+        }
+
+        protected Hep3Vector getHole() {
+            double x = -1*hole_to_center_of_plate_width_dir;   
+            double y = 0.0; // TODO assume that cone and module mount pin hole is at same y. Check if true.
+            double z = -UChannelL46.side_plate_cone_y - UChannelL46Plate.pocket_depth_L4;
+            return new BasicHep3Vector(x, y, z);
+        }
+        
+    }
+    
+    
+    public static class ModuleL5Bot extends ModuleL46Bot {
+
+        public ModuleL5Bot(String name, SurveyVolume mother,
                 AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, mother, alignmentCorrection, ref);
             init();
@@ -1041,17 +1149,51 @@
         }
 
     }
-
-    public static class ModuleL6 extends ModuleL46 {
-
-        public ModuleL6(String name, SurveyVolume mother,
+    
+    public static class ModuleL5Top extends ModuleL46Top {
+
+        public ModuleL5Top(String name, SurveyVolume mother,
                 AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, mother, alignmentCorrection, ref);
             init();
         }
 
         protected Hep3Vector getHole() {
+            double x = -1*hole_to_center_of_plate_width_dir;   
+            double y = UChannelL46Plate.module_mounting_hole_to_hole_x; 
+            double z = -UChannelL46.side_plate_cone_y - UChannelL46Plate.pocket_depth_L5;
+            return new BasicHep3Vector(x, y, z);
+        }
+
+    }
+
+    public static class ModuleL6Bot extends ModuleL46Bot {
+
+        public ModuleL6Bot(String name, SurveyVolume mother,
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+            super(name, mother, alignmentCorrection, ref);
+            init();
+        }
+
+        protected Hep3Vector getHole() {
             double x = hole_to_center_of_plate_width_dir;   
+            double y = 2.0*UChannelL46Plate.module_mounting_hole_to_hole_x; 
+            double z = -UChannelL46.side_plate_cone_y - UChannelL46Plate.pocket_depth_L6;
+            return new BasicHep3Vector(x, y, z);
+        }
+
+    }
+    
+    public static class ModuleL6Top extends ModuleL46Top {
+
+        public ModuleL6Top(String name, SurveyVolume mother,
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+            super(name, mother, alignmentCorrection, ref);
+            init();
+        }
+
+        protected Hep3Vector getHole() {
+            double x = -hole_to_center_of_plate_width_dir;   
             double y = 2.0*UChannelL46Plate.module_mounting_hole_to_hole_x; 
             double z = -UChannelL46.side_plate_cone_y - UChannelL46Plate.pocket_depth_L6;
             return new BasicHep3Vector(x, y, z);
@@ -1226,7 +1368,7 @@
 
     /**
      * @SurveyVolume volume defining the coordinate system of the axial half-module in module L1-3
-     * Reference:  @ModuleL13 coordinate system
+     * Reference:  @ModuleL13Bot coordinate system
      * Origin:  sensor center
      * Orientation: w - is normal to the surface pointing from p-side to n-side, v - points along strips away from signal bond pads
      * 
@@ -1234,25 +1376,23 @@
      *
      */
     public static class HalfModuleAxial extends HPSTestRunTracker2014GeometryDefinition.TestRunHalfModule {
-        
+        // Sensor positions from Shawn's 3D model
         public static final double sensor_x = -1.543*inch;
         public static final double sensor_y = 4.868*inch;
         public static final double sensor_z = -0.23*inch;
         
-        
         public HalfModuleAxial(String name, SurveyVolume mother,
                 AlignmentCorrection alignmentCorrection, int layer, String half) {
             super(name, mother, alignmentCorrection, layer, half);
             init();
         }
         protected void setPos() {
-            // Sensor positions from Shawn's 3D model
-            final double x = sensor_x;
-            final double y = sensor_y;
-            final double z = sensor_z;
-            ballPos = new BasicHep3Vector(x, y, z);
+            ballPos = getSensorPosition();
             veePos  = new BasicHep3Vector(ballPos.x()+1, ballPos.y(), ballPos.z());
             flatPos  = new BasicHep3Vector(ballPos.x(), ballPos.y()+1, ballPos.z());
+        }
+        protected Hep3Vector getSensorPosition() {
+            return new BasicHep3Vector(sensor_x, sensor_y, sensor_z);
         }
         protected void setCenter() {
             double x = -1.0 * (TestRunHalfModule.getWidth()/2.0 - ( 12.66 - (8.83 -3.00) + Sensor.width/2.0 ) ); 
@@ -1260,17 +1400,15 @@
             double z = -Sensor.getSensorThickness()/2.0 - HalfModuleLamination.thickness - CarbonFiber.thickness + half_module_thickness/2.0; 
             setCenter(x, y, z); 
         }
-        
-
-
-        
-    }
-    
-    
-    
+    }
+    
+    
+    
+    
+   
     /**
      * @SurveyVolume volume defining the coordinate system of the stereo half-module in module L1-3
-     * Reference:  @ModuleL13 coordinate system
+     * Reference:  @ModuleL13Bot coordinate system
      * Origin:  sensor center
      * Orientation: same as axial - the module is rotated later.
      * 
@@ -1410,20 +1548,38 @@
 
         //Create the module
         BaseModule module;
-        if(layer==1) {
-            module = new ModuleL1(volName, mother, alignmentCorrection, ref); 
-        } else if(layer==2) {
-            module = new ModuleL2(volName, mother, alignmentCorrection, ref); 
-        } else if(layer==3) {
-            module = new ModuleL3(volName, mother, alignmentCorrection, ref); 
-        } else if(layer==4) {
-            module = new ModuleL4(volName, mother, alignmentCorrection, ref); 
-        } else if(layer==5) {
-            module = new ModuleL5(volName, mother, alignmentCorrection, ref); 
-        } else if(layer==6) {
-            module = new ModuleL6(volName, mother, alignmentCorrection, ref); 
+        if(half == "bottom") {
+            if(layer==1) {
+                module = new ModuleL1Bot(volName, mother, alignmentCorrection, ref); 
+            } else if(layer==2) {
+                module = new ModuleL2Bot(volName, mother, alignmentCorrection, ref); 
+            } else if(layer==3) {
+                module = new ModuleL3Bot(volName, mother, alignmentCorrection, ref); 
+            } else if(layer==4) {
+                module = new ModuleL4Bot(volName, mother, alignmentCorrection, ref); 
+            } else if(layer==5) {
+                module = new ModuleL5Bot(volName, mother, alignmentCorrection, ref); 
+            } else if(layer==6) {
+                module = new ModuleL6Bot(volName, mother, alignmentCorrection, ref); 
+            } else {
+                throw new UnsupportedOperationException("Layer " + layer + " not implemented yet for bottom");
+            }
         } else {
-            throw new UnsupportedOperationException("Layer " + layer + " not implemented yet");
+            if(layer==1) {
+                module = new ModuleL1Top(volName, mother, alignmentCorrection, ref); 
+            } else if(layer==2) {
+                module = new ModuleL2Top(volName, mother, alignmentCorrection, ref); 
+            } else if(layer==3) {
+                module = new ModuleL3Top(volName, mother, alignmentCorrection, ref); 
+            } else if(layer==4) {
+                module = new ModuleL4Top(volName, mother, alignmentCorrection, ref); 
+            } else if(layer==5) {
+                module = new ModuleL5Top(volName, mother, alignmentCorrection, ref); 
+            } else if(layer==6) {
+                module = new ModuleL6Top(volName, mother, alignmentCorrection, ref); 
+            } else {
+                throw new UnsupportedOperationException("Layer " + layer + " not implemented yet for top");
+            }
         }
 
 

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use