Print

Print


Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd on MAIN
LCDDSubdetector.java+39-321.8 -> 1.9
TPC.java+21.2 -> 1.3
+41-32
2 modified files
JM: Support combineHits attributes for TPC

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
LCDDSubdetector.java 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- LCDDSubdetector.java	22 Mar 2006 00:29:07 -0000	1.8
+++ LCDDSubdetector.java	31 Mar 2006 22:18:59 -0000	1.9
@@ -42,15 +42,15 @@
     }
 
     /**
-     * Set limits of an LCDD volume
-     * 
-     * @param lcdd
-     *            LCDD object currently being processed
-     * @param node
-     *            Current DOM node (e.g. detector, layer, slice, etc.)
-     * @param volume
-     *            The volume corresponding to the DOM node
-     */
+	 * Set limits of an LCDD volume
+	 * 
+	 * @param lcdd
+	 *            LCDD object currently being processed
+	 * @param node
+	 *            Current DOM node (e.g. detector, layer, slice, etc.)
+	 * @param volume
+	 *            The volume corresponding to the DOM node
+	 */
     public void setLimitSet(LCDD lcdd, Element node, Volume volume)
     {
         if (node.getAttribute("limits") != null)
@@ -70,17 +70,17 @@
     }
 
     /**
-     *
-     * Set the region of an LCDD volume
-     *      
-     * @param lcdd
-     *            LCDD object currently being processed
-     * @param node
-     *            Current DOM node (e.g. detector, layer, slice, etc.)
-     * @param volume
-     *            The volume corresponding to the DOM node 
-     * 
-     */
+	 * 
+	 * Set the region of an LCDD volume
+	 * 
+	 * @param lcdd
+	 *            LCDD object currently being processed
+	 * @param node
+	 *            Current DOM node (e.g. detector, layer, slice, etc.)
+	 * @param volume
+	 *            The volume corresponding to the DOM node
+	 * 
+	 */
     public void setRegion(LCDD lcdd, Element node, Volume volume)
     {
         if (node.getAttribute("region") != null)
@@ -99,25 +99,32 @@
         }
     }
 
-    /**     
-     * 
-     * Set combine_hits attribute of LCDD sensitive detector
-     * 
-     * @param node detector XML node
-     * @param sens sensitive detector which should be of type Tracker
-     */
+    /**
+	 * 
+	 * Set combine_hits attribute of LCDD sensitive detector
+	 * 
+	 * @param node
+	 *            detector XML node
+	 * @param sens
+	 *            sensitive detector which should be of type Tracker
+	 */
     public void setCombineHits(Element node, SensitiveDetector sens)
     {
         if (node.getAttribute("combineHits") != null)
         {
+        	System.out.println("combineHits=" + node.getAttributeValue("combineHits"));
             try
             {
-                if (node.getAttribute("combineHits").getBooleanValue() == true)
+            	if (sens instanceof Tracker)
                 {
-                    if (sens instanceof Tracker)
-                    {
-                        sens.setAttribute("combine_hits", "true");
-                    }
+            		if (node.getAttribute("combineHits").getBooleanValue() == true)
+            		{                    
+                        sens.setAttribute("combine_hits", "true");                 
+            		}
+            		else 
+            		{
+            			sens.setAttribute("combine_hits", "false");
+            		}
                 }
             }
             catch (Exception e)

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
TPC.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- TPC.java	28 Oct 2005 00:34:21 -0000	1.2
+++ TPC.java	31 Mar 2006 22:18:59 -0000	1.3
@@ -116,6 +116,8 @@
         
         solids.addSolid(envelope);
         structure.addVolume(envelopeVolume);
+        
+        setCombineHits(node, sens);
     }
     
     public boolean isTracker()
CVSspam 0.2.8