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

#include "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+2.6-2.12-e17-debug/GENIE-Generator/src/Tools/Flux/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 210 of file GAstroFlux.h.

Constructor & Destructor Documentation

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

Definition at line 212 of file GAstroFlux.h.

212 : fStepSize(stepsz/units::km) { }
static const double km
Definition: Units.h:72
genie::flux::GAstroFlux::NuPropagator::~NuPropagator ( )
inline

Definition at line 213 of file GAstroFlux.h.

213 { }

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 485 of file GAstroFlux.cxx.

References genie::units::km, genie::constants::kREarth, LOG, pWARN, and ana::Sqrt().

488 {
489  // initialize neutrino code
490  fNuPdg = nu_pdg;
491 
492  //
493  // initialize neutrino position vector
494  //
495  double sintheta = TMath::Sqrt(1-costheta*costheta);
496  double cosphi = TMath::Cos(phi);
497  double sinphi = TMath::Sin(phi);
498  double REarth = constants::kREarth/units::km;
499  double zs = REarth * costheta;
500  double ys = REarth * sintheta * cosphi;
501  double xs = REarth * sintheta * sinphi;
502 
503  TVector3 start_position(xs,ys,zs);
504  fX3 = start_position - detector_centre;
505 
506  //
507  // initialize neutrino momentum 4-vector
508  //
509  TVector3 direction_unit_vec = -1. * fX3.Unit();
510  fP3 = Ev * direction_unit_vec;
511 
512  //
513  // step through the Earth
514  //
515 
516  LOG("Flux", pWARN) << "|dist| = " << fX3.Mag();
517  LOG("Flux", pWARN) << "|detsize| = " << detector_sz;
518 
519  while(1) {
520  double currdist = fX3.Mag();
521  if(currdist <= detector_sz - 0.1) break;
522 
523  double stepsz = (currdist-detector_sz > fStepSize) ?
524  fStepSize : currdist-detector_sz;
525  if(stepsz <= 0.) break;
526 
527 // LOG("Flux", pWARN) << "Stepping by... |dr| = " << stepsz;
528 
529  //
530  // check earth density at current position, calculate interaction
531  // probability over next step size, decide whether it interacts and
532  // what happens if it does...
533  //
534  // ... todo ...
535 
536  fX3 += (stepsz * direction_unit_vec);
537  }
538 
539  return true;
540 }
static const double km
Definition: Units.h:72
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
#define pWARN
Definition: Messenger.h:61
static const double kREarth
Definition: Constants.h:111
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:326
int genie::flux::GAstroFlux::NuPropagator::NuPdgAtDetVolBoundary ( void  )
inline

Definition at line 215 of file GAstroFlux.h.

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

Definition at line 217 of file GAstroFlux.h.

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

Definition at line 216 of file GAstroFlux.h.

216 { return fX3; }

Member Data Documentation

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

Definition at line 220 of file GAstroFlux.h.

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

Definition at line 222 of file GAstroFlux.h.

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

Definition at line 219 of file GAstroFlux.h.

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

Definition at line 221 of file GAstroFlux.h.


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