Message: <scale> ignored in GDML Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question <scale> ignored in GDML 

Forum: Geometry
Date: 19 Jun, 2014
From: Werner <Werner>

In the following minimum example, the <scale...> tag seems to be ignored, as you can especially see when you modify the constant "yoke_tan" which is the tangent of the "cutting angle" at the edges.
Can this be considered a bug or is it an "official" limitation that boolean solids cannot be scaled?

<?xml version="1.0" encoding="UTF-8"?>

<gdml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd">

  <define>
    <constant name="yoke_tan" value="sqrt(3.)"/>
                <!-- tan of inclination angle (against y) of the planes of the
                yoke's flattened edges -->
  </define>

  <materials>

    <element name="Argon" Z="18."> <atom value="39.948"/> </element>
    <element name="Oxygen" Z="8."> <atom value="15.999"/> </element>
    <element name="Nitrogen" Z="7."> <atom value="14.007"/></element>
    <material name="Air">
      <D value="1.204" unit="mg/cm3"/> <!-- at 20 C -->
      <fraction n="0.7554" ref="Nitrogen"/>
      <fraction n="0.2315" ref="Oxygen"/>
      <fraction n="0.0131" ref="Argon"/>
    </material>

    <material Z="26" name="Iron" state="solid">
      <D unit="g/cm3" value="7.874"/>
      <atom unit="g/mole" value="55.845"/>
    </material>

  </materials>

  <solids>

    <define>
      <constant name="yoke_dx" value="7000."/>  <!-- iron yoke without coils -->
      <constant name="yoke_dy" value="4480."/>
      <constant name="yoke_dz" value="2600."/>
      <constant name="yoke_2_edge"
                value="(yoke_dx+(yoke_dy-2*800.)/yoke_tan)/sqrt(2)"/>
    </define>
    <box name="big_box" x="yoke_dx" y="yoke_dy" z="5142."/> <!-- mother -->
    <!-- I take one cuboid block, yoke_1, and intersect it with a 45&#8304; rotated
    box yoke_2 to remove the edges. To get the edges' inclination right (which
    is 30&#8304;, not 45&#8304;, I have to construct yoke_1 by 1/yoke_tan downscaled in y-
    direction. It will be upscaled again later at the physical placement. -->
    <box name="yoke_1" x="yoke_dx" y="yoke_dy/yoke_tan" z="yoke_dz"/>
    <box name="yoke_2" x="yoke_2_edge" y="yoke_2_edge" z="yoke_dz"/>
    <intersection name="yoke_12">
      <first ref="yoke_1"/>
      <second ref="yoke_2"/>
      <rotation z="+pi/4" name="pi4"/>
    </intersection>

  </solids>

  <structure>

    <volume name="iron_yoke">
      <materialref ref="Iron"/>
      <solidref ref="yoke_12"/>
    </volume>

    <volume name="magnet">
      <materialref ref="Air"/>
      <solidref ref="big_box"/>
      <physvol>
        <volumeref ref="iron_yoke"/>
        <!-- Here the body is scaled to its actual size. -->
        <scale x="1." y="yoke_tan" z="1." name="undo_scaling"/>
      </physvol>
    </volume>

  </structure>

  <setup name="BMN_magnet" version="1">
    <world ref="magnet"/>
  </setup>

</gdml>

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: <scale> ignored in GDML   (Tatiana Nikitina - 15 Jul, 2014)
(_ More: Re: <scale> ignored in GDML   (Werner - 16 Jul, 2014)
(_ None: Re: <scale> ignored in GDML   (Tatiana Nikitina - 16 Jul, 2014)
 Add Message Add Message
to: "<scale> ignored in GDML"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]