GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
diff -u -r1.9 -r1.10
--- SiTrackerEndcap.java 2 Nov 2007 20:10:28 -0000 1.9
+++ SiTrackerEndcap.java 7 Nov 2007 01:14:18 -0000 1.10
@@ -37,7 +37,10 @@
// Set static module parameters.
moduleParameters = new ModuleParameters(node.getChild("module"));
-
+
+ int sysId = node.getAttribute("id").getIntValue();
+ String subdetName = node.getAttributeValue("name");
+
for (Object o : node.getChildren("layer"))
{
Element layerElement = (Element)o;
@@ -60,14 +63,12 @@
innerR = layerElement.getAttribute("inner_r").getDoubleValue();
outerR = layerElement.getAttribute("outer_r").getDoubleValue();
innerZ = layerElement.getAttribute("inner_z").getDoubleValue();
- thickness = layerElement.getAttribute("thickness").getDoubleValue();
+ thickness = layerElement.getAttribute("thickness").getDoubleValue();
}
catch (DataConversionException x)
{
throw new RuntimeException(x);
- }
-
- String subdetName = node.getAttributeValue("name");
+ }
String layerName = subdetName + "_layer" + layerN;
@@ -85,7 +86,9 @@
// Positive endcap.
PhysVol posEC = new PhysVol(layerVolume, lcdd.getTrackingVolume(), position, rotation);
- posEC.addPhysVolID("barrel", 1);
+ posEC.addPhysVolID("system", sysId);
+ posEC.addPhysVolID("barrel", 1); // Positive endcap flag.
+ posEC.addPhysVolID("layer", layerN);
// Negative endcap.
Rotation rotationReflect = new Rotation(layerName + "_rotation_reflect");
@@ -95,7 +98,9 @@
lcdd.add(rotationReflect);
lcdd.add(positionReflect);
PhysVol negEC = new PhysVol(layerVolume, lcdd.getTrackingVolume(), positionReflect, rotationReflect);
- negEC.addPhysVolID("barrel", 2);
+ negEC.addPhysVolID("system", sysId);
+ negEC.addPhysVolID("barrel", 2); // Negative endcap flag.
+ negEC.addPhysVolID("layer", layerN);
}
moduleParameters = null;
@@ -327,11 +332,8 @@
Rotation rot = new Rotation(sliceName + "_rotation");
lcdd.add(rot);
- new PhysVol(
- sliceLV,
- wedgeLV,
- p,
- rot);
+ PhysVol slicePV = new PhysVol(sliceLV, wedgeLV, p, rot);
+ slicePV.addPhysVolID("module", imodule);
imodule++;
}
@@ -357,11 +359,8 @@
Rotation rot = new Rotation(sliceName + "_rotation");
lcdd.add(rot);
- new PhysVol(
- sliceLV,
- wedgeLV,
- p,
- rot);
+ PhysVol slicePV = new PhysVol(sliceLV, wedgeLV, p, rot);
+ slicePV.addPhysVolID("module", imodule);
imodule++;
}
@@ -399,11 +398,8 @@
Rotation rot = new Rotation(sliceName + "_rotation");
lcdd.add(rot);
- new PhysVol(
- sliceLV,
- wedgeLV,
- p,
- rot);
+ PhysVol slicePV = new PhysVol(sliceLV, wedgeLV, p, rot);
+ slicePV.addPhysVolID("module", imodule);
imodule++;
}