Open atolosadelgado opened 10 hours ago
At what phase of Geant4 do these values have to be set?
At what phase of Geant4 do these values have to be set?
These values are set when instantiating the logical volumes [link]. There is no UI command for later modification.
Why do you need to access
?
Is the ability to SetSmartless(G4double s)
, enough?
The problem is to pass all that information from DD4hep volumes to G4LogicalVolumes, and maybe needing to expose more functions...
So maybe we can try this:
Create your own G4LogicalVolume plugin to create G4LogicalVolumes that you fully control. See https://github.com/AIDASoft/DD4hep/blob/master/examples/DDG4/src/ChannelingCrystalVolume.cpp as an example, e.g. SmartlessLogicalVolume
In the c++ where you create your volumes then put something like this
Volume vol = Volume("Volume", solid, material);
// ...
vol.addProperty("Geant4-plugin", "SmartlessLogicalVolume");
Then the Geant4Converter will use your code to create the G4LogicalVolume
See the release notes entry https://github.com/AIDASoft/DD4hep/blob/960cfa063b0ad2b90d6b5211ba52ff7f4dae9087/doc/ReleaseNotes.md?plain=1#L1065
Hi,
If I understand correctly, the DD4hep class
Volume
[link] is the equivalent toLogical Volume
in Geant4. I was wondering if it would be possible to expose the following functions [link] of G4LogicalVolume from the DD4hep Volume:In my case I am dealing with the full stereo drift chamber, which may be very extreme when creating the voxelization because of the twisted geometry. I would like to investigate if it is possible to fine tune the granularity of the voxelization so it can be a better option to using hyperboloids as layers. With the Geant4 default settings, the voxelization causes the memory to explode: 4GB (60k wires placed directly into the main volume) [1] vs 2.7GB (60k placed in 112 different layers) [2].
Without the possibility of tuning the granularity of the smart voxelization, I guess the use of hyperboloids is preferred because of the smaller memory consumption, even if the tracking is slower.
Thank you for your time.
Best, Alvaro
[1] When placing wires directly into the main gas volume, so the geometry tree looks like "main gas, cylinder" -> "wires" x60000
[2] When using hyperboloids as layers, so the geometry tree looks like "main gas, cylinder" -> "gas layer, hyperboloid" x112 -> "wires" x60000