Commit in projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/lcdd on MAIN | |||
HPSTestRunTracker2014GeometryDefinition.java | +28 | -31 | 3335 -> 3336 |
Changed visibiltiy to allow inheritance
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/lcdd/HPSTestRunTracker2014GeometryDefinition.java 2014-09-23 00:07:35 UTC (rev 3335) +++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/lcdd/HPSTestRunTracker2014GeometryDefinition.java 2014-09-23 00:08:37 UTC (rev 3336) @@ -33,9 +33,9 @@
protected static final boolean useFakeHalfModuleAxialPos = false; // Global position references
- private static final double target_pos_wrt_base_plate_x = 162.3; //from Marco's 3D model - private static final double target_pos_wrt_base_plate_y = 80.55; //from Tim's sketchup //68.75; //from Marco's 3D model - private static final double target_pos_wrt_base_plate_z = 926.59; //from Marco's 3D model
+ protected static final double target_pos_wrt_base_plate_x = 162.3; //from Marco's 3D model + protected static final double target_pos_wrt_base_plate_y = 80.55; //from Tim's sketchup //68.75; //from Marco's 3D model + protected static final double target_pos_wrt_base_plate_z = 926.59; //from Marco's 3D model
protected static final double PS_vac_box_inner_height = 7.0*inch;
@@ -152,10 +152,12 @@
this.mother = mother; } public void addReferenceGeom(BaseGeometry refGeom) {
- if(referenceGeom == null) { - referenceGeom = new ArrayList<BaseGeometry>(); - } - referenceGeom.add(refGeom);
+ if(refGeom!=null) { // check that it's not a dummy call + if(referenceGeom == null) { + referenceGeom = new ArrayList<BaseGeometry>(); + } + referenceGeom.add(refGeom); + }
} public void addReferenceGeom(List<BaseGeometry> refGeomList) { if(referenceGeom == null) {
@@ -832,32 +834,27 @@
printSurveyPos(); }
- // - // Note that the mother volume is the support wrap box which can be different than support plate coord system. - // Thus I need to take that into account when making the modules by referencing through the support plate - if(referenceGeom==null) { - throw new RuntimeException("No ref found for " + getName()); - }
+ // walk through the reference volumes + if(referenceGeom!=null) { + for(BaseGeometry ref : referenceGeom) {
- for(BaseGeometry ref : referenceGeom) { - - if(debug) { - System.out.printf("%s: survey positions before ref %s transform\n",this.getClass().getSimpleName(),ref.getName()); - printSurveyPos(); - } - - if(debug) System.out.printf("%s: Ref %s coord\n%s\n",this.getClass().getSimpleName(), ref.getName(),ref.getCoord().toString()); - - ref.getCoord().getTransformation().transform(ballPos); - ref.getCoord().getTransformation().transform(veePos); - ref.getCoord().getTransformation().transform(flatPos); - - if(debug) { - System.out.printf("%s: survey positions after ref %s transform\n",this.getClass().getSimpleName(),ref.getName()); - printSurveyPos(); - }
+ if(debug) { + System.out.printf("%s: survey positions before ref %s transform\n",this.getClass().getSimpleName(),ref.getName()); + printSurveyPos(); + } + + if(debug) System.out.printf("%s: Ref %s coord\n%s\n",this.getClass().getSimpleName(), ref.getName(),ref.getCoord().toString()); + + ref.getCoord().getTransformation().transform(ballPos); + ref.getCoord().getTransformation().transform(veePos); + ref.getCoord().getTransformation().transform(flatPos); + + if(debug) { + System.out.printf("%s: survey positions after ref %s transform\n",this.getClass().getSimpleName(),ref.getName()); + printSurveyPos(); + } + }
}
-
}
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