I have started to investigate what would be the optimal approach for me to store a relatively complex detector model. My impression is that the GDML approach is probably the most suitable one, but I am not sure. It seems to me that other people have trouble getting started as well:
I think that a guide comparing all available approaches would be useful, and I was thinking that I could document my learning process for others. Unless this has been done already, of course, in which case I would love to read it But if not, it would be great if someone experienced could guide me a bit through this.
I have not compared anything yet! So far I have only managed to collect the alternatives, look a bit at what the formats look like, etc. It is looking like it’s winning for us because it seems to have better support than ASCII, and because we don’t need complex surfaces but would rather rely on Geant4 solids like G4Cons, G4Box, etc. rather than triangular meshes.
Performance was not something that I was concerned in my analysis, but indeed a decent review should evaluate that!
I am now delving into GDML documentation, I have one practical question: does GDML support reading only some geometric elements from the GDML file, or does it need to contain the whole description, to which nothing can be added later? Ie I would like to have different parts of the system in different files, and possibly the world volume hard-coded in the source. Would that be possible?
I think that I can hack my way through… But in all honesty, and I hope nobody reading this gets offended, I was not a big fan on the interface for selecting the correct thermal cross sections, and in my opinion this reveals the issues. I mean, if (big if) thermal scattering were to be supported in GDML, it should look completely different.
GDML is only related to geometry detector description, and nothing else.
Please, if you find anything missing or to improve related to documentation, submit a Bugzilla ticket rather than posting on the Forum on topics totally unrelated. Thanks,
My apologies if I am adding unnecessary noise over here. I am not quite sure about where to move the discussion to; or if I should split it. In other forums I have participated in it is expected that discussions derail a little bit, especially since there is not so much volume of messages in this thread.
I leave here some responses; no need to address them here but it is easier than writing them in my local machine and risking losing them.
One the things that I am trying to do is precisely understand better if things are bugs or features before I report the issues, this is why I thought it was a good idea to write here instead of directly reporting a bug… On the other hand, I have been contacting already @witoldp to provide some feedback, which to my understanding was relevant. Actually I am currently reading the guide from beginning to end to really understand the available features, and will share with him some more comments.
About the thermal scattering, that is exactly the issue: the framework used for thermal physics requires a special definition of the materials, since not only elements, but also their chemical environment, need to be specified. I.e., this is part of the detector definition.
And about modules, I did not think I was asking about implementation details. I will study better how modules work and I will post later if I still have questions…
OK, this is good. Feedback is always welcome, but please, directly interact with the responsible if you can!
Chemical environment is not considered to be described in GDML…
You are right in Geant4 we do not directly explicitly provide documentation about the handling of GDML in the manuals… Geant4 interprets the GDML schema in most if not all of its aspects, entities get automatically loaded in Geant4 as long the GDML schema is implemented in the GDML file, such that in general it is not necessary to know beyond what G4GDMLParser provides. Example G01, for instance, demonstrate several features of the parser, including how to import separate entities defined in different files… Although trivial, we could add an example demonstrating the importing of modules as well.
Thank you very much, Gabriele once again!!! That was a wealth of information!
Yeah, about the chemical information, I have to see how I have to go about that, because the problem is that thermal scattering is fundamentally incompatible with GDML. I think that I can get away with it by creating the detector, and then replacing the relevant elements in each material with the corresponding TS-enable version of the element. Sigh. But I’ll fight that battle and come begging for help when I know more, now this is just ranting here
I am providing information for MRADSIM Converter. You can easily convert the geometry designed in 3D from any CAD program (Solidworks, Fusion 360) to GDML format via MRADSIM Converter. You only need to output the STEP format of the 3D file. For now it only creates points and triangles in mesh format. In addition, you can define materials for geometries.
MRADSIM Space, all GDML models are supported. These can be Geant4 Solids or mesh models. There is software that you can use to simulate directly. You can perform complex simulations by clicking next, next, run buttons without installing Geant4
support for geant4 solids would be truely phenomenal
many parts with holes could be modeled as boolean solids, subtracting the cylinders from the tesselated object. would this improve performance? round holes usually increase the triangle count so significantly…