Print

Print


Commit in GeomConverter/src/org/lcsim on MAIN
geometry/compact/converter/lcdd/SiTrackerFixedTarget2.java+8-21.1 -> 1.2
detector/converter/compact/SiTrackerFixedTarget2Converter.java+9-41.2 -> 1.3
+17-6
2 modified files
include option for opposite stereo angles the the two sides

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
SiTrackerFixedTarget2.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- SiTrackerFixedTarget2.java	21 Jan 2010 21:26:32 -0000	1.1
+++ SiTrackerFixedTarget2.java	10 Feb 2011 19:33:58 -0000	1.2
@@ -43,7 +43,11 @@
         } else {
             reflect = true;
         }
-
+        boolean flipSA=false;
+        if ( node.getAttribute( "flipSA" ) != null )
+        {
+                flipSA = node.getAttribute( "flipSA" ).getBooleanValue();
+        }
         for (Iterator i = node.getChildren("module").iterator(); i.hasNext();) {
             Element module = (Element) i.next();
             String moduleName = module.getAttributeValue("name");
@@ -114,7 +118,9 @@
                             pr.setY(y);
                             pr.setZ(-z);
                             Rotation rotr = new Rotation(moduleBaseName + "_reflect_rotation");
-                            rotr.setX(Math.PI / 2+phi0);
+                            double rphi0=phi0;
+                            if(flipSA) rphi0=-rphi0;
+                            rotr.setX(Math.PI / 2+rphi0);
                             rotr.setY(0);
                             rotr.setZ(-Math.PI / 2);
 

GeomConverter/src/org/lcsim/detector/converter/compact
SiTrackerFixedTarget2Converter.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- SiTrackerFixedTarget2Converter.java	30 Nov 2010 00:16:27 -0000	1.2
+++ SiTrackerFixedTarget2Converter.java	10 Feb 2011 19:33:58 -0000	1.3
@@ -63,14 +63,17 @@
             String subdetName = node.getAttributeValue( "name" );
             vacuum = MaterialStore.getInstance().get( "Air" );
 
-            boolean reflect;
+            boolean reflect=true;
             if ( node.getAttribute( "reflect" ) != null )
             {
                 reflect = node.getAttribute( "reflect" ).getBooleanValue();
             }
-            else
+
+
+              boolean flipSA=false;
+            if ( node.getAttribute( "flipSA" ) != null )
             {
-                reflect = true;
+                flipSA = node.getAttribute( "flipSA" ).getBooleanValue();
             }
 
             IDetectorElement subdetDetElem = subdet.getDetectorElement();
@@ -192,7 +195,9 @@
                             if ( reflect )
                             {
                                 Translation3D pr = new Translation3D( x + dx, y, -z );
-                                RotationGeant rotr = new RotationGeant( Math.PI / 2 + phi0, 0, -Math.PI / 2 );
+                                double rphi0=phi0;
+                                if(flipSA) rphi0=-rphi0;
+                                RotationGeant rotr = new RotationGeant( Math.PI / 2 + rphi0, 0, -Math.PI / 2 );
 
                                 String path2 = "/" + detector.getTrackingVolume().getName() + "/" + moduleBaseName + "_reflected";
                                 new PhysicalVolume( new Transform3D( pr, rotr ),
CVSspam 0.2.8