Skip to content

Commit

Permalink
Merge pull request #50 from JostMigenda/release_v1.3
Browse files Browse the repository at this point in the history
Release v1.3
  • Loading branch information
JostMigenda authored Aug 12, 2023
2 parents e141b45 + 281dacd commit c821c5f
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 362 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ documentation.pdf
*.aux
*.bbl
*.blg
*.dvi
*.fdb_latexmk
*.fls
*.log
Expand Down
30 changes: 6 additions & 24 deletions doc/documentation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
\newcommand{\nuxbar}{\ensuremath{\bar{\nu}_x}\xspace}


\title{Documentation for sntools 1.2\footnote{See \url{https://github.com/JostMigenda/sntools} for the most recent version.}}
\title{Documentation for sntools 1.3\footnote{See \url{https://github.com/JostMigenda/sntools} for the most recent version.}}
\author{Jost Migenda\footnote{King’s College London, \url{[email protected]}}}
\date{\today}

Expand Down Expand Up @@ -87,7 +87,7 @@ \subsection{Quick Start Guide}
\begin{description}
\item[\texttt{--format <value>}] Format of input file(s). See section~\ref{sec:input-formats}.
\item[\texttt{--output <value>}] Name of the output file.
\item[\texttt{--mcformat <value>}] Format of output file. Can be 1) \texttt{NUANCE} (used e.\,g. by Hyper-Kamiokande), 2) \texttt{RATPAC} (used e.\,g. by WATCHMAN) or 3) \texttt{JUNO_ROOT} (used by the JUNO internal software) \footnote{For a description of these formats see \url{http://neutrino.phy.duke.edu/nuance-format/} and \url{https://rat.readthedocs.io/en/latest/generators.html\#external.}\footnote{For more details on the JUNO SNEvent internal structure, contact \url{[email protected]}.}.}
\item[\texttt{--mcformat <value>}] Format of output file. Can be \texttt{NUANCE} (used e.\,g. by Hyper-Kamiokande), \texttt{RATPAC} (used e.\,g. by SNO+ and WATCHMAN) or \texttt{JUNO\_ROOT} (used by the JUNO internal software).\footnote{For a description of these formats see \url{http://neutrino.phy.duke.edu/nuance-format/} and \url{https://rat.readthedocs.io/en/latest/generators.html\#external}. For more details on the JUNO SNEvent internal structure, contact \url{[email protected]}.}

\item[\texttt{--detector <value>}] Detector configuration. See section~\ref{sec:detector-configurations}.
\item[\texttt{--channel <value>}] Interaction channel to generate events for. See section~\ref{sec:interaction-channels}.
Expand Down Expand Up @@ -141,8 +141,9 @@ \section{More Details}
\subsection{Detector Materials}
sntools currently supports three detector materials: water, liquid scintillator and water-based liquid scintillator.
Water is assumed to consist of an oxygen-16 nucleus and two hydrogen nuclei (free protons).
Generic liquid scintillator is assumed to consist of $n$ carbon-12 nuclei and $2n$ hydrogen nuclei (free protons). In addition, linear alkylbenzene (LAB) is available as a liquid scintillator material and assumes a molecular structure of C$_6$H$_5$C$_n$H$_{2n+1}$ where $n$ is between 9-14 (95\% 9-12) \cite{anderson2021development}. For JUNO, a dedicated LAB density has been implented to match with the LAB mass and detector volume of JUNO.
Water-based liquid scintillator is assumed to be a mixture of $x\,\%$ liquid scintillator and $(100-x)\,\%$ water.
Generic liquid scintillator is assumed to consist of $n$ carbon-12 nuclei and $2n$ hydrogen nuclei (free protons).
In addition, two specific liquid scintillators\footnote{both linear alkylbenzene (LAB), a mixture of C$_6$H$_5$C$_n$H$_{2n+1}$ molecules with $9<n<14$} are implemented, which match the materials used in SNO+~\cite{anderson2021development} and JUNO.
Water-based liquid scintillator is assumed to be a mixture of $x\,\%$ generic liquid scintillator and $(100-x)\,\%$ water.
%Each material supports the appropriate detection channels presented in section~\ref{sec:interaction-channels}.

The detector material doesn’t need to be specified explicitly; it is determined by the detector configuration.
Expand Down Expand Up @@ -199,7 +200,7 @@ \subsubsection{\texttt{es}: Neutrino-Electron Scattering}
\subsubsection{\texttt{ps}: Neutrino-Proton Scattering}
In liquid scintillator, neutrino-proton scattering ($\nu + p \rightarrow \nu + p$) is an additional available subdominant interaction channel. The recoiling proton energy spectrum is soft meaning the deposited energy in the detector is relatively low ($<5$~MeV). These protons are invisible in water as they're below the Cherenkov threshold. Furthermore, the slow heavily ionizing protons lose energy very quickly, quenching the effective signal. Despite this, over a realistic detection threshold ($\mathcal{O}(100)$s~keV), the neutrino-proton scattering yield can be the second largest available to liquid scintillator detectors below IBD.

Neutrino-proton scattering is a neutral current interaction and is available to all (anti-)neutrino flavours. The proton recoil spectrum can also provide spectral information about the incoming neutrino, which could solve a long-standing problem of how to separately measure the total energy and temperature of $\nu_{\mu}$, $\nu_{\tau}$, $\bar{\nu}_{\mu}$, and $\bar{\nu}_{\tau}$ \cite{beacom2002detection}.
Neutrino-proton scattering is a neutral-current interaction and is available to all (anti-)neutrino flavours. The proton recoil spectrum can also provide spectral information about the incoming neutrino, which could solve a long-standing problem of how to separately measure the total energy and temperature of $\nu_{\mu}$, $\nu_{\tau}$, $\bar{\nu}_{\mu}$, and $\bar{\nu}_{\tau}$ \cite{beacom2002detection}.

In sntools, the implementation of neutrino-proton scattering is based a prediction by Beacom, Farr, and Vogel \cite{beacom2002detection}. Here the cross-section is calculated directly from the Standard Model, which has been extensively verified by GeV-scale experiments \cite{ahrens1987measurement}.

Expand All @@ -219,25 +220,6 @@ \subsubsection{\texttt{o16e} and \texttt{o16eb}: Charged-Current Interactions on
For a typical supernova neutrino flux, the difference in the resulting event spectra when using the four groups instead of all 42 nuclear states is very small.


\subsubsection{\texttt{o16nc\_n} and \texttt{o16nc\_p}: Neutral-Current Interactions on $^{16}$O}
In water, neutral-current interactions on $^{16}$O nuclei are a subdominant interaction channel that neutrinos and antineutrinos of all flavours contribute to equally.
The largest contribution to this channel comes from events where a single neutron or proton\footnote{
Since the energy of the emitted proton is below the Cherenkov threshold, it cannot be detected in water Cherenkov detectors.
Therefore, sntools generates \texttt{o16nc\_p} events only for WbLS detectors.
However, \texttt{o16nc\_n} events \textit{are} generated also in water Cherenkov detectors, since the neutron capture signal is potentially detectable.
} is emitted,
\begin{align}
\nu + \/^{16}\text{O} \rightarrow \nu' + &^{16}\text{O}^*\\
\Rightarrow &^{16}\text{O}^{*} \rightarrow X + n\\
\nu + \/^{16}\text{O} \rightarrow \nu' + &^{16}\text{O}^*\\
\Rightarrow &^{16}\text{O}^{*} \rightarrow X + p.
\end{align}

In sntools, the cross sections for these interactions is based on the theoretical calculations tabulated in~\cite{Suzuki2018}.
The energy distribution of the outgoing particle is unknown.
In the current implementation, the energy is simply taken to be a random fraction of the available neutrino energy above threshold.


\subsubsection{\texttt{c12e} and \texttt{c12eb}: Charged-Current Interactions on $^{12}$C}
In liquid scintillator, charged-current interactions of \nue and \nuebar on $^{12}$C nuclei,
\begin{align}
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ dependencies = [
"numpy",
"scipy",
"h5py >= 2.10",
"snewpy ~=1.3.0",
"snewpy ~=1.4b1",
"uproot"
]

keywords = ["astrophysics", "supernova", "neutrino", "event generator"]
classifiers = [
'Private :: Do Not Upload', # TODO: only for testing
'License :: OSI Approved :: BSD License',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
Expand Down
2 changes: 1 addition & 1 deletion src/sntools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
For more extensive documentation, to report issues or to contribute code,
see https://github.com/JostMigenda/sntools.
"""
__version__ = '1.2'
__version__ = '1.3'


def setup():
Expand Down
10 changes: 3 additions & 7 deletions src/sntools/detectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
water = {
"molecular_weight": 18.0153, # g/mol
"density": 1.0, # g/cm^3
"channel_weights": {"ibd": 2, "es": 10, "o16e": 1, "o16eb": 1, "o16nc_n": 1}, # targets per molecule
"channel_weights": {"ibd": 2, "es": 10, "o16e": 1, "o16eb": 1}, # targets per molecule
}

# liquid scintillator: approximated here as CH_2
Expand All @@ -17,7 +17,7 @@
}

# liquid scintillator: LAB, average structure -> C_16.65H_27.3 (C6H5CnH2n+1 where n is 95% 9-12, 5% 13-14)
lab = {
lab_snoplus = {
"molecular_weight": 227.50, # g/mol
"density": 0.856, # g/cm^3
"channel_weights": {"ibd": 27.3, "es": 127.2, "ps": 27.3, "c12e": 16.65, "c12eb": 16.65, "c12nc": 16.65},
Expand All @@ -39,10 +39,6 @@ def wbls(x):
if not 0 <= x <= 1:
raise ValueError("Fraction of Liquid Scintillator must be between 0 and 1!")

# The free proton from o16nc_p is undetectable in pure water, so not included above.
# Since it may be detectable in WbLS, we add it manually here.
water["channel_weights"]["o16nc_p"] = 1

mw = x * ls["molecular_weight"] + (1 - x) * water["molecular_weight"]
d = x * ls["density"] + (1 - x) * water["density"]
cw = {}
Expand Down Expand Up @@ -109,7 +105,7 @@ def __init__(self, name):
elif name == "SNOplusAV": # SNO+ inner AV only
self.shape = "sphere"
self.radius = 600
self.material = lab
self.material = lab_snoplus
elif name == "SNOplusEW": # SNO+ external water
self.shape = "hollowSphere"
self.innerRadius = 605
Expand Down
3 changes: 1 addition & 2 deletions src/sntools/genevts.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,10 @@ def parse_command_line_options():
help="Transformation between neutrino flux inside SN and flux in the detector on Earth. \
Choices: %(choices)s. Default: %(default)s.")

choices = ("ibd", "es", "ps", "o16e", "o16eb", "o16nc_n", "o16nc_p", "c12e", "c12eb", "c12nc")
choices = ("ibd", "es", "ps", "o16e", "o16eb", "c12e", "c12eb", "c12nc")
parser.add_argument("-c", "--channel", metavar="INTCHANNEL", choices=choices, default="all",
help="Interaction channels to consider. Currently supported: inverse beta decay (ibd), \
electron scattering (es), proton scattering (ps), nu_e + oxygen CC (o16e), nu_e-bar + oxygen CC (o16eb), \
nu + oxygen NC with neutron emission (o16nc_n) or proton emission (o16nc_p), \
nu_e + carbon CC (c12e), nu_e-bar + carbon CC (c12eb) and nu + carbon NC (c12nc). \
Default: All channels available in selected detector.")

Expand Down
112 changes: 0 additions & 112 deletions src/sntools/interaction_channels/o16nc_n.py

This file was deleted.

112 changes: 0 additions & 112 deletions src/sntools/interaction_channels/o16nc_p.py

This file was deleted.

Loading

0 comments on commit c821c5f

Please sign in to comment.