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::BetaFitNeutrinoSource Class Reference

"Beta-fit" neutrino source More...

#include <NeutrinoSource.hh>

Inheritance diagram for marley::BetaFitNeutrinoSource:
marley::NeutrinoSource

Public Member Functions

 BetaFitNeutrinoSource (int particle_id=marley_utils::ELECTRON_NEUTRINO, double Emin=0., double Emax=50., double Emean=13., double beta=4.5)
 
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_
 pinching parameter (stored as alpha = beta - 1)
 
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

"Beta-fit" neutrino source

Neutrino energies from this source are sampled from a "beta-fit" spectrum (see, for example, equation 7 in Huang, Guo, & Young, Chinese Physics C, 40, 073102 (2016)) with mean neutrino energy \(E_\text{mean}\) and fit parameter \(\beta\). This parameterization is related to the alpha-fit form by \(\alpha = \beta - 1\). The probability density function is given by

\begin{align*}P(E) &= C\left(E/\,E_\text{mean}\right)^{\beta - 1} \exp\left(-\beta\,E/\,E_\text{mean}\right) & \text{E}_\text{min} \leq E \leq \text{E}_\text{max} \end{align*}

where \(C\) is a normalization constant.

Definition at line 204 of file NeutrinoSource.hh.

Constructor & Destructor Documentation

◆ BetaFitNeutrinoSource()

marley::BetaFitNeutrinoSource::BetaFitNeutrinoSource ( int particle_id = marley_utils::ELECTRON_NEUTRINO,
double Emin = 0.,
double Emax = 50.,
double Emean = 13.,
double beta = 4.5 )
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)
betadimensionless fit parameter

Definition at line 119 of file NeutrinoSource.cc.

121 : NeutrinoSource(particle_id), Emin_(Emin), Emax_(Emax), Emean_(Emean),
122 alpha_(beta - 1.), C_(1.)
123{
124 if ( beta <= 0. ) {
125 throw marley::Error("For a \"beta-fit\" neutrino source, a value of"
126 " the fit parameter beta <= 0 prevents normalization of the"
127 " energy distribution. Please choose a positive value and try again.");
128 }
129
130 if ( alpha_ < 0. && Emin_ == 0. ) {
131 MARLEY_LOG(WARN, "init.config.source") << "For a beta-fit source with"
132 " beta < 1 (i.e., alpha < 0) and Emin = 0, the PDF diverges at E = 0.";
133 }
134
135 // Normalize the source spectrum (not strictly necessary, but having the
136 // spectrum approximately normalized makes the default rejection sampling
137 // tolerance of 1e-8 reliable for finding the maximum of the spectrum)
138 double integral = marley_utils::num_integrate(
139 [this](double E) -> double { return this->pdf(E); }, Emin_, Emax_);
140
141 // Update the normalization constant, thereby normalizing this object's
142 // pdf in the process.
143 C_ /= integral;
144}
virtual double pdf(double E) const override
Probability density function describing the incident neutrino energy distribution.
double C_
dimensionless normalization constant
double alpha_
pinching parameter (stored as alpha = beta - 1)
double Emean_
mean neutrino energy
double Emin_
minimum neutrino energy (MeV)
NeutrinoSource(int particle_id)

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

Member Function Documentation

◆ get_Emax()

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

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

Implements marley::NeutrinoSource.

Definition at line 349 of file NeutrinoSource.hh.

349{ return Emax_; }

References Emax_.

◆ get_Emin()

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

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

Implements marley::NeutrinoSource.

Definition at line 350 of file NeutrinoSource.hh.

350{ return Emin_; }

References Emin_.

◆ pdf()

double marley::BetaFitNeutrinoSource::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 146 of file NeutrinoSource.cc.

146 {
147 return C_ * gamma_pdf_unnorm(E, Emean_, alpha_, Emin_, Emax_);
148}

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

Referenced by BetaFitNeutrinoSource().

Member Data Documentation

◆ alpha_

double marley::BetaFitNeutrinoSource::alpha_
protected

pinching parameter (stored as alpha = beta - 1)

Definition at line 229 of file NeutrinoSource.hh.

Referenced by BetaFitNeutrinoSource(), and pdf().

◆ C_

double marley::BetaFitNeutrinoSource::C_
protected

dimensionless normalization constant

Definition at line 230 of file NeutrinoSource.hh.

Referenced by BetaFitNeutrinoSource(), and pdf().

◆ Emax_

double marley::BetaFitNeutrinoSource::Emax_
protected

maximum neutrino energy (MeV)

Definition at line 223 of file NeutrinoSource.hh.

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

◆ Emean_

double marley::BetaFitNeutrinoSource::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 228 of file NeutrinoSource.hh.

Referenced by BetaFitNeutrinoSource(), and pdf().

◆ Emin_

double marley::BetaFitNeutrinoSource::Emin_
protected

minimum neutrino energy (MeV)

Definition at line 222 of file NeutrinoSource.hh.

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


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