Skip to content

Commit

Permalink
Updates to examples and COHERENT notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
bradkav committed May 5, 2018
1 parent 043e52c commit eb6d624
Show file tree
Hide file tree
Showing 35 changed files with 8,311 additions and 8,549 deletions.
133 changes: 45 additions & 88 deletions CEvNS-examples.ipynb

Large diffs are not rendered by default.

15 changes: 4 additions & 11 deletions CEvNS.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
"""
CEvNS.py - Version 1.6 - 06/11/2017
CEvNS.py - Release Version 1.0 - 05/05/2018
Summary:
Code for calculating differential cross section
for Coherent Elastic Neutrino Nucleus Scattering (CEvNS).
Version 1.6: Updated and checked code for Scalar cross section and
differential rate. Can now calculate scalar xsec
in terms of product of scalar coupling to quarks
and neutrinos (assuming universal quark couplings)
Version 1.5: Added separate fluxes for different neutrino species
You can now specify the flavor of neutrino you're
interested in, using the nu_flavor variable in the
differential rate functions ('e', 'eb', 'mu', 'mub', 'tau', 'taub', or 'all')
Version 1.4: Added neutrino fluxes for COHERENT@SNS
Cross sections mainly taken from arXiv:1604.01025.
See also arXiv:1701.07443.
Expand Down Expand Up @@ -369,6 +359,9 @@ def loadNeutrinoFlux(source="CHOOZ"):

Enu_min = 1.0
Enu_max = 300.0
else:
raise ValueError("CEvNS.py: source '" + source + "' not recognised...\nTry source == CHOOZ or source = SNS...")


#Now tabulate the total neutrino flux
Evals = np.logspace(np.log10(Enu_min), np.log10(Enu_max), 1000)
Expand Down
Binary file removed CEvNS_rate_Zprime.pdf
Binary file not shown.
Binary file removed CEvNS_rate_magnetic.pdf
Binary file not shown.
Binary file removed CEvNS_rate_scalar.pdf
Binary file not shown.
725 changes: 250 additions & 475 deletions COHERENT.ipynb

Large diffs are not rendered by default.

Binary file removed L1.png
Binary file not shown.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Bradley J. Kavanagh
Copyright (c) 2018 Bradley J. Kavanagh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
72 changes: 53 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,44 @@
# CEvNS

[![Binder](http://mybinder.org/badge.svg)](https://beta.mybinder.org/v2/gh/bradkav/CEvNS/master)
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/bradkav/CEvNS/master?filepath=CEvNS-examples.ipynb) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1229055.svg)](https://doi.org/10.5281/zenodo.1229055) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)

Code for calculating Coherent Elastic Neutrino-Nucleus Scattering (CEvNS) cross sections. Cross sections taken largely from [arXiv:1604.01025](https://arxiv.org/abs/1604.01025) and [arXiv:1701.07443](https://arxiv.org/abs/1701.07443).
*Code for calculating Coherent Elastic Neutrino-Nucleus Scattering (CEvNS) cross sections and recoil spectra.*

See the **example code** in the iPython notebook (`CEvNS-examples.ipynb`) [here](https://nbviewer.jupyter.org/github/bradkav/CEvNS/blob/master/CEvNS-examples.ipynb) or click the 'Launch Binder' button to view an interactive notebook. For working with the **recent COHERENT data** ([arXiv:1708.01294](https://arxiv.org/abs/1708.01294)), check out the notebook `COHERENT.ipynb` [here](https://nbviewer.jupyter.org/github/bradkav/CEvNS/blob/master/COHERENT.ipynb).
Currently includes (among other things) the Standard Model contribution to the CEvNS cross section, along with the contribution from Simplified Models with new vector or scalar mediators. The code also covers neutrino magnetic moments and non-standard contact neutrino interactions (NSI). Cross sections taken largely from [arXiv:1604.01025](https://arxiv.org/abs/1604.01025) and [arXiv:1701.07443](https://arxiv.org/abs/1701.07443).

Currently includes (among other things) the Standard Model contribution to the CEvNS cross section, along with the contribution from Simplified Models with new vector or scalar mediators. The code also covers neutrino magnetic moments and non-standard contact neutrino interactions (NSI).
#### Requirements

Note that if you are using the NSI rate or the vector mediator, you do not need to add the Standard Model rate too - the NSI and vector rates include (and modify) the normalisation of Standard Model CEvNS. For the scalar mediator and neutrino magnetic moments, you need to add also the contribution of the Standard Model rate.
The code is compatible with Python2.7 and requires [numpy](http://www.numpy.org) and [scipy](https://www.scipy.org).

### Version History
Some of the associated notebooks require [matplotlib](https://matplotlib.org) and [tqdm](https://github.com/tqdm/tqdm).

**Version 1.6 (06/11/2017):** Updated and checked code for Scalar cross section and differential rate.
**Version 1.5 (21/09/2017):** Now stores separate fluxes for different neutrino species (specify in the differential rate functions using nu_flavor=('e', 'eb', 'mu', 'mub', 'tau', 'taub', or 'all')).
**Version 1.4 (20/09/2017):** Now includes COHERENT@SNS fluxes (simply use `loadNeutrinoFlux("SNS")` to initialise). Results from the COHERENT experiment are reproduced in the notebook `COHERENT.ipynb`.
**Version 1.3 (13/09/2017):** Updated to calculate rate including NSI interactions.
**Version 1.2 (15/02/2017):** Updated to include contribution to nuclear scattering from 'neutrino magnetic moment'-'nuclear charge' coupling.
**Version 1.1 (31/01/2017):** Updated to include *reactor neutrino flux* and calculation of the differential neutrino-nucleus scattering rate.
**Version 1.0 (25/01/2017):** Initial code include SM contribution and vector current Simplified Model.
#### Getting started

To get started, see the **example code** in the jupyter notebook [`CEvNS-examples.ipynb`](https://nbviewer.jupyter.org/github/bradkav/CEvNS/blob/master/CEvNS-examples.ipynb) or click the 'Launch Binder' button to view an interactive notebook. A more detailed description of the code is also shown below.

### Using the code
For working with the **recent COHERENT data** ([arXiv:1708.01294](https://arxiv.org/abs/1708.01294)), check out the notebook [`COHERENT.ipynb`](https://nbviewer.jupyter.org/github/bradkav/CEvNS/blob/master/COHERENT.ipynb).

Import the module `CEvNS.py`. This gives you access to the following functions for calculating the cross section and differential recoil rate.

#### Related projects

This code was used to generate plots and perform some calculations for the following projects:

> J Billard, J Johnston & B J Kavanagh, "*Prospects for exploring New Physics in
Coherent Elastic Neutrino-Nucleus Scattering*" (2018), [arXiv:1805.?????](https://arxiv.org/abs/1805.?????)

#### Contact

If you have any questions, comments, feature requests, bug-reports etc., please contact Bradley Kavanagh at bradkav@gmail.com.

# Using the code

Import the module `CEvNS.py`:

```python
import CEvNS
```

This gives you access to the following functions for calculating the cross section and differential recoil rate.

#### Cross sections

Expand Down Expand Up @@ -67,9 +82,15 @@ where
- (`A`, `Z`) are the mass and atomic number of the target nucleus
- `Eps_X_Y` is the NSI coupling epsilson to X type quarks (X = u, d). Y = e, mu, tau specifies the final neutrino flavour. For flavour-conserving (i.e. nu_e -> nu_e) Y = e. For flavour-changing (e.g. nu_e -> nu_tau) Y = mu, tau.

#### Neutrino fluxes

Before you can calculate the differential rates, you need to load an appropriate set of neutrino fluxes using `loadNeutrinoFlux(source)`. There are two options for `source`: `"CHOOZ"` (for the CHOOZ reactor, Near Site) and `"SNS"` (for the Spallation Neutron Source where COHERENT is located). `"CHOOZ"` is the default choice, and if you don't call `loadNeutrinoFlux` before you try to calculate a differential rate, the CHOOZ neutrino flux is automatically loaded.

The fluxes for the 6 different neutrino species (e, eb, mu, mub, tau, taub) are stored separately, as well as the total neutrino flux. When you call a differential rate function, you can specify which species you're interested in with nu_flavor=('e', 'eb', 'mu', 'mub', 'tau', 'taub', or 'all'). The default is 'all', which sums the contributions from all the neutrino flavours.

#### Differential rates

Calculate differential rates in units of counts/keV/kg/day (parameter definitions as above).
Calculate differential recoil rates (per unit detector mass) in units of counts/keV/kg/day (parameter definitions as above).

*Contribution from vector exchange (Z and possible new Z' mediator):*
`differentialRate_CEvNS(E_R, A, Z, gsq=0.0, m_med=1000.0, nu_flavor='all')`
Expand All @@ -86,8 +107,21 @@ Calculate differential rates in units of counts/keV/kg/day (parameter definition
*Full contribution from vector exchange and magnetic moment:*
`differentialRate_full(E_R, A, Z, gsq=0.0, m_med=1000.0,mu_nu=0.0, nu_flavor='all')`

#### Neutrino fluxes
Note that if you are using the NSI or vector mediator rates, you do not need to add the Standard Model rate too - the NSI and vector rates include (and modify) the normalisation of Standard Model CEvNS. For the scalar mediator and neutrino magnetic moments, you need to add also the contribution of the Standard Model rate.

# Version History

**Release Version 1.0 (05/05/2018):** Release version, including plotting and examples routines, associated with [arXiv:1805.?????](https://arxiv.org/abs/1805.?????).

**Pre-release Version 1.6 (06/11/2017):** Updated and checked code for Scalar cross section and differential rate.
**Pre-release Version 1.5 (21/09/2017):** Now stores separate fluxes for different neutrino species (specify in the differential rate functions using nu_flavor=('e', 'eb', 'mu', 'mub', 'tau', 'taub', or 'all')).
**Pre-release Version 1.4 (20/09/2017):** Now includes COHERENT@SNS fluxes (simply use `loadNeutrinoFlux("SNS")` to initialise). Results from the COHERENT experiment are reproduced in the notebook `COHERENT.ipynb`.
**Pre-release Version 1.3 (13/09/2017):** Updated to calculate rate including NSI interactions.
**Pre-release Version 1.2 (15/02/2017):** Updated to include contribution to nuclear scattering from 'neutrino magnetic moment'-'nuclear charge' coupling.
**Pre-release Version 1.1 (31/01/2017):** Updated to include *reactor neutrino flux* and calculation of the differential neutrino-nucleus scattering rate.
**Pre-release Version 1.0 (25/01/2017):** Initial code include SM contribution and vector current Simplified Model.


Before you can calculate the differential rates, you need to load an appropriate set of neutrino fluxes using `loadNeutrinoFlux(source)`. There are two options for `source`: `"CHOOZ"` (for the CHOOZ reactor) and `"SNS"` (for the Spallation Neutron Source where COHERENT is located). `"CHOOZ"` is the default choice, and if you don't call `loadNeutrinoFlux` before you try to calculate a differential rate, the CHOOZ neutrino flux is automatically loaded.
# License

The fluxes for the 6 different neutrino species (e, eb, mu, mub, tau, taub) are stored separately, as well as the total neutrino flux. When you call a differential rate function, you can specify which species you're interested in with nu_flavor=('e', 'eb', 'mu', 'mub', 'tau', 'taub', or 'all'). The default is 'all', which sums all the neutrino fluxes.
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
Binary file removed plots/CEvNS_rate.pdf
Binary file not shown.
Binary file removed plots/CEvNS_rate_3.pdf
Binary file not shown.
Binary file removed plots/CEvNS_rate_NMM.pdf
Binary file not shown.
Binary file removed plots/CEvNS_rate_SMonly.pdf
Binary file not shown.
Binary file modified plots/CEvNS_rate_Scalar.pdf
Binary file not shown.
Binary file modified plots/CEvNS_rate_Zprime.pdf
Binary file not shown.
Binary file modified plots/CEvNS_rate_magnetic.pdf
Binary file not shown.
File renamed without changes.
Binary file removed plots/CEvNS_rate_xkcd.pdf
Binary file not shown.
Binary file modified plots/COHERENT_NSI_ee.pdf
Binary file not shown.
Binary file modified plots/COHERENT_NSI_emu.pdf
Binary file not shown.
Binary file modified plots/COHERENT_NSI_etau.pdf
Binary file not shown.
Binary file added plots/COHERENT_Zprime.pdf
Binary file not shown.
Binary file modified plots/COHERENT_data.pdf
Binary file not shown.
Binary file modified plots/COHERENT_likelihood.pdf
Binary file not shown.
Binary file modified plots/COHERENT_magnetic.pdf
Binary file not shown.
Binary file added plots/COHERENT_scalar.pdf
Binary file not shown.
Binary file removed plots/Downward fluctuation.pdf
Binary file not shown.
Binary file removed plots/Typical.pdf
Binary file not shown.
Binary file removed plots/Upward fluctuation.pdf
Binary file not shown.
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
matplotlib
scipy==1.0.0
matplotlib==2.1.2
numpy==1.14.0
tqdm==4.19.9
Loading

0 comments on commit eb6d624

Please sign in to comment.