MARLEY (Model of Argon Reaction Low Energy Yields)  v1.2.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
marley::NeutrinoSource Class Referenceabstract

Abstract base class for all objects that describe the incident neutrino energy distribution. More...

#include <NeutrinoSource.hh>

Inheritance diagram for marley::NeutrinoSource:
marley::BetaFitNeutrinoSource marley::DecayAtRestNeutrinoSource marley::FermiDiracNeutrinoSource marley::FunctionNeutrinoSource marley::GridNeutrinoSource marley::MonoNeutrinoSource

Public Member Functions

 NeutrinoSource (int particle_id)
 
virtual double get_Emax () const =0
 Get the maximum neutrino energy (MeV) that can be sampled by this source.
 
virtual double get_Emin () const =0
 Get the minimum neutrino energy (MeV) that can be sampled by this source.
 
virtual int get_pid () const
 Get the PDG particle ID for the neutrino type produced by this source.
 
virtual double pdf (double E) const =0
 Probability density function describing the incident neutrino energy distribution. More...
 
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. More...
 

Static Public Member Functions

static bool pdg_is_allowed (const int pdg)
 

Protected Attributes

int pid_
 PDG particle ID for the neutrinos produced by this source.
 

Detailed Description

Abstract base class for all objects that describe the incident neutrino energy distribution.

Classes derived from NeutrinoSource implement a probability density function used to sample neutrino energies for each event. Because MARLEY will weight this probability density by the reaction cross section(s) during event generation, all NeutrinoSource objects should use unweighted energy spectra. While normalizing the probability densities to unity is not strictly required (the cross section weighted spectra are normalized automatically before sampling), it is encouraged, and all classes derived from NeutrinoSource currently do so.

Constructor & Destructor Documentation

◆ NeutrinoSource()

marley::NeutrinoSource::NeutrinoSource ( int  particle_id)
Parameters
particle_idPDG particle ID for the neutrinos produced by this source

Member Function Documentation

◆ pdf()

virtual double marley::NeutrinoSource::pdf ( double  E) const
pure virtual

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)

Implemented in marley::GridNeutrinoSource, marley::DecayAtRestNeutrinoSource, marley::FunctionNeutrinoSource, marley::BetaFitNeutrinoSource, marley::FermiDiracNeutrinoSource, and marley::MonoNeutrinoSource.

◆ pdg_is_allowed()

bool marley::NeutrinoSource::pdg_is_allowed ( const int  pdg)
inlinestatic

Returns true if the Particle Data Group code passed to the function is allowed to be used by a neutrino source object, and returns false otherwise.

◆ sample_incident_neutrino()

double marley::NeutrinoSource::sample_incident_neutrino ( int &  pdg,
marley::Generator gen 
) const
virtual

Samples an incident neutrino energy and loads pdg with the PDG code of the appropriate neutrino type.

This function uses a probability density function that represents the incident neutrino spectrum, i.e., it is not weighted by the reaction cross section(s). To sample a neutrino from the reacting (i.e., cross section weighted) spectrum, use Generator::sample_reaction().

Parameters
[out]pdgPDG code of the sampled neutrino
[in]genGenerator to use for random sampling
Returns
The energy of the sampled neutrino (MeV)

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