Plotting events ‐ event display - DUNE/dune-tms GitHub Wiki

The script

We have a python script handling the plotting of event displays. It 'lives' in scripts/Reco/ and is called draw_spills_3D_projections.py.

In the most basic case, it will create plots like this one.

spill_001_027_00

First you need to set up (at the gpvms) everything correctly in dune-tms/. To do this

source setup_FNAL.sh
spack load py-packaging
spack load py-numpy
spack load py-matplotlib

Now to create event displays, put something like this in the command-line

python3 scripts/Reco/draw_spill_3D_projections.py --outdir <path/to/output/folder/ --input_filename <path/to/input/file_RecoCandidates_Hough_Cluster1.root

Options in the script

Spillnumber

If you are only interested in events from a specific spill, you can add --spillnum <number> in the commandline and only get events from this one spill plotted.

Histograms

If you'd like to see the time slicing and energy of the hits, you can add --hists in the commandline and it will plot them at the bottom like this. spill_001_027_00

Can be combined with --spillnum.

Fullspill

If you'd like to see all reconstructed events from a fullspill, reducing the amount of details shown, you can add --fullspill and it will plot all events per spill in the event display and per default the histograms. spill_001

Can be combined with --spillnum.

Lines2D

Sometimes you need to look at the lower level information e.g. for debugging purposes. The option --lines2D tries to do this by plotting the hits on the U, V, X or Y lines separately alongside the true hit positions and hits in clusters. This can then look like this.

spill_000_012_00

Can be combined with --spillnum and/or --hists.

Reach out to Asa Nehm on slack or via email for questions, or reach out to the #nd-muon-spectrometer(-code) channel on slack.

⚠️ **GitHub.com Fallback** ⚠️