The display.sh script provides a convenient wrapper around the cluster_display application with support for multiple drawing modes.
./scripts/display.sh --input-clusters <file.root> [options]The script now supports three drawing modes via the --draw-mode flag:
./scripts/display.sh \
-j json/display/example.json \
--draw-mode pentagonFeatures:
- Most accurate waveform representation
- Uses grid search for optimal pentagon vertices
- Extended range fills 1-2 pixels beyond boundaries
- Best for detailed analysis
./scripts/display.sh \
-j json/display/example.json \
--draw-mode rectangleFeatures:
- Uniform intensity across all samples
- Intensity = adc_integral / samples_over_threshold
- Fastest rendering
- Good for quick overview
./scripts/display.sh \
-j json/display/example.json \
--draw-mode triangleFeatures:
- Linear rise and fall from threshold to peak
- Simple approximation
- Good compromise between accuracy and speed
./scripts/display.sh \
--input-clusters data/prod_cc/cc_valid_tick5_ch2_min2_tot1_clusters.root \
--mode clusters \
--draw-mode pentagon./scripts/display.sh \
--input-clusters data/prod_cc/cc_valid_tick5_ch2_min2_tot1_clusters.root \
--mode events \
--draw-mode rectangle \
--only-marley./scripts/display.sh -j json/display/example.json./scripts/display.sh \
-j json/display/example.json \
--draw-mode triangle \
-v./scripts/display.sh \
-j json/display/example.json \
--draw-mode rectangle \
--no-compile| Option | Values | Default | Description |
|---|---|---|---|
--input-clusters |
file path | - | Input clusters ROOT file (required unless via JSON) |
-j, --json-settings |
file path | - | JSON configuration file (relative to json/) |
--mode |
clusters, events | clusters | Display mode |
--draw-mode |
triangle, pentagon, rectangle | pentagon | Drawing/rendering mode |
--only-marley |
flag | false | In events mode, show only MARLEY clusters |
-v, --verbose-mode |
flag | false | Enable verbose output |
--no-compile |
flag | false | Skip recompilation |
--clean-compile |
flag | false | Clean and recompile |
-h, --help |
flag | - | Show help message |
You can also specify the draw mode in your JSON settings file:
{
"clusters_file": "data/prod_cc/cc_valid_tick5_ch2_min2_tot1_clusters.root",
"mode": "clusters",
"draw_mode": "pentagon",
"only_marley": false
}Command-line arguments override JSON settings.
For typical clusters with 10-20 TPs:
| Mode | Relative Speed | Use Case |
|---|---|---|
| Rectangle | 100% (fastest) | Quick overview, many clusters |
| Triangle | ~95% | Good balance |
| Pentagon | ~85% | Detailed analysis, publications |
- Start with rectangle mode for quick navigation through many clusters
- Use pentagon mode when you need to analyze specific clusters in detail
- Triangle mode is a good middle ground for most use cases
- Verbose mode (
-v) helps debug when clusters don't appear as expected - Use JSON settings to save your preferred configuration
- Use pentagon mode with extended range (default behavior)
- Check that your TP data has valid samples_over_threshold values
- Switch to rectangle or triangle mode
- Use
--no-compileto skip recompilation
- The script uses the Viridis palette (perceptually uniform)
- Color scale is in ADC units based on the selected drawing mode
# Event 2, Plane V, Cluster 3/7 mentioned in your printout
./scripts/display.sh \
-j json/display/example.json \
--draw-mode pentagon
# Then use "Next" button to navigate to cluster 3# Pentagon mode
./scripts/display.sh -j json/display/example.json --draw-mode pentagon
# Rectangle mode for comparison
./scripts/display.sh -j json/display/example.json --draw-mode rectangle --no-compile
# Triangle mode
./scripts/display.sh -j json/display/example.json --draw-mode triangle --no-compileIf you don't specify --draw-mode, the script defaults to pentagon mode, which provides the most accurate visualization with extended boundaries to show all samples including first and last ticks.