Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
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 281 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 283 of file MARLEYTimeGen_module.cc.

286  : fTime(time),
287  fNueFitParams(Emean_nue, alpha_nue, lum_nue),
288  fNuebarFitParams(Emean_nuebar, alpha_nuebar, lum_nuebar),
289  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 326 of file MARLEYTimeGen_module.cc.

326  {
327  return this->*GetFitParametersMemberPointer(pdg_code);
328  }
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 301 of file MARLEYTimeGen_module.cc.

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

343  {
344  return marley::IteratorToMember<It, FitParameters>(
346  }
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 294 of file MARLEYTimeGen_module.cc.

294 { 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 357 of file MARLEYTimeGen_module.cc.

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

Fitting parameters for electron neutrinos in this time bin.

Definition at line 353 of file MARLEYTimeGen_module.cc.

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

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

Definition at line 361 of file MARLEYTimeGen_module.cc.

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

Time bin low edge (s)

Definition at line 350 of file MARLEYTimeGen_module.cc.


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