OscProb
OscProb::Absorption Class Reference

#include <Absorption.h>

Public Member Functions

 Absorption ()
 
virtual ~Absorption ()
 
virtual double Trans (double xsec)
 
virtual void SetPath (std::vector< NuPath > paths)
 Set a path sequence. More...
 

Protected Attributes

std::vector< NuPathfNuPaths
 Vector of neutrino paths. More...
 

Static Protected Attributes

static const double kU = 1.660539066e-24
 Atomic mass unit. More...
 

Detailed Description

Definition at line 8 of file Absorption.h.

Constructor & Destructor Documentation

◆ Absorption()

Absorption::Absorption ( )

Definition at line 14 of file Absorption.cxx.

14{}

◆ ~Absorption()

Absorption::~Absorption ( )
virtual

Definition at line 16 of file Absorption.cxx.

16{}

Member Function Documentation

◆ SetPath()

void Absorption::SetPath ( std::vector< NuPath paths)
virtual

Definition at line 36 of file Absorption.cxx.

36{ fNuPaths = paths; }
std::vector< NuPath > fNuPaths
Vector of neutrino paths.
Definition: Absorption.h:18

References fNuPaths.

◆ Trans()

double Absorption::Trans ( double  xsec)
virtual

Definition at line 19 of file Absorption.cxx.

20{
21 vector<double> p_trans_vec;
22
23 for (int i = 0; i < int(fNuPaths.size()); i++) {
24 double n = fNuPaths[i].density / kU;
25 double l = fNuPaths[i].length * 1e5; // l in km -> cm
26 double p_trans = exp(-l * n * xsec);
27 p_trans_vec.push_back(p_trans); // probability of NO absorption!
28 }
29
30 // returns probability of transmission
31 return accumulate(p_trans_vec.begin(), p_trans_vec.end(), 1.,
32 multiplies<double>());
33}
static const double kU
Atomic mass unit.
Definition: Absorption.h:20

References fNuPaths, and kU.

Member Data Documentation

◆ fNuPaths

std::vector<NuPath> OscProb::Absorption::fNuPaths
protected

Definition at line 18 of file Absorption.h.

Referenced by SetPath(), and Trans().

◆ kU

const double Absorption::kU = 1.660539066e-24
staticprotected

Definition at line 20 of file Absorption.h.

Referenced by Trans().


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