-
Notifications
You must be signed in to change notification settings - Fork 3
Description
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
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!
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.

