Print

Print


Commit in projects/gdml/trunk/G4Binding/G4Subscribers/src on MAIN
assemblySubscriber.cpp+14-23093 -> 3094
Fix for GDML-12 where assembly volumes were not rotated correctly.

projects/gdml/trunk/G4Binding/G4Subscribers/src
assemblySubscriber.cpp 3093 -> 3094
--- projects/gdml/trunk/G4Binding/G4Subscribers/src/assemblySubscriber.cpp	2014-04-11 17:20:31 UTC (rev 3093)
+++ projects/gdml/trunk/G4Binding/G4Subscribers/src/assemblySubscriber.cpp	2014-04-11 18:58:52 UTC (rev 3094)
@@ -167,8 +167,20 @@
                 } // end of for(;;)
 
                 // At this point we should have everything ready to create assembly triplet
-                ptrp = new G4AssemblyTriplet( plog, *ppos, prot );
-                anew->AddPlacedVolume( plog, *ppos, prot );
+                //ptrp = new G4AssemblyTriplet( plog, *ppos, prot );
+                //anew->AddPlacedVolume( plog, *ppos, prot );
+
+                // FIX for GDML-12 Jira item.  --JM
+                if ( prot ) {
+                  *prot = prot->inverse(); // inverse() returns by value; hence copy in place OK
+                  ptrp = new G4AssemblyTriplet( plog, *ppos, prot );
+                  anew->AddPlacedVolume( plog, *ppos, prot );
+                }
+                else {
+                  ptrp = new G4AssemblyTriplet( plog, *ppos, 0 );
+                  anew->AddPlacedVolume( plog, *ppos, 0);
+                }
+
                 processor->AddAssemblyVolume( obj->get_name(), anew );
 
               } else { /* Should not happen */ } // end of if-physvol
SVNspam 0.1


Use REPLY-ALL to reply to list

To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1