MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Loading...
Searching...
No Matches
marley::AlphaFitNeutrinoSource Class Reference

"Alpha-fit" neutrino source More...

#include <NeutrinoSource.hh>

Inheritance diagram for marley::AlphaFitNeutrinoSource:
marley::NeutrinoSource

Public Member Functions

 AlphaFitNeutrinoSource (int particle_id=marley_utils::ELECTRON_NEUTRINO, double Emin=0., double Emax=50., double Emean=13., double alpha=2.)
 
virtual double get_Emax () const override
 Get the maximum neutrino energy (MeV) that can be sampled by this source.
 
virtual double get_Emin () const override
 Get the minimum neutrino energy (MeV) that can be sampled by this source.
 
virtual double pdf (double E) const override
 Probability density function describing the incident neutrino energy distribution.
 
- Public Member Functions inherited from marley::NeutrinoSource
 NeutrinoSource (int particle_id)
 
virtual int get_pid () const
 Get the PDG particle ID for the neutrino type produced by this source.
 
virtual double sample_incident_neutrino (int &pdg, marley::Generator &gen) const
 Samples an incident neutrino energy and loads pdg with the PDG code of the appropriate neutrino type.
 

Protected Attributes

double alpha_
 dimensionless pinching parameter
 
double C_
 dimensionless normalization constant
 
double Emax_
 
double Emean_
 mean neutrino energy
 
double Emin_
 minimum neutrino energy (MeV)
 
- Protected Attributes inherited from marley::NeutrinoSource
int pid_
 PDG particle ID for the neutrinos produced by this source.
 

Additional Inherited Members

- Static Public Member Functions inherited from marley::NeutrinoSource
static bool pdg_is_allowed (const int pdg)
 

Detailed Description

"Alpha-fit" neutrino source

Neutrino energies from this source are sampled from an "alpha-fit" spectrum (see, for example, equation 14 in Keil, Raffelt, & Janka, Astrophys. J. 590, 971 (2003)) with mean neutrino energy \(\langle E \rangle\) and fit parameter \(\alpha\). The probability density function is given by

\begin{align*}P(E) &= C\left(E/\langle E \rangle\right)^{\alpha} \exp\left(-(\alpha+1)\,E/\langle E \rangle\right) & \text{E}_\text{min} \leq E \leq \text{E}_\text{max} \end{align*}

where \(C\) is a normalization constant.

Definition at line 163 of file NeutrinoSource.hh.

Constructor & Destructor Documentation

◆ AlphaFitNeutrinoSource()

marley::AlphaFitNeutrinoSource::AlphaFitNeutrinoSource ( int particle_id = marley_utils::ELECTRON_NEUTRINO,
double Emin = 0.,
double Emax = 50.,
double Emean = 13.,
double alpha = 2. )
Parameters
particle_idPDG particle ID for the neutrinos produced by this source
Eminminimum allowed neutrino energy (MeV)
Emaxmaximum allowed neutrino energy (MeV)
Emeanmean neutrino energy (MeV)
alphadimensionless pinching parameter

Definition at line 88 of file NeutrinoSource.cc.

90 : NeutrinoSource(particle_id), Emin_(Emin), Emax_(Emax), Emean_(Emean),
91 alpha_(alpha), C_(1.)
92{
93 if ( alpha_ <= -1. ) {
94 throw marley::Error("For an \"alpha-fit\" neutrino source, alpha must be"
95 " > -1. This condition is required for the energy distribution to be"
96 " normalizable.");
97 }
98
99 if ( alpha_ < 0. && Emin_ == 0. ) {
100 MARLEY_LOG(WARN, "init.config.source") << "For an alpha-fit source with"
101 " alpha < 0 and Emin = 0, the PDF diverges at E = 0.";
102 }
103
104 // Normalize the source spectrum (not strictly necessary, but having the
105 // spectrum approximately normalized makes the default rejection sampling
106 // tolerance of 1e-8 reliable for finding the maximum of the spectrum)
107 double integral = marley_utils::num_integrate(
108 [this](double E) -> double { return this->pdf(E); }, Emin_, Emax_);
109
110 // Update the normalization constant, thereby normalizing this object's
111 // pdf in the process.
112 C_ /= integral;
113}
double C_
dimensionless normalization constant
double Emin_
minimum neutrino energy (MeV)
virtual double pdf(double E) const override
Probability density function describing the incident neutrino energy distribution.
double Emean_
mean neutrino energy
double alpha_
dimensionless pinching parameter
NeutrinoSource(int particle_id)

References marley::NeutrinoSource::NeutrinoSource(), alpha_, C_, Emax_, Emean_, Emin_, and pdf().

Member Function Documentation

◆ get_Emax()

double marley::AlphaFitNeutrinoSource::get_Emax ( ) const
inlineoverridevirtual

Get the maximum neutrino energy (MeV) that can be sampled by this source.

Implements marley::NeutrinoSource.

Definition at line 346 of file NeutrinoSource.hh.

346{ return Emax_; }

References Emax_.

◆ get_Emin()

double marley::AlphaFitNeutrinoSource::get_Emin ( ) const
inlineoverridevirtual

Get the minimum neutrino energy (MeV) that can be sampled by this source.

Implements marley::NeutrinoSource.

Definition at line 347 of file NeutrinoSource.hh.

347{ return Emin_; }

References Emin_.

◆ pdf()

double marley::AlphaFitNeutrinoSource::pdf ( double E) const
overridevirtual

Probability density function describing the incident neutrino energy distribution.

The neutrino spectrum produced by this source will be folded with the relevant cross sections by a Generator object during event creation

Parameters
Eneutrino energy (MeV)
Returns
Probability density (MeV -1)

Implements marley::NeutrinoSource.

Definition at line 115 of file NeutrinoSource.cc.

115 {
116 return C_ * gamma_pdf_unnorm(E, Emean_, alpha_, Emin_, Emax_);
117}

References alpha_, C_, Emax_, Emean_, and Emin_.

Referenced by AlphaFitNeutrinoSource().

Member Data Documentation

◆ alpha_

double marley::AlphaFitNeutrinoSource::alpha_
protected

dimensionless pinching parameter

Definition at line 188 of file NeutrinoSource.hh.

Referenced by AlphaFitNeutrinoSource(), and pdf().

◆ C_

double marley::AlphaFitNeutrinoSource::C_
protected

dimensionless normalization constant

Definition at line 189 of file NeutrinoSource.hh.

Referenced by AlphaFitNeutrinoSource(), and pdf().

◆ Emax_

double marley::AlphaFitNeutrinoSource::Emax_
protected

maximum neutrino energy (MeV)

Definition at line 182 of file NeutrinoSource.hh.

Referenced by AlphaFitNeutrinoSource(), get_Emax(), and pdf().

◆ Emean_

double marley::AlphaFitNeutrinoSource::Emean_
protected

mean neutrino energy

Note
This is exactly the mean neutrino energy only if \(E_\text{min} = 0 \) and \( Emax = \infty \). Truncating the distribution may alter the mean value appreciably.

Definition at line 187 of file NeutrinoSource.hh.

Referenced by AlphaFitNeutrinoSource(), and pdf().

◆ Emin_

double marley::AlphaFitNeutrinoSource::Emin_
protected

minimum neutrino energy (MeV)

Definition at line 181 of file NeutrinoSource.hh.

Referenced by AlphaFitNeutrinoSource(), get_Emin(), and pdf().


The documentation for this class was generated from the following files: