Skip to content

Nested volumes in GDML not added to physical and logical volumes names (?) #136

@mariajmz

Description

@mariajmz

I was trying to use a gdml where one volume (gasVolume) contains a nested physical volume (sample) defined like this inside the structure node:

<volume name="sampleVolume">
    <materialref  ref="Copper"/>
    <solidref ref="sampleSolid"/>
</volume>

<volume name="gasVolume">
    <materialref ref="Ar_ISO"/>
    <solidref ref="gasSolid"/>
    <physvol name="sample">
        <volumeref ref="sampleVolume"/> <!-- sample inside the gas -->
        <position name="sample.position" x="sample_XPosition" y="sample_YPosition" z="sample_ZPosition" unit="mm"/>
    </physvol>
</volume>

Then the gas physical volume is placed inside the world volume:

<volume name="World">
        <materialref ref="Air"/>
        <solidref ref="WorldSolid"/>

        <physvol name="vesselTopcover">
            <volumeref ref="vesselTopcoverVolume"/>
            <position name="vesselTopcover.position" z="vesselTopcover_ZPosition" unit="mm"/>
        </physvol>

       <physvol name="readout">
            <volumeref ref="readoutVolume"/>
            <position name="readout.position" z="readout_ZPosition" unit="mm"/>
        </physvol>

        <physvol name="gas">
            <volumeref ref="gasVolume"/>
            <position name="gas.position" z="gas_ZPosition" unit="mm"/>
        </physvol>
        
        <physvol name="cathode">
            <volumeref ref="cathodeVolume"/>
            <position name="cathode.position" z="cathode_ZPosition" unit="mm"/>
        </physvol>

        <physvol name="gasbelow">
            <volumeref ref="gasbelowVolume"/>
            <position name="gasbelow.position" z="gasbelow_ZPosition" unit="mm"/>
        </physvol>

        <physvol name="vesselBottomcover">
            <volumeref ref="vesselBottomcoverVolume"/>
            <position name="vesselBottomcover.position" z="vesselBottomcover_ZPosition" unit="mm"/>
        </physvol>

        <physvol name="vessel">
            <volumeref ref="vesselVolume"/>
            <position name="vessel.position" z="vessel_ZPosition" unit="mm"/>
        </physvol>

   </volume>

ROOT is capable of parsing this geometry, because I can visualize it

Image

The problem appears when I try to use this geometry in a restG4 simulation. The sample volume is not recognized and is missing from the list of physical and logical volumes:

This message is displayed while launching the simulation:

TRestGeant4GeometryInfo::GetIDFromVolume - volume 'sample' not found in store!

Image

Is this an expected behaviour and should I redefine the geometry in a different way?

I think the problem may lie on the TRestGeant4GeometryInfo::PopulateFromGdml method where the list of physical and logical volume names is generated. If this method only iterates over the direct children of the World volume, the sample volume won't be added to the fGdmlNewPhysicalNames list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions