LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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, TimeFit, 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 284 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 286 of file MARLEYTimeGen_module.cc.

289  : fTime(time),
290  fNueFitParams(Emean_nue, alpha_nue, lum_nue),
291  fNuebarFitParams(Emean_nuebar, alpha_nuebar, lum_nuebar),
292  fNuxFitParams(Emean_nux, alpha_nux, lum_nux) {}
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 329 of file MARLEYTimeGen_module.cc.

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

329  {
330  return this->*GetFitParametersMemberPointer(pdg_code);
331  }
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 304 of file MARLEYTimeGen_module.cc.

References fNuebarFitParams, fNueFitParams, and fNuxFitParams.

306  {
307  if (pdg_code == marley_utils::ELECTRON_NEUTRINO) {
308  return &TimeFit::fNueFitParams;
309  }
310  else if (pdg_code == marley_utils::ELECTRON_ANTINEUTRINO) {
312  }
313  else if ( is_nux(pdg_code) )
314  {
315  // The PDG code represents one of the varieties of nu_x
316  return &TimeFit::fNuxFitParams;
317  }
318  else throw cet::exception("MARLEYTimeGen") << "Invalid neutrino"
319  << " PDG code " << pdg_code << " encountered in MARLEYTimeGen"
320  << "::TimeFit::GetFitParametersMemberPointer()";
321  return nullptr;
322  }
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, TimeFit, 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 344 of file MARLEYTimeGen_module.cc.

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

346  {
347  return marley::IteratorToMember<It, TimeFit, FitParameters>(
349  }
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 297 of file MARLEYTimeGen_module.cc.

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

297 { 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 360 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 356 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 364 of file MARLEYTimeGen_module.cc.

Referenced by GetFitParametersMemberPointer().

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

Time bin low edge (s)

Definition at line 353 of file MARLEYTimeGen_module.cc.


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