Print

Print


Commit in GeomConverter/test/org/lcsim/geometry/subdetector on MAIN
PolyhedraBarrelCalorimeterTest.java+54added 1.1
PolyhedraBarrelCalorimeterTest.xml+57added 1.1
+111
2 added files
Added test for reading/writing PolyhedraBarrelCalorimeter.

GeomConverter/test/org/lcsim/geometry/subdetector
PolyhedraBarrelCalorimeterTest.java added at 1.1
diff -N PolyhedraBarrelCalorimeterTest.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ PolyhedraBarrelCalorimeterTest.java	25 Aug 2005 08:00:39 -0000	1.1
@@ -0,0 +1,54 @@
+/*
+ * ForwardDetectorTest.java
+ *
+ * Created on June 16, 2005, 1:50 PM
+ */
+
+package org.lcsim.geometry.subdetector;
+
+import java.io.InputStream;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.lcsim.geometry.GeometryReader;
+import org.lcsim.geometry.compact.Detector;
+
+/**
+ *
+ * @author jeremym
+ */
+public class PolyhedraBarrelCalorimeterTest extends TestCase
+{
+    Detector det;
+    PolyhedraBarrelCalorimeter pbc;
+    
+    /** Creates a new instance of ForwardDetectorTest */
+    public PolyhedraBarrelCalorimeterTest()
+    {}
+    
+    protected void setUp() throws java.lang.Exception
+    {
+        InputStream in = this.getClass().getResourceAsStream("/org/lcsim/geometry/subdetector/PolyhedraBarrelCalorimeterTest.xml");
+        GeometryReader reader = new GeometryReader();
+        det = reader.read(in);
+        
+        assert( det.getSubdetectors().get("PolyhedraBarrelCalorimeterTest") != null );
+        
+        try
+        {
+            pbc = (PolyhedraBarrelCalorimeter) det.getSubdetectors().get("PolyhedraBarrelCalorimeterTest");
+        }
+        catch ( ClassCastException cce )
+        {
+            throw new RuntimeException("Failed cast to PolyhedraBarrelCalorimeter.");
+        }
+    }
+    
+    public static junit.framework.Test suite()
+    {
+        return new TestSuite(PolyhedraBarrelCalorimeterTest.class);
+    }
+    
+    public void test_PolyhedraBarrelCalorimeter()
+    {
+    }
+}
\ No newline at end of file

GeomConverter/test/org/lcsim/geometry/subdetector
PolyhedraBarrelCalorimeterTest.xml added at 1.1
diff -N PolyhedraBarrelCalorimeterTest.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ PolyhedraBarrelCalorimeterTest.xml	25 Aug 2005 08:00:40 -0000	1.1
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- top-level compact description element -->
+<lccdd xmlns:lccdd="namespaceUrl"
+       xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
+       xs:noNamespaceSchemaLocation="noNamespaceUrl">
+
+  <info name="PolyhedraBarrelCalorimeterTest"
+        title="PolyhedraBarrelCalorimeterTest"
+	author="Jeremy McCormick"
+	url="NONE">
+    <comment>Test of org.lcsim.geometry.subdetector.PolyhedraBarrelCalorimeter class.</comment>
+  </info>
+
+  <!-- Constants -->
+  <define>
+    <constant name="cm" value="10"/>
+
+    <!-- world -->
+    <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" />
+
+    <!-- tracking region -->
+    <constant name="tracking_region_radius" value="0.1*cm"/>
+    <constant name="tracking_region_zmax" value="0.1*cm"/>
+  </define>
+
+  <materials>
+  </materials>
+
+  <detectors>
+    <detector id="0" 
+              name="PolyhedraBarrelCalorimeterTest" 
+              type="PolyhedraBarrelCalorimeter" 
+              readout="PolyhedraBarrelCalorimeterHits">
+         <dimensions numsides="8" z="1000.0" rmin="500.0"/>
+         <layer repeat="10">
+           <slice material="Silicon" thickness="1.0*cm" sensitive="true" />
+         </layer>
+    </detector>
+  </detectors>
+
+  <readouts>
+    <readout name="PolyhedraBarrelCalorimeterHits">
+      <id>layer:8,system:6,module:4,stave:1,barrel:3,x:32:10,y:10</id>
+    </readout>
+  </readouts>
+  
+  <fields>
+    <field type="Solenoid" name="GlobalSolenoid"
+              inner_field="5.0"
+              outer_field="-0.6"
+              zmax="1000"
+              outer_radius="(221.0+ 5.0 + 17.5 + 40./2.)*cm"/>  <!-- SolenoidCoilBarrel inner_radius + Al support + Oxygen gap + half coil-->
+   </fields>
+</lccdd>
\ No newline at end of file
CVSspam 0.2.8