Author: phansson
Date: Sun Nov 23 12:47:16 2014
New Revision: 3428
Log:
Adding top L1-3 and L4-6 plates and modules. Placeholders until I can look at the drawings to figure out how to make the mirror image correctly. Also started refactoring some of the code that's just not reasonable right now.
Modified:
projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014GeometryDefinition.java
projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014LCDDBuilder.java
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/HPSTracker2014LCDDBuilder.java
projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerLCDDBuilder.java
Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014GeometryDefinition.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014GeometryDefinition.java (original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014GeometryDefinition.java Sun Nov 23 12:47:16 2014
@@ -938,10 +938,10 @@
// Distance from CF edge to screw hole: 30mm
// Distance from screw hole to edge of cold block: 33.75mm
// Distance from edge of cold block to hole/ball position: 5mm
- protected static final double dist_sensor_center_to_coldblock_hole_vdir = (180.0 - 30.0 + (33.75 - 5.0)) - Sensor.sensor_length/2.0;
- protected static final double half_module_thickness = TestRunHalfModule.getHybridThickness() + TestRunHalfModule.getCFThickness() + HalfModuleLamination.kapton_thickness;
+ protected static final double dist_sensor_center_to_coldblock_hole_vdir = (180.0 - 30.0 + (33.75 - 5.0)) - Sensor.length/2.0;
+ protected static final double half_module_thickness = TestRunHalfModule.getHybridThickness() + TestRunHalfModule.getCFThickness() + HalfModuleLamination.thickness;
protected static final double half_module_length = TestRunHalfModule.getCFLength();
- protected static final double half_module_width = 6.83 + Sensor.getSensorWidth();
+ protected static final double half_module_width = 6.83 + Sensor.width;
protected double stereo_angle = 0.0;
@@ -956,11 +956,11 @@
// I'm not sure this feels good but this has to be done somewhere
// double box_center_local_x = TestRunHalfModule.getLength()/2.0 - ( (170.00 + 10.00) - Sensor.getSensorLength()/2.0);
// double box_center_local_y = -1.0*TestRunHalfModule.getThickness()/2.0 + (TestRunHalfModule.getCFThickness() + HalfModuleLamination.kapton_thickness + Sensor.getSensorThickness()/2.0);
-// double box_center_local_z = TestRunHalfModule.getWidth()/2.0 - ( 12.66 - (8.83 -3.00) + Sensor.getSensorWidth()/2.0 );
-
- double box_center_local_x = TestRunHalfModule.getLength()/2.0 - ( (170.00 + 10.00) - Sensor.getSensorLength()/2.0);
- double box_center_local_y = - Sensor.getSensorThickness()/2.0 - HalfModuleLamination.kapton_thickness - CarbonFiber.cf_thickness + half_module_thickness/2.0;
- double box_center_local_z = TestRunHalfModule.getWidth()/2.0 - ( 12.66 - (8.83 -3.00) + Sensor.getSensorWidth()/2.0 );
+// double box_center_local_z = TestRunHalfModule.getWidth()/2.0 - ( 12.66 - (8.83 -3.00) + Sensor.width/2.0 );
+
+ double box_center_local_x = TestRunHalfModule.getLength()/2.0 - ( (170.00 + 10.00) - Sensor.length/2.0);
+ double box_center_local_y = - Sensor.getSensorThickness()/2.0 - HalfModuleLamination.thickness - CarbonFiber.thickness + half_module_thickness/2.0;
+ double box_center_local_z = TestRunHalfModule.getWidth()/2.0 - ( 12.66 - (8.83 -3.00) + Sensor.width/2.0 );
if(useSiStripsConvention) {
@@ -989,13 +989,13 @@
this.stereo_angle = stereo_angle;
}
public static double getCFThickness() {
- return CarbonFiber.cf_thickness;
+ return CarbonFiber.thickness;
}
public static double getCFLength() {
- return CarbonFiber.cf_length;
+ return CarbonFiber.length;
}
public static double getCFWidth() {
- return CarbonFiber.cf_width;
+ return CarbonFiber.width;
}
public static double getHybridLength() {
return Hybrid.hybrid_length;
@@ -1034,12 +1034,12 @@
final double dist_lower_sensor_edge_to_cold_block_mounting_surface = getLayer() <=3 ? TestRunModuleL13.dist_lower_sensor_edge_to_cold_block_mounting_surface : TestRunModuleL45.dist_lower_sensor_edge_to_cold_block_mounting_surface;
double ball_pos_halfmod_local_x = dist_sensor_center_to_coldblock_hole_vdir;
- double ball_pos_halfmod_local_y = -1.0* (coldBlockThick/2.0 + TestRunHalfModule.getCFThickness() + HalfModuleLamination.kapton_thickness + Sensor.getSensorThickness()/2.0);
+ double ball_pos_halfmod_local_y = -1.0* (coldBlockThick/2.0 + TestRunHalfModule.getCFThickness() + HalfModuleLamination.thickness + Sensor.getSensorThickness()/2.0);
if(useFakeHalfModuleAxialPos) {
ball_pos_halfmod_local_x = ball_pos_halfmod_local_x*2.0;
ball_pos_halfmod_local_y = -2.0*ball_pos_halfmod_local_y;
}
- final double ball_pos_halfmod_local_z = dist_lower_sensor_edge_to_cold_block_mounting_surface + Sensor.getSensorWidth()/2.0;
+ final double ball_pos_halfmod_local_z = dist_lower_sensor_edge_to_cold_block_mounting_surface + Sensor.width/2.0;
double vee_pos_halfmod_local_x;
@@ -1053,19 +1053,19 @@
if(useSiStripsConvention) {
// vee_pos_halfmod_local_x = ball_pos_halfmod_local_x;
// vee_pos_halfmod_local_y = ball_pos_halfmod_local_y;
-// vee_pos_halfmod_local_z = ball_pos_halfmod_local_z + Sensor.getSensorWidth()/2.0;
+// vee_pos_halfmod_local_z = ball_pos_halfmod_local_z + Sensor.width/2.0;
// flat_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.getSensorLength()/2.0;
// flat_pos_halfmod_local_y = ball_pos_halfmod_local_y;
// flat_pos_halfmod_local_z = ball_pos_halfmod_local_z;
vee_pos_halfmod_local_x = ball_pos_halfmod_local_x;
vee_pos_halfmod_local_y = ball_pos_halfmod_local_y;
- vee_pos_halfmod_local_z = ball_pos_halfmod_local_z - Sensor.getSensorWidth()/2.0;
- flat_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.getSensorLength()/2.0;
+ vee_pos_halfmod_local_z = ball_pos_halfmod_local_z - Sensor.width/2.0;
+ flat_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.length/2.0;
flat_pos_halfmod_local_y = ball_pos_halfmod_local_y;
flat_pos_halfmod_local_z = ball_pos_halfmod_local_z;
} else {
- vee_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.getSensorLength()/2.0;
+ vee_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.length/2.0;
vee_pos_halfmod_local_y = ball_pos_halfmod_local_y;
vee_pos_halfmod_local_z = ball_pos_halfmod_local_z;
flat_pos_halfmod_local_x = ball_pos_halfmod_local_x;
@@ -1112,7 +1112,7 @@
// final double ball_pos_halfmod_local_x = dist_sensor_center_to_coldblock_hole_vdir;
// // note minus sign to separate from axial
// final double ball_pos_halfmod_local_y = -1.0 * (-1.0* (coldBlockThick/2.0 + TestRunHalfModule.getCFThickness() + HalfModuleLamination.kapton_thickness + Sensor.getSensorThickness()/2.0));
-// final double ball_pos_halfmod_local_z = dist_lower_sensor_edge_to_cold_block_mounting_surface + Sensor.getSensorWidth()/2.0;
+// final double ball_pos_halfmod_local_z = dist_lower_sensor_edge_to_cold_block_mounting_surface + Sensor.width/2.0;
// final double vee_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.getSensorLength()/2.0;
// final double vee_pos_halfmod_local_y = ball_pos_halfmod_local_y;
// final double vee_pos_halfmod_local_z = ball_pos_halfmod_local_z;
@@ -1135,14 +1135,14 @@
ball_pos_halfmod_local_x = dist_sensor_center_to_coldblock_hole_vdir;
// note minus sign to separate from axial
- ball_pos_halfmod_local_y = -1.0 * (-1.0* (coldBlockThick/2.0 + TestRunHalfModule.getCFThickness() + HalfModuleLamination.kapton_thickness + Sensor.getSensorThickness()/2.0));
- ball_pos_halfmod_local_z = dist_lower_sensor_edge_to_cold_block_mounting_surface + Sensor.getSensorWidth()/2.0;
+ ball_pos_halfmod_local_y = -1.0 * (-1.0* (coldBlockThick/2.0 + TestRunHalfModule.getCFThickness() + HalfModuleLamination.thickness + Sensor.getSensorThickness()/2.0));
+ ball_pos_halfmod_local_z = dist_lower_sensor_edge_to_cold_block_mounting_surface + Sensor.width/2.0;
if(useSiStripsConvention) {
// vee_pos_halfmod_local_x = ball_pos_halfmod_local_x ;
// vee_pos_halfmod_local_y = ball_pos_halfmod_local_y;
-// vee_pos_halfmod_local_z = ball_pos_halfmod_local_z + Sensor.getSensorWidth()/2.0;
+// vee_pos_halfmod_local_z = ball_pos_halfmod_local_z + Sensor.width/2.0;
// flat_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.getSensorLength()/2.0;
// flat_pos_halfmod_local_y = ball_pos_halfmod_local_y;
// flat_pos_halfmod_local_z = ball_pos_halfmod_local_z;
@@ -1151,7 +1151,7 @@
// vee_pos_halfmod_local_x = ball_pos_halfmod_local_x;
// vee_pos_halfmod_local_y = ball_pos_halfmod_local_y;
- // vee_pos_halfmod_local_z = ball_pos_halfmod_local_z - Sensor.getSensorWidth()/2.0;
+ // vee_pos_halfmod_local_z = ball_pos_halfmod_local_z - Sensor.width/2.0;
// flat_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.getSensorLength()/2.0;
// flat_pos_halfmod_local_y = ball_pos_halfmod_local_y;
// flat_pos_halfmod_local_z = ball_pos_halfmod_local_z;
@@ -1159,15 +1159,15 @@
vee_pos_halfmod_local_x = ball_pos_halfmod_local_x;
vee_pos_halfmod_local_y = ball_pos_halfmod_local_y;
- vee_pos_halfmod_local_z = ball_pos_halfmod_local_z - Sensor.getSensorWidth()/2.0;
- flat_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.getSensorLength()/2.0;
+ vee_pos_halfmod_local_z = ball_pos_halfmod_local_z - Sensor.width/2.0;
+ flat_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.length/2.0;
flat_pos_halfmod_local_y = ball_pos_halfmod_local_y;
flat_pos_halfmod_local_z = ball_pos_halfmod_local_z;
} else {
- vee_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.getSensorLength()/2.0;
+ vee_pos_halfmod_local_x = ball_pos_halfmod_local_x + Sensor.length/2.0;
vee_pos_halfmod_local_y = ball_pos_halfmod_local_y;
vee_pos_halfmod_local_z = ball_pos_halfmod_local_z;
flat_pos_halfmod_local_x = ball_pos_halfmod_local_x;
@@ -1336,32 +1336,24 @@
*
*/
public static class Sensor extends HalfModuleComponent {
- static final double sensor_length= 100.00;
- private static final double sensor_width = 40.34;
- private static final double sensor_thickness = 0.32;
+ static final double length= 100.00;
+ static final double width = 40.34;
+ static final double thickness = 0.32;
+ static final double height = thickness;
public Sensor(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, int id) {
super(name, mother, alignmentCorrection, id);
init();
- }
- public static double getSensorLength() {
- return sensor_length;
- }
- public static double getSensorWidth() {
- return sensor_width;
- }
- public static double getSensorHeight() {
- return sensor_thickness;
}
public static double getSensorThickness() {
- return getSensorHeight();
+ return height;
}
protected void setPos() {
if(debug) System.out.printf("%s: setPos for %s\n",this.getClass().getSimpleName(),getName());
setBallPos(0,0,0);
- setVeePos(ballPos.x() + getSensorWidth()/2.0, ballPos.y(), ballPos.z());
- setFlatPos(ballPos.x(),ballPos.y() + getSensorLength()/2.0, ballPos.z());
+ setVeePos(ballPos.x() + width/2.0, ballPos.y(), ballPos.z());
+ setFlatPos(ballPos.x(),ballPos.y() + length/2.0, ballPos.z());
// if(useSiStripsConvention) {
// setBallPos(0,0,0);
@@ -1384,22 +1376,22 @@
}
protected void setBoxDim() {
if(useSiStripsConvention) {
- setBoxDim(getSensorWidth(),getSensorLength(),getSensorThickness());
+ setBoxDim(width,length,thickness);
} else {
- setBoxDim(getSensorLength(),getSensorThickness(),getSensorWidth());
+ setBoxDim(length,thickness,width);
}
}
protected double getThickness() {
- return getSensorThickness();
+ return thickness;
}
protected double getHeigth() {
- return getSensorHeight();
+ return thickness;
}
protected double getWidth() {
- return getSensorWidth();
+ return width;
}
protected double getLength() {
- return getSensorLength();
+ return length;
}
}
@@ -1410,21 +1402,21 @@
*
*/
public static class ActiveSensor extends SurveyVolume {
- private static final double sensor_active_length= 98.33;
- private static final double sensor_active_width = 38.3399;
- private static final double sensor_active_thickness = Sensor.sensor_thickness;
+ private static final double length= 98.33;
+ private static final double width = 38.3399;
+ private static final double thickness = Sensor.thickness;
public ActiveSensor(String name, SurveyVolume m) {
super(name, m, null);
init();
}
public static double getActiveSensorLength() {
- return sensor_active_length;
+ return length;
}
public static double getActiveSensorWidth() {
- return sensor_active_width;
+ return width;
}
public static double getActiveSensorHeight() {
- return sensor_active_thickness;
+ return thickness;
}
public static double getActiveSensorThickness() {
return getActiveSensorHeight();
@@ -1475,9 +1467,9 @@
*
*/
public static class HalfModuleLamination extends HalfModuleComponent {
- protected static final double kapton_length = 184.0;
- protected static final double kapton_width = 40.0; // -2.0; // width under the sensor, 2mm wider under hybrid.
- protected static final double kapton_thickness = 0.050;
+ protected static final double length = 184.0;
+ protected static final double width = 40.0; // -2.0; // width under the sensor, 2mm wider under hybrid.
+ protected static final double thickness = 0.050;
public HalfModuleLamination(String name, SurveyVolume m, int id) {
super(name, m, null, id);
init();
@@ -1488,7 +1480,7 @@
// double ball_pos_kapton_local_x = -1 * (180.0 - Sensor.getSensorLength()/2.0) + 8.5;
// double ball_pos_kapton_local_y = (Sensor.getSensorThickness()/2.0 + HalfModuleLamination.kapton_thickness/2.0);
- // double ball_pos_kapton_local_z = -1 * (Sensor.getSensorWidth()/2.0 + 12.66) + 8.83 - 3.00 + 6.00 ;
+ // double ball_pos_kapton_local_z = -1 * (Sensor.width/2.0 + 12.66) + 8.83 - 3.00 + 6.00 ;
// double vee_pos_kapton_local_x = ball_pos_kapton_local_x + 1.0; // arbitrary distance
// double vee_pos_kapton_local_y = ball_pos_kapton_local_y;
// double vee_pos_kapton_local_z = ball_pos_kapton_local_z;
@@ -1496,19 +1488,19 @@
// double flat_pos_kapton_local_y = ball_pos_kapton_local_y + HalfModuleLamination.kapton_thickness/2.0; // arbitrary distance
// double flat_pos_kapton_local_z = ball_pos_kapton_local_z;
-// double ball_pos_kapton_local_x = -1 * (Sensor.getSensorWidth()/2.0 + 12.66) + 8.83 - 3.00 + 6.00;
+// double ball_pos_kapton_local_x = -1 * (Sensor.width/2.0 + 12.66) + 8.83 - 3.00 + 6.00;
// double ball_pos_kapton_local_y = -1 * (180.0 - Sensor.getSensorLength()/2.0) + 8.5;
// double ball_pos_kapton_local_z = (Sensor.getSensorThickness()/2.0 + HalfModuleLamination.kapton_thickness/2.0);
-// double vee_pos_kapton_local_x = ball_pos_kapton_local_x + Sensor.getSensorWidth()/2.0; // arbitrary distance
+// double vee_pos_kapton_local_x = ball_pos_kapton_local_x + Sensor.width/2.0; // arbitrary distance
// double vee_pos_kapton_local_y = ball_pos_kapton_local_y;
// double vee_pos_kapton_local_z = ball_pos_kapton_local_z;
// double flat_pos_kapton_local_x = ball_pos_kapton_local_x;
// double flat_pos_kapton_local_y = ball_pos_kapton_local_y + Sensor.getSensorLength(); // arbitrary distance
// double flat_pos_kapton_local_z = ball_pos_kapton_local_z;
- double ball_pos_kapton_local_x = Sensor.sensor_width/2.0 + 6.83 - 6.0 - kapton_width/2.0;
- double ball_pos_kapton_local_y = Sensor.getSensorLength()/2.0 - 170.0 - 10.0 + 8.5 + kapton_length/2.0;
- double ball_pos_kapton_local_z = -1.0 * (Sensor.getSensorThickness()/2.0 + HalfModuleLamination.kapton_thickness/2.0);
+ double ball_pos_kapton_local_x = Sensor.width/2.0 + 6.83 - 6.0 - width/2.0;
+ double ball_pos_kapton_local_y = Sensor.length/2.0 - 170.0 - 10.0 + 8.5 + length/2.0;
+ double ball_pos_kapton_local_z = -1.0 * (Sensor.getSensorThickness()/2.0 + HalfModuleLamination.thickness/2.0);
//ballPos = new BasicHep3Vector(ball_pos_kapton_local_x,ball_pos_kapton_local_y,ball_pos_kapton_local_z);
//veePos = new BasicHep3Vector(vee_pos_kapton_local_x,vee_pos_kapton_local_y,vee_pos_kapton_local_z);
@@ -1530,16 +1522,16 @@
//setCenter(getWidth()/2.0, getLength()/2.0,0.0);
}
protected double getThickness() {
- return kapton_thickness;
+ return thickness;
}
protected double getHeigth() {
return getThickness();
}
protected double getWidth() {
- return kapton_width;
+ return width;
}
protected double getLength() {
- return kapton_length;
+ return length;
}
protected void setBoxDim() {
setBoxDim(getWidth(),getLength(),getThickness());
@@ -1554,9 +1546,9 @@
*
*/
public static class CarbonFiber extends HalfModuleComponent {
- protected static final double cf_length = 200.;
- protected static final double cf_width = 45.;
- protected static final double cf_thickness = 0.250;
+ protected static final double length = 200.;
+ protected static final double width = 45.;
+ protected static final double thickness = 0.250;
public CarbonFiber(String name, SurveyVolume m, int id) {
super(name, m, null, id);
init();
@@ -1567,7 +1559,7 @@
// final double ball_pos_cf_local_x = -1 * (180.0 - Sensor.getSensorLength()/2.0);
// final double ball_pos_cf_local_y = (Sensor.getSensorThickness()/2.0 + HalfModuleLamination.kapton_thickness + TestRunHalfModule.getCFThickness()/2.0);
-// final double ball_pos_cf_local_z = -1 * (Sensor.getSensorWidth()/2.0 + 12.66) + 8.83 - 3.00;
+// final double ball_pos_cf_local_z = -1 * (Sensor.width/2.0 + 12.66) + 8.83 - 3.00;
// final double vee_pos_cf_local_x = ball_pos_cf_local_x + 1.0; // arbitrary distance
// final double vee_pos_cf_local_y = ball_pos_cf_local_y;
// final double vee_pos_cf_local_z = ball_pos_cf_local_z;
@@ -1578,10 +1570,10 @@
// setVeePos(vee_pos_cf_local_x,vee_pos_cf_local_y,vee_pos_cf_local_z);
// setFlatPos(flat_pos_cf_local_x,flat_pos_cf_local_y,flat_pos_cf_local_z);
-// final double ball_pos_cf_local_x = -1 * (Sensor.getSensorWidth()/2.0 + 12.66) + 8.83 - 3.00;
+// final double ball_pos_cf_local_x = -1 * (Sensor.width/2.0 + 12.66) + 8.83 - 3.00;
// final double ball_pos_cf_local_y = -1 * (180.0 - Sensor.getSensorLength()/2.0);
// final double ball_pos_cf_local_z = (Sensor.getSensorThickness()/2.0 + HalfModuleLamination.kapton_thickness + TestRunHalfModule.getCFThickness()/2.0);
-// final double vee_pos_cf_local_x = ball_pos_cf_local_x + Sensor.getSensorWidth()/2.0; // arbitrary distance
+// final double vee_pos_cf_local_x = ball_pos_cf_local_x + Sensor.width/2.0; // arbitrary distance
// final double vee_pos_cf_local_y = ball_pos_cf_local_y;
// final double vee_pos_cf_local_z = ball_pos_cf_local_z;
// final double flat_pos_cf_local_x = ball_pos_cf_local_x;
@@ -1592,9 +1584,9 @@
// setFlatPos(flat_pos_cf_local_x,flat_pos_cf_local_y,flat_pos_cf_local_z);
- final double ball_pos_cf_local_x = Sensor.getSensorWidth()/2.0 + 6.83 - cf_width/2.0;
- final double ball_pos_cf_local_y = Sensor.getSensorLength()/2.0 - 170.0 - 10.0 + cf_length/2.0;
- final double ball_pos_cf_local_z = -1 * ( Sensor.getSensorThickness()/2.0 + HalfModuleLamination.kapton_thickness + TestRunHalfModule.getCFThickness()/2.0 );
+ final double ball_pos_cf_local_x = Sensor.width/2.0 + 6.83 - width/2.0;
+ final double ball_pos_cf_local_y = Sensor.length/2.0 - 170.0 - 10.0 + length/2.0;
+ final double ball_pos_cf_local_z = -1 * ( Sensor.getSensorThickness()/2.0 + HalfModuleLamination.thickness + TestRunHalfModule.getCFThickness()/2.0 );
ballPos = new BasicHep3Vector(ball_pos_cf_local_x, ball_pos_cf_local_y, ball_pos_cf_local_z);
veePos = new BasicHep3Vector(ballPos.x() + 1.0, ballPos.y(), ballPos.z());
@@ -1614,13 +1606,13 @@
//setCenter(getLength()/2.0, 0.0, getWidth()/2.0);
}
protected double getThickness() {
- return cf_thickness;
+ return thickness;
}
protected double getWidth() {
- return cf_width;
+ return width;
}
protected double getLength() {
- return cf_length;
+ return length;
}
protected double getHeigth() {
return getThickness();
@@ -1638,8 +1630,8 @@
*
*/
public static class Hybrid extends HalfModuleComponent {
- protected static final double hybrid_length = 170.0 - Sensor.getSensorLength(); // sensor b-to-b with hybrid
- protected static final double hybrid_width = Sensor.getSensorWidth();
+ protected static final double hybrid_length = 170.0 - Sensor.length; // sensor b-to-b with hybrid
+ protected static final double hybrid_width = Sensor.width;
protected static final double hybrid_thickness = 4.0/64.0*inch;
public Hybrid(String name, SurveyVolume m, int id) {
super(name, m, null, id);
@@ -1651,7 +1643,7 @@
// final double ball_pos_hybrid_local_x = -1 * (170.0 - Sensor.getSensorLength()/2.0);
// final double ball_pos_hybrid_local_y = (Sensor.getSensorThickness()/2.0 - TestRunHalfModule.getHybridThickness()/2.0);
-// final double ball_pos_hybrid_local_z = -1 * (Sensor.getSensorWidth()/2.0);
+// final double ball_pos_hybrid_local_z = -1 * (Sensor.width/2.0);
// final double vee_pos_hybrid_local_x = ball_pos_hybrid_local_x + 1.0; // arbitrary distance
// final double vee_pos_hybrid_local_y = ball_pos_hybrid_local_y;
// final double vee_pos_hybrid_local_z = ball_pos_hybrid_local_z;
@@ -1662,10 +1654,10 @@
// setVeePos(vee_pos_hybrid_local_x,vee_pos_hybrid_local_y,vee_pos_hybrid_local_z);
// setFlatPos(flat_pos_hybrid_local_x,flat_pos_hybrid_local_y,flat_pos_hybrid_local_z);
-// final double ball_pos_hybrid_local_x = -1 * (Sensor.getSensorWidth()/2.0);
+// final double ball_pos_hybrid_local_x = -1 * (Sensor.width/2.0);
// final double ball_pos_hybrid_local_y = -1 * (170.0 - Sensor.getSensorLength()/2.0);
// final double ball_pos_hybrid_local_z = (Sensor.getSensorThickness()/2.0 - TestRunHalfModule.getHybridThickness()/2.0);
-// final double vee_pos_hybrid_local_x = ball_pos_hybrid_local_x + Sensor.getSensorWidth()/2.0; // arbitrary distance
+// final double vee_pos_hybrid_local_x = ball_pos_hybrid_local_x + Sensor.width/2.0; // arbitrary distance
// final double vee_pos_hybrid_local_y = ball_pos_hybrid_local_y;
// final double vee_pos_hybrid_local_z = ball_pos_hybrid_local_z;
// final double flat_pos_hybrid_local_x = ball_pos_hybrid_local_x;
@@ -1676,7 +1668,7 @@
// setFlatPos(flat_pos_hybrid_local_x,flat_pos_hybrid_local_y,flat_pos_hybrid_local_z);
final double ball_pos_hybrid_local_x = 0.0;
- final double ball_pos_hybrid_local_y = Sensor.getSensorLength()/2.0 - 170.0 + hybrid_length/2.0;
+ final double ball_pos_hybrid_local_y = Sensor.length/2.0 - 170.0 + hybrid_length/2.0;
final double ball_pos_hybrid_local_z = -1.0*Sensor.getSensorThickness()/2.0 + hybrid_thickness/2.0;
ballPos = new BasicHep3Vector(ball_pos_hybrid_local_x,ball_pos_hybrid_local_y, ball_pos_hybrid_local_z);
Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014LCDDBuilder.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014LCDDBuilder.java (original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014LCDDBuilder.java Sun Nov 23 12:47:16 2014
@@ -171,7 +171,7 @@
}
-
+/*
public void setVisualization() {
if(isDebug()) System.out.printf("%s: Set LCDD visualization for %d LCDD geometry objects \n", getClass().getSimpleName(), lcddSurveyVolumes.size());
@@ -196,6 +196,6 @@
}
if(isDebug()) System.out.printf("%s: DONE Set LCDD vis \n", getClass().getSimpleName());
}
-
+*/
}
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 Sun Nov 23 12:47:16 2014
@@ -36,7 +36,7 @@
doStereo = true;
doColdBlock = false;
doBottom = true;
- doTop = false;
+ doTop = true;
layerBitMask = 0x3F;
}
@@ -69,18 +69,33 @@
SupportRingL13BottomKinMount supportRingKinL13Bottom = new SupportRingL13BottomKinMount("c_support_kin_L13b", svtBox, null, supportRing);
surveyVolumes.add(supportRingKinL13Bottom);
- UChannelL13Bottom uChannelL13Bottom = new UChannelL13Bottom("support_bottom_L13", svtBox, null, supportRingKinL13Bottom);
+ UChannelL13 uChannelL13Bottom = new UChannelL13Bottom("support_bottom_L13", svtBox, null, supportRingKinL13Bottom);
surveyVolumes.add(uChannelL13Bottom);
- UChannelL13BottomPlate uChannelL13BottomPlate = new UChannelL13BottomPlate("support_plate_bottom_L13", uChannelL13Bottom, null);
+ UChannelL13Plate uChannelL13BottomPlate = new UChannelL13BottomPlate("support_plate_bottom_L13", uChannelL13Bottom, null);
surveyVolumes.add(uChannelL13BottomPlate);
-
- UChannelL46Bottom uChannelL46Bottom = new UChannelL46Bottom("support_bottom_L46", svtBox, null);
+
+ SupportRingL13TopKinMount supportRingKinL13Top = new SupportRingL13TopKinMount("c_support_kin_L13t", svtBox, null, supportRing);
+ surveyVolumes.add(supportRingKinL13Top);
+
+ UChannelL13Top uChannelL13Top = new UChannelL13Top("support_top_L13", svtBox, null, supportRingKinL13Top);
+ surveyVolumes.add(uChannelL13Top);
+
+ UChannelL13Plate uChannelL13TopPlate = new UChannelL13TopPlate("support_plate_top_L13", uChannelL13Top, null);
+ surveyVolumes.add(uChannelL13TopPlate);
+
+ UChannelL46 uChannelL46Bottom = new UChannelL46Bottom("support_bottom_L46", svtBox, null);
surveyVolumes.add(uChannelL46Bottom);
- UChannelL46BottomPlate uChannelL46BottomPlate = new UChannelL46BottomPlate("support_plate_bottom_L46", uChannelL46Bottom, null);
+ UChannelL46Plate uChannelL46BottomPlate = new UChannelL46BottomPlate("support_plate_bottom_L46", uChannelL46Bottom, null);
surveyVolumes.add(uChannelL46BottomPlate);
-
+
+ UChannelL46 uChannelL46Top = new UChannelL46Top("support_top_L46", svtBox, null);
+ surveyVolumes.add(uChannelL46Top);
+
+ UChannelL46Plate uChannelL46TopPlate = new UChannelL46TopPlate("support_plate_top_L46", uChannelL46Top, null);
+ surveyVolumes.add(uChannelL46TopPlate);
+
for(int l=1; l<=6;++l) {
if(doLayer(l)) {
@@ -292,32 +307,42 @@
/**
- * @SurveyVolume volume defining the coordinate system from the kinematic mount positions
+ * Abstract @SurveyVolume volume defining a coordinate system from the kinematic mount positions for support channels
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
+ public abstract static class SupportRingL13KinMount extends SurveyVolume {
+
+ public static final double kin_mount_offset_vertically = 0.113*inch; // TODO fix this offset
+
+ public SupportRingL13KinMount(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
+ super(name, mother, alignmentCorrection, ref);
+ }
+ protected void setCenter() {
+ setCenter(null); //dummy
+ }
+ protected void setBoxDim() {
+ // do nothing
+ }
+ }
+
+ /**
+ * @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: slot mount is vee position.
+ * 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 SurveyVolume {
-
- public static final double kin_mount_offset_vertically = 0.113*inch; // TODO fix this offset
-
+ public static class SupportRingL13BottomKinMount extends SupportRingL13KinMount {
+
public SupportRingL13BottomKinMount(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
super(name, mother, alignmentCorrection, ref);
init();
}
- protected void setCenter() {
- setCenter(null); //dummy
- }
- protected void setBoxDim() {
- // do nothing
- }
- protected void setPos() {
-
- //if(debug)
- //System.out.printf("%s: setPos\n", this.getClass().getSimpleName());
+ protected void setPos() {
final double ball_pos_x = (7.0 - 5.444) *inch;
final double ball_pos_y = 0.574*inch;
@@ -337,10 +362,81 @@
}
-
-
- /**
- * @SurveyVolume volume defining the coordinate system of the u-channel
+ /**
+ * @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 {
+
+ // TODO Check this offset
+ public static final double offset_vertically_wrt_bottom = 200.0;
+
+ 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 = SupportRing.plate_thickness + kin_mount_offset_vertically + offset_vertically_wrt_bottom;
+ 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);
+ }
+
+ }
+
+
+ /**
+ * Abstract @SurveyVolume volume defining the coordinate system of the L1-3 u-channels
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ */
+ public abstract static class UChannelL13 extends SurveyVolume {
+
+ public static final double width = UChannelL13Plate.width;
+ public static final double height = 2.575*inch;
+ 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) {
+ super(name, m, alignmentCorrection, ref);
+ }
+
+ protected void setBoxDim() {
+ setBoxDim(getWidth(),getLength(),getHeight());
+ }
+
+ protected double getWidth() {
+ return width;
+ }
+
+ protected abstract double getLength();
+
+ protected double getHeight() {
+ return height;
+ }
+
+ }
+
+ /**
+ * @SurveyVolume volume defining the coordinate system of the bottom L1-3 u-channel
* Reference: SupportRingL13BottomKinMount 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
@@ -348,19 +444,11 @@
* @author Per Hansson Adrian <[log in to unmask]>
*
*/
- public static class UChannelL13Bottom extends SurveyVolume {
- public final static double width = UChannelL13BottomPlate.width;
+ public static class UChannelL13Bottom extends UChannelL13 {
public final static double length = UChannelL13BottomPlate.length;
- public final static double height = 2.575*inch;
- public static final double kin_mount_to_edge_of_plate_x = width/2.0-4.0*inch;
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_L1_hole_y = cone_to_edge_of_plate_y - kin_mount_to_edge_of_plate_y;
- public final static double side_plate_cone_y = 2.0*inch;
-
-
-
-
public UChannelL13Bottom(String name, SurveyVolume m,
AlignmentCorrection alignmentCorrection,
SurveyVolume ref) {
@@ -370,11 +458,8 @@
protected void setCenter() {
final double x = 0.0;
final double y = cone_to_L1_hole_y + kin_mount_to_edge_of_plate_y - length/2.0;
- final double z = -side_plate_cone_y - UChannelL13BottomPlate.height + height/2.0;
+ final double z = -side_plate_cone_y - UChannelL13Plate.height + height/2.0;
setCenter(x,y,z);
- }
- protected void setBoxDim() {
- setBoxDim(width,length,height);
}
protected void setPos() {
//locate cone from pin hole
@@ -386,19 +471,76 @@
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;
+ }
+ }
+
+
+ /**
+ * @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
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
+ 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_L1_hole_y = cone_to_edge_of_plate_y - kin_mount_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_L1_hole_y + kin_mount_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() {
+ //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
+
+ 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
+
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
public abstract static class UChannelL13Plate extends SurveyVolume {
public final static double pocket_depth_L1 = 0.025;
public final static double pocket_depth_L2 = pocket_depth_L1 + 0.059;
public final static double pocket_depth_L3 = pocket_depth_L2 + 0.059;
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 UChannelL13Plate(String name, SurveyVolume m,
AlignmentCorrection alignmentCorrection) {
super(name, m, alignmentCorrection);
+ setMaterial("Aluminum");
}
/**
@@ -414,12 +556,30 @@
throw new RuntimeException("Trying to create a L1-3 module with invalid layer nr: " + layer);
}
}
-
- }
-
-
- /**
- * @SurveyVolume volume defining the coordinate system of the u-channel plate
+
+ protected void setBoxDim() {
+ setBoxDim(getWidth(), getLength(), getHeight());
+ }
+
+ protected void setPos() {
+ ballPos = new BasicHep3Vector(0, 0, 0);
+ veePos = new BasicHep3Vector(1, 0, 0);
+ flatPos = new BasicHep3Vector(0, 1, 0);
+ }
+
+ public double getWidth() {
+ return width;
+ }
+ public abstract double getLength();
+ public double getHeight() {
+ return height;
+ }
+
+ }
+
+
+ /**
+ * @SurveyVolume volume defining the coordinate system of the bottom u-channel plate
* Reference: @UChannelL13Bottom coordinate system
* Origin: same as reference
* Orientation: same as reference
@@ -428,35 +588,82 @@
*
*/
public static class UChannelL13BottomPlate extends UChannelL13Plate {
- public final static double width = 9.25*inch;
public final static double length = 16.0*inch;
- public final static double height = 0.375*inch;
-
-
public UChannelL13BottomPlate(String name, SurveyVolume m,
AlignmentCorrection alignmentCorrection) {
super(name, m, alignmentCorrection);
- setMaterial("Aluminum");
init();
}
protected void setCenter() {
final double x = 0.0;
final double y = UChannelL13Bottom.cone_to_edge_of_plate_y - length/2.0;
- final double z = -UChannelL13Bottom.side_plate_cone_y - height/2.0;
+ final double z = -UChannelL13.side_plate_cone_y - height/2.0;
setCenter(x,y,z);
}
+
+ public double getLength() {
+ return length;
+ }
+
+ }
+
+ /**
+ * @SurveyVolume volume defining the coordinate system of the bottom u-channel plate
+ * Reference: @UChannelL13Bottom coordinate system
+ * Origin: same as reference
+ * Orientation: same as reference
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
+ public static class UChannelL13TopPlate extends UChannelL13Plate {
+ public final static double length = 16.0*inch;
+ public UChannelL13TopPlate(String name, SurveyVolume m,
+ AlignmentCorrection alignmentCorrection) {
+ super(name, m, alignmentCorrection);
+ init();
+ }
+
+ protected void setCenter() {
+ final double x = 0.0;
+ final double y = UChannelL13Bottom.cone_to_edge_of_plate_y - length/2.0;
+ final double z = -UChannelL13.side_plate_cone_y - height/2.0;
+ setCenter(x,y,z);
+ }
+
+ public double getLength() {
+ return length;
+ }
+
+ }
+
+
+ /**
+ * Abstract @SurveyVolume volume defining the L4-6 u-channel volume
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ */
+ public abstract static class UChannelL46 extends SurveyVolume {
+
+ public static final double width = UChannelL46Plate.width;
+ public static final double length = UChannelL46Plate.length;
+ public static final double height = 2.575*inch;
+ public static final double kin_mount_to_edge_of_plate_x = width/2.0-5.75*inch;
+ public static final double kin_mount_to_edge_of_plate_y = 0.2*inch;
+ public static final double cone_to_edge_of_plate_y = 2.75*inch;
+ public static final double side_plate_cone_y = 2.0*inch;
+ public static final double cone_to_L1_hole_y = cone_to_edge_of_plate_y - kin_mount_to_edge_of_plate_y;
+
+ public UChannelL46(String name, SurveyVolume m,
+ AlignmentCorrection alignmentCorrection) {
+ super(name, m, alignmentCorrection);
+ }
+
protected void setBoxDim() {
setBoxDim(width,length,height);
}
- protected void setPos() {
- ballPos = new BasicHep3Vector(0, 0, 0);
- veePos = new BasicHep3Vector(1, 0, 0);
- flatPos = new BasicHep3Vector(0, 1, 0);
- }
-
-
-
+
}
@@ -470,25 +677,12 @@
* @author Per Hansson Adrian <[log in to unmask]>
*
*/
- public static class UChannelL46Bottom extends SurveyVolume {
- public final static double width = UChannelL46BottomPlate.width;
- public final static double length = UChannelL46BottomPlate.length;
- public final static double height = 2.575*inch;
- public static final double kin_mount_to_edge_of_plate_x = width/2.0-5.75*inch;
- public static final double kin_mount_to_edge_of_plate_y = 0.2*inch;
- public final static double cone_to_edge_of_plate_y = 2.75*inch;
- public final static double side_plate_cone_y = 2.0*inch;
- public final static double cone_to_L1_hole_y = cone_to_edge_of_plate_y - kin_mount_to_edge_of_plate_y;
- // position of positron side upstream cone surface/intercept with normal from center of cone
- private final static double cone_x = -6.977*inch;
- private final static double cone_y = SvtBox.length/2.0 - 31.668*inch;
- private final static double cone_z = -0.3316*inch;
-
-
-
-
-
-
+ public static class UChannelL46Bottom extends UChannelL46 {
+ // Coordinates taken from Shawn's 3D model
+ protected static final double cone_x = -6.977*inch;
+ protected static final double cone_y = SvtBox.length/2.0 - 31.668*inch;
+ protected static final double cone_z = -0.3316*inch;
+
public UChannelL46Bottom(String name, SurveyVolume m,
AlignmentCorrection alignmentCorrection) {
super(name, m, alignmentCorrection);
@@ -497,11 +691,8 @@
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 - UChannelL46BottomPlate.height + height/2.0;
+ final double z = -side_plate_cone_y - UChannelL46Plate.height + height/2.0;
setCenter(x,y,z);
- }
- protected void setBoxDim() {
- setBoxDim(width,length,height);
}
protected void setPos() {
//locate coordinate system from cone in mother coordinate system
@@ -513,19 +704,66 @@
flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()-1, ballPos.z());
}
}
-
-
-
-
+
+
+ /**
+ * @SurveyVolume volume defining the coordinate system of the u-channel
+ * Reference: SVTBox 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
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
+ 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;
+
+ 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
+ final double ball_pos_x = cone_x + width/2.0;
+ 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());
+ flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()-1, ballPos.z());
+ }
+ }
+
+
+
+ /**
+ * Abstract @SurveyVolume defining the coordinate system of the u-channel plates
+
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
public abstract static class UChannelL46Plate extends SurveyVolume {
public final static double pocket_depth_L4 = 0.1;
public final static double pocket_depth_L5 = pocket_depth_L4 + 0.118;
public final static double pocket_depth_L6 = pocket_depth_L5 + 0.118;
public final static double module_mounting_hole_to_hole_x =7.874*inch;
+ public static final double width = 13.5*inch;
+ public static final double length = 21.0*inch;
+ public static final double height = 0.5*inch;
public UChannelL46Plate(String name, SurveyVolume m,
AlignmentCorrection alignmentCorrection) {
super(name, m, alignmentCorrection);
+ setMaterial("Aluminum");
}
/**
@@ -541,11 +779,32 @@
throw new RuntimeException("Trying to create a L4-6 module with invalid layer nr: " + layer);
}
}
-
- }
-
- /**
- * @SurveyVolume volume defining the coordinate system of the u-channel plate
+
+ protected void setBoxDim() {
+ setBoxDim(getWidth(),getLength(),getHeight());
+ }
+
+ protected void setPos() {
+ ballPos = new BasicHep3Vector(0, 0, 0);
+ veePos = new BasicHep3Vector(1, 0, 0);
+ flatPos = new BasicHep3Vector(0, 1, 0);
+ }
+
+ public double getWidth() {
+ return width;
+ }
+
+ public double getLength() {
+ return length;
+ }
+
+ public double getHeight() {
+ return height;
+ }
+ }
+
+ /**
+ * @SurveyVolume defining the coordinate system of the bottom u-channel plate
* Reference: @UChannelL13Bottom coordinate system
* Origin: same as reference
* Orientation: same as reference
@@ -554,36 +813,48 @@
*
*/
public static class UChannelL46BottomPlate extends UChannelL46Plate {
- public final static double width = 13.5*inch;
- public final static double length = 21.0*inch;
- public final static double height = 0.5*inch;
-
-
public UChannelL46BottomPlate(String name, SurveyVolume m,
AlignmentCorrection alignmentCorrection) {
super(name, m, alignmentCorrection);
- setMaterial("Aluminum");
init();
}
protected void setCenter() {
final double x = 0.0;
- final double y = -UChannelL46Bottom.cone_to_edge_of_plate_y + length/2.0;
- final double z = -UChannelL46Bottom.side_plate_cone_y - height/2.0;
+ final double y = -UChannelL46.cone_to_edge_of_plate_y + length/2.0;
+ final double z = -UChannelL46.side_plate_cone_y - height/2.0;
setCenter(x,y,z);
}
- protected void setBoxDim() {
- setBoxDim(width,length,height);
- }
- protected void setPos() {
- ballPos = new BasicHep3Vector(0, 0, 0);
- veePos = new BasicHep3Vector(1, 0, 0);
- flatPos = new BasicHep3Vector(0, 1, 0);
- }
-
-
}
+
+
+ /**
+ * @SurveyVolume defining the coordinate system of the top u-channel plate
+ * Reference: @UChannelL13Top coordinate system
+ * Origin: same as reference
+ * Orientation: same as reference
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
+ public static class UChannelL46TopPlate extends UChannelL46Plate {
+ public UChannelL46TopPlate(String name, SurveyVolume m,
+ AlignmentCorrection alignmentCorrection) {
+ super(name, m, alignmentCorrection);
+ init();
+ }
+
+ protected void setCenter() {
+ final double x = 0.0;
+ final double y = -UChannelL46.cone_to_edge_of_plate_y + length/2.0;
+ final double z = -UChannelL46.side_plate_cone_y - height/2.0;
+ setCenter(x,y,z);
+ }
+
+ }
+
+
/**
* @SurveyVolume volume defining the coordinate system of module L1-3
@@ -642,7 +913,7 @@
//hole position (sensor side)
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 = -UChannelL13Bottom.side_plate_cone_y - UChannelL13Plate.pocket_depth_L1;
+ double z = -UChannelL13.side_plate_cone_y - UChannelL13Plate.pocket_depth_L1;
return new BasicHep3Vector(x, y, z);
}
@@ -659,8 +930,8 @@
protected Hep3Vector getHole() {
//hole position (sensor side)
double x = hole_to_center_of_plate_width_dir;
- double y = UChannelL13BottomPlate.module_mounting_hole_to_hole_x;
- double z = -UChannelL13Bottom.side_plate_cone_y - UChannelL13Plate.pocket_depth_L2;
+ 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);
}
@@ -676,8 +947,8 @@
protected Hep3Vector getHole() {
//hole position (sensor side)
double x = hole_to_center_of_plate_width_dir;
- double y = 2*UChannelL13BottomPlate.module_mounting_hole_to_hole_x;
- double z = -UChannelL13Bottom.side_plate_cone_y - UChannelL13Plate.pocket_depth_L3;
+ double y = 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);
}
@@ -747,7 +1018,7 @@
protected Hep3Vector getHole() {
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 = -UChannelL46Bottom.side_plate_cone_y - UChannelL46Plate.pocket_depth_L4;
+ double z = -UChannelL46.side_plate_cone_y - UChannelL46Plate.pocket_depth_L4;
return new BasicHep3Vector(x, y, z);
}
@@ -764,8 +1035,8 @@
protected Hep3Vector getHole() {
double x = hole_to_center_of_plate_width_dir;
- double y = UChannelL46BottomPlate.module_mounting_hole_to_hole_x;
- double z = -UChannelL46Bottom.side_plate_cone_y - UChannelL46Plate.pocket_depth_L5;
+ 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);
}
@@ -781,8 +1052,8 @@
protected Hep3Vector getHole() {
double x = hole_to_center_of_plate_width_dir;
- double y = 2.0*UChannelL46BottomPlate.module_mounting_hole_to_hole_x;
- double z = -UChannelL46Bottom.side_plate_cone_y - UChannelL46Plate.pocket_depth_L6;
+ 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);
}
@@ -795,8 +1066,8 @@
public abstract static class LongHalfModule extends BaseModule {
private static final double randomoffset = 5.0; //TODO this will be replaced when I fix the size of the half-module
- public static final double width = Sensor.getSensorWidth() + randomoffset;
- public static final double length = Sensor.getSensorLength() + randomoffset/10.0;
+ public static final double width = Sensor.width + randomoffset;
+ public static final double length = Sensor.length + randomoffset/10.0;
public static final double height = Sensor.getSensorThickness() + randomoffset/10.0;
@@ -984,9 +1255,9 @@
flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()+1, ballPos.z());
}
protected void setCenter() {
- double x = -1.0 * (TestRunHalfModule.getWidth()/2.0 - ( 12.66 - (8.83 -3.00) + Sensor.getSensorWidth()/2.0 ) );
- double y = TestRunHalfModule.getLength()/2.0 - ( (170.00 + 10.00) - Sensor.getSensorLength()/2.0);
- double z = -Sensor.getSensorThickness()/2.0 - HalfModuleLamination.kapton_thickness - CarbonFiber.cf_thickness + half_module_thickness/2.0;
+ double x = -1.0 * (TestRunHalfModule.getWidth()/2.0 - ( 12.66 - (8.83 -3.00) + Sensor.width/2.0 ) );
+ double y = TestRunHalfModule.getLength()/2.0 - ( (170.00 + 10.00) - Sensor.length/2.0);
+ double z = -Sensor.getSensorThickness()/2.0 - HalfModuleLamination.thickness - CarbonFiber.thickness + half_module_thickness/2.0;
setCenter(x, y, z);
}
@@ -1027,9 +1298,9 @@
flatPos = new BasicHep3Vector(ballPos.x(), ballPos.y()+1, ballPos.z());
}
protected void setCenter() {
- double x = -1.0 * (TestRunHalfModule.getWidth()/2.0 - ( 12.66 - (8.83 -3.00) + Sensor.getSensorWidth()/2.0 ) );
- double y = TestRunHalfModule.getLength()/2.0 - ( (170.00 + 10.00) - Sensor.getSensorLength()/2.0);
- double z = -Sensor.getSensorThickness()/2.0 - HalfModuleLamination.kapton_thickness - CarbonFiber.cf_thickness + half_module_thickness/2.0;
+ double x = -1.0 * (TestRunHalfModule.getWidth()/2.0 - ( 12.66 - (8.83 -3.00) + Sensor.width/2.0 ) );
+ double y = TestRunHalfModule.getLength()/2.0 - ( (170.00 + 10.00) - Sensor.length/2.0);
+ double z = -Sensor.getSensorThickness()/2.0 - HalfModuleLamination.thickness - CarbonFiber.thickness + half_module_thickness/2.0;
setCenter(x, y, z);
}
protected void applyGenericCoordinateSystemCorrections() {
@@ -1061,8 +1332,8 @@
public static class HalfLongModuleLamination extends HPSTestRunTracker2014GeometryDefinition.HalfModuleComponent {
- protected static final double width = Sensor.getSensorWidth();
- protected static final double length = Sensor.getSensorLength();
+ protected static final double width = Sensor.width;
+ protected static final double length = Sensor.length;
protected static final double height = Sensor.getSensorThickness();
public HalfLongModuleLamination(String name, SurveyVolume mother, int id) {
@@ -1130,7 +1401,11 @@
ref = getSurveyVolume(UChannelL46Bottom.class);
}
} else {
- throw new UnsupportedOperationException("top not implemented yet");
+ if(layer < 4) {
+ ref = getSurveyVolume(UChannelL13Top.class);
+ } else {
+ ref = getSurveyVolume(UChannelL46Top.class);
+ }
}
//Create the module
Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014LCDDBuilder.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014LCDDBuilder.java (original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014LCDDBuilder.java Sun Nov 23 12:47:16 2014
@@ -8,8 +8,12 @@
import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.SvtBoxBasePlate;
import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.UChannelL13Bottom;
import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.UChannelL13BottomPlate;
+import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.UChannelL13Top;
+import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.UChannelL13TopPlate;
import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.UChannelL46Bottom;
import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.UChannelL46BottomPlate;
+import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.UChannelL46Top;
+import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.UChannelL46TopPlate;
import org.lcsim.geometry.compact.converter.HPSTrackerBuilder.BaseModuleBundle;
import org.lcsim.geometry.compact.converter.HPSTrackerBuilder.HalfModuleBundle;
import org.lcsim.geometry.compact.converter.HPSTrackerGeometryDefinition.TestRunModuleBundle;
@@ -82,13 +86,25 @@
LCDDSurveyVolume uChannelL13BottomPlate = new LCDDSurveyVolume(_builder.getSurveyVolume(UChannelL13BottomPlate.class), lcdd, uChannelL13Bottom);
add(uChannelL13BottomPlate);
-
+
+ LCDDSurveyVolume uChannelL13Top = new LCDDSurveyVolume(_builder.getSurveyVolume(UChannelL13Top.class),lcdd, svtBox);
+ add(uChannelL13Top);
+
+ LCDDSurveyVolume uChannelL13TopPlate = new LCDDSurveyVolume(_builder.getSurveyVolume(UChannelL13TopPlate.class), lcdd, uChannelL13Top);
+ add(uChannelL13TopPlate);
LCDDSurveyVolume uChannelL46Bottom = new LCDDSurveyVolume(_builder.getSurveyVolume(UChannelL46Bottom.class), lcdd, svtBox);
add(uChannelL46Bottom);
LCDDSurveyVolume uChannelL46BottomPlate = new LCDDSurveyVolume(_builder.getSurveyVolume(UChannelL46BottomPlate.class), lcdd, uChannelL46Bottom);
add(uChannelL46BottomPlate);
+
+ LCDDSurveyVolume uChannelL46Top = new LCDDSurveyVolume(_builder.getSurveyVolume(UChannelL46Top.class), lcdd, svtBox);
+ add(uChannelL46Top);
+
+ LCDDSurveyVolume uChannelL46TopPlate = new LCDDSurveyVolume(_builder.getSurveyVolume(UChannelL46TopPlate.class), lcdd, uChannelL46Top);
+ add(uChannelL46TopPlate);
+
// build modules
Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerLCDDBuilder.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerLCDDBuilder.java (original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerLCDDBuilder.java Sun Nov 23 12:47:16 2014
@@ -53,6 +53,10 @@
_builder = b;
}
+ public HPSTrackerBuilder getBuilder() {
+ return _builder;
+ }
+
public void build() {
_builder.build();
}
@@ -92,22 +96,26 @@
if(isDebug()) System.out.printf("%s: Set LCDD visualization for %d LCDD geometry objects \n", getClass().getSimpleName(), lcddSurveyVolumes.size());
for(SurveyVolumeImpl g : lcddSurveyVolumes) {
- if(isDebug()) System.out.printf("%s: Set LCDD vis for %s \n", getClass().getSimpleName(), g.getName());
- if(g.getName().endsWith("baseplate")) g.setVisName("BasePlateVis");
- //else if(g.getName().contains("base")) g.setVisName("BaseVis");
- else if(g.getName().endsWith("support_bottom") || g.getName().contains("support_top")) g.setVisName("SupportVolumeVis");
- else if(g.getName().endsWith("support_plate_bottom") || g.getName().contains("support_plate_top")) g.setVisName("SupportPlateVis");
- else if(g.getName().endsWith("halfmodule_axial")) g.setVisName("HalfModuleVis");
- else if(g.getName().endsWith("halfmodule_stereo")) g.setVisName("HalfModuleVis");
- else if(g.getName().endsWith("module")) g.setVisName("ModuleVis");
- else if(g.getName().endsWith("cold")) g.setVisName("ColdBlockVis");
- else if(g.getName().endsWith("lamination")) g.setVisName("KaptonVis");
- else if(g.getName().endsWith("sensor")) g.setVisName("SensorVis");
- else if(g.getName().endsWith("sensor_active")) g.setVisName("SensorVis");
- else if(g.getName().endsWith("cf")) g.setVisName("CarbonFiberVis");
- else if(g.getName().endsWith("hybrid")) g.setVisName("HybridVis");
+ String name = g.getName();
+ if(isDebug()) System.out.printf("%s: Set LCDD vis for %s \n", getClass().getSimpleName(), name);
+ if(name.contains("base_plate")) g.setVisName("BasePlateVis");
+ else if(name.contains("support_bottom") || name.contains("support_top")) g.setVisName("SupportVolumeVis");
+ else if(name.contains("support_plate")) g.setVisName("SupportPlateVis");
+ else if(name.startsWith("module_")) {
+ if(name.endsWith("halfmodule_axial") || name.endsWith("halfmodule_stereo")) g.setVisName("HalfModuleVis");
+ else if(name.endsWith("cold")) g.setVisName("ColdBlockVis");
+ else if(name.endsWith("lamination")) g.setVisName("KaptonVis");
+ else if(name.endsWith("sensor")) g.setVisName("SensorVis");
+ else if(name.endsWith("sensor_active")) g.setVisName("SensorVis");
+ else if(name.endsWith("cf")) g.setVisName("CarbonFiberVis");
+ else if(name.endsWith("hybrid")) g.setVisName("HybridVis");
+ else {
+ //this must be a module then?
+ g.setVisName("ModuleVis");
+ }
+ }
else {
- if(isDebug()) System.out.printf("%s: No LCDD vis for %s \n", getClass().getSimpleName(), g.getName());
+ if(isDebug()) System.out.printf("%s: No LCDD vis for %s \n", getClass().getSimpleName(), name);
}
}
if(isDebug()) System.out.printf("%s: DONE Set LCDD vis \n", getClass().getSimpleName());
########################################################################
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
|