Public Member Functions | Private Attributes | List of all members
genie::flux::GAstroFlux::NuPropagator Class Reference

#include <GAstroFlux.h>

Public Member Functions

 NuPropagator (double stepsz)
 
 ~NuPropagator ()
 
bool Go (double phi_start, double costheta_start, const TVector3 &detector_centre, double detector_sz, int nu_pdg, double Ev)
 
int NuPdgAtDetVolBoundary (void)
 
TVector3 & X3AtDetVolBoundary (void)
 
TVector3 & P3AtDetVolBoundary (void)
 

Private Attributes

double fStepSize
 
int fNuPdg
 
TVector3 fX3
 
TVector3 fP3
 

Detailed Description

Definition at line 207 of file GAstroFlux.h.

Constructor & Destructor Documentation

genie::flux::GAstroFlux::NuPropagator::NuPropagator ( double  stepsz)
inline

Definition at line 209 of file GAstroFlux.h.

209 : fStepSize(stepsz/units::km) { }
static constexpr double km
Definition: Units.h:64
genie::flux::GAstroFlux::NuPropagator::~NuPropagator ( )
inline

Definition at line 210 of file GAstroFlux.h.

210 { }

Member Function Documentation

bool GAstroFlux::NuPropagator::Go ( double  phi_start,
double  costheta_start,
const TVector3 &  detector_centre,
double  detector_sz,
int  nu_pdg,
double  Ev 
)

Definition at line 473 of file GAstroFlux.cxx.

476 {
477  // initialize neutrino code
478  fNuPdg = nu_pdg;
479 
480  //
481  // initialize neutrino position vector
482  //
483  double sintheta = TMath::Sqrt(1-costheta*costheta);
484  double cosphi = TMath::Cos(phi);
485  double sinphi = TMath::Sin(phi);
486  double REarth = constants::kREarth/units::km;
487  double zs = REarth * costheta;
488  double ys = REarth * sintheta * cosphi;
489  double xs = REarth * sintheta * sinphi;
490 
491  TVector3 start_position(xs,ys,zs);
492  fX3 = start_position - detector_centre;
493 
494  //
495  // initialize neutrino momentum 4-vector
496  //
497  TVector3 direction_unit_vec = -1. * fX3.Unit();
498  fP3 = Ev * direction_unit_vec;
499 
500  //
501  // step through the Earth
502  //
503 
504  LOG("Flux", pWARN) << "|dist| = " << fX3.Mag();
505  LOG("Flux", pWARN) << "|detsize| = " << detector_sz;
506 
507  while(1) {
508  double currdist = fX3.Mag();
509  if(currdist <= detector_sz - 0.1) break;
510 
511  double stepsz = (currdist-detector_sz > fStepSize) ?
512  fStepSize : currdist-detector_sz;
513  if(stepsz <= 0.) break;
514 
515 // LOG("Flux", pWARN) << "Stepping by... |dr| = " << stepsz;
516 
517  //
518  // check earth density at current position, calculate interaction
519  // probability over next step size, decide whether it interacts and
520  // what happens if it does...
521  //
522  // ... todo ...
523 
524  fX3 += (stepsz * direction_unit_vec);
525  }
526 
527  return true;
528 }
static constexpr double km
Definition: Units.h:64
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
#define pWARN
Definition: Messenger.h:60
static const double kREarth
Definition: Constants.h:110
static constexpr double zs
Definition: Units.h:102
static constexpr double ys
Definition: Units.h:103
int genie::flux::GAstroFlux::NuPropagator::NuPdgAtDetVolBoundary ( void  )
inline

Definition at line 212 of file GAstroFlux.h.

TVector3& genie::flux::GAstroFlux::NuPropagator::P3AtDetVolBoundary ( void  )
inline

Definition at line 214 of file GAstroFlux.h.

214 { return fP3; }
TVector3& genie::flux::GAstroFlux::NuPropagator::X3AtDetVolBoundary ( void  )
inline

Definition at line 213 of file GAstroFlux.h.

213 { return fX3; }

Member Data Documentation

int genie::flux::GAstroFlux::NuPropagator::fNuPdg
private

Definition at line 217 of file GAstroFlux.h.

TVector3 genie::flux::GAstroFlux::NuPropagator::fP3
private

Definition at line 219 of file GAstroFlux.h.

double genie::flux::GAstroFlux::NuPropagator::fStepSize
private

Definition at line 216 of file GAstroFlux.h.

TVector3 genie::flux::GAstroFlux::NuPropagator::fX3
private

Definition at line 218 of file GAstroFlux.h.


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