// ESAF : Euso Simulation and Analysis Framework
// $Id: RadiativeProcessesCalculator.cc,v 1.8 2004/12/08 10:08:23 moreggia Exp $
// Sylvain Moreggia created Jan, 9 2004
#include "RadiativeProcessesCalculator.hh"
#include "EarthVector.hh"
#include "Atmosphere.hh"
#include <math.h>
#include "BunchOfPhotons.hh"
#include "SinglePhoton.hh"
#include "EsafMsgSource.hh"
ClassImp(RadiativeProcessesCalculator)
//_____________________________________________________________________________
RadiativeProcessesCalculator::RadiativeProcessesCalculator() : EsafMsgSource() {
//
// ctor
//
}
//_____________________________________________________________________________
RadiativeProcessesCalculator::~RadiativeProcessesCalculator() {
//
// dtor
//
}
//_____________________________________________________________________________
Double_t RadiativeProcessesCalculator::PhaseFunction(string type,const BunchOfPhotons& b,const EarthVector& dir,Double_t omega) const {
//
// Integrated scattering phase function (omega must be an elementary solid angle)
//
Double_t rtn;
if(type == "isotropic")
rtn = omega/(4*pi);
if(type == "rayleigh") {
Double_t theta = dir.Angle(b.GetDir());
rtn =3 * (1 + pow(cos(theta),2)) * omega / (16*pi);
}
else throw invalid_argument("Wrong type of phase function");
return rtn;
}