iLCSoft / CEDViewer

Marlin processor for the CED event display
GNU General Public License v3.0
2 stars 9 forks source link

ced2go doesn't work with DST files #24

Open dudarboh opened 7 months ago

dudarboh commented 7 months ago

Issue

ced2go is expected to work with DST files if one specifies a -v flag to choose DSTViewer. This modifies the default template steering file ced2go-template.xml to use DSTViewer instead of the default one.

If the user specifies the detector geometry with a flag -d, the default template steering file is changed to ced2go-template-DD4.xml, which does not work with DST files. The ced2go-template-DD4.xml looks very different and incomplete compared to ced2go-template.xml. It doesn't have the DSTViewer processor defined and always uses the default CEDViewer, thus also ignoring the -v flag completely.

Note that a user is required to define the detector geometry with a flag -d; otherwise, the code exits.

https://github.com/iLCSoft/CEDViewer/blob/eec6d2391ca5bd735e402eb17de192863f959d62/ced2go/ced2go#L108-L110

This means ced2go is completely unusable for DST files.

Workarounds

Run the DSTViewer steering file directly with Marlin, e.g.:

source /cvmfs/ilc.desy.de/sw/x86_64_gcc82_centos7/v02-02-03/init_ilcsoft.sh
glced&
Marlin MarlinStdRecoViewerDST.xml   --global.GearXMLFile=Gear/gear_ILD_l5_o1_v02.xml   --global.LCIOInputFiles=filename.slcio

But it doesn't work with dd4hep geometry and requires obsolete Gear geometry files.

Additionally, a user should know where the MarlinStdRecoViewerDST.xml is located. Using the iLCSoft environment, I managed to find it, but using key4hep, I did not.

Another workaround is to add a DSTViewer processor to the user's steering file.

How to fix

Add -v flag support to the ced2go-template-DD4.xml like in the ced2go-template.xml.

An even better option would be to use only one general template file and not have two. They don't seem very different, so compressing them into a single steering file should be straightforward.

P.S.

Is there a viewer option for mini-DSTs?