All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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,
FitParameters
make_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 282 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 284 of file MARLEYTimeGen_module.cc.

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

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

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

344  {
345  return marley::IteratorToMember<It, FitParameters>(
346  iterator, GetFitParametersMemberPointer(pdg_code) );
347  }
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 295 of file MARLEYTimeGen_module.cc.

295 { 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 358 of file MARLEYTimeGen_module.cc.

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

Fitting parameters for electron neutrinos in this time bin.

Definition at line 354 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 362 of file MARLEYTimeGen_module.cc.

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

Time bin low edge (s)

Definition at line 351 of file MARLEYTimeGen_module.cc.


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