Problem 2386

Summary: SD info is not saved to gdml
Product: Geant4 Reporter: Vladimir.Ivantchenko
Component: persistency/gdmlAssignee: Witold.Pokorski
Status: RESOLVED INVALID    
Severity: major    
Priority: P4    
Version: 10.7   
Hardware: All   
OS: All   

Description Vladimir.Ivantchenko 2021-06-13 21:07:57 CEST
For CMS geometry gdml dump does not have SD info. The reason - wrong place in the code when such dump is performed. SD is principally different from cuts, because may be whatev er volume, not necessary a root logical volume.
Comment 1 Gabriele Cosmo 2021-06-14 08:36:47 CEST
The current implementation of the GDML parser only supports import of sensitive detector information. Note that the writer -cannot- know the specifics of user sensitive detector data...
You may want to look at examples/extended/persistency/gdml/G04 for how to associate detector sensitivity to volumes in the form of auxiliary information.
Comment 2 Vladimir.Ivantchenko 2021-06-14 09:09:10 CEST
Hi Gabriele,

I expect SDinfo = "name of SD". But even these names are not dumped.

Cheers,
Vladimir
Comment 3 Witold.Pokorski 2021-06-14 09:11:06 CEST
There is a part of the GDML writer which is supposed to write out the sensitive detector names for the 'sensitive' volumes (see  G4GDMLWriteStructure::ExportSD method).

To enable this functionality, you need to set the flag:

parser.SetSDExport(true);

Where 'parser' is your GDMLParser object.

Obviously, to write out the SD names, you need to invoke the GDML writer once the SD are instantiated and attached to the logical volumes.

If this works correctly, for the sensitive volumes, you should get auxiliary information in the form like:

<volume name="Boxvol" >
   <materialref ref="Air" />
   <solidref ref="Box" />
   <auxiliary auxtype="SensDet" auxvalue="veloSD"/>
   </auxiliary>
</volume>

Please let me know in case you still get problems.