// ESAF : Euso Simulation and Analysis Framework // $Id: RadiativeTransfer.hh,v 1.22 2005/11/03 12:01:33 moreggia Exp $ // D. De Marco - M. Pallavicini created Jan, 20 2002 // // IMPORTANT : EVERY child of this generic class MUST CONTAIN and HANDLE // creation and destruction of the PhotonsOnPupil* pointer // (the object MUST be in the HEAP) // #ifndef __RADIATIVETRANSFER_HH_ #define __RADIATIVETRANSFER_HH_ #include "euso.hh" #include "EsafConfigurable.hh" #include "EsafMsgSource.hh" #include "DetectorGeometry.hh" #include "EarthVector.hh" class PhotonsOnPupil; class PhotonsInAtmosphere; class Ground; class RadiativeProcessesCalculator; class DetectorGeometry; class EEvent; class RadiativeTransfer : public EsafConfigurable, public EsafMsgSource { public: // ctor RadiativeTransfer(); // dtor virtual ~RadiativeTransfer(); // Transfers atmospheric photons until EUSO pupil virtual PhotonsOnPupil *Get( PhotonsInAtmosphere*,const DetectorGeometry* dg ) = 0; // Get ground object inline const Ground* GetGround() const {return fGround;} // get ready for next event // NB: fGround must be reset by child classes virtual void Reset() = 0; EsafConfigClass(RadiativeTransfer,RadiativeTransfer) protected: Ground* fGround; // ground description Bool_t fDecoupled; // in case detector geometry is decoupled from RT simu // build PhotonsOnPupil's frame void BuildPupilFrame(PhotonsOnPupil*) const; // Sample a random photon position on pupil void RamdomPosOnPupil(const PhotonsOnPupil*, TVector3&, TVector3&) const; Bool_t fDetAtGrnd; // flag is true if ground detector simulation //GRNDetec // // handling of detector geometry (defined in Detector part) // const DetectorGeometry* fDetGeom; // copy of the object defined in Detector part // copy of detector geometry defined in Detector part virtual void CopyDetectorGeometry(const DetectorGeometry* dg) = 0; const DetectorGeometry* GetDetGeometry() const; inline EarthVector EUSO() const {if(fDetAtGrnd) return EarthVector(0,0,0); else return GetDetGeometry()->GetPos();} //GRNDetec inline Double_t EusoRadius() const {return GetDetGeometry()->GetRadius();} // Returns the solid angle made by Euso pupil as seen from a position in the atmosphere inline Double_t EusoOmega(const EarthVector& pos) const; ClassDef(RadiativeTransfer,0) }; //_______________________________________________________________________________________________________________________ inline const DetectorGeometry* RadiativeTransfer::GetDetGeometry() const { if(!fDetGeom) Msg(EsafMsg::Panic) << "DetectorGeometry not defined" << MsgDispatch; return fDetGeom; } //_______________________________________________________________________________________________________________________ inline Double_t RadiativeTransfer::EusoOmega(const EarthVector& pos) const { if(fDecoupled) return GetDetGeometry()->MaxSolidAngle(pos); else return GetDetGeometry()->SolidAngle(pos); } #endif /* __RADIATIVETRANSFER_HH_ */