Problem 1975 - Missing feature : exporting parametrised boolean solids in GDML
Summary: Missing feature : exporting parametrised boolean solids in GDML
Status: REOPENED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: persistency/gdml (show other problems)
Version: 10.3
Hardware: All All
: P4 normal
Assignee: Witold.Pokorski
URL:
Depends on:
Blocks:
 
Reported: 2017-05-15 17:04 CEST by Neal Gauvin
Modified: 2017-06-16 12:34 CEST (History)
1 user (show)

See Also:


Attachments
Geant4 application to reproduce the problem. (48.29 KB, application/gzip)
2017-05-15 17:04 CEST, Neal Gauvin
Details
G4 application to reproduce the error messages (123.28 KB, application/x-xz)
2017-06-16 12:34 CEST, Neal Gauvin
Details

Note You need to log in before you can comment on or make changes to this problem.
Description Neal Gauvin 2017-05-15 17:04:41 CEST
Created attachment 457 [details]
Geant4 application to reproduce the problem.

It is currently not possible to export in GDML the geometry built from the parametrisation of G4UnionSolids. Trying results in the following error message :

G4GDML: Writing 'Geometry.gdml'...
G4GDML: Writing definitions...
G4GDML: Writing materials...
G4GDML: Writing solids...
G4GDML: Writing structure...
G4GDML: Writing userinfo...
G4GDML: Writing setup...

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : InvalidSetup
      issued by : G4GDMLWriteParamvol::ParametersWrite()
Solid 'tracker' cannot be used in parameterised volume!
*** Fatal Exception *** core dump ***
-------- EEEE -------- G4Exception-END --------- EEEE -------


*** G4Exception: Aborting execution ***

Would it be possible to add this feature in the G4GDMLParser ?

I provide in attachment an application to reproduce the problem. It is basically the example B2b found in examples/basic/B2 adapted to :

- create parametrisation of G4UnionSolid of two half G4Tubs instead of G4Tubs.         See B2bDetectorConstruction.cc and B2bChamberParameterisation.

- Export geometry in GDML. See exampleB2b.cc.

The provided application should be installed, compiled and run like any Geant4 example. See the README
The expected result is the creation of a Geometry.gdml file containing the geometry in GDML format.

Thanks !
Comment 1 Gabriele Cosmo 2017-06-15 10:30:32 CEST
In the test case attached, the parameterisation applies to the -constituents- of a Boolean solid in their dimension. This feature is NOT supported in Geant4, although not explicitly mentioned in the documentation and cannot be implemented as it violates the parameterisation paradigm. This can also be verified by visualising the setup, where you can see the attempted parameterisation is NOT applied.
Parameterisations can only apply to the final solid as a whole, associated to the logical volume. A parameterisation in -positioning- of the Boolean shape (as a whole), for instance, works and can be regularly exported in GDML.
Comment 2 Neal Gauvin 2017-06-16 12:33:25 CEST
I wanted my test be as complete as possible, that's why I added the parametrisation in dimension. Let's forget about it. We don't need that. Only parametrisation in position. This works well for the construction of the booleans volumes.
But I am afraid, the export in GDML does not work for me, as we discussed previously in mails with Witek. The conclusion of the mails was that this is a missing feature that should be implemented. That was was the reason for this post.

I adapted the G4Application to build and export parametrised booleans in position only. The application still yields the following message :
./exampleB2b
Available UI session types: [ Qt, Xm, GAG, tcsh, csh ]

G4GDML: Writing 'Geometry.gdml'...
G4GDML: Writing definitions...
G4GDML: Writing materials...
G4GDML: Writing solids...
G4GDML: Writing structure...
G4GDML: Writing userinfo...
G4GDML: Writing setup...

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : InvalidSetup
      issued by : G4GDMLWriteParamvol::ParametersWrite()
Solid 'tracker' cannot be used in parameterised volume!
*** Fatal Exception *** core dump ***
-------- EEEE -------- G4Exception-END --------- EEEE -------


*** G4Exception: Aborting execution ***
Aborted (core dumped)
Comment 3 Neal Gauvin 2017-06-16 12:34:55 CEST
Created attachment 460 [details]
G4 application to reproduce the error messages