// $Id: DetectorPhotonTransporter.hh,v 1.17 2005/07/05 19:37:21 thea Exp $ // Author: D.Demarco, M.Pallavicini /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * Id: DetectorPhotontransporter * * Package: Optics * * Coordinator: Alessandro.Thea * * * *****************************************************************************/ #ifndef DETECTORPHOTONTRANSPORTER_HH #define DETECTORPHOTONTRANSPORTER_HH #include "Photon.hh" #include "EsafConfigurable.hh" #include "EsafMsgSource.hh" //////////////////////////////////////////////////////////////////////////////// // // // DetectorPhotontransporter // // // // Abstarct base class providing the interface of a generic photon // // transporter // // // //////////////////////////////////////////////////////////////////////////////// class DetectorPhotonTransporter : public EsafConfigurable, public EsafMsgSource { protected: EVector fPos; // origin of the local coordinates Double_t fDZdown; // Double_t fDZup; // Double_t fR; // radius of the cylinder Double_t CylinderIntersection(const TVector3 &pos,const TVector3 &dir, Double_t radius, Double_t zup, Double_t zdown, Bool_t zero = kFALSE) const; Double_t CylinderIntersection(const Photon *p, Double_t radius, Double_t zup, Double_t zdown, Bool_t zero = kFALSE) const; public: DetectorPhotonTransporter(); virtual ~DetectorPhotonTransporter(); virtual Photon *Transport(Photon *) const = 0; // we suppose a cylinder surrounding our DetectorPhotonTransporter. // These are the heights of that cylinder virtual Double_t Radius() const { return fR; } virtual Double_t DZdown() const { return fDZdown; } virtual Double_t DZup() const { return fDZup; } virtual const TVector3 &Position() const { return fPos; } virtual Double_t Bottom() const { return fPos[Z] - fDZdown; } virtual Double_t Top() const { return fPos[Z] + fDZup; } virtual Double_t CylinderIntersection( const TVector3 &pos, const TVector3 &dir, Bool_t zero = kFALSE ) const; virtual Double_t CylinderIntersection( const Photon *p, Bool_t zero = kFALSE ) const; virtual Bool_t IsInside(Photon * ) const; EsafConfigClass(Optics,DetectorPhotonTransporter) ClassDef(DetectorPhotonTransporter,0) }; #endif /* DETECTORPHOTONTRANSPORTER_HH */