Giter Club home page Giter Club logo

oscprob's Introduction

DOI

OscProb

OscProb is a small set of classes aimed at computing exact neutrino oscillation probabilities with a few different models.

OscProb contains a basic framework for computing neutrino oscillation probabilities. It is integrated into ROOT, so that each class can be used as you would any ROOT class.

Available classes are:

  • PremModel: Used for determining neutrino paths through the earth
  • PMNS_Fast: Standard 3-flavour oscillations
  • PMNS_Iter: Standard 3-flavour oscillations (iterative approximation)
  • PMNS_Sterile: Oscillations with any number of neutrinos
  • PMNS_NSI: Oscillations with 3 flavours including vector Non-Standard Interactions
  • PMNS_SNSI: Oscillations with 3 flavours including scalar Non-Standard Interactions
  • PMNS_Deco: Oscillations with 3 flavours including a simple decoherence model
  • PMNS_LIV: Oscillations with 3 flavours including Lorentz Invariance Violations
  • PMNS_Decay: Oscillations with 3 flavours including neutrino decays
  • PMNS_NUNM: Oscillations with 3 flavours including non-unitary neutrino mixing
  • Absorption: Computes absorption probabilities for high-energy neutrinos

A few example macros on how to use OscProb are available in a tutorial directory.

Installing OscProb

OscProb is very easy to install. The only requirements is to have ROOT installed.

NEW: Thanks to Jacek Holeczek, OscProb now also builds with ROOT 6!!

Details: Eigen

In order to compile the PMNS_Decay and PMNS_Sterile classes, it is necessary to donwload the external Eigen library. This library is added as a submodule and will be downloaded by make.

Alternatively, you can trigger them manually with:

  • During cloning: git clone --recurse-submodules https://github.com/joaoabcoelho/OscProb.git
  • After clonning: git submodule update --init

Once you have ROOT setup, simply do:

cd OscProb
make

A shared library will be produced: lib/libOscProb.so

This should take a few seconds and you are all set.

Just load the shared library in your ROOT macros with:

gSystem->Load("/full/path/to/libOscProb.so");

Or use the LoadOscProb.C macro (see below).

Tutorial

In the directory OscProb/tutorial you will find a few macros with examples using OscProb.

Two macros are particularly useful:

  • simpleExamples.C : Contains some short pieces of code on how to perform different tasks.
  • MakeOscillogram.C : Runs a full example of how to plot an oscillogram with the PREM model.

Additionally, these macros contain useful tools:

  • LoadOscProb.C: Searches for the OscProb library in your current directory, parent directory, or library path, and then loads it.
  • SetNiceStyle.C: Provides simple tools to make your plots look nicer. Feel free to use it anytime you're making plots, even if you're not running OscProb. This is completely independent of OscProb.

To run macros you will need to preload the OscProb library, e.g:

Interpreter mode

root -l LoadOscProb.C MakeOscillogram.C

Compiler mode

root -l LoadOscProb.C MakeOscillogram.C+

Python

You can use OscProb in Python using PyROOT by simply loading the shared library:

import ROOT
ROOT.gSystem.Load('/path/to/OscProb/libOscProb.so')

p = ROOT.OscProb.PMNS_Fast()

print(p.Prob(1, 1, 5.0))

Documentation

More detailed documentation of the code can be found in a Doxygen page here:

Doxygen

oscprob's People

Contributors

albadomi91 avatar joaoabcoelho avatar lmaderer avatar lvmcerisy avatar rpestes avatar simonbourret avatar ushakrhmn avatar vicacuen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

oscprob's Issues

Problem with Longitude Bin Edge Calculation

The modification of using less arguments in the functions for the bin edge calculations used by FillPath in the EarthModelBinned class ended up introducing some errors into the calculation for the edge of the next longitude bin.

Can not get OscProb working through ROOT on Linux

Hi! I am trying to use OscProb with python as part of my research project at NIKHEF. However I can not get it to work. I was hoping you could help me.

I have installed root using conda as follows:

conda config --set channel_priority strict
conda create -c conda-forge --name env_root root python=3.8 pandas

As per the instructions on the ROOT webpage . I added python=3.8 ONLY after initial tries without specifying this also failed, and I found some comment online that the appropriate python version was 3.8 . Pandas I added purely because I need pandas for my code.

After this a conda environment is succesfully created with root=6.30.4. However nowhere on my device can I now find a folder named OscProb to follow the steps for installing OscProb found in your README.

Do you know what might be going wrong? I am using Ubuntu through WSL2 for Windows. Thank you in advance!

Implement a 3D model of the Earth

Some Earth models are not spherically symmetric. We should have a 3D Earth class that is capable of generating neutrino paths in such models.

Doxygen Inheritance Links

Apparently doxygen fails to link classes in the inheritance diagrams when the classes have underscores in their names. Can't get them to be clickable. ☚ī¸

Extend Lorentz Invariance Violation up to order 8

Hi Joao!

The present implementation of LIV in PMNS_LIV, based on the SME, is focused on isotropic coefficients up to dimension four.
However, since with high energy atmospheric neutrinos (E > TeV) it is possible to probe higher dimension coefficients, it would be useful to extend the present implementation up to the order 8 of the isotropic coefficients.

This can be done following the reference: https://doi.org/10.1103/PhysRevD.69.016005

Compiling problem

Hi Joao!

When compiling the code on MacOS, I got this error:

Building OscProb...
Undefined symbols for architecture x86_64:
"OscProb::PremModel::ShowMembers(TMemberInspector&)", referenced from:
vtable for OscProb::PremModel in PremModel-ee05c6.o
"OscProb::PremModel::Class()", referenced from:
OscProb::PremModel::IsA() const in PremModel-ee05c6.o
"OscProb::PremModel::Streamer(TBuffer&)", referenced from:
vtable for OscProb::PremModel in PremModel-ee05c6.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/dungphan/Documents/GitHub/OscProbRelease/OscProb-1.0/libOscProb.so] Error 1

Do you that this is a compatibility problem?
I remember compiling this code successfully before in Quy Nhon, on the same machine.

EDIT:
I fixed the problem.

  • I have GSL compiled and installed in my own directory. To avoid setting up LD_LIBRARY_PATH/CPATH everytime, I exported these paths right in the .bash_profile.
  • The problem comes from the fact that I have ROOT compiled with its built in GSL. It seems to me that there are some incompatibilities between the two versions of GSL.
  • CPP by pass the GSL by ROOT.

The fix is simple:

  • Remove (or as I did, function-ize) the export's to the standalone GSL.
  • Use ROOT builtin GSL instead.
  • make clean & make

Implement caching system for decay class

The PMNS_Decay class has a more complicated eigensystem structure with complex eigenvalues and inverse eigenvectors. This requires an extension of the EigenPoint class to store the extra information.

One option is to include this in the generic EigenPoint, but it may slowdown the caching system. Needs to be investigated.

Bug in caching system

The EigenPoint path variables are not set when filling the cache here:

OscProb/PMNS_Base.cxx

Lines 170 to 186 in e4a0df1

void PMNS_Base::FillCache()
{
if(fUseCache){
if(fMixCache.size()>fMaxCache){
fMixCache.erase(fMixCache.begin());
}
for(int i=0; i<fNumNus; i++){
fProbe.fEval[i] = fEval[i];
for(int j=0; j<fNumNus; j++){
fProbe.fEvec[i][j] = fEvec[i][j];
}
}
fMixCache.insert(fProbe);
}
}

This causes the caching to access the wrong parameters in some cases.

Scalar NSIs in OscProb

I have forked the original OscProb repo and added the PMNS classes with scalar NSI for both NO and IO. I have also included sample oscillogram codes in the tutorial directory

CP phases seems to be flipped in some classes

The definition of the CP phases are flipped in PMNS_Sterile and maybe also in PMNS_Iter. For the sterile case, it seems to have been introduced in the move from GSL to Eigen in v2.0.5.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.