// DetectorTransportManager // $Id: DetectorTransportManager.hh,v 1.27 2005/10/15 10:12:59 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; // arrival time of the first photon Double_t fTimeLastPhoton; // arrival time of the last photon Double_t fInnerRadius; // radius of the walls of the det. Double_t fOuterRadius; // external detector's radius Double_t fScaleFactor; // detector size scale factor Bool_t fEnableFocalPlane; UInt_t fNout; UInt_t fNbaffle; UInt_t fNoptics; UInt_t fNwalls; UInt_t fNfocalplane; UInt_t fNreflected; UInt_t fNlost; 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;} virtual Double_t GetScaleFactor() const {return fScaleFactor; } virtual void SetScaleFactor( Double_t scale ); virtual void Reset(); 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: "<