// ESAF : Euso Simulation and Analysis Framework
// $Id: UniformLayersCloudsPropagator.cc,v 1.4 2005/04/14 15:57:47 moreggia Exp $
// Author: Sylvain Moreggia Aug, 19 2004
#include "UniformLayersCloudsPropagator.hh"
#include "UniformLayersClouds.hh"
#include "Atmosphere.hh"
#include "BunchOfPhotons.hh"
#include "EarthVector.hh"
ClassImp(UniformLayersCloudsPropagator)
//_____________________________________________________________________________
UniformLayersCloudsPropagator::UniformLayersCloudsPropagator() : InCloudsPropagator() {
//
// Constructor
//
}
//_____________________________________________________________________________
UniformLayersCloudsPropagator::UniformLayersCloudsPropagator(const Ground* g) : InCloudsPropagator(g) {
//
// Constructor
//
}
//_____________________________________________________________________________
UniformLayersCloudsPropagator::~UniformLayersCloudsPropagator() {
//
// Destructor
//
}
//_____________________________________________________________________________
Medium UniformLayersCloudsPropagator::Go(BunchOfPhotons& b,ListPhotonsInAtmosphere& list) const {
// Transport a BunchOfPhotons in cloudy conditions,
// generating SinglePhotons all along the travel (ListPhotonsInAtmosphere filled)
Medium rtn = GROUND;
#ifdef DEBUG
if((b.GetPos() - b.GetNextImpact()).Mag())
Msg(EsafMsg::Panic)<<"Go() bunch Pos and Nextimpact should be equal here"<< MsgDispatch;
#endif
EarthVector bunchdir = b.GetDir();
EarthVector bunchpos = b.GetPos();
const UniformLayersClouds* clouds = (UniformLayersClouds*) Atmosphere::Get()->GetClouds();
// calculate next impact (exit point from clouds)
//DELETE EarthVector nextimpact = clouds->GetImpact(bunchpos,bunchdir,"outgoing");
// b.SetLastImpact(bunchpos);
//b.SetNextImpact(nextimpact);
return rtn;
}