Author: phansson
Date: Mon Nov 3 18:26:47 2014
New Revision: 3412
Log:
Adding new 2014 HPS SVT geometry. Use compact to read in survey constants with a new SurveyVolume class. Active the LCDD converter for now and add test to build the lcdd file. Try to re-use as much as possible from the Test Run detector; within limits.
Added:
projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/CompactSurveyVolume.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/HPSTrackerGeometryDefinition.java
projects/lcsim/trunk/detector-framework/src/test/java/org/lcsim/geometry/compact/converter/lcdd/HPSTracker2014LCDDTest.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/HPSTestRunTracker2014JavaBuilder.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/HPSTracker2014LCDDBuilder.java
projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerBuilder.java
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/LCDDSurveyVolume.java
projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyCoordinateSystem.java
projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolume.java
projects/lcsim/trunk/detector-framework/src/test/resources/org/lcsim/geometry/subdetector/HPSTracker2014.xml
Added: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/CompactSurveyVolume.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/CompactSurveyVolume.java (added)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/CompactSurveyVolume.java Mon Nov 3 18:26:47 2014
@@ -0,0 +1,223 @@
+package org.lcsim.geometry.compact.converter;
+
+import hep.physics.vec.BasicHep3Vector;
+import hep.physics.vec.Hep3Vector;
+
+import java.util.List;
+
+import org.jdom.DataConversionException;
+import org.jdom.Element;
+
+public abstract class CompactSurveyVolume extends SurveyVolume {
+ public static final String xmlTagNameTop = "SurveyVolumes";
+ public static final String xmlTagName = "SurveyVolume";
+
+ Element node = null;
+
+ public CompactSurveyVolume(String name, SurveyVolume m,
+ AlignmentCorrection alignmentCorrection, Element node2) {
+ super(name, m, alignmentCorrection);
+ node = node2;
+ }
+
+ public CompactSurveyVolume(String name, SurveyVolume m,
+ AlignmentCorrection alignmentCorrection, SurveyVolume ref, Element node2) {
+ super(name, m, alignmentCorrection, ref);
+ node = node2;
+ }
+
+
+ /**
+ * Extract survey positions from xml description
+ */
+ protected void setPos() {
+
+ if(debug) System.out.printf("%s: getSurveyPosFromCompact for %s from %s\n",getClass().getSimpleName(), getName(), node.getAttributeValue("name"));
+
+ Element eNameTop = node.getChild(xmlTagNameTop);
+ if(eNameTop==null) {
+ throw new RuntimeException("no eName for " + xmlTagNameTop + " found in compact file");
+ }
+
+ List<Element> eNames = eNameTop.getChildren(xmlTagName);
+ if(eNames==null) {
+ throw new RuntimeException("no eNames for " + xmlTagName + " found in compact file");
+ }
+
+ for(Element eName : eNames) {
+
+ if(eName.getAttributeValue("name").compareTo(getName())==0) {
+
+
+ Element eCoord = eName.getChild("SurveyPos");
+
+ if(eCoord==null) {
+ throw new RuntimeException("no eCoord for " + getName() + " found in compact file");
+ }
+
+ Element eOrigin = eCoord.getChild("origin");
+
+ if(eOrigin==null) {
+ throw new RuntimeException("no eOrigin for " + getName() + " found in compact file");
+ }
+
+// origin = null;
+// try {
+// double x,y,z;
+// x= eOrigin.getAttribute("x").getDoubleValue();
+// y= eOrigin.getAttribute("y").getDoubleValue();
+// z= eOrigin.getAttribute("z").getDoubleValue();
+// origin = new BasicHep3Vector(x, y, z);
+// } catch (DataConversionException e) {
+// e.printStackTrace();
+// }
+
+ List<Element> eCoordComponents = eCoord.getChildren("point");
+
+ for(Element eUnitVec: eCoordComponents) {
+ try {
+ double x,y,z;
+ if(eUnitVec.getAttributeValue("name").compareTo("ball") == 0) {
+ x = eUnitVec.getAttribute("x").getDoubleValue();
+ y = eUnitVec.getAttribute("y").getDoubleValue();
+ z = eUnitVec.getAttribute("z").getDoubleValue();
+ setBallPos(x, y, z);
+ } else if(eUnitVec.getAttributeValue("name").compareTo("vee") == 0) {
+ x = eUnitVec.getAttribute("x").getDoubleValue();
+ y = eUnitVec.getAttribute("y").getDoubleValue();
+ z = eUnitVec.getAttribute("z").getDoubleValue();
+ setVeePos(x, y, z);
+ } else if(eUnitVec.getAttributeValue("name").compareTo("flat") == 0) {
+ x = eUnitVec.getAttribute("x").getDoubleValue();
+ y = eUnitVec.getAttribute("y").getDoubleValue();
+ z = eUnitVec.getAttribute("z").getDoubleValue();
+ setFlatPos(x, y, z);
+ } else {
+ throw new RuntimeException("eUnitVec name " + eUnitVec.getAttributeValue("name") + " is ill-defined for " + getName() + " found in compact file");
+ }
+ } catch (DataConversionException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+
+
+ }
+ }
+ if(debug) {
+ System.out.printf("%s: Extracted these survey constants from compact\n", this.getClass().getSimpleName());
+ System.out.printf("%s: ball %s \n", this.getClass().getSimpleName(),getBallPos().toString());
+ System.out.printf("%s: vee %s \n", this.getClass().getSimpleName(),getVeePos().toString());
+ System.out.printf("%s: flat %s \n", this.getClass().getSimpleName(),getFlatPos().toString());
+ }
+
+ }
+
+
+
+ /**
+ * Extract coordinate system from xml description
+ */
+ private void getCoordFromCompact() {
+
+
+
+ if(debug) System.out.printf("%s: getCoordFromCompact for %s from %s\n",getClass().getSimpleName(), getName(), node.getAttributeValue("name"));
+
+ if(1==1)
+ throw new UnsupportedOperationException("Need to work on interface of a new coordinate system and the ball, vee, flat procedure to build coord system!");
+
+
+
+ Element eNameTop = node.getChild(xmlTagNameTop);
+ if(eNameTop==null) {
+ throw new RuntimeException("no eName for " + xmlTagNameTop + " found in compact file");
+ }
+
+ List<Element> eNames = eNameTop.getChildren(xmlTagName);
+ if(eNames==null) {
+ throw new RuntimeException("no eNames for " + xmlTagName + " found in compact file");
+ }
+
+ for(Element eName : eNames) {
+
+ if(eName.getAttributeValue("name").compareTo(getName())==0) {
+
+
+ Element eCoord = eName.getChild("SurveyCoord");
+
+ if(eCoord==null) {
+ throw new RuntimeException("no eCoord for " + getName() + " found in compact file");
+ }
+
+ Element eOrigin = eCoord.getChild("origin");
+
+ if(eOrigin==null) {
+ throw new RuntimeException("no eOrigin for " + getName() + " found in compact file");
+ }
+
+ Hep3Vector coord_org = null;
+ Hep3Vector coord_unit_u = null;
+ Hep3Vector coord_unit_v = null;
+ Hep3Vector coord_unit_w = null;
+
+
+ double x,y,z;
+ try {
+ x= eOrigin.getAttribute("x").getDoubleValue();
+ y= eOrigin.getAttribute("y").getDoubleValue();
+ z= eOrigin.getAttribute("z").getDoubleValue();
+ coord_org =new BasicHep3Vector(x, y, z);
+ } catch (DataConversionException e) {
+ e.printStackTrace();
+ }
+
+
+
+
+ List<Element> eCoordComponents = eCoord.getChildren("unitVec");
+
+ for(Element eUnitVec: eCoordComponents) {
+ try {
+ double ux,uy,uz;
+ double vx,vy,vz;
+ double wx,wy,wz;
+ if(eUnitVec.getAttributeValue("name").compareTo("u") == 0) {
+ ux = eUnitVec.getAttribute("x").getDoubleValue();
+ uy = eUnitVec.getAttribute("y").getDoubleValue();
+ uz = eUnitVec.getAttribute("z").getDoubleValue();
+ coord_unit_u = new BasicHep3Vector(ux, uy, uz);
+ } else if(eUnitVec.getAttributeValue("name").compareTo("v") == 0) {
+ vx = eUnitVec.getAttribute("x").getDoubleValue();
+ vy = eUnitVec.getAttribute("y").getDoubleValue();
+ vz = eUnitVec.getAttribute("z").getDoubleValue();
+ coord_unit_v = new BasicHep3Vector(vx, vy, vz);
+ } else if(eUnitVec.getAttributeValue("name").compareTo("w") == 0) {
+ wx = eUnitVec.getAttribute("x").getDoubleValue();
+ wy = eUnitVec.getAttribute("y").getDoubleValue();
+ wz = eUnitVec.getAttribute("z").getDoubleValue();
+ coord_unit_w = new BasicHep3Vector(wx, wy, wz);
+ } else {
+ throw new RuntimeException("eUnitVec name " + eUnitVec.getAttributeValue("name") + " is ill-defined for " + getName() + " found in compact file");
+ }
+ } catch (DataConversionException e) {
+ e.printStackTrace();
+ }
+ }
+
+ throw new RuntimeException("need to work on this!");
+ //SurveyCoordinateSystem coord = new SurveyCoordinateSystem(coord_org, coord_unit_u, coord_unit_v, coord_unit_w);
+ //setCoord(coord);
+
+ }
+ }
+ if(debug) {
+ System.out.printf("%s: found coord system\n%s\n", this.getClass().getSimpleName(),getCoord().toString());
+ }
+
+ }
+
+
+
+}
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 Mon Nov 3 18:26:47 2014
@@ -20,7 +20,7 @@
* @author Per Hansson Adrian <[log in to unmask]>
*
*/
-public class HPSTestRunTracker2014GeometryDefinition extends HPSTrackerBuilder {
+public class HPSTestRunTracker2014GeometryDefinition extends HPSTrackerGeometryDefinition {
@@ -34,7 +34,6 @@
//General
- static final double inch = 25.4; //mm
protected static final boolean useSiStripsConvention = true;
protected static final boolean use30mradRotation = true;
protected static final boolean useFakeHalfModuleAxialPos = false;
@@ -43,8 +42,7 @@
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;
-
+
public HPSTestRunTracker2014GeometryDefinition(boolean debug, Element node) {
@@ -63,32 +61,32 @@
// Keep the order correct.
// Each item has knowledge of its mother but not its daughters
TrackingVolume tracking = new TrackingVolume("trackingVolume",null);
- geometries.add(tracking);
+ surveyVolumes.add(tracking);
TrackerEnvelope base = new TrackerEnvelope("base",tracking);
- geometries.add(base);
+ surveyVolumes.add(base);
BasePlate basePlate = new BasePlate("baseplate",base, "Aluminum");
- geometries.add(basePlate);
+ surveyVolumes.add(basePlate);
CSupport cSupport = new CSupport("c_support", base);
- geometries.add(cSupport);
+ surveyVolumes.add(cSupport);
AlignmentCorrection alignmentCorrectionSupportBottom = getSupportAlignmentCorrection(false);
SupportBottom supportBottom = new SupportBottom("support_bottom", base, alignmentCorrectionSupportBottom, cSupport);
- geometries.add(supportBottom);
+ surveyVolumes.add(supportBottom);
// The support survey positions are now with respect to its mother and not the reference coord. system.
// So to get the reference for the support plate I don't need to apply that extra transformation
SupportPlateBottom supportPlateBottom = new SupportPlateBottom("support_plate_bottom", base, supportBottom, "Aluminum");
- geometries.add(supportPlateBottom);
+ surveyVolumes.add(supportPlateBottom);
AlignmentCorrection alignmentCorrectionSupportTop = getSupportAlignmentCorrection(true);
SupportTop supportTop = new SupportTop("support_top", base, alignmentCorrectionSupportTop, cSupport);
- geometries.add(supportTop);
+ surveyVolumes.add(supportTop);
SupportPlateTop supportPlateTop = new SupportPlateTop("support_plate_top", base, supportTop, "Aluminum");
- geometries.add(supportPlateTop);
+ surveyVolumes.add(supportPlateTop);
// Modules are built using an encapsulating class that keeps tracks of all components
modules = new ArrayList<ModuleBundle>();
@@ -103,7 +101,7 @@
if(isDebug()) {
System.out.printf("%s: DONE constructing the geometry objects\n", this.getClass().getSimpleName());
System.out.printf("%s: List of all the geometry objects built\n", this.getClass().getSimpleName());
- for(SurveyVolume bg : geometries) {
+ for(SurveyVolume bg : surveyVolumes) {
System.out.printf("-------\n%s\n", bg.toString());
}
}
@@ -135,11 +133,11 @@
final SurveyVolume mother;
final SurveyVolume ref;
if(half == "bottom") {
- mother = getBaseGeometry(TrackerEnvelope.class);
- ref = getBaseGeometry(SupportPlateBottom.class);
+ mother = getSurveyVolume(TrackerEnvelope.class);
+ ref = getSurveyVolume(SupportPlateBottom.class);
} else {
- mother= getBaseGeometry(TrackerEnvelope.class);
- ref = getBaseGeometry(SupportPlateTop.class);
+ mother= getSurveyVolume(TrackerEnvelope.class);
+ ref = getSurveyVolume(SupportPlateTop.class);
}
//Create the module
@@ -375,15 +373,11 @@
}
- private boolean doLayer(int layer) {
- int a = (1<<(layer-1)) & layerBitMask;
- return a!=0?true:false;
- }
-
/**
* Tracking volume geometry definition.
*/
+ /*
public static class TrackingVolume extends SurveyVolume {
public TrackingVolume(String name, SurveyVolume mother) {
super(name,mother, null);
@@ -408,6 +402,7 @@
}
}
+*/
public static class TrackerEnvelope extends SurveyVolume {
// height of the dummy box holding the entire SVT:
// this means the bottom of the base plate to the the inner surface of of the PS vac box for now
@@ -433,9 +428,6 @@
setVeePos(vee_pos_base_x,vee_pos_base_y,vee_pos_base_z);
setFlatPos(flat_pos_base_x, flat_pos_base_y, flat_pos_base_z);
}
- protected void setCoord() {
- setCoord(null);
- }
protected void setCenter() {
setCenter(base_width/2.0, base_length/2.0, base_height/2.0 - BasePlate.base_plate_thickness);
}
@@ -462,9 +454,6 @@
setBallPos(0,0,0);
setVeePos(base_plate_width,ballPos.y(),ballPos.z());
setFlatPos(ballPos.x(),base_plate_length,ballPos.z());
- }
- protected void setCoord() {
- setCoord(null);
}
protected void setCenter() {
setCenter(base_plate_width/2.0, base_plate_length/2.0, -base_plate_thickness/2.0);
@@ -546,9 +535,6 @@
printSurveyPos();
}
}
- protected void setCoord() {
- setCoord(null);
- }
protected void setCenter() {
// this is never used since it's only a reference volume
setCenter(null);
@@ -632,9 +618,6 @@
System.out.printf("%s: survey positions for %s\n",this.getClass().getSimpleName(),getName());
printSurveyPos();
}
- }
- protected void setCoord() {
- setCoord(null);
}
protected void setCenter() {
setCenter(support_top_width/2.0+1.0, support_top_length/2.0 + (17.00-10.50/2.0), -1.0 * (support_top_height/2.0 - (12.70-6.66-1.34)));
@@ -763,9 +746,6 @@
}
}
- protected void setCoord() {
- setCoord(null);
- }
protected void setCenter() {
setCenter(support_bottom_width/2.0+1.0, support_bottom_length/2.0 + (17.00-10.50/2.0), support_bottom_height/2.0 - (12.70-6.66-1.34));
}
@@ -849,9 +829,6 @@
printSurveyPos();
}
}
- protected void setCoord() {
- setCoord(null);
- }
protected void setCenter() {
setCenter(support_plate_bottom_width/2.0, support_plate_bottom_length/2.0, -1.0 * support_plate_bottom_height/2.0);
}
@@ -904,9 +881,6 @@
System.out.printf("%s: survey positions for %s\n",this.getClass().getSimpleName(),getName());
printSurveyPos();
}
- }
- protected void setCoord() {
- setCoord(null);
}
protected void setCenter() {
setCenter(support_plate_top_width/2.0, support_plate_top_length/2.0, support_plate_top_height/2.0);
@@ -1003,12 +977,6 @@
protected void setBoxDim() {
setBoxDim(getModuleBoxLength(),getModuleBoxHeight(),getModuleBoxWidth());
- }
- protected void setCoord() {
- setCoord(null);
- if(debug) System.out.printf("%s: coordinate system:\n%s\n",this.getClass().getSimpleName(), getCoord().toString());
- if(debug) System.out.printf("%s: translation:\n%s\n",this.getClass().getSimpleName(), getCoord().getTransformation().getTranslation().toString());
- if(debug) System.out.printf("%s: rotation:\n%s\n",this.getClass().getSimpleName(), getCoord().getTransformation().getRotation().toString());
}
protected void setCenter() {
setCenter(getModuleBoxLength()/2.0-5.0, 0.0, getModuleBoxWidth()/2.0-box_extra_width/5.0);
@@ -1204,9 +1172,6 @@
setCenter(box_center_local_x, box_center_local_y, box_center_local_z);
}
}
- protected void setCoord() {
- setCoord(null);
- }
protected void setBoxDim() {
//setBoxDim(getLength(), getThickness(), getWidth());
@@ -1470,9 +1435,6 @@
public void setLayer(int layer) {
this.layer = layer;
}
- protected void setCoord() {
- setCoord(null);
- }
protected void setCenter() {
setCenter(getLength()/2.0, 0.0, getWidth()/2.0);
}
@@ -1601,9 +1563,6 @@
}
}
- protected void setCoord() {
- setCoord(null);
- }
protected void setCenter() {
setCenter(0,0,0);
}
@@ -1676,9 +1635,6 @@
System.out.printf("%s: survey positions for %s\n",this.getClass().getSimpleName(),getName());
printSurveyPos();
}
- }
- protected void setCoord() {
- setCoord(null);
}
protected void setCenter() {
setCenter(0,0,0);
@@ -1931,9 +1887,6 @@
protected abstract double getHeigth();
protected abstract double getWidth();
protected abstract double getLength();
- protected void setCoord() {
- setCoord(null);
- }
public int getId() {
return id;
}
@@ -1945,22 +1898,6 @@
TestRunModuleBundle(TestRunModule m) {
module = m;
}
- public int getLayer() {
- if(module==null) throw new RuntimeException("Need to add module to bundle first!");
- return HPSTrackerBuilder.getLayerFromVolumeName(module.getName());
- }
- public String getHalf() {
- if(module==null) throw new RuntimeException("Need to add module to bundle first!");
- return HPSTrackerBuilder.getHalfFromName(module.getName());
- }
- /**
- * Find mother to this module.
- * @return mother
- */
- public SurveyVolume getMother() {
- if(module==null) throw new RuntimeException("Need to add module to bundle first!");
- return module.getMother();
- }
public void print() {
if(module!=null) System.out.printf("%s: %s\n", this.getClass().getSimpleName(),module.getName());
if(halfModuleAxial!=null) halfModuleAxial.print();
Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014JavaBuilder.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014JavaBuilder.java (original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014JavaBuilder.java Mon Nov 3 18:26:47 2014
@@ -7,17 +7,15 @@
import org.jdom.Element;
import org.lcsim.detector.ILogicalVolume;
+import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.BasePlate;
import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.Sensor;
-import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TestRunHalfModuleBundle;
-import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TestRunModuleBundle;
-import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TrackerEnvelope;
-import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.BasePlate;
import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.SupportBottom;
import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.SupportPlateBottom;
import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.SupportPlateTop;
import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.SupportTop;
-import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TrackingVolume;
-import org.lcsim.geometry.compact.converter.HPSTrackerBuilder.HalfModuleBundle;
+import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TestRunHalfModuleBundle;
+import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TestRunModuleBundle;
+import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TrackerEnvelope;
import org.lcsim.geometry.compact.converter.HPSTrackerBuilder.ModuleBundle;
@@ -65,23 +63,23 @@
javaSurveyVolumes = new ArrayList<JavaSurveyVolume>();
// Go through the list of volumes to build that is created in the generic builder class
- JavaSurveyVolume trackingGeometry = new JavaSurveyVolume(_builder.getBaseGeometry(TrackingVolume.class), trackingVolume);
+ JavaSurveyVolume trackingGeometry = new JavaSurveyVolume(_builder.getSurveyVolume(org.lcsim.geometry.compact.converter.HPSTrackerGeometryDefinition.TrackingVolume.class), trackingVolume);
add(trackingGeometry);
//setBaseTrackerGeometry(new GhostJavaBaseGeom(_builder.getBaseGeometry(Base.class), trackingGeometry));
- setBaseTrackerGeometry(new JavaSurveyVolume(_builder.getBaseGeometry(TrackerEnvelope.class), trackingGeometry,1));
+ setBaseTrackerGeometry(new JavaSurveyVolume(_builder.getSurveyVolume(TrackerEnvelope.class), trackingGeometry,1));
add(getBaseTrackerGeometry());
- JavaSurveyVolume basePlateGeometry = new JavaGhostSurveyVolume(_builder.getBaseGeometry(BasePlate.class), getBaseTrackerGeometry());
+ JavaSurveyVolume basePlateGeometry = new JavaGhostSurveyVolume(_builder.getSurveyVolume(BasePlate.class), getBaseTrackerGeometry());
add(basePlateGeometry);
// skip the c-support, this is purely a reference volume in the builder so should have no use here!?
//JavaBaseGeometry cSupportGeometry = new GhostJavaBaseGeom(_builder.getBaseGeometry(CSupport.class), baseTrackerGeometry);
//add(cSupportGeometry);
- JavaSurveyVolume supportBottomGeometry = new JavaGhostSurveyVolume(_builder.getBaseGeometry(SupportBottom.class), getBaseTrackerGeometry());
+ JavaSurveyVolume supportBottomGeometry = new JavaGhostSurveyVolume(_builder.getSurveyVolume(SupportBottom.class), getBaseTrackerGeometry());
add(supportBottomGeometry);
- JavaSurveyVolume supportPlateBottomGeometry = new JavaGhostSurveyVolume(_builder.getBaseGeometry(SupportPlateBottom.class), getBaseTrackerGeometry());
+ JavaSurveyVolume supportPlateBottomGeometry = new JavaGhostSurveyVolume(_builder.getSurveyVolume(SupportPlateBottom.class), getBaseTrackerGeometry());
add(supportPlateBottomGeometry);
- JavaSurveyVolume supportTopGeometry = new JavaGhostSurveyVolume(_builder.getBaseGeometry(SupportTop.class), getBaseTrackerGeometry());
+ JavaSurveyVolume supportTopGeometry = new JavaGhostSurveyVolume(_builder.getSurveyVolume(SupportTop.class), getBaseTrackerGeometry());
add(supportTopGeometry);
- JavaSurveyVolume supportPlateTopGeometry = new JavaGhostSurveyVolume(_builder.getBaseGeometry(SupportPlateTop.class), getBaseTrackerGeometry());
+ JavaSurveyVolume supportPlateTopGeometry = new JavaGhostSurveyVolume(_builder.getSurveyVolume(SupportPlateTop.class), getBaseTrackerGeometry());
add(supportPlateTopGeometry);
// build modules
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 Mon Nov 3 18:26:47 2014
@@ -1,16 +1,16 @@
package org.lcsim.geometry.compact.converter;
import org.jdom.Element;
-import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TestRunHalfModuleBundle;
-import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TestRunModuleBundle;
-import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TrackerEnvelope;
import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.BasePlate;
import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.CSupport;
import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.SupportBottom;
import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.SupportPlateBottom;
import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.SupportPlateTop;
import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.SupportTop;
-import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TrackingVolume;
+import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TestRunHalfModuleBundle;
+import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TestRunModuleBundle;
+import org.lcsim.geometry.compact.converter.HPSTestRunTracker2014GeometryDefinition.TrackerEnvelope;
+import org.lcsim.geometry.compact.converter.HPSTrackerBuilder.HalfModuleBundle;
import org.lcsim.geometry.compact.converter.HPSTrackerBuilder.ModuleBundle;
import org.lcsim.geometry.compact.converter.lcdd.util.LCDD;
import org.lcsim.geometry.compact.converter.lcdd.util.SensitiveDetector;
@@ -30,11 +30,16 @@
super(debugFlag, node, lcdd, sens);
}
+
+ public void setBuilder() {
+ setBuilder(new HPSTestRunTracker2014GeometryDefinition(_debug, node));
+ }
+
public void build(Volume worldVolume) {
- // build geometry
- setBuilder(new HPSTestRunTracker2014GeometryDefinition(_debug, node));
-
+ // set and build geometry
+ setBuilder();
+
if(_builder==null) throw new RuntimeException("need to set builder class before calling build!");
if(isDebug()) System.out.printf("%s: build the base geometry objects\n", getClass().getSimpleName());
@@ -49,22 +54,22 @@
// Go through the list of volumes to build that is created in the generic builder class
// TODO this is manual now since I don't have a way of knowing in the generic builder class what is a ghost volume at this point.
- LCDDSurveyVolume trackingGeometry = new LCDDSurveyVolume(_builder.getBaseGeometry(TrackingVolume.class), worldVolume);
+ LCDDSurveyVolume trackingGeometry = new LCDDSurveyVolume(_builder.getSurveyVolume(org.lcsim.geometry.compact.converter.HPSTrackerGeometryDefinition.TrackingVolume.class), worldVolume);
add(trackingGeometry);
- baseSurveyVolume = new LCDDSurveyVolume(_builder.getBaseGeometry(TrackerEnvelope.class), lcdd, trackingGeometry);
+ baseSurveyVolume = new LCDDSurveyVolume(_builder.getSurveyVolume(TrackerEnvelope.class), lcdd, trackingGeometry);
add(baseSurveyVolume);
- LCDDSurveyVolume basePlateGeometry = new LCDDSurveyVolume(_builder.getBaseGeometry(BasePlate.class), lcdd, baseSurveyVolume);
+ LCDDSurveyVolume basePlateGeometry = new LCDDSurveyVolume(_builder.getSurveyVolume(BasePlate.class), lcdd, baseSurveyVolume);
add(basePlateGeometry);
// TODO I don't think this c-support has any use at all since the coordinates of it has been already used in the builder. Should remove?
- LCDDSurveyVolume cSupportGeometry = new LCDDGhostSurveyVolume(_builder.getBaseGeometry(CSupport.class), baseSurveyVolume);
+ LCDDSurveyVolume cSupportGeometry = new LCDDGhostSurveyVolume(_builder.getSurveyVolume(CSupport.class), baseSurveyVolume);
add(cSupportGeometry);
- LCDDSurveyVolume supportBottomGeometry = new LCDDGhostSurveyVolume(_builder.getBaseGeometry(SupportBottom.class), baseSurveyVolume);
+ LCDDSurveyVolume supportBottomGeometry = new LCDDGhostSurveyVolume(_builder.getSurveyVolume(SupportBottom.class), baseSurveyVolume);
add(supportBottomGeometry);
- LCDDSurveyVolume supportPlateBottomGeometry = new LCDDSurveyVolume(_builder.getBaseGeometry(SupportPlateBottom.class), lcdd, baseSurveyVolume);
+ LCDDSurveyVolume supportPlateBottomGeometry = new LCDDSurveyVolume(_builder.getSurveyVolume(SupportPlateBottom.class), lcdd, baseSurveyVolume);
add(supportPlateBottomGeometry);
- LCDDSurveyVolume supportTopGeometry = new LCDDGhostSurveyVolume(_builder.getBaseGeometry(SupportTop.class), baseSurveyVolume);
+ LCDDSurveyVolume supportTopGeometry = new LCDDGhostSurveyVolume(_builder.getSurveyVolume(SupportTop.class), baseSurveyVolume);
add(supportTopGeometry);
- LCDDSurveyVolume supportPlateTopGeometry = new LCDDSurveyVolume(_builder.getBaseGeometry(SupportPlateTop.class), lcdd, baseSurveyVolume);
+ LCDDSurveyVolume supportPlateTopGeometry = new LCDDSurveyVolume(_builder.getSurveyVolume(SupportPlateTop.class), lcdd, baseSurveyVolume);
add(supportPlateTopGeometry);
// build modules
@@ -123,14 +128,18 @@
* @param bundle - module to be added
* @param mother - mother LCDD geometry object
*/
- private void addModule(ModuleBundle bundle, LCDDSurveyVolume mother) {
+ protected void addModule(ModuleBundle bundle, LCDDSurveyVolume mother) {
// This could perhaps be fixed if there is a relation with daughters in geometry definition?
// create the module
LCDDSurveyVolume lcddM = new LCDDSurveyVolume(bundle.module, lcdd, mother);
add(lcddM);
- if(bundle.halfModuleAxial!=null) addHalfModule((TestRunHalfModuleBundle)bundle.halfModuleAxial,lcddM);
+ if(bundle.halfModuleAxial!=null) addHalfModule(bundle.halfModuleAxial,lcddM);
if(bundle.coldBlock!=null) add(new LCDDSurveyVolume(bundle.coldBlock, lcdd, lcddM));
if(bundle.halfModuleStereo!=null) addHalfModule((TestRunHalfModuleBundle)bundle.halfModuleStereo,lcddM);
+// if(bundle.halfModuleAxial!=null) addHalfModule((TestRunHalfModuleBundle)bundle.halfModuleAxial,lcddM);
+// if(bundle.coldBlock!=null) add(new LCDDSurveyVolume(bundle.coldBlock, lcdd, lcddM));
+// if(bundle.halfModuleStereo!=null) addHalfModule((TestRunHalfModuleBundle)bundle.halfModuleStereo,lcddM);
+
}
/**
@@ -138,9 +147,11 @@
* @param bundle - module to be added
* @param mother - mother LCDD geometry object
*/
- private void addHalfModule(TestRunHalfModuleBundle bundle, LCDDSurveyVolume mother) {
+ private void addHalfModule(HalfModuleBundle bundle2, LCDDSurveyVolume mother) {
// This could perhaps be fixed if there is a relation with daughters in geometry definition?
- // create the half-module
+ TestRunHalfModuleBundle bundle = (TestRunHalfModuleBundle) bundle2;
+
+ // create the half-module
LCDDSurveyVolume lcddHM = new LCDDSurveyVolume(bundle.halfModule, lcdd, mother);
add(lcddHM);
// create the sensor
Added: 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 (added)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014GeometryDefinition.java Mon Nov 3 18:26:47 2014
@@ -0,0 +1,382 @@
+/**
+ *
+ */
+package org.lcsim.geometry.compact.converter;
+
+import java.util.ArrayList;
+
+import org.jdom.Element;
+
+
+/**
+ *
+ * Geometry information for the HPS tracker 2014
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
+public class HPSTracker2014GeometryDefinition extends HPSTrackerGeometryDefinition {
+
+
+
+ //steering
+ public final boolean doAxial = false;
+ public final boolean doStereo = false;
+ public final boolean doColdBlock = false;
+ public final boolean doBottom = true;
+ public final boolean doTop = false;
+ public final int layerBitMask = 0x7; //0x1;//
+
+
+
+ public HPSTracker2014GeometryDefinition(boolean debug, Element node) {
+ super(debug, node);
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.lcsim.geometry.compact.converter.HPSTrackerBuilder#build()
+ */
+ public void build() {
+
+ if(isDebug()) System.out.printf("%s: constructing the geometry objects\n", this.getClass().getSimpleName());
+
+ // Build the geometry from the basic building blocks in the geometry definition class
+ // Keep the order correct.
+ // Each item has knowledge of its mother but not its daughters
+ HPSTrackerGeometryDefinition.TrackingVolume tracking = new HPSTrackerGeometryDefinition.TrackingVolume("trackingVolume",null);
+ surveyVolumes.add(tracking);
+
+
+ TrackerEnvelope base = new TrackerEnvelope("base",tracking);
+ surveyVolumes.add(base);
+
+ AlignmentCorrection alignmentCorrectionRingSupport = null;
+ SupportRing supportRing = new SupportRing("c_support", base, alignmentCorrectionRingSupport, node);
+ surveyVolumes.add(supportRing);
+
+ // The uChannel is referenced at the kinematic mount on the downstream side
+ // For L1-3 this basically handles tilt angle of support plate
+ AlignmentCorrection alignmentCorrectionUChannelBottomL13 = null;
+ UChannelL13Bottom uChannelL13Bottom = new UChannelL13Bottom("support_bottom_L13", base, alignmentCorrectionUChannelBottomL13, supportRing, node);
+ surveyVolumes.add(uChannelL13Bottom);
+
+ // build the uChannel plate
+ AlignmentCorrection alignmentCorrectionUChannelBottomL13Plate = null;
+ UChannelL13BottomPlate uChannelL13BottomPlate = new UChannelL13BottomPlate("support_plate_bottom_L13", base , alignmentCorrectionUChannelBottomL13Plate, uChannelL13Bottom, node);
+ surveyVolumes.add(uChannelL13BottomPlate);
+
+ // Modules are built using an encapsulating class that keeps tracks of all components
+ modules = new ArrayList<ModuleBundle>();
+
+ for(int l=1; l<=6;++l) {
+ if(doLayer(l)) {
+ if(doBottom) makeModuleBundle(l,"bottom");
+ if(doTop) makeModuleBundle(l,"top");
+ }
+ }
+
+ /*
+
+ BasePlate basePlate = new BasePlate("baseplate",base, "Aluminum");
+ geometries.add(basePlate);
+
+ CSupport cSupport = new CSupport("c_support", base);
+ geometries.add(cSupport);
+
+ AlignmentCorrection alignmentCorrectionSupportBottom = getSupportAlignmentCorrection(false);
+ SupportBottom supportBottom = new SupportBottom("support_bottom", base, alignmentCorrectionSupportBottom, cSupport);
+ geometries.add(supportBottom);
+ // The support survey positions are now with respect to its mother and not the reference coord. system.
+ // So to get the reference for the support plate I don't need to apply that extra transformation
+
+ SupportPlateBottom supportPlateBottom = new SupportPlateBottom("support_plate_bottom", base, supportBottom, "Aluminum");
+ geometries.add(supportPlateBottom);
+
+ AlignmentCorrection alignmentCorrectionSupportTop = getSupportAlignmentCorrection(true);
+ SupportTop supportTop = new SupportTop("support_top", base, alignmentCorrectionSupportTop, cSupport);
+ geometries.add(supportTop);
+
+ SupportPlateTop supportPlateTop = new SupportPlateTop("support_plate_top", base, supportTop, "Aluminum");
+ geometries.add(supportPlateTop);
+
+ // Modules are built using an encapsulating class that keeps tracks of all components
+ modules = new ArrayList<ModuleBundle>();
+
+ for(int l=1; l<=5;++l) {
+ if(doLayer(l)) {
+ if(doBottom) makeModuleBundle(l,"bottom");
+ if(doTop) makeModuleBundle(l,"top");
+ }
+ }
+
+*/
+
+ if(isDebug()) {
+ System.out.printf("%s: DONE constructing the geometry objects\n", this.getClass().getSimpleName());
+ System.out.printf("%s: List of all the geometry objects built\n", this.getClass().getSimpleName());
+ for(SurveyVolume bg : surveyVolumes) {
+ System.out.printf("-------\n%s\n", bg.toString());
+ }
+ }
+
+ }
+
+
+
+ /**
+ * @SurveyVolume volume defining the envelope corresponding to inner volume of PS magnet system.
+ * It is referenced to the tracking coordinate system.
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
+ public static class TrackerEnvelope extends SurveyVolume {
+ public static final double height = PS_vac_box_inner_height - HPSTestRunTracker2014GeometryDefinition.BasePlate.base_plate_offset_height;
+ public static final double width = HPSTestRunTracker2014GeometryDefinition.BasePlate.base_plate_width;
+ public static final double length = HPSTestRunTracker2014GeometryDefinition.BasePlate.base_plate_length;
+
+ public TrackerEnvelope(String name, SurveyVolume mother) {
+ super(name,mother, null);
+ init();
+ }
+ protected void setPos() {
+ final double ball_pos_x = -1.0*target_pos_wrt_base_plate_x;
+ final double ball_pos_base_y = -1.0*target_pos_wrt_base_plate_y;
+ final double ball_pos_base_z = target_pos_wrt_base_plate_z;
+ setBallPos(ball_pos_x,ball_pos_base_y,ball_pos_base_z);
+ setVeePos(ball_pos_x + width,ball_pos_base_y,ball_pos_base_z);
+ setFlatPos(ball_pos_x,ball_pos_base_y,ball_pos_base_z - length);
+// setBallPos(0,0,0);
+// setVeePos(width,0,0);
+// setFlatPos(0,0,-1.0*length);
+ }
+ protected void setCenter() {
+ setCenter(width/2.0, length/2.0, height/2.0);
+ }
+ protected void setBoxDim() {
+ setBoxDim(width,length,height);
+ }
+ }
+
+
+
+
+
+ /**
+ * @SurveyVolume volume defining the coordinate system of the support ring in the SVT box coordinate system
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
+ public static class SupportRing extends CompactSurveyVolume {
+
+ public SupportRing(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, Element node) {
+ super(name, mother, alignmentCorrection, node);
+ init();
+ }
+ protected void setCenter() {
+ setCenter(null); //dummy
+ }
+ protected void setBoxDim() {
+ // do nothing
+ }
+
+ }
+
+ /**
+ * @SurveyVolume volume defining the coordinate system of the u-channel in the @SupportRing coordinate system
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
+ public static class UChannelL13Bottom extends CompactSurveyVolume {
+ public final static double width = UChannelL13BottomPlate.width;
+ public final static double length = UChannelL13BottomPlate.length;
+ public final static double height = 50.0;
+
+ public UChannelL13Bottom(String name, SurveyVolume m,
+ AlignmentCorrection alignmentCorrection,
+ SurveyVolume ref, Element node2) {
+ super(name, m, alignmentCorrection, ref, node2);
+ init();
+ }
+ protected void setCenter() {
+ //TODO set UChannelL13Bottom position properly
+ setCenter(width/2.0, length/2.0, height/2.0);
+ }
+ protected void setBoxDim() {
+ setBoxDim(width,length,height);
+ }
+ }
+
+ /**
+ * @SurveyVolume volume defining the coordinate system of the u-channel plate in the @UChannelL13Bottom coordinate system
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
+ public static class UChannelL13BottomPlate extends CompactSurveyVolume {
+ public final static double width = 200.0;
+ public final static double length = 400.0;
+ public final static double height = 0.5*inch;
+
+ public UChannelL13BottomPlate(String name, SurveyVolume m,
+ AlignmentCorrection alignmentCorrection,
+ SurveyVolume ref, Element node2) {
+ super(name, m, alignmentCorrection, ref, node2);
+ init();
+ }
+
+ protected void setCenter() {
+ //TODO set UChannelL13Bottom position properly
+ setCenter(0, 0, 0);
+ }
+ protected void setBoxDim() {
+ setBoxDim(width,length,height);
+ }
+
+ }
+
+
+ public static abstract class BaseModule extends CompactSurveyVolume {
+ private int layer;
+ private String half;
+ protected final static double box_extra_length = 10.0;// random at this point
+ protected final static double box_extra_width = 15.0;// random at this point
+ protected final static double box_extra_height = 1.0;// random at this point
+
+ public BaseModule(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref, Element node2) {
+ super(name, mother, alignmentCorrection, ref, node2);
+ setLayer(getLayerFromVolumeName(name));
+ setHalf(getHalfFromName(name));
+ isValid();
+ }
+ private void isValid() {
+ if(half!="bottom" && half!="top") {
+ System.out.printf("ERROR invalid half %s for BaseModule\n",half);
+ System.exit(1);
+ }
+ }
+ public int getLayer() {
+ return layer;
+ }
+ public void setLayer(int layer) {
+ this.layer = layer;
+ }
+
+ public String getHalf() {
+ return half;
+ }
+
+ public void setHalf(String half) {
+ this.half = half;
+ }
+
+ public boolean isBottom() {
+ return getHalf() == "bottom" ? true : false;
+ }
+
+ }
+
+
+
+
+
+ public static class ModuleL13 extends BaseModule {
+
+ protected static final double length = 205.2 + box_extra_length; // includes lexan spacer and cold block
+ protected static final double height = 12.5 + box_extra_height; // includes screws height
+ protected static final double width = 71.3 - 13.0 + box_extra_width; // height from cold block to encapsulate the whole module
+
+ public ModuleL13(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref, Element node2) {
+ super(name, mother, alignmentCorrection, ref, node2);
+ init();
+ }
+ protected void setCenter() {
+ setCenter(0.0, 0.0, 0.0);
+ }
+ protected void setBoxDim() {
+ setBoxDim(width, length, height);
+ }
+
+ }
+
+
+ public static class SVTModuleBundle extends ModuleBundle {
+ SVTModuleBundle(BaseModule m) {
+ module = m;
+ }
+ public void print() {
+ if(module!=null) System.out.printf("%s: %s\n", this.getClass().getSimpleName(),module.getName());
+// if(halfModuleAxial!=null) halfModuleAxial.print();
+// if(coldBlock!=null)System.out.printf("%s: %s\n", this.getClass().getSimpleName(),coldBlock.getName());
+// if(halfModuleStereo!=null) halfModuleStereo.print();
+ }
+ }
+
+
+ /**
+ * Create the module.
+ * @param layer - of the module
+ * @param half - top or bottom half of the tracker
+ */
+ private void makeModuleBundle(int layer, String half)
+ {
+
+ if(isDebug()) System.out.printf("%s: makeModule for layer %d %s \n", this.getClass().getSimpleName(), layer, half);
+
+
+ // build the module name
+ String volName = "module_L"+ layer + (half=="bottom"?"b":"t");
+
+ boolean isL13 = ( layer >=1 && layer <=3 ) ? true : false;
+
+ // find the mother and reference geometry
+ // Note that the reference geometry is the support plate and since that is assumed to be
+ // created through it's references we don't need more than one reference to reach the mother coordinate system
+ final SurveyVolume mother;
+ final SurveyVolume ref;
+ AlignmentCorrection alignmentCorrection = null;
+ if(half == "bottom") {
+ mother = getSurveyVolume(TrackerEnvelope.class);
+ ref = getSurveyVolume(UChannelL13BottomPlate.class);
+ } else {
+ throw new UnsupportedOperationException("top not implemented yet");
+ // mother= getSurveyVolume(TrackerEnvelope.class);
+// ref = getSurveyVolume(UChannelL13TopPlate.class);
+ }
+
+ //Create the module
+ BaseModule module;
+ if(isL13) {
+ module = new ModuleL13(volName, mother, alignmentCorrection, ref, node);
+
+ } else {
+ throw new UnsupportedOperationException("L4-6 not implemented yet");
+ //module = new TestRunModuleL45(volName, mother, ref, layer, half);
+ }
+
+
+ // create the bundle for this module
+ SVTModuleBundle bundle = new SVTModuleBundle(module);
+ addModuleBundle(bundle);
+
+// if(doAxial) makeHalfModule("axial", module);
+// if(doColdBlock) makeColdBlock(module);
+// if(doStereo) makeHalfModule("stereo", module);
+
+
+ if(isDebug()) {
+ System.out.printf("%s: created module bundle:\n", this.getClass().getSimpleName());
+ bundle.print();
+ }
+
+ }
+
+
+}
+
+
+
+
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 Mon Nov 3 18:26:47 2014
@@ -1,8 +1,14 @@
package org.lcsim.geometry.compact.converter;
import org.jdom.Element;
+import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.TrackerEnvelope;
+import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.UChannelL13Bottom;
+import org.lcsim.geometry.compact.converter.HPSTracker2014GeometryDefinition.UChannelL13BottomPlate;
+import org.lcsim.geometry.compact.converter.HPSTrackerBuilder.ModuleBundle;
+import org.lcsim.geometry.compact.converter.HPSTrackerGeometryDefinition.TrackingVolume;
import org.lcsim.geometry.compact.converter.lcdd.util.LCDD;
import org.lcsim.geometry.compact.converter.lcdd.util.SensitiveDetector;
+import org.lcsim.geometry.compact.converter.lcdd.util.Volume;
public class HPSTracker2014LCDDBuilder extends HPSTestRunTracker2014LCDDBuilder {
@@ -14,6 +20,98 @@
}
+ /* (non-Javadoc)
+ * @see org.lcsim.geometry.compact.converter.HPSTestRunTracker2014LCDDBuilder#setBuilder()
+ */
+ public void setBuilder() {
+ setBuilder(new HPSTracker2014GeometryDefinition(_debug, node));
+ }
+ /* (non-Javadoc)
+ * @see org.lcsim.geometry.compact.converter.HPSTestRunTracker2014LCDDBuilder#build(org.lcsim.geometry.compact.converter.lcdd.util.Volume)
+ */
+ public void build(Volume worldVolume) {
+
+ // set and build geometry
+ setBuilder();
+
+ if(_builder==null) throw new RuntimeException("need to set builder class before calling build!");
+
+ if(isDebug()) System.out.printf("%s: build the base geometry objects\n", getClass().getSimpleName());
+
+ _builder.build();
+
+ if(isDebug()) System.out.printf("%s: DONE build the base geometry objects\n", getClass().getSimpleName());
+
+
+ if(isDebug()) System.out.printf("%s: build the LCDD geometry objects\n", getClass().getSimpleName());
+
+
+ LCDDSurveyVolume trackingGeometry = new LCDDSurveyVolume(_builder.getSurveyVolume(TrackingVolume.class), worldVolume);
+ add(trackingGeometry);
+
+ baseSurveyVolume = new LCDDSurveyVolume(_builder.getSurveyVolume(TrackerEnvelope.class), lcdd, trackingGeometry);
+ add(baseSurveyVolume);
+
+ LCDDSurveyVolume uSupportBottomL13 = new LCDDGhostSurveyVolume(_builder.getSurveyVolume(UChannelL13Bottom.class), baseSurveyVolume);
+ add(uSupportBottomL13);
+
+ LCDDSurveyVolume uSupportPlateBottomL13 = new LCDDSurveyVolume(_builder.getSurveyVolume(UChannelL13BottomPlate.class), lcdd, baseSurveyVolume);
+ add(uSupportPlateBottomL13);
+
+
+ // build modules
+
+ if(isDebug()) System.out.printf("%s: build modules\n", getClass().getSimpleName());
+
+ // Loop over all modules created
+ for(ModuleBundle mod : _builder.modules) {
+ //SVTModuleBundle m = (SVTModuleBundle) mod;
+ ModuleBundle m = mod;
+ if(isDebug()) {
+ System.out.printf("%s: module layer %d half %s\n", getClass().getSimpleName(),m.getLayer(),m.getHalf());
+ m.print();
+ }
+
+ // Find the mother among the LCDD objects using its name, should probably have a better way...
+ String name_mother = m.getMother().getName();
+ LCDDSurveyVolume mother = null;
+ for(LCDDSurveyVolume g : lcddSurveyVolumes) {
+ if(g.getName().equals(name_mother)) {
+ mother = g;
+ break;
+ }
+ }
+ // Check that it had a mother
+ if(mother==null) throw new RuntimeException("Cound't find mother to module layer " + m.getLayer() + " half "+ m.getHalf());
+
+ if(isDebug()) System.out.printf("%s: found mother %s for module layer %d half %s\n", getClass().getSimpleName(),mother.getName(),m.getLayer(),m.getHalf());
+
+ // add the module to the list of objects that will be added to LCDD
+ addModule(m, mother);
+
+ }
+
+
+
+
+
+ //if(isDebug()) {
+ System.out.printf("%s: DONE building the LCDD geometry objects\n", getClass().getSimpleName());
+ System.out.printf("%s: List of all %d LCDD geometry objects built\n", this.getClass().getSimpleName(), lcddSurveyVolumes.size());
+ for(SurveyVolumeImpl bg : lcddSurveyVolumes) {
+ System.out.printf("-------\n%s\n", bg.toString());
+ }
+ //}
+
+
+
+ // Set visualization features
+ setVisualization();
+
+ }
+
+
+
}
Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerBuilder.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerBuilder.java (original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerBuilder.java Mon Nov 3 18:26:47 2014
@@ -16,7 +16,7 @@
private boolean debug = true;
public List<ModuleBundle> modules;
- protected List<SurveyVolume> geometries = new ArrayList<SurveyVolume>();
+ protected List<SurveyVolume> surveyVolumes = new ArrayList<SurveyVolume>();
protected Element node;
protected List<MilleParameter> milleparameters = new ArrayList<MilleParameter>();
@@ -33,6 +33,9 @@
initAlignmentParameters();
}
+ /**
+ * Extract alignment constants from xml description
+ */
private void initAlignmentParameters() {
if(debug) System.out.printf("%s: initAlignmentParameters from %s\n",this.getClass().getSimpleName(),node.getAttributeValue("name"));
@@ -153,10 +156,19 @@
public HalfModuleBundle halfModuleAxial = null;
public HalfModuleBundle halfModuleStereo = null;
protected SurveyVolume coldBlock = null;
- abstract public int getLayer();
- abstract public String getHalf();
- abstract public SurveyVolume getMother();
abstract public void print();
+ public int getLayer() {
+ if(module==null) throw new RuntimeException("Need to add module to bundle first!");
+ return HPSTrackerBuilder.getLayerFromVolumeName(module.getName());
+ }
+ public String getHalf() {
+ if(module==null) throw new RuntimeException("Need to add module to bundle first!");
+ return HPSTrackerBuilder.getHalfFromName(module.getName());
+ }
+ public SurveyVolume getMother() {
+ if(module==null) throw new RuntimeException("Need to add module to bundle first!");
+ return module.getMother();
+ }
}
/**
@@ -270,16 +282,16 @@
* @param c - class type to be found
* @return the found type.
*/
- public <T> T getBaseGeometry(Class<T> c) {
+ public <T> T getSurveyVolume(Class<T> c) {
//if(isDebug()) System.out.printf("%s: get Item %s\n", this.getClass().getSimpleName(),c.getName());
- for(SurveyVolume item : geometries) {
+ for(SurveyVolume item : surveyVolumes) {
//if(isDebug()) System.out.printf("%s: item %s\n", getClass().getSimpleName(),item.getClass().getName());
if(c.isInstance(item)) {
return (T)item;
}
}
- throw new RuntimeException("Coulnd't find instance of " + c.getSimpleName() + " among the " + geometries.size() + " tracker items!");
+ throw new RuntimeException("Coulnd't find instance of " + c.getSimpleName() + " among the " + surveyVolumes.size() + " tracker items!");
}
protected List<ModuleBundle> getModules() {
Added: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerGeometryDefinition.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerGeometryDefinition.java (added)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerGeometryDefinition.java Mon Nov 3 18:26:47 2014
@@ -0,0 +1,92 @@
+/**
+ *
+ */
+package org.lcsim.geometry.compact.converter;
+
+import hep.physics.vec.BasicHep3Vector;
+
+import org.jdom.Element;
+
+/**
+ *
+ * Common geometry information for the HPS trackers
+ *
+ * @author Per Hansson Adrian <[log in to unmask]>
+ *
+ */
+abstract public class HPSTrackerGeometryDefinition extends HPSTrackerBuilder {
+
+
+
+ //steering
+ public final boolean doAxial = true;
+ public final boolean doStereo = true;
+ public final boolean doColdBlock = false;
+ public final boolean doBottom = true;
+ public final boolean doTop = true;
+ public final int layerBitMask = 0x1; //0x1;//
+
+
+ //General
+ static final double inch = 25.4; //mm
+ protected static final boolean useSiStripsConvention = true;
+ protected static final boolean use30mradRotation = true;
+ protected static final boolean useFakeHalfModuleAxialPos = false;
+
+ // Global position references
+ 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;
+
+
+
+ public HPSTrackerGeometryDefinition(boolean debug, Element node) {
+ super(debug, node);
+ }
+
+ protected boolean doLayer(int layer) {
+ int a = (1<<(layer-1)) & layerBitMask;
+ return a!=0?true:false;
+ }
+
+
+ /**
+ * Tracking volume geometry definition.
+ */
+ public static class TrackingVolume extends SurveyVolume {
+ public TrackingVolume(String name, SurveyVolume mother) {
+ super(name,mother, null);
+ init();
+ }
+ protected void setPos() {
+ // Dummy survey positions to setup a coordinate system
+ ballPos = new BasicHep3Vector(0,0,0);
+ veePos = new BasicHep3Vector(1,0,0);
+ flatPos = new BasicHep3Vector(0,1,0);
+ }
+ protected void setCenter() {
+ // at the origin
+ setCenter(new BasicHep3Vector(0,0,0));
+ }
+ protected void setBoxDim() {
+ // do nothing since we are not building a tracking volume
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+
+
+
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 Mon Nov 3 18:26:47 2014
@@ -26,6 +26,16 @@
setSensitiveDetector(sens);
setNode(node);
}
+
+ /**
+ * Build the LCDD geometry objects.
+ * @param worldVolume - the reference volume.
+ */
+ public abstract void build(Volume worldVolume);
+
+
+ public abstract void setBuilder();
+
public void setNode(Element node) {
this.node = node;
@@ -63,12 +73,7 @@
lcddSurveyVolumes.add(geom);
}
- /**
- * Build the LCDD geometry objects.
- * @param worldVolume - the reference volume.
- */
- public abstract void build(Volume worldVolume);
-
+
public void setLCDD(LCDD lcdd) {
Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/LCDDSurveyVolume.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/LCDDSurveyVolume.java (original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/LCDDSurveyVolume.java Mon Nov 3 18:26:47 2014
@@ -47,7 +47,7 @@
*/
public LCDDSurveyVolume(SurveyVolume base, Volume volume) {
super();
- if(isDebug()) System.out.printf("%s: constructing LCDD object %s with given volume name %s\n", this.getClass().getSimpleName(),base.getName(),volume.getName());
+ if(isDebug()) System.out.printf("%s: constructing LCDD object %s with volume name %s\n", this.getClass().getSimpleName(),base.getName(),volume.getName());
setName(base.getName());
setVolume(volume);
if(isDebug()) System.out.printf("%s: DONE constructing LCDD object %s\n", this.getClass().getSimpleName(),base.getName());
Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyCoordinateSystem.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyCoordinateSystem.java (original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyCoordinateSystem.java Mon Nov 3 18:26:47 2014
@@ -24,13 +24,14 @@
private Hep3Vector v;
private Hep3Vector w;
- public SurveyCoordinateSystem(Hep3Vector org, Hep3Vector unit_x, Hep3Vector unit_y, Hep3Vector unit_z) {
- origin = org;
- u = unit_x;
- v = unit_y;
- w = unit_z;
- }
+// public SurveyCoordinateSystem(Hep3Vector org, Hep3Vector unit_x, Hep3Vector unit_y, Hep3Vector unit_z) {
+// origin = org;
+// u = unit_x;
+// v = unit_y;
+// w = unit_z;
+// }
+
public SurveyCoordinateSystem(Hep3Vector ball, Hep3Vector vee, Hep3Vector flat) {
origin = ball;
Hep3Vector ball_to_vee = VecOp.sub(vee, ball);
Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolume.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolume.java (original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolume.java Mon Nov 3 18:26:47 2014
@@ -53,7 +53,6 @@
}
protected abstract void setPos();
- protected abstract void setCoord();
protected abstract void setCenter();
protected abstract void setBoxDim();
@@ -223,14 +222,15 @@
public Hep3Vector getFlatPos() {
return flatPos;
}
- public void setCoord(Hep3Vector origin) {
+ public void setCoord() {
if(ballPos==null || veePos==null || flatPos==null) {
throw new RuntimeException("Need to set ball, vee and flat before building coord system!");
}
- if(origin!=null) {
- coord = new SurveyCoordinateSystem(origin, ballPos, veePos, flatPos);
- } else {
- coord = new SurveyCoordinateSystem(ballPos, veePos, flatPos);
+
+ coord = new SurveyCoordinateSystem(ballPos, veePos, flatPos);
+
+ if(this.debug) {
+ System.out.printf("%s: setCoord \n%s\n", this.getClass().getSimpleName(), coord.toString());
}
}
public SurveyCoordinateSystem getCoord() {
Added: projects/lcsim/trunk/detector-framework/src/test/java/org/lcsim/geometry/compact/converter/lcdd/HPSTracker2014LCDDTest.java
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/test/java/org/lcsim/geometry/compact/converter/lcdd/HPSTracker2014LCDDTest.java (added)
+++ projects/lcsim/trunk/detector-framework/src/test/java/org/lcsim/geometry/compact/converter/lcdd/HPSTracker2014LCDDTest.java Mon Nov 3 18:26:47 2014
@@ -0,0 +1,35 @@
+package org.lcsim.geometry.compact.converter.lcdd;
+
+import java.io.BufferedOutputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.lcsim.util.test.TestUtil.TestOutputFile;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*
+* @author Per Hansson Adrian <[log in to unmask]>
+*/
+public class HPSTracker2014LCDDTest extends TestCase
+{
+ public HPSTracker2014LCDDTest(String name)
+ {
+ super(name);
+ }
+
+ public static TestSuite suite()
+ {
+ return new TestSuite(HPSTracker2014LCDDTest.class);
+ }
+
+ public void test_converter() throws Exception
+ {
+ InputStream in = HPSTestRunTracker2014.class.getResourceAsStream("/org/lcsim/geometry/subdetector/HPSTracker2014.xml");
+ OutputStream out = new BufferedOutputStream(new FileOutputStream(new TestOutputFile("HPSTracker2014.lcdd")));
+ new Main().convert("HPSTracker2014",in,out);
+ }
+}
Modified: projects/lcsim/trunk/detector-framework/src/test/resources/org/lcsim/geometry/subdetector/HPSTracker2014.xml
=============================================================================
--- projects/lcsim/trunk/detector-framework/src/test/resources/org/lcsim/geometry/subdetector/HPSTracker2014.xml (original)
+++ projects/lcsim/trunk/detector-framework/src/test/resources/org/lcsim/geometry/subdetector/HPSTracker2014.xml Mon Nov 3 18:26:47 2014
@@ -2,22 +2,28 @@
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd">
- <info name="HPSTrackerProposal2014">
- <comment>new SVT test geometry</comment>
+ <info name="HPSTracker2014">
+ <comment>SVT survey-based geometry for 2014 proposal</comment>
</info>
<define>
+ <!-- units -->
+ <constant name="mm" value="0.1*cm"/>
+ <constant name="inch" value="25.4*mm"/>
+
<!-- world -->
<constant name="world_side" value="500.0*cm" />
<constant name="world_x" value="world_side" />
<constant name="world_y" value="world_side" />
<constant name="world_z" value="world_side" />
- <!-- tracking region -->
- <constant name="tracking_region_radius" value="200.0*cm"/>
+ <!-- tracking region -->
+ <constant name="tracking_region_radius" value="200.0*cm"/>
<constant name="tracking_region_min" value="5.0*cm"/>
<constant name="tracking_region_zmax" value="131.8*cm"/>
- </define>
+
+
+ </define>
<materials>
<!-- Set tracking material to vacuum. -->
@@ -28,69 +34,218 @@
</materials>
<display>
-
+
<vis name="SensorVis" alpha="1.0" r="1.0" g="0.0" b="0.0" drawingStyle="wireframe" lineStyle="unbroken" showDaughters="true" visible="true"/>
- <vis name="CarbonFiberVis" alpha="1.0" r="0.88" g="0.88" b="0.88" drawingStyle="wireframe" lineStyle="unbroken" showDaughters="true" visible="true"/>
- <vis name="KaptonVis" alpha="1.0" r="0.91" g="0.77" b="0.06" drawingStyle="wireframe" lineStyle="unbroken" showDaughters="true" visible="true"/>
- <vis name="HybridVis" alpha="1.0" r="0.0" g="1.0" b="0" drawingStyle="wireframe" lineStyle="unbroken" showDaughters="true" visible="true"/>
+ <vis name="ActiveSensorVis" alpha="1.0" r="1.0" g="0.0" b="0.0" drawingStyle="solid" lineStyle="unbroken" showDaughters="true" visible="true"/>
+ <vis name="CarbonFiberVis" alpha="1.0" r="0.88" g="0.88" b="0.88" drawingStyle="solid" lineStyle="unbroken" showDaughters="true" visible="true"/>
+ <vis name="KaptonVis" alpha="1.0" r="0.91" g="0.77" b="0.06" drawingStyle="solid" lineStyle="unbroken" showDaughters="true" visible="true"/>
+ <vis name="HybridVis" alpha="1.0" r="0.0" g="1.0" b="0" drawingStyle="solid" lineStyle="unbroken" showDaughters="true" visible="true"/>
<vis name="HalfModuleVis" alpha="1.0" r="1.0" g="1.0" b="1.0" drawingStyle="wireframe" lineStyle="dashed" showDaughters="true" visible="true"/>
+ <vis name="ColdBlockVis" alpha="1.0" r="0.75" g="0.73" b="0.75" drawingStyle="solid" lineStyle="dashed" showDaughters="true" visible="true"/>
<vis name="ModuleVis" alpha="1.0" r="1.0" g="1.0" b="1.0" drawingStyle="wireframe" lineStyle="dotted" showDaughters="true" visible="true"/>
- <vis name="SupportPlateVis" alpha="1.0" r="0.75" g="0.73" b="0.75" drawingStyle="solid" lineStyle="dashed" showDaughters="true" visible="true"/>
+ <vis name="SupportPlateVis" alpha="1.0" r="0.45" g="0.45" b="0.45" drawingStyle="solid" lineStyle="dashed" showDaughters="true" visible="true"/>
+ <vis name="SupportVolumeVis" alpha="1.0" r="0.75" g="0.73" b="0.75" drawingStyle="wireframe" lineStyle="dashed" showDaughters="true" visible="true"/>
+ <vis name="BasePlateVis" alpha="1.0" r="0.35" g="0.35" b="0.35" drawingStyle="solid" lineStyle="dashed" showDaughters="true" visible="true"/>
<vis name="LayerVis" alpha="0.0" r="0.0" g="0.0" b="1.0" drawingStyle="wireframe" showDaughters="true" visible="false"/>
<vis name="ComponentVis" alpha="0.0" r="0.0" g="0.2" b="0.4" drawingStyle="solid" showDaughters="false" visible="false"/>
-
+ <vis name="BeamPlaneVis" alpha="1.0" r="1.0" g="1.0" b="1.0" drawingStyle="solid" lineStyle="unbroken" showDaughters="false" visible="true"/>
+
</display>
<detectors>
<detector id="1" name="Tracker" type="HPSTracker2014" readout="TrackerHits">
-
- <!-- Definition of half module logical volume. -->
- <half_modules>
- <half_module name="SvtHalfModuleLayers1-3">
- <component x="50.0" y="100.0" z="0.0" material="Silicon" sensitive="true" />
- </half_module>
- </half_modules>
-
- <!-- Alignment of entire tracker box. -->
- <alignment x="0.0" y="0.0" z="0.0" />
- <support_plate name="SupportPlateL1-3bot">
- <position name="ball" x="0.0" y="0.0" z="0.0"/>
- <position name="vee" x="0.0" y="0.0" z="0.0"/>
- <position name="flat" x="0.0" y="0.0" z="0.0"/>
- <alignment x="5.0" y="5.0" z="5.0" rx="0.1" ry="0.1" rz="0.1"/>
- <modules>
- <module layer="1" ref="SvtModule">
- <position name="ball" x="0.0" y="0.0" z="0.0"/>
- <position name="vee" x="0.0" y="0.0" z="0.0"/>
- <position name="flat" x="0.0" y="0.0" z="0.0"/>
- <alignment x="4.0" y="4.0" z="4.0" rx="0.1" ry="0.1" rz="0.1"/>
- <half_module type="axial" ref="SvtHalfModuleLayers1-3">
- <position name="ball" x="0.0" y="0.0" z="0.0"/>
- <position name="vee" x="0.0" y="0.0" z="0.0"/>
- <position name="flat" x="0.0" y="0.0" z="0.0"/>
- <alignment x="3.0" y="3.0" z="3.0" rx="0.1" ry="0.1" rz="0.1" />
- </half_module>
- <!--
- <half_module type="stereo" ref="SvtHalfModuleLayers1-3">
- <position name="ball" x="0.0" y="0.0" z="0.0"/>
- <position name="vee" x="0.0" y="0.0" z="0.0"/>
- <position name="flat" x="0.0" y="0.0" z="0.0"/>
- <alignment x="2.0" y="2.0" z="2.0" rx="0.1" ry="0.1" rz="0.1" />
- </half_module>
- -->
- </module>
- <!--
- <module layer="2" ref="SvtModule">
- <alignment x="0.0" y="0.0" z="" rx="0.0" ry="0.0"
- rz="0.0" />
- </module>
- <module layer="3" ref="SvtModule">
- <alignment x="0.0" y="0.0" z="" rx="0.0" ry="0.0"
- rz="0.0" />
- </module>
- -->
- </modules>
- </support_plate>
+ <SurveyVolumes>
+ <SurveyVolume name="c_support">
+ <SurveyPos>
+ <point name="ball" x="192.5" y="608.0" z="0.0"/>
+ <point name="vee" x="193.5" y="608.0" z="0.0"/>
+ <point name="flat" x="192.5" y="609.0" z="0.0"/>
+ </SurveyPos>
+ <!--
+ <SurveyCoord>
+ <origin x="" y="" z=""/>
+ <unitVec name="u" x="1.0" y="0.0" z="0.0"/>
+ <unitVec name="v" x="1.0" y="0.0" z="0.0"/>
+ <unitVec name="w" x="0.0" y="1.0" z="0.0"/>
+ </SurveyCoord>
+ -->
+ </SurveyVolume>
+ <SurveyVolume name="support_bottom_L13">
+ <SurveyPos>
+ <point name="ball" x="0.0" y="0.0" z="0.0"/>
+ <point name="vee" x="-1.0" y="0.0" z="0.0"/>
+ <point name="flat" x="0.0" y="-1.0" z="0.0"/>
+ </SurveyPos>
+ </SurveyVolume>
+ <SurveyVolume name="support_plate_bottom_L13">
+ <SurveyPos>
+ <point name="ball" x="0.0" y="0.0" z="0.0"/>
+ <point name="vee" x="1.0" y="0.0" z="0.0"/>
+ <point name="flat" x="0.0" y="1.0" z="0.0"/>
+ </SurveyPos>
+ </SurveyVolume>
+ <SurveyVolume name="module_L1b">
+ <SurveyPos>
+ <point name="ball" x="0.0" y="0.0" z="0.0"/>
+ <point name="vee" x="0.0" y="0.0" z="1.0"/>
+ <point name="flat" x="1.0" y="0.0" z="0.0"/>
+ </SurveyPos>
+ </SurveyVolume>
+ </SurveyVolumes>
+
+ <millepede_constants>
+
+ <!-- top half-module translations -->
+ <millepede_constant name="11101" value="0.0"/>
+ <millepede_constant name="11102" value="0.0"/>
+ <millepede_constant name="11103" value="0.0"/>
+ <millepede_constant name="11104" value="0.0"/>
+ <millepede_constant name="11105" value="0.0"/>
+ <millepede_constant name="11106" value="0.0"/>
+ <millepede_constant name="11107" value="0.0"/>
+ <millepede_constant name="11108" value="0.0"/>
+ <millepede_constant name="11109" value="0.0"/>
+ <millepede_constant name="11110" value="0.0"/>
+
+ <millepede_constant name="11201" value="0.0"/>
+ <millepede_constant name="11202" value="0.0"/>
+ <millepede_constant name="11203" value="0.0"/>
+ <millepede_constant name="11204" value="0.0"/>
+ <millepede_constant name="11205" value="0.0"/>
+ <millepede_constant name="11206" value="0.0"/>
+ <millepede_constant name="11207" value="0.0"/>
+ <millepede_constant name="11208" value="0.0"/>
+ <millepede_constant name="11209" value="0.0"/>
+ <millepede_constant name="11210" value="0.0"/>
+
+ <millepede_constant name="11301" value="0.0"/>
+ <millepede_constant name="11302" value="0.0"/>
+ <millepede_constant name="11303" value="0.0"/>
+ <millepede_constant name="11304" value="0.0"/>
+ <millepede_constant name="11305" value="0.0"/>
+ <millepede_constant name="11306" value="0.0"/>
+ <millepede_constant name="11307" value="0.0"/>
+ <millepede_constant name="11308" value="0.0"/>
+ <millepede_constant name="11309" value="0.0"/>
+ <millepede_constant name="11310" value="0.0"/>
+
+ <!-- top half-module rotations -->
+
+ <millepede_constant name="12101" value="0.0"/>
+ <millepede_constant name="12102" value="0.0"/>
+ <millepede_constant name="12103" value="0.0"/>
+ <millepede_constant name="12104" value="0.0"/>
+ <millepede_constant name="12105" value="0.0"/>
+ <millepede_constant name="12106" value="0.0"/>
+ <millepede_constant name="12107" value="0.0"/>
+ <millepede_constant name="12108" value="0.0"/>
+ <millepede_constant name="12109" value="0.0"/>
+ <millepede_constant name="12110" value="0.0"/>
+
+ <millepede_constant name="12201" value="0.0"/>
+ <millepede_constant name="12202" value="0.0"/>
+ <millepede_constant name="12203" value="0.0"/>
+ <millepede_constant name="12204" value="0.0"/>
+ <millepede_constant name="12205" value="0.0"/>
+ <millepede_constant name="12206" value="0.0"/>
+ <millepede_constant name="12207" value="0.0"/>
+ <millepede_constant name="12208" value="0.0"/>
+ <millepede_constant name="12209" value="0.0"/>
+ <millepede_constant name="12210" value="0.0"/>
+
+ <millepede_constant name="12301" value="0.0"/>
+ <millepede_constant name="12302" value="0.0"/>
+ <millepede_constant name="12303" value="0.0"/>
+ <millepede_constant name="12304" value="0.0"/>
+ <millepede_constant name="12305" value="0.0"/>
+ <millepede_constant name="12306" value="0.0"/>
+ <millepede_constant name="12307" value="0.0"/>
+ <millepede_constant name="12308" value="0.0"/>
+ <millepede_constant name="12309" value="0.0"/>
+ <millepede_constant name="12310" value="0.0"/>
+
+ <!-- bottom half-module translations -->
+
+ <millepede_constant name="21101" value="0.0"/>
+ <millepede_constant name="21102" value="0.0"/>
+ <millepede_constant name="21103" value="0.0"/>
+ <millepede_constant name="21104" value="0.0"/>
+ <millepede_constant name="21105" value="0.0"/>
+ <millepede_constant name="21106" value="0.0"/>
+ <millepede_constant name="21107" value="0.0"/>
+ <millepede_constant name="21108" value="0.0"/>
+ <millepede_constant name="21109" value="0.0"/>
+ <millepede_constant name="21110" value="0.0"/>
+
+ <millepede_constant name="21201" value="0.0"/>
+ <millepede_constant name="21202" value="0.0"/>
+ <millepede_constant name="21203" value="0.0"/>
+ <millepede_constant name="21204" value="0.0"/>
+ <millepede_constant name="21205" value="0.0"/>
+ <millepede_constant name="21206" value="0.0"/>
+ <millepede_constant name="21207" value="0.0"/>
+ <millepede_constant name="21208" value="0.0"/>
+ <millepede_constant name="21209" value="0.0"/>
+ <millepede_constant name="21210" value="0.0"/>
+
+ <millepede_constant name="21301" value="0.0"/>
+ <millepede_constant name="21302" value="0.0"/>
+ <millepede_constant name="21303" value="0.0"/>
+ <millepede_constant name="21304" value="0.0"/>
+ <millepede_constant name="21305" value="0.0"/>
+ <millepede_constant name="21306" value="0.0"/>
+ <millepede_constant name="21307" value="0.0"/>
+ <millepede_constant name="21308" value="0.0"/>
+ <millepede_constant name="21309" value="0.0"/>
+ <millepede_constant name="21310" value="0.0"/>
+
+ <!-- bottom half-module rotations -->
+
+ <millepede_constant name="22101" value="0.0"/>
+ <millepede_constant name="22102" value="0.0"/>
+ <millepede_constant name="22103" value="0.0"/>
+ <millepede_constant name="22104" value="0.0"/>
+ <millepede_constant name="22105" value="0.0"/>
+ <millepede_constant name="22106" value="0.0"/>
+ <millepede_constant name="22107" value="0.0"/>
+ <millepede_constant name="22108" value="0.0"/>
+ <millepede_constant name="22109" value="0.0"/>
+ <millepede_constant name="22110" value="0.0"/>
+
+ <millepede_constant name="22201" value="0.0"/>
+ <millepede_constant name="22202" value="0.0"/>
+ <millepede_constant name="22203" value="0.0"/>
+ <millepede_constant name="22204" value="0.0"/>
+ <millepede_constant name="22205" value="0.0"/>
+ <millepede_constant name="22206" value="0.0"/>
+ <millepede_constant name="22207" value="0.0"/>
+ <millepede_constant name="22208" value="0.0"/>
+ <millepede_constant name="22209" value="0.0"/>
+ <millepede_constant name="22210" value="0.0"/>
+
+ <millepede_constant name="22301" value="0.0"/>
+ <millepede_constant name="22302" value="0.0"/>
+ <millepede_constant name="22303" value="0.0"/>
+ <millepede_constant name="22304" value="0.0"/>
+ <millepede_constant name="22305" value="0.0"/>
+ <millepede_constant name="22306" value="0.0"/>
+ <millepede_constant name="22307" value="0.0"/>
+ <millepede_constant name="22308" value="0.0"/>
+ <millepede_constant name="22309" value="0.0"/>
+ <millepede_constant name="22310" value="0.0"/>
+
+
+ <!-- top support tilt angles -->
+ <millepede_constant name="13100" value="0.0"/> <!-- + means opening -->
+ <millepede_constant name="13200" value="0.0"/>
+ <millepede_constant name="13300" value="0.0"/>
+
+ <!-- bottom support tilt angles -->
+ <millepede_constant name="23100" value="0.0"/> <!-- + means closing -->
+ <millepede_constant name="23200" value="0.0"/>
+ <millepede_constant name="23300" value="0.0"/>
+
+ </millepede_constants>
</detector>
</detectors>
<readouts>
########################################################################
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
|