Skip to content

PinpointDetector/EnergyRegressor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neutrino Regression Network

Summary

This repository contains the framework for training the Pinpoint neutrino energy regression code

Getting Started

This code is configured using hydra and pytorch lightning

To setup the enviroment install micromaba, if you've every used miniconda before, the usage is very similar - mamba is just a bit faster. With micromaba installed you can install the environment with:

mamba env create -f environment.yaml

Running the code

The code is steered by nuRegressor.py which can operate in in one of three modes:

  • preprocess: Run the preprocessing step to convert the Pinpoint Geant4 root NTuples into the .pt pytorch files which contain the event image projrections and the training targets. An example command looks like:
python3 nuRegressor.py mode=preprocess preprocessing.input_dirpath=../path/to/Ntuples/10000/*.root preprocessing.output_dirpath=data/10000
  • train: Run the training step. Unless overrridden, the output of the training and tensorboard logs will be saved to logs/energy_regression_train/<date-time>/. An example command looks like:
python3 nuRegressor.py mode=train training.learning_rate=0.00001
  • test: Run inference on test dataset and make the resolution plots. Will load the logs/energy_regression_train/<data-time>/.hydra/config.yaml config to reload the checkpointed model:
python3 nuRegressor.py mode=test testing.run_dir=logs/energy_regression_train/2026-01-31_16-12-00/

The config/config.yaml file contains all the parameters that will be used for the preprocessing, training and testing. Through hydra you can override any of the parameters from the command line when you run nuRegressor.py. For example, if you just wanted to regress the neutrino and primary lepton energy during training you could run

python3 nuRegressor.py mode=train training.targets=["E_nu","E_lep"]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published