Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Continuous Flux Injection from Differential MCEq Profile as a new Body Class and Corresponding Updates #41

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

ConnorSponsler
Copy link
Contributor

Adds a new body type EmittingEarthAtm as a derived class from EarthAtm in both body.h and body.cpp that uses TriCubicInterpolator to calculate the differential flux production dependent on coszen, heaght, and energy in the atmosphere.
Modifies nuSQUIDSAtm to allow for a second template that is derived from EarthAtm.
Updates how nuSQUIDSAtm checks for the base class of a template.
Adds functions to nuSQUIDSAtm to allow for the manipulation of the class in the body template.
Adds a new file in examples to that explains the use of nuSQUIDSAtm with the EmittingEarthAtm class.
Adds this example to the configure file so it appears with the old examples in the makefile.
To be added: a new file in data called "atmos_prod" that should contain the differential flux production profile. All data has been calculated, but is currently too large in .dat format to upload.

@@ -29,6 +29,7 @@
#include <stdexcept>
#include <type_traits>
#include <utility>
#include <fstream>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required for reading the datafile in line 966

Copy link
Collaborator

@cnweaver cnweaver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this code is generally on the right track, and will be really great once we tune it up a bit.

This does need to be extended to handle anti-neutrinos. EmittingEarthAtm::injected_neutrino_flux is currently hard-coded to only fill the rho=0 entries in the flux array, but it should be mindful of whether the propagation is neutrinos only, anti-neutrinos only, or both together (which is the most common case people will want to calculate). The input data file should likewise be able to (and probably required to) provide anti-neutrino fluxes. Related to this, the nu_tau flux needs to be handled if the number of flavors is >= 3, even if just by explicitly setting it to zero, to prevent leaving garbage value in the flux array, and likewise any sterile flavors.

Since it would generally be odd to compute/predict neutrino fluxes without anti-neutrino fluxes, I propose that the text file format should always require them to be present together. It could then have a fixed set of abscissa columns (zenith angle, height, energy), and a variable number of ordinate columns for different neutrino flavors, but with the requirement that the number of ordinate columns should be even. If there are two columns (after the required three), they would be nu_e and nu_e_bar fluxes, if there are four they would be nu_e, nu_e_bar, nu_mu, nu_mu_bar, etc.

configure Outdated Show resolved Hide resolved
include/nuSQuIDS/body.h Outdated Show resolved Hide resolved
include/nuSQuIDS/body.h Outdated Show resolved Hide resolved
src/body.cpp Outdated Show resolved Hide resolved
src/body.cpp Outdated Show resolved Hide resolved
/// \brief indices for the electron and muon flavors
/// defaulted to the first and second flavor states
int E_nu_index = 0;
int Mu_nu_index = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think E_nu_index and Mu_nu_index should be removed. We should use the usual implicit flavor ordering (nu_e, nu_mu, nu_tau). It would also be good to change all remaining comments an variable names to the standard form (e.g. correct E_nu to nu_e).

include/nuSQuIDS/body.h Outdated Show resolved Hide resolved
src/body.cpp Outdated Show resolved Hide resolved
src/body.cpp Outdated Show resolved Hide resolved
adjust EmittingEarthAtm implementation
adjustments to EmittingEarthAtm implementation
update description of requirements for user supplied data file
@ConnorSponsler
Copy link
Contributor Author

ConnorSponsler commented Nov 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants