1 | // $Id: DetectorPhotonTransporter.hh 2804 2008-10-09 12:10:06Z biktem $ |
---|
2 | // Author: D.Demarco, M.Pallavicini |
---|
3 | |
---|
4 | /***************************************************************************** |
---|
5 | * ESAF: Euso Simulation and Analysis Framework * |
---|
6 | * * |
---|
7 | * Id: DetectorPhotontransporter * |
---|
8 | * Package: Optics * |
---|
9 | * Coordinator: Alessandro.Thea * |
---|
10 | * * |
---|
11 | *****************************************************************************/ |
---|
12 | |
---|
13 | #ifndef DETECTORPHOTONTRANSPORTER_HH |
---|
14 | #define DETECTORPHOTONTRANSPORTER_HH |
---|
15 | |
---|
16 | #include "Photon.hh" |
---|
17 | #include "EsafConfigurable.hh" |
---|
18 | #include "EsafMsgSource.hh" |
---|
19 | |
---|
20 | //////////////////////////////////////////////////////////////////////////////// |
---|
21 | // // |
---|
22 | // DetectorPhotontransporter // |
---|
23 | // // |
---|
24 | // Abstarct base class providing the interface of a generic photon // |
---|
25 | // transporter // |
---|
26 | // // |
---|
27 | //////////////////////////////////////////////////////////////////////////////// |
---|
28 | |
---|
29 | class DetectorPhotonTransporter : public EsafConfigurable, public EsafMsgSource { |
---|
30 | protected: |
---|
31 | EVector fPos; // origin of the local coordinates |
---|
32 | Double_t fDZdown; // |
---|
33 | Double_t fDZup; // |
---|
34 | Double_t fR; // radius of the cylinder |
---|
35 | |
---|
36 | Double_t CylinderIntersection(const TVector3 &pos,const TVector3 &dir, |
---|
37 | Double_t radius, Double_t zup, Double_t zdown, Bool_t zero = kFALSE) const; |
---|
38 | Double_t CylinderIntersection(const Photon *p, Double_t radius, |
---|
39 | Double_t zup, Double_t zdown, Bool_t zero = kFALSE) const; |
---|
40 | |
---|
41 | public: |
---|
42 | DetectorPhotonTransporter(); |
---|
43 | virtual ~DetectorPhotonTransporter(); |
---|
44 | |
---|
45 | //!!! moved to VirtualDetectorTransportManager |
---|
46 | //virtual Photon *Transport(Photon *) const = 0; |
---|
47 | |
---|
48 | // we suppose a cylinder surrounding our DetectorPhotonTransporter. |
---|
49 | // These are the heights of that cylinder |
---|
50 | virtual Double_t Radius() const { return fR; } |
---|
51 | virtual Double_t DZdown() const { return fDZdown; } |
---|
52 | virtual Double_t DZup() const { return fDZup; } |
---|
53 | virtual const TVector3 &Position() const { return fPos; } |
---|
54 | virtual Double_t Bottom() const { return fPos[Z] - fDZdown; } |
---|
55 | virtual Double_t Top() const { return fPos[Z] + fDZup; } |
---|
56 | virtual Double_t CylinderIntersection( const TVector3 &pos, const TVector3 &dir, |
---|
57 | Bool_t zero = kFALSE ) const; |
---|
58 | virtual Double_t CylinderIntersection( const Photon *p, |
---|
59 | Bool_t zero = kFALSE ) const; |
---|
60 | virtual Bool_t IsInside(Photon * ) const; |
---|
61 | |
---|
62 | EsafConfigClass(Optics,DetectorPhotonTransporter) |
---|
63 | |
---|
64 | ClassDef(DetectorPhotonTransporter,0) |
---|
65 | }; |
---|
66 | |
---|
67 | #endif /* DETECTORPHOTONTRANSPORTER_HH */ |
---|