projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/converter/compact
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/converter/compact/HPSTestRunTracker2014JavaBuilder.java 2014-08-19 05:56:51 UTC (rev 3271)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/converter/compact/HPSTestRunTracker2014JavaBuilder.java 2014-08-19 05:57:24 UTC (rev 3272)
@@ -160,9 +160,15 @@
*/
private void addModule(ModuleBundle bundle, JavaBaseGeom mother) {
+ if(isDebug()) {
+ System.out.printf("%s: addModule:\n",this.getClass().getSimpleName());
+ bundle.print();
+ }
+
// Create the module
JavaBaseGeom lcddM = new GhostJavaBaseGeom(bundle.module, mother);
add(lcddM);
+
// add half modules
addHalfModule(bundle.halfModuleAxial,lcddM);
addHalfModule(bundle.halfModuleStereo,lcddM);
@@ -183,7 +189,7 @@
int oldCompactModuleId = 0;
JavaBaseGeom lcddHM = new JavaBaseGeom(bundle.halfModule, mother,oldCompactModuleId);
add(lcddHM);
-
+
//TODO find the sensor id, this needs to be fixed.
int sensorNumber = mother.getComponentId();
@@ -258,6 +264,7 @@
if(isDebug()) System.out.printf("%s: constructing JAVA ghost object %s with mother %s\n", this.getClass().getSimpleName(),base.getName(),mother==null?"null":mother.getName());
setName(base.getName());
setMother(mother);
+ mother.addDaughter(this);
if(isDebug()) System.out.printf("%s: DONE constructing JAVA object %s\n", this.getClass().getSimpleName(),base.getName());
}
@@ -295,7 +302,7 @@
* @param volumeId - component id number
*/
public JavaBaseGeom(BaseGeometry geomObject, JavaBaseGeom mother, int volumeId) {
- if(isDebug()) System.out.printf("%s: constructing JAVA object %s (volumeID %d) with mother %s\n", this.getClass().getSimpleName(),volumeId,geomObject.getName(),mother==null?"null":mother.getName());
+ if(isDebug()) System.out.printf("%s: constructing JAVA object %s (volumeID %d) with mother %s\n", this.getClass().getSimpleName(),geomObject.getName(),volumeId,mother==null?"null":mother.getName());
setName(geomObject.getName());
setComponentId(volumeId);
setMother(mother);