LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
evgen::MarleyTimeGen::TimeFit Class Reference

Stores fitting parameters for all neutrino types from a single time bin in a "fit"-format spectrum file. More...

Public Member Functions

 TimeFit (double time, double Emean_nue, double alpha_nue, double lum_nue, double Emean_nuebar, double alpha_nuebar, double lum_nuebar, double Emean_nux, double alpha_nux, double lum_nux)
 
double Time () const
 Returns the low edge (in s) of the time bin that uses these fit parameters. More...
 
const FitParametersGetFitParameters (int pdg_code) const
 Retrieves fit parameters for a specific neutrino type for this time bin. More...
 

Static Public Member Functions

template<typename It >
static marley::IteratorToMember< It, FitParametersmake_FitParameters_iterator (int pdg_code, It iterator)
 Converts an iterator that points to a TimeFit object into an iterator that points to the appropriate (based on the neutrino PDG code) FitParameters member owned by the TimeFit object. More...
 

Static Protected Member Functions

static FitParameters TimeFit::* GetFitParametersMemberPointer (int pdg_code)
 Helper function that returns a pointer-to-member for the FitParameters object appropriate for a given neutrino type. More...
 

Protected Attributes

double fTime
 Time bin low edge (s) More...
 
FitParameters fNueFitParams
 Fitting parameters for electron neutrinos in this time bin. More...
 
FitParameters fNuebarFitParams
 Fitting parameters for electron antineutrinos in this time bin. More...
 
FitParameters fNuxFitParams
 Fitting parameters for non-electron-flavor neutrinos in this time bin. More...
 

Detailed Description

Stores fitting parameters for all neutrino types from a single time bin in a "fit"-format spectrum file.

Definition at line 268 of file MARLEYTimeGen_module.cc.

Constructor & Destructor Documentation

evgen::MarleyTimeGen::TimeFit::TimeFit ( double  time,
double  Emean_nue,
double  alpha_nue,
double  lum_nue,
double  Emean_nuebar,
double  alpha_nuebar,
double  lum_nuebar,
double  Emean_nux,
double  alpha_nux,
double  lum_nux 
)
inline

Definition at line 270 of file MARLEYTimeGen_module.cc.

280  : fTime(time)
281  , fNueFitParams(Emean_nue, alpha_nue, lum_nue)
282  , fNuebarFitParams(Emean_nuebar, alpha_nuebar, lum_nuebar)
283  , fNuxFitParams(Emean_nux, alpha_nux, lum_nux)
284  {}
FitParameters fNuebarFitParams
Fitting parameters for electron antineutrinos in this time bin.
double fTime
Time bin low edge (s)
FitParameters fNueFitParams
Fitting parameters for electron neutrinos in this time bin.
FitParameters fNuxFitParams
Fitting parameters for non-electron-flavor neutrinos in this time bin.

Member Function Documentation

const FitParameters& evgen::MarleyTimeGen::TimeFit::GetFitParameters ( int  pdg_code) const
inline

Retrieves fit parameters for a specific neutrino type for this time bin.

Parameters
pdg_codeThe PDG code for the desired neutrino type

Definition at line 318 of file MARLEYTimeGen_module.cc.

Referenced by evgen::MarleyTimeGen::make_nu_emission_histograms(), evgen::MarleyTimeGen::reconfigure(), and evgen::MarleyTimeGen::source_from_time_fit().

319  {
320  return this->*GetFitParametersMemberPointer(pdg_code);
321  }
static FitParameters TimeFit::* GetFitParametersMemberPointer(int pdg_code)
Helper function that returns a pointer-to-member for the FitParameters object appropriate for a given...
static FitParameters TimeFit::* evgen::MarleyTimeGen::TimeFit::GetFitParametersMemberPointer ( int  pdg_code)
inlinestaticprotected

Helper function that returns a pointer-to-member for the FitParameters object appropriate for a given neutrino type.

Parameters
pdg_codePDG code for the neutrino type of interest

Definition at line 296 of file MARLEYTimeGen_module.cc.

References fNuebarFitParams, fNueFitParams, and fNuxFitParams.

297  {
298  if (pdg_code == marley_utils::ELECTRON_NEUTRINO) { return &TimeFit::fNueFitParams; }
299  else if (pdg_code == marley_utils::ELECTRON_ANTINEUTRINO) {
301  }
302  else if (is_nux(pdg_code)) {
303  // The PDG code represents one of the varieties of nu_x
304  return &TimeFit::fNuxFitParams;
305  }
306  else
307  throw cet::exception("MARLEYTimeGen")
308  << "Invalid neutrino"
309  << " PDG code " << pdg_code << " encountered in MARLEYTimeGen"
310  << "::TimeFit::GetFitParametersMemberPointer()";
311  return nullptr;
312  }
FitParameters fNuebarFitParams
Fitting parameters for electron antineutrinos in this time bin.
FitParameters fNueFitParams
Fitting parameters for electron neutrinos in this time bin.
FitParameters fNuxFitParams
Fitting parameters for non-electron-flavor neutrinos in this time bin.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
template<typename It >
static marley::IteratorToMember<It, FitParameters> evgen::MarleyTimeGen::TimeFit::make_FitParameters_iterator ( int  pdg_code,
It  iterator 
)
inlinestatic

Converts an iterator that points to a TimeFit object into an iterator that points to the appropriate (based on the neutrino PDG code) FitParameters member owned by the TimeFit object.

This function helps us to be able to sample time bins with a std::discrete_distribution using the bin luminosities without redundnant storage.

Parameters
pdg_codePDG code for the neutrino type of interest
iteratorAn iterator to a TimeFit object that will be converted

Definition at line 334 of file MARLEYTimeGen_module.cc.

Referenced by evgen::MarleyTimeGen::create_truths_time_fit().

336  {
337  return marley::IteratorToMember<It, FitParameters>(iterator,
339  }
intermediate_table::iterator iterator
static FitParameters TimeFit::* GetFitParametersMemberPointer(int pdg_code)
Helper function that returns a pointer-to-member for the FitParameters object appropriate for a given...
double evgen::MarleyTimeGen::TimeFit::Time ( ) const
inline

Returns the low edge (in s) of the time bin that uses these fit parameters.

Time zero is defined to be the core bounce

Definition at line 289 of file MARLEYTimeGen_module.cc.

Referenced by evgen::MarleyTimeGen::make_nu_emission_histograms().

289 { return fTime; }
double fTime
Time bin low edge (s)

Member Data Documentation

FitParameters evgen::MarleyTimeGen::TimeFit::fNuebarFitParams
protected

Fitting parameters for electron antineutrinos in this time bin.

Definition at line 350 of file MARLEYTimeGen_module.cc.

Referenced by GetFitParametersMemberPointer().

FitParameters evgen::MarleyTimeGen::TimeFit::fNueFitParams
protected

Fitting parameters for electron neutrinos in this time bin.

Definition at line 346 of file MARLEYTimeGen_module.cc.

Referenced by GetFitParametersMemberPointer().

FitParameters evgen::MarleyTimeGen::TimeFit::fNuxFitParams
protected

Fitting parameters for non-electron-flavor neutrinos in this time bin.

Definition at line 354 of file MARLEYTimeGen_module.cc.

Referenced by GetFitParametersMemberPointer().

double evgen::MarleyTimeGen::TimeFit::fTime
protected

Time bin low edge (s)

Definition at line 343 of file MARLEYTimeGen_module.cc.


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