Commit in GeomConverter on MAIN
src/org/lcsim/geometry/compact/converter/lcdd/SiStripTrackerBarrel.java+25-41.1 -> 1.2
test/org/lcsim/geometry/subdetector/SiStripTrackerBarrelTest.xml+43-151.1 -> 1.2
+68-19
2 modified files
JM: Add ability to set position of each module_component in the module.

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
SiStripTrackerBarrel.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- SiStripTrackerBarrel.java	29 Sep 2006 01:00:08 -0000	1.1
+++ SiStripTrackerBarrel.java	29 Sep 2006 17:41:48 -0000	1.2
@@ -345,10 +345,31 @@
 					PhysVol component_physvol = new PhysVol(component_logvol);
 					
 					// Set component position.
-					Position component_position = new Position(component_name + "_position");
-					component_position.setZ(component.getAttribute("zc").getDoubleValue());
-					lcdd.getDefine().addPosition(component_position);
-					component_physvol.setPosition(component_position);
+					// FIXME: Processing of positions should be generalized in compact description.					
+					if (component.getChild("position") != null)
+					{
+						Element pos_elem = component.getChild("position");
+					
+						Position component_position = new Position(component_name + "_position");
+						
+						if (pos_elem.getAttribute("x") != null)
+						{
+							component_position.setX(pos_elem.getAttribute("x").getDoubleValue());
+						}
+						
+						if (pos_elem.getAttribute("y") != null)
+						{
+							component_position.setY(pos_elem.getAttribute("y").getDoubleValue());
+						}
+						
+						if (pos_elem.getAttribute("z") != null)
+						{
+							component_position.setZ(pos_elem.getAttribute("z").getDoubleValue());
+						}
+						
+						lcdd.getDefine().addPosition(component_position);
+						component_physvol.setPosition(component_position);
+					}										
 					
 					// Set component rotation.
 					// FIXME: Processing of rotations should be generalized in compact description.

GeomConverter/test/org/lcsim/geometry/subdetector
SiStripTrackerBarrelTest.xml 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- SiStripTrackerBarrelTest.xml	29 Sep 2006 01:00:10 -0000	1.1
+++ SiStripTrackerBarrelTest.xml	29 Sep 2006 17:41:49 -0000	1.2
@@ -30,41 +30,69 @@
 	-->
 	
 		<detector id="1" name="SiStripTrackerBarrel" type="SiStripTrackerBarrel" readout="SiStripTrackerBarrel_RO" vis="TestVis">
+		
 			<module name="SiTrackerModule">
 		
 				<module_envelope width="97.79" length="97.79" thickness="5.5"/>
+								
+				<module_component  width="97.79" length="97.79" thickness="0.1" material="Kapton" sensitive="false">				
+					<position z="-2.692"/>
+				</module_component>
 				
-				<!--<module_envelope width="200.0" length="200.0" thickness="20.0"/>-->
+				<module_component width="63.8" length="6.67" thickness="0.3" material="Silicon" sensitive="false">
+					<position z="-2.492"/>
+				</module_component>
 				
-				<module_component zc="-2.692" width="97.79" length="97.79" thickness="0.1" material="Kapton" sensitive="false" />				
-				<module_component zc="-2.492" width="63.8" length="6.67" thickness="0.3" material="Silicon" sensitive="false" />				
-				<module_component zc="-2.082" width="93.031" length="93.031" thickness="0.3" material="Silicon" sensitive="true">
+				<module_component width="93.031" length="93.031" thickness="0.3" material="Silicon" sensitive="true">
+					<position z="-2.082"/>
 					<rotation z="0.04" />
 				</module_component>
 
-				<module_component zc="-1.702" width="97.79" length="97.79" thickness="0.228" material="CarbonFiber" sensitive="false" />
+				<module_component width="97.79" length="97.79" thickness="0.228" material="CarbonFiber" sensitive="false">
+					<position z="-1.702"/>
+				</module_component>
 
-				<module_component zc="0.0" width="97.79" length="97.79" thickness="3.175" material="Rohacell31" sensitive="false" />
+				<module_component width="97.79" length="97.79" thickness="3.175" material="Rohacell31" sensitive="false">
+					<position z="0.0"/>
+				</module_component>
 				
-				<module_component zc="1.702" width="97.79" length="97.79" thickness="0.228" material="CarbonFiber" sensitive="false" />
+				<module_component width="97.79" length="97.79" thickness="0.228" material="CarbonFiber" sensitive="false">
+					<position z="1.702"/>
+				</module_component>
 				
-				<module_component zc="2.082" width="93.031" length="93.031" thickness="0.3" material="Silicon" sensitive="true" />
-				<module_component zc="2.492" width="63.8" length="6.67" thickness="0.3" material="Silicon" sensitive="false" />
-				<module_component zc="2.692" width="97.79" length="97.79" thickness="0.1" material="Kapton" sensitive="false" />
+				<module_component width="93.031" length="93.031" thickness="0.3" material="Silicon" sensitive="true">
+					<position z="2.082"/>
+				</module_component>
 				
-				<!--
-				<module_component zc="" width="97.79" length="97.79" thickness="" material="" sensitive="false" />
-				-->
+				<module_component width="63.8" length="6.67" thickness="0.3" material="Silicon" sensitive="false">
+					<position z="2.492"/>
+				</module_component>
 				
+				<module_component width="97.79" length="97.79" thickness="0.1" material="Kapton" sensitive="false">
+					<position z="2.692"/>
+				</module_component>
+								
 			</module>
+			
 			<layer module="SiTrackerModule">
+
 				<barrel_envelope inner_r="1220.0" outer_r="1265.0" z_length="3260.0" />
-				<!--<rphi_layout phi_tilt="0.19" nphi="1" phi0="0.01745" rc="1230.0" />
-				<z_layout dr="5.5" z0="1581.0" nz="1"/>-->
+
 				<rphi_layout phi_tilt="0.19" nphi="90" phi0="0.01745" rc="1230.0" />
+
 				<z_layout dr="5.5" z0="1581.0" nz="37"/>
+
 			</layer>
+
 		</detector>	
+
+				<!--
+				<module_component zc="" width="97.79" length="97.79" thickness="" material="" sensitive="false" />
+				-->
+		
+		
+						<!--<rphi_layout phi_tilt="0.19" nphi="1" phi0="0.01745" rc="1230.0" />
+				<z_layout dr="5.5" z0="1581.0" nz="1"/>-->
 	
 	<!--
 		<detector id="1" name="SiStripTrackerBarrel" type="SiStripTrackerBarrel" readout="SiStripTrackerBarrel_RO" vis="TestVis">
CVSspam 0.2.8