// DetectorTransportManager // $Id: DetectorTransportManager.hh,v 1.25 2005/04/16 15:24:07 thea Exp $ // // This is the kernel of the optics simulation, it trasnports photons // between the detector elements. // #ifndef DETECTORTRANSPORTMANAGER_HH #define DETECTORTRANSPORTMANAGER_HH #include "OpticsFactory.hh" #include "Config.hh" #include "EVector.hh" #include "EsafConfigurable.hh" class PhotonsOnPupil; class EEvent; class DetectorTransportManager: public DetectorPhotonTransporter { private: OpticsFactory *of; protected: Double_t EusoCylIntersection( Photon *p ) const; EVector InteractionPoint(Photon *p, Double_t radius = -1) const; EVector NewInteractionPoint(const Photon *p, double DZ) const; OpticalSystem* fOptics; IdealFocalSurface* fIdealFocalSurface; FocalPlane* fFocalPlane; WallInteraction* fWalls; Baffle* fBaffle; Int_t fMaxIterations; Bool_t fDebug; Double_t fTimeFirstPhoton; Double_t fTimeLastPhoton; Double_t fInnerRadius; Double_t fOuterRadius; Bool_t fEnableFocalPlane; public: DetectorTransportManager(); virtual ~DetectorTransportManager() {} virtual Photon* Transport(Photon *) const; virtual void Go( PhotonsOnPupil* ); inline OpticalSystem* GetOptics() { return fOptics; } inline IdealFocalSurface* GetIdealFocalSurface() { return fIdealFocalSurface; } inline FocalPlane* GetFocalPlane() { return fFocalPlane; } inline WallInteraction* GetWalls() { return fWalls; } inline Baffle* GetBaffle() { return fBaffle; } inline Double_t GetTimeFirstPhoton() const {return fTimeFirstPhoton;} inline Double_t GetTimeLastPhoton() const {return fTimeLastPhoton;} inline Double_t GetOuterRadius() { return fOuterRadius; } inline void EnableFocalPlane(Bool_t b=kTRUE){ fEnableFocalPlane=b;} EsafConfigClass(Optics,DetectorTransportManager) ClassDef(DetectorTransportManager,0) }; inline EVector DetectorTransportManager::NewInteractionPoint(const Photon *p, double DZ) const { EVector dir=p->dir.Unit(); EVector newPoint=p->pos+dir*(DZ/dir[Z]); #ifdef DEBUG //cout<<"new intPoint: "<