iLCSoft / LCIO

Linear Collider I/O
BSD 3-Clause "New" or "Revised" License
17 stars 34 forks source link

Add dumpmctree tool #170

Closed dudarboh closed 2 months ago

dudarboh commented 1 year ago

BEGINRELEASENOTES

ENDRELEASENOTES

This tool is just an easier visual representation of parent-daughter relations of MCParticles in the MCtable which are stored in the slcio files.

The tool has very similar interface to dumpevent, so it is easy to use for people who are already familiar with it.

 usage: dumpmctree -[s] -[p] -[o] filename eventNumber 

 OPTIONS: 
 -s                 Draw particles created in simulation (material interaction with the detector)
 -p                 Draw parton shower particles above pythia hadronisation string/cluster (pdg = 92/91). E.g. (Z/W/H/quarks/gluons/etc) 
 -o                 Draw overlay particles.

 INPUT: 
 filename           slcio file to draw the event from.
 eventNumber        event number to draw.

By default Overlay and CreatedInSimulation particles, as well as patron shower particles are not shown to avoid cumbresome image. In case user wants to see those, one can enable them with optional switch flags -osp.

The script produces graphviz text file in the dot format and corresponding generated image file in the svg format.

The image contains a graph connecting particles in the parent-daughter relations, showing some additional information as their distance to the IP, pt and pz.

image

dudarboh commented 1 year ago

I did some changes in parallell while you were commenting, so please check again.

tmadlener commented 2 months ago

@dudarboh you want to test whether I broke something accidentally? Otherwise I would merge this.

dudarboh commented 2 months ago

Looks good to me!