This guide provides comprehensive information about configuring the online-pointing-utils project.
The project uses multiple configuration layers:
- Parameter System - Core constants and geometry
- JSON Configurations - Algorithm parameters and workflows
- Environment Variables - Runtime paths and options
- Build Scripts - Compilation and execution settings
# Set parameter directory
export PARAMETERS_DIR=/path/to/online-pointing-utils/parameters
# Or use the setup script
source setup_parameters.sh- geometry.dat - Detector geometry constants
- timing.dat - Time-related parameters
- conversion.dat - Unit conversion factors
- detector.dat - Detector-specific settings
- analysis.dat - Analysis parameters
Format Example:
< geometry.apa_length_cm = 230.0 > APA length in cm
< timing.time_tick_cm = 0.0805 > Time tick in cm
Detailed Documentation: parameters/PARAMETERS.md
- Location:
json/cluster/ - Purpose: Control clustering algorithm parameters
- Example: json/cluster/example.json
- Documentation: json/README.md
- Location:
json/analyze_tps/,json/analyze_clusters/ - Purpose: Configure analysis workflows and cuts
- Examples: Various JSON files for different analysis scenarios
- Location:
json/cluster_to_root/,json/clusters_to_dataset/ - Purpose: Control data format conversion and output
- Documentation: json/cluster_to_root/README.md
{
"filename": "input_file.root",
"filelist": "list_of_files.txt",
"tick_limit": 3,
"channel_limit": 1,
"min_tps_to_cluster": 1,
"adc_integral_cut_induction": 0,
"adc_integral_cut_collection": 0
}PARAMETERS_DIR- Path to parameter files directoryHOME_DIR- Repository root directory (set by init.sh)SCRIPTS_DIR- Scripts directory path (set by init.sh)
BUILD_DIR- Build directory path (default:build/)INIT_DONE- Environment initialization flag
# Automatic setup
source scripts/init.sh
# Manual setup
export PARAMETERS_DIR=/path/to/parameters
export HOME_DIR=/path/to/online-pointing-utilsUSE_STATIC_LINKS- Enable static library linkingCMAKE_BUILD_TYPE- Debug/Release build type
- compile.sh - Main compilation script
- Options:
--no-compile,--clean-compile
Each analysis type has its own script and configuration:
# Trigger primitive analysis
./scripts/analyze_tps.sh -j json/analyze_tps/config.json
# Clustering workflow
./scripts/cluster.sh -j json/cluster/config.json
# Backtracking analysis
./scripts/backtrack.sh -j json/backtrack/config.jsonScripts automatically locate configuration files:
# Searches multiple locations for config.json
./scripts/cluster.sh -j config.jsonCreate custom parameter files following the format:
*******************************************************************************
Custom Parameters
*******************************************************************************
< custom.parameter = value > Description
The system provides validation for:
- Missing parameter files (warnings)
- Missing parameters (runtime exceptions)
- Invalid JSON syntax (parse errors)
- Required vs optional configuration fields
# Enable verbose mode in scripts
./scripts/cluster.sh -j config.json -v
# Check parameter loading
echo $PARAMETERS_DIR
ls -la $PARAMETERS_DIR/*.dat- Old hardcoded constants are still supported via compatibility macros
- Gradual migration path from
.hfiles to.datfiles - Backward compatibility maintained for existing code
- Replace hardcoded constants with parameter file values
- Update JSON configurations for new algorithm parameters
- Set environment variables in deployment scripts
- Test configuration loading with validation tools
For specific configuration examples and troubleshooting, see the linked README files and parameter documentation.