// $Id: SinglePhotonPropagator.hh,v 1.7 2005/11/03 12:01:33 moreggia Exp $ // Author: 2005/08/16 /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * Id: SinglePhotonPropagator * * Package: * * Coordinator: * * * *****************************************************************************/ #ifndef __SINGLEPHOTONPROPAGATOR_HH__ #define __SINGLEPHOTONPROPAGATOR_HH__ #include "euso.hh" #include "DetectorGeometry.hh" #include "EarthVector.hh" #include "EsafMsgSource.hh" #include "BunchPropagator.hh" //////////////////////////////////////////////////////////////////////////////// // // // SinglePhotonPropagator // // // // // // // //////////////////////////////////////////////////////////////////////////////// class FastRadiativeProcessesCalculator; class SinglePhoton; class Ground; class SinglePhotonPropagator : public EsafMsgSource { public: SinglePhotonPropagator(); SinglePhotonPropagator(const Ground*,Double_t,Double_t); virtual ~SinglePhotonPropagator(); // MC code for scattering simu void SinglePhotonPropagator::Go(const vector&,Int_t scatorder) const; // One photon treatment void DoOnePhoton(SinglePhoton&,Int_t scatorder) const; // copy of detector geometry defined in Detector part inline void CopyDetectorGeometry(const DetectorGeometry* dg, Bool_t decoupled, Bool_t GrndDetec) {fDetGeom = dg; fDecoupled = decoupled; fDetAtGrnd = GrndDetec;} // Copy the RadiativeTransfer ground description object inline void CopyGround(const Ground* g) {fGround = g;} // reset method void Reset(); // set methods inline void SetOmegaMax(Double_t omegamax) {fOmegaMax = omegamax;} private: FastRadiativeProcessesCalculator* fCalcul; // interaction length, transmission etc.. WITHOUT Lowtran const Ground* fGround; // copy of the RadativeTransfer ground description object const DetectorGeometry* fDetGeom; // copy of detector geometry built in RT part // both _must not be modified_ by the present class Bool_t fDecoupled; // in case detector geometry is decoupled from RT simu Bool_t fDetAtGrnd; // flag is true if ground detector simulation //GRNDetec Double_t fMaxPhaseFunction; // to normalize all the phase function Double_t fOmegaMax; // factor defining 'reduced solid angle' used in algo Double_t fTofCut; // maximum TOF treated by scattering simu // get impact on next medium // returns type of next medium Medium GetNextImpact(const EarthVector&,const EarthVector&,EarthVector&,Bool_t without_clouds=false) const; // return detector position inline EarthVector EUSO() const {if(fDetAtGrnd) return EarthVector(0,0,0); else return fDetGeom->GetPos();} //GRNDetec inline Double_t EusoOmega(const EarthVector& pos) const; ClassDef(SinglePhotonPropagator,0) }; //_______________________________________________________________________________________________________________________ inline Double_t SinglePhotonPropagator::EusoOmega(const EarthVector& pos) const { if(fDecoupled) return fDetGeom->MaxSolidAngle(pos); else return fDetGeom->SolidAngle(pos); } #endif /* __SINGLEPHOTONPROPAGATOR_HH__ */