Print

Print


Author: [log in to unmask]
Date: Fri Dec 12 11:34:48 2014
New Revision: 3450

Log:
New positions for U-channels. L1-3 sensors are now matching 3D model.

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	Fri Dec 12 11:34:48 2014
@@ -63,12 +63,17 @@
         SvtBoxBasePlate svtBoxBasePlate = new SvtBoxBasePlate("base_plate",svtBox,null);
         surveyVolumes.add(svtBoxBasePlate);
         
-        SupportRing supportRing = new SupportRing("c_support", svtBox, null, svtBoxBasePlate); 
-        surveyVolumes.add(supportRing);
+        //SupportRing supportRing = new SupportRing("c_support", svtBox, null, svtBoxBasePlate); 
+        //surveyVolumes.add(supportRing);
        
+//        AlignmentCorrection supBotCorr = this.getSupportAlignmentCorrection(false);
+//        SupportRingL13BottomKinMount supportRingKinL13Bottom = new SupportRingL13BottomKinMount("c_support_kin_L13b", svtBox, supBotCorr, supportRing); 
+//        surveyVolumes.add(supportRingKinL13Bottom);
+        
         AlignmentCorrection supBotCorr = this.getSupportAlignmentCorrection(false);
-        SupportRingL13BottomKinMount supportRingKinL13Bottom = new SupportRingL13BottomKinMount("c_support_kin_L13b", svtBox, supBotCorr, supportRing); 
+        SupportRingL13BottomKinMount supportRingKinL13Bottom = new SupportRingL13BottomKinMount("c_support_kin_L13b", svtBox, supBotCorr); 
         surveyVolumes.add(supportRingKinL13Bottom);
+        
         
         UChannelL13 uChannelL13Bottom = new UChannelL13Bottom("support_bottom_L13", svtBox, null, supportRingKinL13Bottom); 
         surveyVolumes.add(uChannelL13Bottom);
@@ -76,10 +81,15 @@
         UChannelL13Plate uChannelL13BottomPlate = new UChannelL13BottomPlate("support_plate_bottom_L13", svtBox, null, uChannelL13Bottom); 
         surveyVolumes.add(uChannelL13BottomPlate);
 
+//        AlignmentCorrection supTopCorr = this.getSupportAlignmentCorrection(true);
+//        SupportRingL13TopKinMount supportRingKinL13Top = new SupportRingL13TopKinMount("c_support_kin_L13t", svtBox, supTopCorr, supportRing); 
+//        surveyVolumes.add(supportRingKinL13Top);
+
         AlignmentCorrection supTopCorr = this.getSupportAlignmentCorrection(true);
-        SupportRingL13TopKinMount supportRingKinL13Top = new SupportRingL13TopKinMount("c_support_kin_L13t", svtBox, supTopCorr, supportRing); 
+        SupportRingL13TopKinMount supportRingKinL13Top = new SupportRingL13TopKinMount("c_support_kin_L13t", svtBox, supTopCorr); 
         surveyVolumes.add(supportRingKinL13Top);
 
+        
         UChannelL13Top uChannelL13Top = new UChannelL13Top("support_top_L13", svtBox, null, supportRingKinL13Top); 
         surveyVolumes.add(uChannelL13Top);
         
@@ -303,9 +313,11 @@
     public abstract static class SupportRingL13KinMount extends SurveyVolume {
 
         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);
+        protected static final double kin_mount_pos_x = -138.665;
+        protected static final double kin_mount_pos_y =  -67.855;
+
+        public SupportRingL13KinMount(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection) {
+           super(name, mother, alignmentCorrection);
         }
         protected void setCenter() {
             setCenter(null); //dummy
@@ -313,6 +325,62 @@
         protected void setBoxDim() {
             // do nothing
         }
+        protected void setPos() {
+            ballPos = new BasicHep3Vector(kin_mount_pos_x, kin_mount_pos_y, getKinMountVerticalPos());
+
+            final double vee_pos_x = ballPos.x()+1; // random positive offset
+            final double vee_pos_y = ballPos.y();
+            final double vee_pos_z = ballPos.z();
+            veePos = new BasicHep3Vector(vee_pos_x, vee_pos_y, vee_pos_z);
+
+            final double flat_pos_x = ballPos.x();
+            final double flat_pos_y = ballPos.y() + 1.0; // random positive offset
+            final double flat_pos_z = ballPos.z();
+            flatPos = new BasicHep3Vector(flat_pos_x,flat_pos_y,flat_pos_z);
+        }
+        abstract protected double getKinMountVerticalPos();
+    }
+    
+    /**
+     * @SurveyVolume volume defining a coordinate system from the kinematic mount positions for support channels
+     *  Reference: {@SvtBox} coordinate system
+     *  Origin: cone mount (it's on the electron side)
+     *  Orientation: ball is cone mount, slot mount is vee position and flat is along beamline pointing upstream
+     *  
+     * @author Per Hansson Adrian <[log in to unmask]>
+     *
+     */
+    public static class SupportRingL13BottomKinMount extends SupportRingL13KinMount {
+
+        protected static final double kin_mount_pos_z =  -67.996;
+
+        public SupportRingL13BottomKinMount(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection) {
+           super(name, mother, alignmentCorrection);
+           init();
+        }
+
+        @Override
+        protected double getKinMountVerticalPos() {
+            return kin_mount_pos_z;
+        }
+
+//        protected void setPos() {
+//            final double ball_pos_x = (7.0 - 5.444) *inch;
+//            final double ball_pos_y = 0.574*inch;
+//            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;
+//            final double vee_pos_y = ball_pos_y;
+//            final double vee_pos_z = ball_pos_z;
+//            veePos = new BasicHep3Vector(vee_pos_x, vee_pos_y, vee_pos_z);
+//            
+//            final double flat_pos_x = ball_pos_x;
+//            final double flat_pos_y = ball_pos_y + 1.0; // random distance
+//            final double flat_pos_z = ball_pos_z;
+//            flatPos = new BasicHep3Vector(flat_pos_x,flat_pos_y,flat_pos_z);
+//        }
+        
     }
     
     /**
@@ -324,67 +392,36 @@
      * @author Per Hansson Adrian <[log in to unmask]>
      *
      */
-    public static class SupportRingL13BottomKinMount extends SupportRingL13KinMount {
-
-        public SupportRingL13BottomKinMount(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
-           super(name, mother, alignmentCorrection, ref);
+    public static class SupportRingL13TopKinMount extends SupportRingL13KinMount {
+        //public static final double mount_surface_wrt_baseplate_vertically = 5.388*inch;
+        protected static final double kin_mount_pos_z =  56.857;
+
+        public SupportRingL13TopKinMount(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection) {
+           super(name, mother, alignmentCorrection);
            init();
         }
-        protected void setPos() {
-
-            final double ball_pos_x = (7.0 - 5.444) *inch;
-            final double ball_pos_y = 0.574*inch;
-            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;
-            final double vee_pos_y = ball_pos_y;
-            final double vee_pos_z = ball_pos_z;
-            veePos = new BasicHep3Vector(vee_pos_x, vee_pos_y, vee_pos_z);
-            
-            final double flat_pos_x = ball_pos_x;
-            final double flat_pos_y = ball_pos_y + 1.0; // random distance
-            final double flat_pos_z = ball_pos_z;
-            flatPos = new BasicHep3Vector(flat_pos_x,flat_pos_y,flat_pos_z);
-        }
-        
-    }
-    
-    /**
-     * @SurveyVolume volume defining a coordinate system from the kinematic mount positions for support channels
-     *  Reference: @SupportRing coordinate system
-     *  Origin: cone mount (it's on the electron side)
-     *  Orientation: ball is cone mount, slot mount is vee position and flat is along beamline pointing upstream
-     *  
-     * @author Per Hansson Adrian <[log in to unmask]>
-     *
-     */
-    public static class SupportRingL13TopKinMount extends SupportRingL13KinMount {
-        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);
-           init();
-        }
-        protected void setPos() {
-
-            // 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 = 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;
-            final double vee_pos_y = ball_pos_y;
-            final double vee_pos_z = ball_pos_z;
-            veePos = new BasicHep3Vector(vee_pos_x, vee_pos_y, vee_pos_z);
-            
-            final double flat_pos_x = ball_pos_x;
-            final double flat_pos_y = ball_pos_y + 1.0; // random distance
-            final double flat_pos_z = ball_pos_z;
-            flatPos = new BasicHep3Vector(flat_pos_x,flat_pos_y,flat_pos_z);
-        }
-        
+
+        @Override
+        protected double getKinMountVerticalPos() {
+            return kin_mount_pos_z;
+        }
+
+//        protected void setPos() {
+//            final double ball_pos_x = (7.0 - 5.444) *inch;
+//            final double ball_pos_y = 0.574*inch;
+//            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;
+//            final double vee_pos_y = ball_pos_y;
+//            final double vee_pos_z = ball_pos_z;
+//            veePos = new BasicHep3Vector(vee_pos_x, vee_pos_y, vee_pos_z);
+//            
+//            final double flat_pos_x = ball_pos_x;
+//            final double flat_pos_y = ball_pos_y + 1.0; // random distance
+//            final double flat_pos_z = ball_pos_z;
+//            flatPos = new BasicHep3Vector(flat_pos_x,flat_pos_y,flat_pos_z);
+//        }
     }
     
     
@@ -400,8 +437,7 @@
         public static final double kin_mount_to_edge_of_plate_x = width/2.0-4.0*inch;
         public static final double side_plate_cone_y = 2.0*inch;
 
-        public UChannelL13(String name, SurveyVolume m,
-                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+        public UChannelL13(String name, SurveyVolume m, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, m, alignmentCorrection, ref);
         }
 
@@ -429,12 +465,11 @@
      *
      */
     public static class UChannelL13Bottom extends UChannelL13 {
-        private static final double kin_mount_to_edge_of_plate_y = length-15.8*inch;
         private final static double cone_to_edge_of_plate_y = 12.25*inch; 
-        //private final static double cone_to_L1_hole_y = cone_to_edge_of_plate_y - kin_mount_to_edge_of_plate_y; 
+        private final static Hep3Vector ball_kinMount = new BasicHep3Vector(SupportRingL13BottomKinMount.kin_mount_pos_x,SupportRingL13BottomKinMount.kin_mount_pos_y,SupportRingL13BottomKinMount.kin_mount_pos_z);
+
         public UChannelL13Bottom(String name, SurveyVolume m,
-                AlignmentCorrection alignmentCorrection,
-                SurveyVolume ref) {
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, m, alignmentCorrection, ref);
             init();
         }
@@ -445,16 +480,85 @@
             setCenter(x,y,z);
         }
         protected void setPos() {
-            final double ball_pos_x = 4*inch;
-            //final double ball_pos_y = (4.175 + 2*3.937) * inch; 
-            final double ball_pos_y =  cone_to_edge_of_plate_y - kin_mount_to_edge_of_plate_y;
-            final double ball_pos_z = -UChannelPlate.dist_from_plate_surface_to_pivot_point + UChannelL13Plate.height + side_plate_cone_y; 
+            ballPos = VecOp.sub(UChannelL13BottomSurveyBalls.ball_pos, ball_kinMount);
+            Hep3Vector veeOffset = UChannelL13BottomSurveyBalls.getVeeOffset();
+            veePos = VecOp.add(ballPos, veeOffset);
+            Hep3Vector flatOffset = UChannelL13BottomSurveyBalls.getFlatOffset();
+            flatPos = VecOp.add(ballPos, flatOffset);
             
-            ballPos = new BasicHep3Vector(ball_pos_x, ball_pos_y, ball_pos_z);
-            veePos = new BasicHep3Vector(ballPos.x()-1, ballPos.y(), ballPos.z());
-            flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()-1, ballPos.z());
-        }
-    }
+//            ballPos = VecOp.sub(UChannelL13BottomSurveyBalls.ball_pos, ball_kinMount);
+//            veePos = new BasicHep3Vector(ballPos.x()-1, ballPos.y(), ballPos.z());
+//            flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()-1, ballPos.z());
+        }
+    }
+    
+    
+    
+    /**
+     * Position of the center of the survey balls when engaging the cones in the side plates of the U-channel. 
+     * This is at nominal position.
+     * 
+     * @author Per Hansson Adrian <[log in to unmask]>
+     *
+     */
+    private static class UChannelL13BottomSurveyBalls  {
+        
+     // Shawn's calculated point at midpoint between two forward survey balls
+        protected final static Hep3Vector ball_pos = new BasicHep3Vector(-46.446, 241.184, -8.423);
+
+        //Nominal Design  FWD Right (x,y,z)   BWD Right (x,y,z)   FWD Left (x,y,z,)   BWD Left (x,y,z)
+        //
+        //Layer 1-3, Lower     -6.493, -.332, 9.353    -6.253, -.332, 1.483    2.836, -.332, 9.638     3.076, -.332, 1.767
+        //                
+        //Layer 1-3, Upper     -6.512, .332, 9.978     -6.272, .332, 2.107     2.817, .332, 10.262     3.057, .332, 2.392
+
+        
+        protected static final Hep3Vector fwd_right = new BasicHep3Vector(-6.493, 9.353,-.332);
+        protected static final Hep3Vector bwd_right = new BasicHep3Vector(-6.253, 1.483, -.332);
+        protected static final Hep3Vector fwd_left = new BasicHep3Vector( 2.836, 9.638, -.332);
+        protected static final Hep3Vector bwd_left = new BasicHep3Vector(3.076, 1.767, -.332);
+        
+        protected static Hep3Vector getVeeOffset() {
+            return  VecOp.mult(0.5,VecOp.sub(fwd_right, fwd_left));
+        }
+        protected static Hep3Vector getFlatOffset() {
+            return VecOp.sub(bwd_right, fwd_right);
+        }
+    }
+    
+    
+    
+    
+    
+    
+//    public static class UChannelL13Bottom extends UChannelL13 {
+//        private static final double kin_mount_to_edge_of_plate_y = length-15.8*inch;
+//        private final static double cone_to_edge_of_plate_y = 12.25*inch; 
+//        //private final static double cone_to_L1_hole_y = cone_to_edge_of_plate_y - kin_mount_to_edge_of_plate_y; 
+//        public UChannelL13Bottom(String name, SurveyVolume m,
+//                AlignmentCorrection alignmentCorrection,
+//                SurveyVolume ref) {
+//            super(name, m, alignmentCorrection, ref);
+//            init();
+//        }
+//        protected void setCenter() {
+//            final double x = 0.0;
+//            final double y = cone_to_edge_of_plate_y - length/2.0;
+//            final double z = -side_plate_cone_y - UChannelL13Plate.height + height/2.0;
+//            setCenter(x,y,z);
+//        }
+//        protected void setPos() {
+//            final double ball_pos_x = 4*inch;
+//            //final double ball_pos_y = (4.175 + 2*3.937) * inch; 
+//            final double ball_pos_y =  cone_to_edge_of_plate_y - kin_mount_to_edge_of_plate_y;
+//            final double ball_pos_z = -UChannelPlate.dist_from_plate_surface_to_pivot_point + 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());
+//            flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()-1, ballPos.z());
+//        }
+//    }
+    
     
     /**
      * @SurveyVolume volume defining the coordinate system of the top L1-3 u-channel 
@@ -467,15 +571,16 @@
      *
      */
     public static class UChannelL13Top extends UChannelL13 {
+        private final static Hep3Vector ball_kinMount = new BasicHep3Vector(SupportRingL13TopKinMount.kin_mount_pos_x,SupportRingL13TopKinMount.kin_mount_pos_y,SupportRingL13TopKinMount.kin_mount_pos_z);
+
         private final static double length = UChannelL13.length;
-        private static final double kin_mount_to_edge_of_plate_y = length-15.8*inch;
+        //private static final double kin_mount_to_edge_of_plate_y = length-15.8*inch;
         private final static double cone_to_side_plate_pin_y = (14.5-3.125)*inch; 
         private final static double side_plate_pin_to_edge_of_plate_y = (16.0-14.5)*inch; 
         private final static double cone_to_edge_of_plate_y = cone_to_side_plate_pin_y + side_plate_pin_to_edge_of_plate_y;
         
         public UChannelL13Top(String name, SurveyVolume m,
-                AlignmentCorrection alignmentCorrection,
-                SurveyVolume ref) {
+                AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, m, alignmentCorrection, ref);
             init();
         }
@@ -486,19 +591,93 @@
             setCenter(x,y,z);
         }
         protected void setPos() {
-            final double ball_pos_x = 4*inch;
-            final double ball_pos_y = cone_to_edge_of_plate_y - kin_mount_to_edge_of_plate_y;
-            final double ball_pos_z = SupportRingL13KinMount.kin_mount_offset_vertically - side_plate_cone_y; 
-            // Note that this coordinate system is flipped pi 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());
-            flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()-1, ballPos.z());
+            ballPos = VecOp.sub(UChannelL13TopSurveyBalls.ball_pos, ball_kinMount);
+            Hep3Vector veeOffset = UChannelL13TopSurveyBalls.getVeeOffset();
+            veePos = VecOp.add(ballPos, veeOffset);
+            Hep3Vector flatOffset = UChannelL13TopSurveyBalls.getFlatOffset();
+            flatPos = VecOp.add(ballPos, flatOffset);
+            
+//            ballPos = VecOp.sub(UChannelL13TopSurveyBalls.ball_pos, ball_kinMount);
+//            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;
         }
     }
 
+    
+    
+    /**
+     * Position of the center of the survey balls when engaging the cones in the side plates of the U-channel. 
+     * This is at nominal position.
+     * 
+     * @author Per Hansson Adrian <[log in to unmask]>
+     *
+     */
+    private static class UChannelL13TopSurveyBalls  {
+        
+     // Shawn's calculated point at midpoint between two forward survey balls
+        protected final static Hep3Vector ball_pos = new BasicHep3Vector(-46.930, 257.052, 8.423);
+        
+        //Nominal Design  FWD Right (x,y,z)   BWD Right (x,y,z)   FWD Left (x,y,z,)   BWD Left (x,y,z)
+        //
+        //Layer 1-3, Lower     -6.493, -.332, 9.353    -6.253, -.332, 1.483    2.836, -.332, 9.638     3.076, -.332, 1.767
+        //                
+        //Layer 1-3, Upper     -6.512, .332, 9.978     -6.272, .332, 2.107     2.817, .332, 10.262     3.057, .332, 2.392
+
+        
+        protected static final Hep3Vector fwd_right = new BasicHep3Vector(-6.512, 9.978, .332);
+        protected static final Hep3Vector bwd_right = new BasicHep3Vector(-6.272, 2.107, .332);
+        protected static final Hep3Vector fwd_left = new BasicHep3Vector( 2.817, 10.262, .332);
+        protected static final Hep3Vector bwd_left = new BasicHep3Vector(3.057, 2.392, .332);
+        
+        protected static Hep3Vector getVeeOffset() {
+            return  VecOp.mult(0.5,VecOp.sub(fwd_left, fwd_right));
+        }
+        protected static Hep3Vector getFlatOffset() {
+            return VecOp.sub(bwd_left, fwd_left);
+        }
+    }
+    
+    
+    
+    
+    
+//    public static class UChannelL13Top extends UChannelL13 {
+//        private final static double length = UChannelL13.length;
+//        private static final double kin_mount_to_edge_of_plate_y = length-15.8*inch;
+//        private final static double cone_to_side_plate_pin_y = (14.5-3.125)*inch; 
+//        private final static double side_plate_pin_to_edge_of_plate_y = (16.0-14.5)*inch; 
+//        private final static double cone_to_edge_of_plate_y = cone_to_side_plate_pin_y + side_plate_pin_to_edge_of_plate_y;
+//        
+//        public UChannelL13Top(String name, SurveyVolume m,
+//                AlignmentCorrection alignmentCorrection,
+//                SurveyVolume ref) {
+//            super(name, m, alignmentCorrection, ref);
+//            init();
+//        }
+//        protected void setCenter() {
+//            final double x = 0.0;
+//            final double y = cone_to_edge_of_plate_y - length/2.0;
+//            final double z = -side_plate_cone_y - UChannelL13Plate.height + height/2.0;
+//            setCenter(x,y,z);
+//        }
+//        protected void setPos() {
+//            final double ball_pos_x = 4*inch;
+//            final double ball_pos_y = cone_to_edge_of_plate_y - kin_mount_to_edge_of_plate_y;
+//            final double ball_pos_z = SupportRingL13KinMount.kin_mount_offset_vertically - side_plate_cone_y; 
+//            // Note that this coordinate system is flipped pi 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());
+//            flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()-1, ballPos.z());
+//        }
+//        protected double getLength() {
+//           return length;
+//        }
+//    }
+
+    
 
     /**
      * Abstract @SurveyVolume volume defining the coordinate system of the u-channel plate
@@ -658,6 +837,8 @@
     }
     
     
+   
+   
     
     /**
      * @SurveyVolume volume defining the coordinate system of the u-channel 
@@ -669,27 +850,11 @@
      *
      */
     public static class UChannelL46Bottom extends UChannelL46 {
-        // Coordinates of the survey ball engaging the machined features
-        protected static final double cone_fwd_right_x = -7.019*inch;
-        protected static final double cone_fwd_right_y = -6.419*inch;
-        protected static final double cone_fwd_right_z = -0.332*inch;
-
-        protected static final double cone_bwd_right_x = -6.539*inch;
-        protected static final double cone_bwd_right_y = -22.159*inch;
-        protected static final double cone_bwd_right_z = -0.332*inch;
-
-        protected static final double cone_fwd_left_x = 6.558*inch;
-        protected static final double cone_fwd_left_y = -6.005*inch;
-        protected static final double cone_fwd_left_z = -0.332*inch;
-
-        protected static final double cone_bwd_left_x = 7.038*inch;
-        protected static final double cone_bwd_left_y = -21.745*inch;
-        protected static final double cone_bwd_left_z = -0.332*inch;
-
+        
+        
         protected static final double cone_to_edge_of_plate_y = 2.75*inch;
 
-        public UChannelL46Bottom(String name, SurveyVolume m,
-                AlignmentCorrection alignmentCorrection) {
+        public UChannelL46Bottom(String name, SurveyVolume m, AlignmentCorrection alignmentCorrection) {
             super(name, m, alignmentCorrection);
             init();
         }
@@ -700,20 +865,104 @@
             setCenter(x,y,z);
         }
         protected void setPos() {
-            //locate coordinate system from cone in mother coordinate system
-            Hep3Vector fwd_right = new BasicHep3Vector(cone_fwd_right_x, cone_fwd_right_y, cone_fwd_right_z);
-            Hep3Vector fwd_left = new BasicHep3Vector(cone_fwd_left_x, cone_fwd_left_y, cone_fwd_left_z);
-            Hep3Vector bwd_right = new BasicHep3Vector(cone_bwd_right_x, cone_bwd_right_y, cone_bwd_right_z);
-            Hep3Vector bwd_left = new BasicHep3Vector(cone_bwd_left_x, cone_bwd_left_y, cone_bwd_left_z);
-            
-            Hep3Vector d = VecOp.mult(0.5,VecOp.sub(fwd_left, fwd_right));
-            ballPos = VecOp.add(fwd_right, d);
-            veePos = fwd_right;
-            d = VecOp.mult(0.5, VecOp.sub(bwd_left, bwd_right));
-            flatPos = VecOp.add(bwd_right, d);
-        }
-    }
-    
+            ballPos = UChannelL46BottomSurveyBalls.ball_pos;
+            Hep3Vector veeOffset = UChannelL46BottomSurveyBalls.getVeeOffset();
+            veePos = VecOp.add(ballPos, veeOffset);
+            Hep3Vector flatOffset = UChannelL46BottomSurveyBalls.getFlatOffset();
+            flatPos = VecOp.add(ballPos, flatOffset);
+        }
+    }
+    
+    /**
+     * Position of the center of the survey balls when engaging the cones in the side plates of the U-channel.
+     * 
+     * @author Per Hansson Adrian <[log in to unmask]>
+     *
+     */
+    private static class UChannelL46BottomSurveyBalls  {
+        
+     // Shawn's calculated point at midpoint between two forward survey balls
+        protected final static Hep3Vector ball_pos = new BasicHep3Vector(-5.857, -157.776, -8.423);
+
+        
+        private static final double cone_fwd_right_x = -7.019*inch;
+        private static final double cone_fwd_right_y = -6.419*inch;
+        private static final double cone_fwd_right_z = -0.332*inch;
+
+        private static final double cone_bwd_right_x = -6.539*inch;
+        private static final double cone_bwd_right_y = -22.159*inch;
+        private static final double cone_bwd_right_z = -0.332*inch;
+
+        private static final double cone_fwd_left_x = 6.558*inch;
+        private static final double cone_fwd_left_y = -6.005*inch;
+        private static final double cone_fwd_left_z = -0.332*inch;
+
+        private static final double cone_bwd_left_x = 7.038*inch;
+        private static final double cone_bwd_left_y = -21.745*inch;
+        private static final double cone_bwd_left_z = -0.332*inch;
+        
+        protected static final Hep3Vector fwd_right = new BasicHep3Vector(cone_fwd_right_x, cone_fwd_right_y, cone_fwd_right_z);
+        protected static final Hep3Vector fwd_left = new BasicHep3Vector(cone_fwd_left_x, cone_fwd_left_y, cone_fwd_left_z);
+        protected static final Hep3Vector bwd_right = new BasicHep3Vector(cone_bwd_right_x, cone_bwd_right_y, cone_bwd_right_z);
+        protected static final Hep3Vector bwd_left = new BasicHep3Vector(cone_bwd_left_x, cone_bwd_left_y, cone_bwd_left_z);
+        
+        protected static Hep3Vector getVeeOffset() {
+            return  VecOp.mult(0.5,VecOp.sub(fwd_right, fwd_left));
+        }
+        protected static Hep3Vector getFlatOffset() {
+            return VecOp.sub(bwd_left, fwd_left);
+        }
+    }
+    
+    
+    
+    
+//  public static class UChannelL46Bottom extends UChannelL46 {
+//      // Coordinates of the survey ball engaging the machined features
+//      protected static final double cone_fwd_right_x = -7.019*inch;
+//      protected static final double cone_fwd_right_y = -6.419*inch;
+//      protected static final double cone_fwd_right_z = -0.332*inch;
+//
+//      protected static final double cone_bwd_right_x = -6.539*inch;
+//      protected static final double cone_bwd_right_y = -22.159*inch;
+//      protected static final double cone_bwd_right_z = -0.332*inch;
+//
+//      protected static final double cone_fwd_left_x = 6.558*inch;
+//      protected static final double cone_fwd_left_y = -6.005*inch;
+//      protected static final double cone_fwd_left_z = -0.332*inch;
+//
+//      protected static final double cone_bwd_left_x = 7.038*inch;
+//      protected static final double cone_bwd_left_y = -21.745*inch;
+//      protected static final double cone_bwd_left_z = -0.332*inch;
+//
+//      protected static final double cone_to_edge_of_plate_y = 2.75*inch;
+//
+//      public UChannelL46Bottom(String name, SurveyVolume m,
+//              AlignmentCorrection alignmentCorrection) {
+//          super(name, m, alignmentCorrection);
+//          init();
+//      }
+//      protected void setCenter() {
+//          final double x = 0.0;
+//          final double y = -cone_to_edge_of_plate_y + length/2.0;
+//          final double z = -side_plate_cone_y - UChannelL46Plate.height + height/2.0;
+//          setCenter(x,y,z);
+//      }
+//      protected void setPos() {
+//          //locate coordinate system from cone in mother coordinate system
+//          Hep3Vector fwd_right = new BasicHep3Vector(cone_fwd_right_x, cone_fwd_right_y, cone_fwd_right_z);
+//          Hep3Vector fwd_left = new BasicHep3Vector(cone_fwd_left_x, cone_fwd_left_y, cone_fwd_left_z);
+//          Hep3Vector bwd_right = new BasicHep3Vector(cone_bwd_right_x, cone_bwd_right_y, cone_bwd_right_z);
+//          Hep3Vector bwd_left = new BasicHep3Vector(cone_bwd_left_x, cone_bwd_left_y, cone_bwd_left_z);
+//          
+//          Hep3Vector d = VecOp.mult(0.5,VecOp.sub(fwd_left, fwd_right));
+//          ballPos = VecOp.add(fwd_right, d);
+//          veePos = fwd_right;
+//          d = VecOp.mult(0.5, VecOp.sub(bwd_left, bwd_right));
+//          flatPos = VecOp.add(bwd_right, d);
+//      }
+//  }
+  
     
     /**
      * @SurveyVolume volume defining the coordinate system of the u-channel 
@@ -725,30 +974,14 @@
      *
      */
     public static class UChannelL46Top extends UChannelL46 {
-        // Coordinates of the survey ball engaging the machined features
-        protected static final double cone_fwd_right_x = -7.038*inch;
-        protected static final double cone_fwd_right_y = -5.794*inch;
-        protected static final double cone_fwd_right_z = 0.332*inch;
-
-        protected static final double cone_bwd_right_x = -6.558*inch;
-        protected static final double cone_bwd_right_y = -21.535*inch;
-        protected static final double cone_bwd_right_z = 0.332*inch;
-
-        protected static final double cone_fwd_left_x = 6.539*inch;
-        protected static final double cone_fwd_left_y = -5.380*inch;
-        protected static final double cone_fwd_left_z = 0.332*inch;
-
-        protected static final double cone_bwd_left_x = 7.019*inch;
-        protected static final double cone_bwd_left_y = -21.121*inch;
-        protected static final double cone_bwd_left_z = 0.332*inch;
+
         
         private static final double cone_to_side_plate_pin_y = (0.875-0.25)*inch;
         private static final double side_plate_pin_to_edge_of_plate_y = 1.5*inch;
         
         protected static final double cone_to_edge_of_plate_y = cone_to_side_plate_pin_y + side_plate_pin_to_edge_of_plate_y;
         
-        public UChannelL46Top(String name, SurveyVolume m,
-                AlignmentCorrection alignmentCorrection) {
+        public UChannelL46Top(String name, SurveyVolume m, AlignmentCorrection alignmentCorrection) {
             super(name, m, alignmentCorrection);
             init();
         }
@@ -760,20 +993,111 @@
         }
         protected void setPos() {
             
-          //locate coordinate system from cone in mother coordinate system
-            Hep3Vector fwd_right = new BasicHep3Vector(cone_fwd_right_x, cone_fwd_right_y, cone_fwd_right_z);
-            Hep3Vector fwd_left = new BasicHep3Vector(cone_fwd_left_x, cone_fwd_left_y, cone_fwd_left_z);
-            Hep3Vector bwd_right = new BasicHep3Vector(cone_bwd_right_x, cone_bwd_right_y, cone_bwd_right_z);
-            Hep3Vector bwd_left = new BasicHep3Vector(cone_bwd_left_x, cone_bwd_left_y, cone_bwd_left_z);
+            ballPos = UChannelL46TopSurveyBalls.ball_pos;
+            Hep3Vector veeOffset = UChannelL46TopSurveyBalls.getVeeOffset();
+            veePos = VecOp.add(ballPos, veeOffset);
+            Hep3Vector flatOffset = UChannelL46TopSurveyBalls.getFlatOffset();
+            flatPos = VecOp.add(ballPos, flatOffset);
             
-            Hep3Vector d = VecOp.mult(0.5,VecOp.sub(fwd_left, fwd_right));
-            ballPos = VecOp.add(fwd_right, d);
-            veePos = fwd_left;
-            d = VecOp.mult(0.5, VecOp.sub(bwd_left, bwd_right));
-            flatPos = VecOp.add(bwd_right, d);
-            
-        }
-    }
+            //ballPos = ball_pos;
+            //veePos = new BasicHep3Vector(ballPos.x()+1, ballPos.y(), ballPos.z()); // note sign change on random offset w.r.t. bottom
+            //flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()-1, ballPos.z()); // random offset
+        }
+    }
+    
+    
+    /**
+     * Position of the center of the survey balls when engaging the cones in the side plates of the U-channel.
+     * 
+     * @author Per Hansson Adrian <[log in to unmask]>
+     *
+     */
+    private static class UChannelL46TopSurveyBalls  {
+
+        // Shawn's calculated point at midpoint between two forward survey balls
+        protected final static Hep3Vector ball_pos = new BasicHep3Vector(-6.341, -141.909, 8.423);
+
+
+        protected static final double cone_fwd_right_x = -7.038*inch;
+        protected static final double cone_fwd_right_y = -5.794*inch;
+        protected static final double cone_fwd_right_z = 0.332*inch;
+
+        protected static final double cone_bwd_right_x = -6.558*inch;
+        protected static final double cone_bwd_right_y = -21.535*inch;
+        protected static final double cone_bwd_right_z = 0.332*inch;
+
+        protected static final double cone_fwd_left_x = 6.539*inch;
+        protected static final double cone_fwd_left_y = -5.380*inch;
+        protected static final double cone_fwd_left_z = 0.332*inch;
+
+        protected static final double cone_bwd_left_x = 7.019*inch;
+        protected static final double cone_bwd_left_y = -21.121*inch;
+        protected static final double cone_bwd_left_z = 0.332*inch;
+
+        protected static final Hep3Vector fwd_right = new BasicHep3Vector(cone_fwd_right_x, cone_fwd_right_y, cone_fwd_right_z);
+        protected static final Hep3Vector fwd_left = new BasicHep3Vector(cone_fwd_left_x, cone_fwd_left_y, cone_fwd_left_z);
+        protected static final Hep3Vector bwd_right = new BasicHep3Vector(cone_bwd_right_x, cone_bwd_right_y, cone_bwd_right_z);
+        protected static final Hep3Vector bwd_left = new BasicHep3Vector(cone_bwd_left_x, cone_bwd_left_y, cone_bwd_left_z);
+
+        protected static Hep3Vector getVeeOffset() {
+            return  VecOp.mult(0.5,VecOp.sub(fwd_left, fwd_right));
+        }
+        protected static Hep3Vector getFlatOffset() {
+            return VecOp.sub(bwd_right, fwd_right);
+        }
+    }
+
+
+//    public static class UChannelL46Top extends UChannelL46 {
+//        // Coordinates of the survey ball engaging the machined features
+//        protected static final double cone_fwd_right_x = -7.038*inch;
+//        protected static final double cone_fwd_right_y = -5.794*inch;
+//        protected static final double cone_fwd_right_z = 0.332*inch;
+//
+//        protected static final double cone_bwd_right_x = -6.558*inch;
+//        protected static final double cone_bwd_right_y = -21.535*inch;
+//        protected static final double cone_bwd_right_z = 0.332*inch;
+//
+//        protected static final double cone_fwd_left_x = 6.539*inch;
+//        protected static final double cone_fwd_left_y = -5.380*inch;
+//        protected static final double cone_fwd_left_z = 0.332*inch;
+//
+//        protected static final double cone_bwd_left_x = 7.019*inch;
+//        protected static final double cone_bwd_left_y = -21.121*inch;
+//        protected static final double cone_bwd_left_z = 0.332*inch;
+//        
+//        private static final double cone_to_side_plate_pin_y = (0.875-0.25)*inch;
+//        private static final double side_plate_pin_to_edge_of_plate_y = 1.5*inch;
+//        
+//        protected static final double cone_to_edge_of_plate_y = cone_to_side_plate_pin_y + side_plate_pin_to_edge_of_plate_y;
+//        
+//        public UChannelL46Top(String name, SurveyVolume m,
+//                AlignmentCorrection alignmentCorrection) {
+//            super(name, m, alignmentCorrection);
+//            init();
+//        }
+//        protected void setCenter() {
+//            final double x = 0.0;
+//            final double y = -cone_to_edge_of_plate_y + length/2.0;
+//            final double z = -side_plate_cone_y - UChannelL46Plate.height + height/2.0;
+//            setCenter(x,y,z);
+//        }
+//        protected void setPos() {
+//            
+//          //locate coordinate system from cone in mother coordinate system
+//            Hep3Vector fwd_right = new BasicHep3Vector(cone_fwd_right_x, cone_fwd_right_y, cone_fwd_right_z);
+//            Hep3Vector fwd_left = new BasicHep3Vector(cone_fwd_left_x, cone_fwd_left_y, cone_fwd_left_z);
+//            Hep3Vector bwd_right = new BasicHep3Vector(cone_bwd_right_x, cone_bwd_right_y, cone_bwd_right_z);
+//            Hep3Vector bwd_left = new BasicHep3Vector(cone_bwd_left_x, cone_bwd_left_y, cone_bwd_left_z);
+//            
+//            Hep3Vector d = VecOp.mult(0.5,VecOp.sub(fwd_left, fwd_right));
+//            ballPos = VecOp.add(fwd_right, d);
+//            veePos = fwd_left;
+//            d = VecOp.mult(0.5, VecOp.sub(bwd_left, bwd_right));
+//            flatPos = VecOp.add(bwd_right, d);
+//            
+//        }
+//    }
 
     
     

########################################################################
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