source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/simulation/detector/optics/include/LightPipe.hh @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 1.4 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id: LightPipe.hh 2136 2005-10-02 14:18:08Z thea $
3// A.Thea created Oct, 26 2002
4
5#ifndef __LIGHTPIPE_HH_
6#define __LIGHTPIPE_HH_
7
8#include "euso.hh"
9#include "DetectorPhotonTransporter.hh"
10#include "PmtGeometry.hh"
11#include "EVector.hh"
12#include "TRotation.h"
13
14enum PVertex {TOPLEFTBACK=0, TOPRIGHTBACK, TOPRIGHTFRONT,
15              TOPLEFTFRONT, BOTTOMLEFTBACK, BOTTOMRIGHTBACK, 
16              BOTTOMRIGHTFRONT, BOTTOMLEFTFRONT};
17
18class LightPipe : public DetectorPhotonTransporter {
19protected:
20    const PmtGeometry *pmt;
21    EVector pos, par_X, par_Y, par_Z;
22    vector <EVector> corner;
23    vector <EVector> normal;
24    vector <EVector> edge;
25   
26    TRotation rot, inv_rot;
27public:
28    LightPipe(const EVector c1, const EVector c2, double t_x,
29              double t_y, double b_x, double b_y, 
30              const PmtGeometry *p);
31    virtual ~LightPipe();
32    virtual Photon *Transport(Photon *) const;
33    vector<EVector> intPoints(Photon *p) const;
34    int whichFace(Photon *p) const;
35    EVector goLocal(const EVector &v) const;
36    EVector goGlobal(const EVector &v) const;
37   
38    ClassDef(LightPipe,0)
39};
40
41inline EVector LightPipe::goLocal(const EVector &v) const {
42    EVector nv=v;
43    nv.Transform(inv_rot);
44    return nv;
45}
46
47inline EVector LightPipe::goGlobal(const EVector &v) const {
48    EVector nv=v;
49    nv.Transform(rot);
50    return nv;
51}
52#endif  /* __LIGHTPIPE_HH_ */
53
Note: See TracBrowser for help on using the repository browser.