// ESAF : Euso Simulation and Analysis Framework // $Id: LightPipe.hh,v 1.7 2005/10/02 14:17:55 thea Exp $ // A.Thea created Oct, 26 2002 #ifndef __LIGHTPIPE_HH_ #define __LIGHTPIPE_HH_ #include "euso.hh" #include "DetectorPhotonTransporter.hh" #include "PmtGeometry.hh" #include "EVector.hh" #include "TRotation.h" enum PVertex {TOPLEFTBACK=0, TOPRIGHTBACK, TOPRIGHTFRONT, TOPLEFTFRONT, BOTTOMLEFTBACK, BOTTOMRIGHTBACK, BOTTOMRIGHTFRONT, BOTTOMLEFTFRONT}; class LightPipe : public DetectorPhotonTransporter { protected: const PmtGeometry *pmt; EVector pos, par_X, par_Y, par_Z; vector corner; vector normal; vector edge; TRotation rot, inv_rot; public: LightPipe(const EVector c1, const EVector c2, double t_x, double t_y, double b_x, double b_y, const PmtGeometry *p); virtual ~LightPipe(); virtual Photon *Transport(Photon *) const; vector intPoints(Photon *p) const; int whichFace(Photon *p) const; EVector goLocal(const EVector &v) const; EVector goGlobal(const EVector &v) const; ClassDef(LightPipe,0) }; inline EVector LightPipe::goLocal(const EVector &v) const { EVector nv=v; nv.Transform(inv_rot); return nv; } inline EVector LightPipe::goGlobal(const EVector &v) const { EVector nv=v; nv.Transform(rot); return nv; } #endif /* __LIGHTPIPE_HH_ */