Commit in GeomConverter on MAIN
src/org/lcsim/detector/converter/compact/SiTrackerBarrelConverter.java+459added 1.1
                                        /DetectorConverter.java+1-11.9 -> 1.10
test/org/lcsim/detector/converter/compact/SiTrackerBarrelTest.java+121added 1.1
                                         /SiTrackerBarrelTest.xml+123added 1.1
+704-1
3 added + 1 modified, total 4 files
JM: First version of SiTrackerBarrelConverter.

GeomConverter/src/org/lcsim/detector/converter/compact
SiTrackerBarrelConverter.java added at 1.1
diff -N SiTrackerBarrelConverter.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SiTrackerBarrelConverter.java	3 Apr 2007 01:45:59 -0000	1.1
@@ -0,0 +1,459 @@
+package org.lcsim.detector.converter.compact;
+
+import static java.lang.Math.cos;
+import static java.lang.Math.sin;
+import hep.physics.vec.BasicHep3Vector;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.jdom.DataConversionException;
+import org.jdom.Element;
+import org.lcsim.detector.DetectorElement;
+import org.lcsim.detector.IDetectorElement;
+import org.lcsim.detector.ILogicalVolume;
+import org.lcsim.detector.IPhysicalVolume;
+import org.lcsim.detector.LogicalVolume;
+import org.lcsim.detector.PhysicalVolume;
+import org.lcsim.detector.Rotation3D;
+import org.lcsim.detector.Transform3D;
+import org.lcsim.detector.material.IMaterial;
+import org.lcsim.detector.material.MaterialStore;
+import org.lcsim.detector.solids.Box;
+import org.lcsim.detector.solids.ISolid;
+import org.lcsim.detector.solids.Tube;
+import org.lcsim.geometry.Detector;
+import org.lcsim.geometry.Subdetector;
+import org.lcsim.geometry.subdetector.SiTrackerBarrel;
+
+public class SiTrackerBarrelConverter
+implements ISubdetectorConverter
+{
+    public void convert( Subdetector subdet, Detector detector)
+    {
+        System.out.println("SiTrackerBarrelConverter.convert");
+                      
+        Map<String, ILogicalVolume> modules = buildModules(subdet);
+        
+        try {
+            buildLayers(detector, subdet, modules);
+        }
+        catch ( DataConversionException x )
+        {
+            throw new RuntimeException( x );
+        }
+    }
+    
+    private Map<String, ILogicalVolume> buildModules(Subdetector subdet)
+    {
+        Map<String, ILogicalVolume> modules = new HashMap<String, ILogicalVolume>();
+        
+        Element subdetElement = subdet.getNode();
+        
+        for (Iterator i = subdetElement.getChildren("module").iterator(); i.hasNext();)
+        {
+            Element module = (Element) i.next();
+            String module_name = module.getAttributeValue("name");
+            ILogicalVolume module_envelope;
+            try
+            {
+                module_envelope = buildModule(subdetElement, module_name);
+                modules.put(module_name, module_envelope);
+            }
+            catch (Exception x)
+            {
+                throw new RuntimeException(x);
+            }
+        }
+        
+        return modules;
+    }
+    
+    private ILogicalVolume buildModule(Element subdetElement, String module_name) throws Exception
+    {
+        String subdetName = subdetElement.getAttributeValue("name");
+        ILogicalVolume moduleLogVol = null;
+
+        int sensor_number = 0;
+
+        Element moduleElement=null;
+        for (Iterator i = subdetElement.getChildren("module").iterator(); i.hasNext();)
+        {
+            Element moduleCheck = (Element) i.next();
+            if (moduleCheck.getAttributeValue("name").compareTo(module_name) == 0)
+            {
+                moduleElement = moduleCheck;
+            }            
+        }
+        if ( moduleElement == null )
+        {
+            throw new RuntimeException("module <" + module_name + " was not found");
+        }
+        
+        Element moduleEnvelopeElement = moduleElement.getChild("module_envelope");
+        
+        //String moduleLongName = subdetName + "_" + moduleElement.getAttributeValue("name");
+
+        // Create the module box.
+        double moduleLength = moduleEnvelopeElement.getAttribute("length").getDoubleValue();
+        double moduleWidth = moduleEnvelopeElement.getAttribute("width").getDoubleValue();
+        double moduleThickness = moduleEnvelopeElement.getAttribute("thickness").getDoubleValue();
+        ISolid moduleBox = 
+            new Box(module_name + "_box", 
+                    moduleWidth/2, 
+                    moduleLength/2, 
+                    moduleThickness/2);
+       
+        // Create the module logical volume.
+        IMaterial air = MaterialStore.getInstance().get("Air");
+        moduleLogVol = new LogicalVolume(module_name, moduleBox, air);
+        
+        int componentNumber = 0;
+        for (Iterator j = moduleElement.getChildren("module_component").iterator(); j.hasNext(); ++componentNumber)
+        {
+            Element componentElement = (Element) j.next();
+
+            boolean sensitive = ((componentElement.getAttribute("sensitive") == null) ? false : componentElement.getAttribute("sensitive").getBooleanValue());
+
+            String componentName = module_name + "_component" + componentNumber;
+            
+            // Create the box solid for the module component.
+            double componentLength = componentElement.getAttribute("length").getDoubleValue();
+            double componentWidth = componentElement.getAttribute("width").getDoubleValue();
+            double componentThickness = componentElement.getAttribute("thickness").getDoubleValue();
+            ISolid componentBox = 
+                new Box(componentName,
+                        componentWidth/2,
+                        componentLength/2,
+                        componentThickness/2);
+
+            IMaterial componentMaterial = 
+                MaterialStore.getInstance().get(componentElement.getAttributeValue("material"));            
+            
+            // Create the volume for the module component.
+            ILogicalVolume componentLogVol = 
+                new LogicalVolume(componentName, componentBox, componentMaterial);
+                                    
+            // Set component position.                 
+            BasicHep3Vector pos = new BasicHep3Vector();
+            Rotation3D rot = new Rotation3D();
+            
+            double px=0, py=0, pz=0, rx=0, ry=0, rz=0;
+            
+            if (componentElement.getChild("position") != null)
+            {
+                Element pos_elem = componentElement.getChild("position");
+
+                if (pos_elem.getAttribute("x") != null)
+                {
+                    px = pos_elem.getAttribute("x").getDoubleValue();
+                }
+
+                if (pos_elem.getAttribute("y") != null)
+                {
+                    py = pos_elem.getAttribute("y").getDoubleValue();
+                }
+
+                if (pos_elem.getAttribute("z") != null)
+                {
+                    pz = pos_elem.getAttribute("z").getDoubleValue();
+                }
+            }
+            
+            pos.setV(px,py,pz);
+
+            // Set component rotation.
+            if (componentElement.getChild("rotation") != null)
+            {
+                Element rot_elem = componentElement.getChild("rotation");
+
+                if (rot_elem.getAttribute("x") != null)
+                {
+                    rot_elem.getAttribute("x").getDoubleValue();
+                }
+
+                if (rot_elem.getAttribute("y") != null)
+                {
+                    rot_elem.getAttribute("y").getDoubleValue();
+                }
+
+                if (rot_elem.getAttribute("z") != null)
+                {
+                    rot_elem.getAttribute("z").getDoubleValue();
+                }
+            }
+            
+            rot.setPassiveXYZ(rx,ry,rz);
+
+            Transform3D componentTransform = new Transform3D(pos,rot);
+            
+            new PhysicalVolume(
+                    componentTransform,
+                    componentName,
+                    componentLogVol,
+                    moduleLogVol,
+                    componentNumber
+                    );            
+            
+            ++componentNumber;            
+        }        
+                
+        return moduleLogVol;        
+    }
+    
+    private void buildLayers(
+            Detector detector, 
+            Subdetector subdet, 
+            Map<String,ILogicalVolume> modules) throws DataConversionException   
+    {
+        Element node = subdet.getNode();
+        String detector_name = subdet.getName();
+        
+//      Build the layers.
+        int nlayer = 0;
+        int sensorNumber = 0;
+        for (Iterator i = node.getChildren("layer").iterator(); i.hasNext(); nlayer++)
+        {
+            // Get the next layer element.
+            Element layer_element = (Element) i.next();
+
+            // Get the reference to the module from the layer.
+            String module_name = layer_element.getAttributeValue("module");
+
+            // Get the logical volume for the module.
+            ILogicalVolume moduleEnvelope = modules.get(module_name);
+
+            // Get the barrel_envelope for this layer.
+            Element barrel_envelope = layer_element.getChild("barrel_envelope");
+
+            // Inner radius of layer.
+            double ir = barrel_envelope.getAttribute("inner_r").getDoubleValue();
+
+            // Outer radius of layer.
+            double or = barrel_envelope.getAttribute("outer_r").getDoubleValue();
+
+            // Full length in z of layer.
+            double oz = barrel_envelope.getAttribute("z_length").getDoubleValue();
+
+            // Name of this layer including layer number.
+            String layer_name = detector_name + "_layer" + nlayer;
+
+            //System.out.println("layer_name=" + layer_name);
+            
+            Tube layer_tube = new Tube(
+                    layer_name + "_tube",
+                    ir,
+                    or,
+                    oz/2);
+
+            // Create the layer envelope volume.
+            IMaterial air = MaterialStore.getInstance().get("Air");
+            ILogicalVolume layer_volume = 
+                new LogicalVolume(layer_name, layer_tube, air);
+            
+            // Layer PhysicalVolume.
+            IPhysicalVolume layer_envelope_physvol = 
+                new PhysicalVolume(
+                        null,
+                        layer_name,
+                        layer_volume,
+                        detector.getTrackingVolume().getLogicalVolume(),
+                        nlayer); 
+            
+            // Layer DE.
+            String layerPath = "/tracking_region/" + layer_name;            
+            IDetectorElement layerDE = new DummyDE(layer_name, subdet, layerPath);            
+
+            // Get the rphi_layout element.
+            Element rphi_layout = layer_element.getChild("rphi_layout");
+
+            // Starting phi of first module.
+            double phi0 = rphi_layout.getAttribute("phi0").getDoubleValue();
+
+            // Number of modules in phi.
+            int nphi = rphi_layout.getAttribute("nphi").getIntValue();
+            assert (nphi > 0);
+
+            // Phi tilt of a module.
+            double phi_tilt = rphi_layout.getAttribute("phi_tilt").getDoubleValue();
+
+            // Radius of the module center.
+            double rc = rphi_layout.getAttribute("rc").getDoubleValue();
+
+            // The delta radius of every other module.
+            double rphi_dr = 0.0;
+            if (rphi_layout.getAttribute("dr") != null)
+            {
+                rphi_dr = rphi_layout.getAttribute("dr").getDoubleValue();
+            }
+
+            // Phi increment for one module.
+            double phi_incr = (Math.PI * 2) / nphi;
+
+            // Phi of the module center.
+            double phic = 0;
+            phic += phi0;
+
+            // Get the <z_layout> element.
+            Element z_layout = layer_element.getChild("z_layout");
+
+            // Z position of first module in phi.
+            double z0 = z_layout.getAttribute("z0").getDoubleValue();
+
+            // Number of modules to place in z.
+            double nz = z_layout.getAttribute("nz").getIntValue();
+            assert (nz > 0);
+
+            // Radial displacement parameter, of every other module.
+            double z_dr = z_layout.getAttribute("dr").getDoubleValue();
+
+            // Z increment for module placement along Z axis.
+            // Adjust for z0 at center of module rather than
+            // the end of cylindrical envelope.
+            double z_incr = (2.0 * z0) / (nz - 1);
+
+            // Starting z for module placement along Z axis.
+            double module_z = -z0;
+
+            // DEBUG 
+            //System.out.println("layer ir=" + ir);
+            //System.out.println("layer or=" + or);
+            //System.out.println("layer oz=" + oz);
+            //System.out.println("phi_tilt=" + phi_tilt);
+            //System.out.println("rc=" + rc);
+            //System.out.println("phi0=" + phi0);
+            //System.out.println("module z_incr=" + z_incr);
+            //System.out.println("module z0=" + z0);
+            //System.out.println("module nz=" + nz);
+            //System.out.println("module dr=" + dr);
+            //
+
+            //String module_lkp_name = layer.getAttributeValue("module");
+
+            // Loop over the number of modules in phi.
+            for (int ii = 0; ii < nphi; ii++)
+            {
+                // Delta x of module position.
+                double dx = z_dr * cos(phic + phi_tilt);
+
+                // Delta y of module position.
+                double dy = z_dr * sin(phic + phi_tilt);
+
+                // Basic x module position.
+                double x = rc * cos(phic);
+
+                // Basic y module position.
+                double y = rc * sin(phic);
+
+                // Loop over the number of modules in z.
+                for (int j = 0; j < nz; j++)
+                {
+                    // Create a unique name for the module in this logical volume, layer, phi, and z.
+                    String module_place_name = detector_name + "_layer" + nlayer + "_phi" + ii + "_z" + j;
+
+                    double z = module_z;
+
+                    // DEBUG
+                    System.out.println("module build...");
+                    System.out.println("module nphi=" + ii);
+                    System.out.println("module nz" + j);
+                    System.out.println("module x=" + x);
+                    System.out.println("module y=" + y);
+                    System.out.println("module z=" + z);
+                    // DEBUG
+
+                    // Position of module.
+                    //Position module_position = new Position(module_place_name + "_position");
+                    BasicHep3Vector module_position = new BasicHep3Vector(x,y,z); 
+
+                    // Rotation of module.
+                    Rotation3D module_rotation = new Rotation3D();
+                    
+                    /*
+                     from the LCDD converter 
+                     
+                    double rotx = Math.PI / 2;
+                    double roty = -((Math.PI / 2) - phic - phi_tilt);
+                    double rotz = 0;
+                                        
+                    */
+                    
+                    // FIXME:  The Y and Z rotations are switched around from
+                    //         the LCDD / Geant4 convention.  Seems like an
+                    //         active versus passive problem.
+                    double rotx = Math.PI/2;
+                    double roty = 0;
+                    double rotz = ((Math.PI / 2) - phic - phi_tilt);
+                    
+                    module_rotation.setPassiveXYZ(rotx,roty,rotz);
+
+                    System.out.println("module rotx=" + rotx);
+                    System.out.println("module roty=" + roty);
+                    System.out.println("module rotz=" + rotz);
+                    
+                    Transform3D moduleTransform = new Transform3D(module_position, module_rotation);
+                                       
+                    // Module PhysicalVolume.
+                    IPhysicalVolume module_physvol =
+                        new PhysicalVolume(
+                                moduleTransform,
+                                module_place_name,
+                                moduleEnvelope,
+                                layer_volume,
+                                sensorNumber
+                                );
+                    
+                    String modulePath = 
+                        "/tracking_region/" + layer_name + "/" + module_place_name;
+                    
+                    new DummyDE(module_place_name, layerDE, modulePath);
+                                                            
+                    ++sensorNumber;
+                                                            
+                    // Adjust the x and y coordinates of the module.
+                    x += dx;
+                    y += dy;
+
+                    // Flip sign of x and y adjustments.
+                    dx *= -1;
+                    dy *= -1;
+
+                    // Add z increment to get next z placement pos.
+                    module_z += z_incr;
+
+                    //System.out.println();
+                }
+
+                // Increment the phi placement of module.
+                phic += phi_incr;
+
+                // Increment the center radius according to dr parameter.
+                rc += rphi_dr;
+
+                // Flip sign of dr parameter.
+                rphi_dr *= -1;
+
+                // Reset the Z placement parameter for module.
+                module_z = -z0;
+            }                                   
+        }
+    }
+
+    public Class getSubdetectorType()
+    {
+        return SiTrackerBarrel.class;
+    }
+    
+    // FIXME: Replace with real DE.
+    public class DummyDE extends DetectorElement
+    {
+        DummyDE(String name,
+                IDetectorElement parent,
+                String path) 
+        {
+            super(name, parent, path);
+            System.out.println(name + " : " + path);
+        }
+    }
+}
\ No newline at end of file

GeomConverter/src/org/lcsim/detector/converter/compact
DetectorConverter.java 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- DetectorConverter.java	24 Mar 2007 01:02:50 -0000	1.9
+++ DetectorConverter.java	3 Apr 2007 01:45:59 -0000	1.10
@@ -7,7 +7,6 @@
 import org.jdom.Document;
 import org.jdom.Element;
 import org.jdom.JDOMException;
-import org.lcsim.detector.DetectorElement;
 import org.lcsim.detector.ILogicalVolume;
 import org.lcsim.detector.IPhysicalVolume;
 import org.lcsim.detector.LogicalVolume;
@@ -35,6 +34,7 @@
         addSubdetectorConverter( new CylindricalEndcapCalorimeterConverter() );
         addSubdetectorConverter( new MultiLayerTrackerConverter() );
         addSubdetectorConverter( new DiskTrackerConverter() );
+        addSubdetectorConverter( new SiTrackerBarrelConverter() );
 	}
 	
 	private void addSubdetectorConverter(ISubdetectorConverter s)

GeomConverter/test/org/lcsim/detector/converter/compact
SiTrackerBarrelTest.java added at 1.1
diff -N SiTrackerBarrelTest.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SiTrackerBarrelTest.java	3 Apr 2007 01:45:59 -0000	1.1
@@ -0,0 +1,121 @@
+package org.lcsim.detector.converter.compact;
+
+import hep.graphics.heprep.HepRep;
+import hep.graphics.heprep.HepRepFactory;
+import hep.graphics.heprep.HepRepInstance;
+import hep.graphics.heprep.HepRepInstanceTree;
+import hep.graphics.heprep.HepRepPoint;
+import hep.graphics.heprep.HepRepTreeID;
+import hep.graphics.heprep.HepRepType;
+import hep.graphics.heprep.HepRepTypeTree;
+import hep.graphics.heprep.HepRepWriter;
+import hep.physics.vec.Hep3Vector;
+
+import java.awt.Color;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.lcsim.detector.DetectorElementStore;
+import org.lcsim.detector.IDetectorElement;
+import org.lcsim.detector.converter.heprep.DetectorElementToHepRepConverter;
+import org.lcsim.geometry.Detector;
+import org.lcsim.geometry.GeometryReader;
+
+/**
+ * 
+ * Perform tests on the detailed geometry of an 
+ * 
+ * @see org.lcsim.geometry.subdetector.DiskTracker 
+ * 
+ * @author Jeremy McCormick <[log in to unmask]>
+ *
+ */
+public class SiTrackerBarrelTest
+extends TestCase
+{
+    private Detector detector;
+
+    public SiTrackerBarrelTest(String name)
+    {
+        super(name);
+    }
+
+    public static junit.framework.Test suite()
+    {
+        return new TestSuite(SiTrackerBarrelTest.class);
+    }
+
+    private static final String resource = 
+        "/org/lcsim/detector/converter/compact/SiTrackerBarrelTest.xml";
+
+    public void setUp()
+    {
+        InputStream in = 
+            this.getClass().
+            getResourceAsStream(resource);
+
+        GeometryReader reader = new GeometryReader();
+
+        try {
+            detector = reader.read(in);
+        }
+        catch ( Throwable x )
+        {
+            throw new RuntimeException(x);
+        }
+    }
+    
+    public void testHepRep()
+    {
+        try {
+            writeHepRep("SiTrackerBarrelTest.heprep");
+        }
+        catch ( Exception x )
+        {
+            throw new RuntimeException( x );
+        }
+    }
+    
+    
+    public final static String HITS_LAYER = "Hits";
+    public final static String PARTICLES_LAYER = "Particles";
+
+    private void writeHepRep(String filepath) throws Exception
+    {
+        HepRepFactory factory = HepRepFactory.create();
+        HepRep root = factory.createHepRep();        
+
+        // detector
+        HepRepTreeID treeID = factory.createHepRepTreeID("DetectorType", "1.0");
+        HepRepTypeTree typeTree = factory.createHepRepTypeTree(treeID);
+        root.addTypeTree(typeTree);
+
+        HepRepInstanceTree instanceTree = factory.createHepRepInstanceTree("Detector", "1.0", typeTree);
+        root.addInstanceTree(instanceTree);
+
+        String detectorLayer = "Detector";
+        root.addLayer(detectorLayer);
+
+        HepRepType barrel = factory.createHepRepType(typeTree, "Barrel");
+        barrel.addAttValue("layer", detectorLayer);
+        HepRepType endcap = factory.createHepRepType(typeTree, "Endcap");
+        endcap.addAttValue("layer", detectorLayer);
+
+        DetectorElementToHepRepConverter cnv = 
+            new DetectorElementToHepRepConverter();
+
+        for (IDetectorElement de : DetectorElementStore.getInstance())
+        {
+            cnv.convert(de, factory, root);
+        }
+        // end detector
+        
+        HepRepWriter writer = 
+            HepRepFactory.create().createHepRepWriter(new FileOutputStream(filepath),false,false);
+        writer.write(root,"test");
+        writer.close();
+    }        
+}
\ No newline at end of file

GeomConverter/test/org/lcsim/detector/converter/compact
SiTrackerBarrelTest.xml added at 1.1
diff -N SiTrackerBarrelTest.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SiTrackerBarrelTest.xml	3 Apr 2007 01:45:59 -0000	1.1
@@ -0,0 +1,123 @@
+<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd">
+	<info name="subdetectors_test">
+		<comment/>
+	</info>
+	<define>
+		<constant name="cm" value="10"/>
+		<constant name="world_side" value="30000"/>
+		<constant name="world_x" value="world_side"/>
+		<constant name="world_y" value="world_side"/>
+		<constant name="world_z" value="world_side"/>
+		<constant name="tracking_region_radius" value="180.0 * cm"/>
+		<constant name="tracking_region_zmax" value="300.0 * cm"/>
+	</define>
+	<materials>
+    </materials>
+	<display>
+		<vis name="TestVis" alpha="1.0" r="1.0" g="0.0" b="0.0" drawingStyle="wireframe" lineStyle="unbroken" showDaughters="true" visible="true"/>
+	</display>
+	<detectors>
+		<detector id="1" name="SiTrackerBarrel" type="SiTrackerBarrel" readout="SiTrackerBarrel_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.228" material="CarbonFiber" sensitive="false">
+					<position z="-1.702"/>
+				</module_component>
+				<module_component width="97.79" length="97.79" thickness="3.175" material="Rohacell31" sensitive="false">
+					<position z="0.0"/>
+				</module_component>
+				<module_component width="97.79" length="97.79" thickness="0.228" material="CarbonFiber" sensitive="false">
+					<position z="1.702"/>
+				</module_component>
+				<module_component width="93.531" length="93.031" thickness="0.3" material="Silicon" sensitive="true">
+					<position z="2.082"/>
+				</module_component>
+				<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="195.0" outer_r="245.0" z_length="267.0 * 2.0"/>
+				<rphi_layout phi_tilt="0.19" nphi="16" phi0="0.196" rc="205.0" dr="0"/>
+				<z_layout dr="5.5" z0="218.0" nz="1"/>
+			</layer>
+
+			<!--			
+			<layer module="SiTrackerModule">
+				<barrel_envelope inner_r="195.0" outer_r="245.0" z_length="267.0 * 2.0"/>
+				<rphi_layout phi_tilt="0.19" nphi="16" phi0="0.196" rc="205.0" dr="0"/>
+				<z_layout dr="5.5" z0="218.0" nz="7"/>
+			</layer>
+
+			<layer module="SiTrackerModule">
+				<barrel_envelope inner_r="451.0" outer_r="501.0" z_length="608.0 * 2.0"/>
+				<rphi_layout phi_tilt="0.19" nphi="36" phi0="0.087" rc="461.0" dr="0.0"/>
+				<z_layout dr="5.5" z0="559.0" nz="15"/>
+			</layer>
+			<layer module="SiTrackerModule">
+				<barrel_envelope inner_r="706.0" outer_r="756.0" z_length="948.0 * 2.0"/>
+				<rphi_layout phi_tilt="0.19" nphi="54" phi0="0.058" rc="716.0" dr="0.0"/>
+				<z_layout dr="5.5" z0="899.0" nz="23"/>
+			</layer>
+			<layer module="SiTrackerModule">
+				<barrel_envelope inner_r="962.0" outer_r="1012.0" z_length="1289.0 * 2.0"/>
+				<rphi_layout phi_tilt="0.19" nphi="72" phi0="0.0436" rc="972.0" dr="0.0"/>
+				<z_layout dr="5.5" z0="1240.0" nz="29"/>
+			</layer>
+			<layer module="SiTrackerModule">
+				<barrel_envelope inner_r="1218.0" outer_r="1265.0" z_length="3260.0"/>
+				<rphi_layout phi_tilt="0.19" nphi="90" phi0="0.01745" rc="1228.0" dr="0.0"/>
+				<z_layout dr="5.5" z0="1581.0" nz="37"/>
+			</layer>
+			-->
+		</detector>
+	</detectors>
+	<readouts>
+		<readout name="SiTrackerBarrel_RO">
+			<id>system:6,barrel:2,layer:4,phi:8,z:8,sensor:1</id>
+		</readout>
+		<readout name="VtxBarrel_RO">
+			<id>system:6,barrel:2,layer:4,phi:8,z:8,sensor:1</id>
+		</readout>
+	</readouts>
+	<fields>
+   </fields>
+</lccdd>
+
+				<!--
+				<module_component  width="97.79" length="97.79" thickness="0.1" material="Kapton" sensitive="false">				
+					<position z="-2.692"/>
+				</module_component>
+				
+				<module_component width="63.8" length="6.67" thickness="0.3" material="Silicon" sensitive="false">
+					<position z="-2.492"/>
+				</module_component>
+				
+				<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>
+				-->
+<!--
+		<detector id="1" name="SiTrackerBarrel" type="SiTrackerBarrel" readout="SiTrackerBarrel_RO" vis="TestVis">
+			<module name="MyModule">
+				<module_envelope width="100.0" length="100.0" thickness="5.0"/>
+				<module_component zc="-2.0" width="100" length="100" thickness="1.0" material="Silicon" sensitive="true"/>
+				<module_component zc="-1.0" width="100" length="100" thickness="1.0" material="Silicon" sensitive="false"/>
+				<module_component zc="0" width="100" length="100" thickness="1.0" material="Silicon" sensitive="false"/>
+				<module_component zc="1.0" width="100" length="100" thickness="1.0" material="Silicon" sensitive="false"/>
+				<module_component zc="2.0" width="100" length="100" thickness="1.0" material="Silicon" sensitive="true">
+					<rotation x="0.0"/>
+				</module_component>
+			</module>
+			<layer module="MyModule">
+				<barrel_envelope inner_r="900.0" outer_r="1100.0" z_length="1000.0" />
+				<rphi_layout phi_tilt="0.2" nphi="50" phi0="0.2" rc="1000.0" />
+				<z_layout dr="10" z0="450" nz="10"/>
+			</layer>
+		</detector>
+		-->
CVSspam 0.2.8