Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dumpmctree tool #170

Merged
merged 21 commits into from
May 8, 2024
Merged

Add dumpmctree tool #170

merged 21 commits into from
May 8, 2024

Conversation

dudarboh
Copy link
Member

@dudarboh dudarboh commented Jun 8, 2023

BEGINRELEASENOTES

  • Added new utility dumpmctree to draw the MC table of the event stored in the slcio file as the graphviz tree diagram, which represents parent-daughter relations visually in a easier way.
    • dumpmctree is a small wrapper script around the actual dumpmctree-dot executable. The latter produces a .dot file which is then transformed into an .svg file via the wrapper script and the dot executable.
    • The script relies on dot & xdg-open to be available on your system.

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

src/cpp/src/EXAMPLE/dumpmctree.cc Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree.cc Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree.cc Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree.cc Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree.cc Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree.cc Outdated Show resolved Hide resolved
src/cpp/CMakeLists.txt Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree-dot.cc Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree-dot.cc Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree-dot.cc Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree-dot.cc Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree-dot.cc Outdated Show resolved Hide resolved
@dudarboh
Copy link
Member Author

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

src/cpp/src/EXAMPLE/dumpmctree Outdated Show resolved Hide resolved
src/cpp/src/EXAMPLE/dumpmctree-dot.cc Outdated Show resolved Hide resolved
@tmadlener
Copy link
Contributor

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

@dudarboh
Copy link
Member Author

dudarboh commented May 3, 2024

Looks good to me!

@tmadlener tmadlener enabled auto-merge (squash) May 8, 2024 09:10
@tmadlener tmadlener merged commit e8c5032 into iLCSoft:master May 8, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants