NC::OscProb::OscPars Class Reference

Base class for the various oscillation models. More...

#include <NCOscProb.h>

Inheritance diagram for NC::OscProb::OscPars:
NC::OscProb::Decay NC::OscProb::Decoherence NC::OscProb::FourFlavorBase NC::OscProb::NoOscillations NC::OscProb::SterileFraction NC::OscProb::SterileFractionTauNorm NC::OscProb::ThreeFlavor NC::OscProb::FourFlavorDelta41Is0 NC::OscProb::FourFlavorDelta43Is0 NC::OscProb::FourFlavorDelta43IsBig NC::OscProb::FourFlavorGeneral

List of all members.

Public Member Functions

 OscPars (NCType::EOscModel mod)
virtual ~OscPars ()
NCType::EOscModel OscillationModel () const
 What oscillation model is this?
virtual double TransitionProbability (NCType::EOscMode mode, NCType::EEventType interactionType, double baseline, double trueEnergy) const =0
double TransitionProbability (int initial, int final, NCType::EEventType interactionType, double baseline, double trueEnergy) const
 Probability to go from flavour initial to final.
virtual bool IsEquiv (const OscPars *rhs) const
 Default implementation of equivalence check.
double GetParameterValue (NCType::EFitParam p) const
virtual bool operator< (const NC::OscProb::OscPars &rhs) const
virtual std::ostream & Print (std::ostream &os=std::cout) const
virtual OscParsClone ()=0

Protected Attributes

SafeDouble fVals [NCType::kNumParameters]

Private Attributes

NCType::EOscModel fModel

Detailed Description

Base class for the various oscillation models.

This class acts as an interface that any oscillation model should implement.

Definition at line 52 of file NCOscProb.h.


Constructor & Destructor Documentation

NC::OscProb::OscPars::OscPars ( NCType::EOscModel  mod  )  [inline]

Definition at line 55 of file NCOscProb.h.

00055 : fModel(mod) {}

virtual NC::OscProb::OscPars::~OscPars (  )  [inline, virtual]

Definition at line 56 of file NCOscProb.h.

00056 {}


Member Function Documentation

virtual OscPars* NC::OscProb::OscPars::Clone (  )  [pure virtual]
double NC::OscProb::OscPars::GetParameterValue ( NCType::EFitParam  p  )  const [inline]

Definition at line 95 of file NCOscProb.h.

References fVals.

Referenced by NC::CoordinateConverter::CoordNDimFromOscPars().

00096     {
00097       return fVals[p];
00098     }

bool NC::OscProb::OscPars::IsEquiv ( const OscPars rhs  )  const [virtual]

Default implementation of equivalence check.

If you need something more complicated you should override it.

Definition at line 21 of file NCOscProb.cxx.

References fVals, NCType::kNumParameters, n, OscillationModel(), and NC::OscProb::SafeDouble::Uninitialized().

Referenced by NCExtrapolationFarNear::ConstructFarSpectrum(), NCExtrapolationBeamMatrix::DoOscillations(), and operator<().

00022 {
00023   if(!rhs) return false;
00024   if(rhs->OscillationModel() != OscillationModel()) return false;
00025   for(int n = 0; n < NCType::kNumParameters; ++n){
00026     if(rhs->fVals[n].Uninitialized() != fVals[n].Uninitialized())
00027       return false;
00028     if(!fVals[n].Uninitialized() && rhs->fVals[n] != fVals[n])
00029       return false;
00030   }
00031   return true;
00032 }

bool NC::OscProb::OscPars::operator< ( const NC::OscProb::OscPars rhs  )  const [virtual]

Definition at line 45 of file NCOscProb.cxx.

References fModel, fVals, IsEquiv(), NCType::kNumParameters, n, and NC::OscProb::SafeDouble::Uninitialized().

00046 {
00047   if(IsEquiv(&rhs)) return false;
00048 
00049   if(fModel < rhs.fModel) return true;
00050   if(fModel > rhs.fModel) return false;
00051 
00052   for(int n = 0; n < NCType::kNumParameters; ++n){
00053     if(fVals[n].Uninitialized()) continue;
00054     assert(!rhs.fVals[n].Uninitialized());
00055     if(fVals[n] < rhs.fVals[n]) return true;
00056     if(fVals[n] > rhs.fVals[n]) return false;
00057   }
00058 
00059   assert(0 && "Not reached");
00060 }

NCType::EOscModel NC::OscProb::OscPars::OscillationModel (  )  const [inline]

What oscillation model is this?

Definition at line 59 of file NCOscProb.h.

References fModel.

Referenced by NC::CoordinateConverter::CoordNDimFromOscPars(), IsEquiv(), and set_osc_pars().

00059 {return fModel;}

std::ostream & NC::OscProb::OscPars::Print ( std::ostream &  os = std::cout  )  const [virtual]

Definition at line 35 of file NCOscProb.cxx.

References fVals, NCType::kNumParameters, and n.

Referenced by NC::OscProb::operator<<().

00036 {
00037   os << "[ ";
00038   for(int n = 0; n < NCType::kNumParameters; ++n)
00039     if(!fVals[n].Uninitialized()) os << fVals[n] << " ";
00040   os << "]";
00041   return os;
00042 }

double NC::OscProb::OscPars::TransitionProbability ( int  initial,
int  final,
NCType::EEventType  interactionType,
double  baseline,
double  trueEnergy 
) const [inline]

Probability to go from flavour initial to final.

Parameters:
initial PDG code of the initial flavour of the neutrino
final PDG code of the final flavour of the neutrino
interactionType See below
baseline Distance (km) over which the oscillation is measured
trueEnergy Energy of the neutrino in GeV
Returns:
Probability for neutrino to be found in flavour final

Apologies for interactionType - it doesn't have much basis in physics. For Neutral Current events no oscillations are considered to occur.

See also:
NCType::kBaseLineFar

Definition at line 80 of file NCOscProb.h.

References NC::OscProb::ToOscMode(), and TransitionProbability().

00085     {
00086       return TransitionProbability(ToOscMode(initial, final), interactionType,
00087                                    baseline, trueEnergy);
00088     }

virtual double NC::OscProb::OscPars::TransitionProbability ( NCType::EOscMode  mode,
NCType::EEventType  interactionType,
double  baseline,
double  trueEnergy 
) const [pure virtual]

Member Data Documentation

Definition at line 111 of file NCOscProb.h.

Referenced by operator<(), and OscillationModel().

SafeDouble NC::OscProb::OscPars::fVals[NCType::kNumParameters] [protected]

Definition at line 108 of file NCOscProb.h.

Referenced by GetParameterValue(), IsEquiv(), operator<(), and Print().


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

Generated on 14 Jun 2018 for loon by  doxygen 1.6.1