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:

r3432 - in /projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim: detector/converter/compact/HPSTracker2014ConverterBase.java 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 19:13:11 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (234 lines)

Author: [log in to unmask]
Date: Tue Nov 25 11:13:06 2014
New Revision: 3432

Log:
Fix positions of L1-3 modules

Modified:
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/converter/compact/HPSTracker2014ConverterBase.java
    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/detector/converter/compact/HPSTracker2014ConverterBase.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/converter/compact/HPSTracker2014ConverterBase.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/converter/compact/HPSTracker2014ConverterBase.java	Tue Nov 25 11:13:06 2014
@@ -29,7 +29,7 @@
 import org.lcsim.geometry.compact.converter.JavaSurveyVolume;
 
 /**
- * Converters the compact description into Java runtime objects
+ * Converts the compact description into Java runtime objects
  * @author Per Hansson Adrian <[log in to unmask]>
  *
  */
@@ -67,10 +67,8 @@
 
         // check tracking material
         trackingMaterial = MaterialStore.getInstance().get("Vacuum");
-        //trackingMaterial = MaterialStore.getInstance().get("Vacuum");
         if(trackingMaterial==null) {
-            System.out.printf("%s: error the tracking material was not found!\n", this.getClass().getSimpleName());
-            System.exit(1);
+            throw new RuntimeException("error the tracking material was not found!");
         }
 
         // Get XML node for this subdetector.

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	Tue Nov 25 11:13:06 2014
@@ -467,8 +467,10 @@
     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_edge_of_plate_y = 10.999*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 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) {
@@ -483,11 +485,9 @@
         }
         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;
-            // 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
+            // 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());
@@ -568,6 +568,8 @@
      *
      */
     public static class UChannelL13BottomPlate extends UChannelL13Plate {
+        protected final static double L1_module_pin_to_edge_of_plate = (16.0-4.126)*inch;
+
         public UChannelL13BottomPlate(String name, SurveyVolume m,
                 AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, m, alignmentCorrection, ref);
@@ -593,6 +595,8 @@
      *
      */
     public static class UChannelL13TopPlate extends UChannelL13Plate {
+        protected final static double L1_module_pin_to_edge_of_plate = (16.0-2.75)*inch;
+
         public UChannelL13TopPlate(String name, SurveyVolume m,
                 AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, m, alignmentCorrection, ref);
@@ -836,19 +840,19 @@
      *
      */
     public abstract static class ModuleL13 extends BaseModule {
-        protected final static double box_extra_length = 10.0;// random at this point
-        protected final static double box_extra_height = 15.0;// random at this point
-        protected final static double box_extra_width = 0.5*inch;// random at this point
+        private final static double box_extra_length = 10.0;// random at this point
+        private final static double box_extra_height = -0.45*inch;// random at this point
+        private final static double box_extra_width = 0.5*inch;// random at this point
         
         private static final double tension_lever_y = 2.5*inch;
         // TODO the dimension of this volume is padded manually. Check if this can cause overlap problems
         public static final double length = 8.0*inch + box_extra_length;  
         public static final double height = 1.0*inch + box_extra_height;
-        public static final double width = tension_lever_y + 0.04*inch + box_extra_width;//TODO find the right length to encapsualte L1-3 module
-        public static final double hole_to_end_of_module_x = 7.750*inch;
-        public static final double hole_to_module_edge_height_dir = height - 0.875*inch;
-        public static final double hole_to_center_of_plate_width_dir = 3.75*inch;
-        public static final double hole_to_module_edge_length_dir = 0.25*inch;
+        private static final double width = tension_lever_y + 0.04*inch + box_extra_width;
+        //private static final double hole_to_end_of_module_x = 7.750*inch;
+        //private static final double hole_to_module_edge_height_dir = height - 0.875*inch;
+        protected static final double hole_to_center_of_plate_width_dir = 3.75*inch;
+        private static final double hole_to_module_edge_length_dir = 0.25*inch;
         
         public ModuleL13(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
             super(name, mother, alignmentCorrection, ref, getLayerFromVolumeName(name), getHalfFromName(name));
@@ -857,14 +861,16 @@
         protected void setCenter() {
             final double x = -width/2.0;
             final double y = -hole_to_module_edge_length_dir + length/2.0;
-            final double z = hole_to_module_edge_height_dir - height/2.0;
+            //center this volume around the center of the module which is the same as the cone for L1
+            //final double z = hole_to_module_edge_height_dir - height/2.0;
+            final double z = -Math.abs(getHoleModuleCenterOffset());
             setCenter(x,y,z);
         }
         protected void setBoxDim() {
             setBoxDim(width, length, height);
         }
         protected abstract void setPos();
-        
+        protected abstract double getHoleModuleCenterOffset();
         protected abstract Hep3Vector getHolePosition();
     }
     
@@ -878,6 +884,10 @@
             veePos = new BasicHep3Vector(ballPos.x(), ballPos.y(), ballPos.z()-1.0);
             flatPos = new BasicHep3Vector(ballPos.x()+1, ballPos.y(), ballPos.z());
         }
+        protected double getHoleModuleCenterOffset() {
+            return UChannelL13Top.cone_to_edge_of_plate_y - UChannelL13TopPlate.L1_module_pin_to_edge_of_plate;
+        }
+
     }
     
     public abstract static class ModuleL13Bot extends ModuleL13 {
@@ -890,6 +900,9 @@
             veePos = new BasicHep3Vector(ballPos.x(), ballPos.y(), ballPos.z()-1.0);
             flatPos = new BasicHep3Vector(ballPos.x()-1, ballPos.y(), ballPos.z());
         }
+        protected double getHoleModuleCenterOffset() {
+            return UChannelL13Bottom.cone_to_edge_of_plate_y - UChannelL13BottomPlate.L1_module_pin_to_edge_of_plate;
+        }
     }
     
     
@@ -902,7 +915,7 @@
         }
         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 y = getHoleModuleCenterOffset();
             double z = -UChannelL13.side_plate_cone_y - UChannelL13Plate.pocket_depth_L1;
             return new BasicHep3Vector(x, y, z);
         }
@@ -920,7 +933,7 @@
        
         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 y = getHoleModuleCenterOffset();
             double z = -UChannelL13.side_plate_cone_y - UChannelL13Plate.pocket_depth_L1;
             return new BasicHep3Vector(x, y, z);
         }
@@ -939,7 +952,7 @@
         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;
+            double y = getHoleModuleCenterOffset() + UChannelL13Plate.module_mounting_hole_to_hole_x;
             double z = -UChannelL13.side_plate_cone_y - UChannelL13Plate.pocket_depth_L2;
             return new BasicHep3Vector(x, y, z);
         }
@@ -956,7 +969,7 @@
        
         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 y = getHoleModuleCenterOffset() + UChannelL13Plate.module_mounting_hole_to_hole_x;
             double z = -UChannelL13.side_plate_cone_y - UChannelL13Plate.pocket_depth_L2;
             return new BasicHep3Vector(x, y, z);
         }
@@ -976,7 +989,7 @@
         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;
+            double y = getHoleModuleCenterOffset() + 2*UChannelL13Plate.module_mounting_hole_to_hole_x;
             double z = -UChannelL13.side_plate_cone_y - UChannelL13Plate.pocket_depth_L3;
             return new BasicHep3Vector(x, y, z);
         }
@@ -993,7 +1006,7 @@
        
         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 y = getHoleModuleCenterOffset() + 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);
         }
@@ -1014,14 +1027,14 @@
         protected final static double hole_to_center_of_plate_width_dir = 5.875*inch;
         protected final static double hole_to_module_edge_height_dir = 0.875*inch;
         protected static final double hole_to_module_edge_length_dir = 0.25*inch;
-        protected final static double box_extra_length = 10.0;// random at this point
-        protected final static double box_extra_height = 15.0;// random at this point
-        protected final static double box_extra_width = 0.5*inch;// random at this point
+        private final static double box_extra_length = 0.0;// random at this point
+        private final static double box_extra_height = -0.45*inch;// random at this point
+        private final static double box_extra_width = 0.5*inch;// random at this point
         
         private static final double tension_lever_y = 2.5*inch;
         // TODO the dimension of the L4-6 module is completely made up
-        public static final double length = 12.25*inch;
-        public static final double height = 1.0*inch;
+        public static final double length = 12.25*inch + box_extra_length;
+        public static final double height = 1.0*inch + box_extra_height;
         public static final double width = tension_lever_y + 0.04*inch + box_extra_width;
         
         public ModuleL46(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {

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