1 | // ESAF : Euso Simulation and Analysis Framework |
---|
2 | // $Id: RadiativeTransfer.hh 2676 2006-04-28 15:22:49Z moreggia $ |
---|
3 | // D. De Marco - M. Pallavicini created Jan, 20 2002 |
---|
4 | // |
---|
5 | // IMPORTANT : EVERY child of this generic class MUST CONTAIN and HANDLE |
---|
6 | // creation and destruction of the PhotonsOnPupil* pointer |
---|
7 | // (the object MUST be in the HEAP) |
---|
8 | // |
---|
9 | |
---|
10 | |
---|
11 | #ifndef __RADIATIVETRANSFER_HH_ |
---|
12 | #define __RADIATIVETRANSFER_HH_ |
---|
13 | |
---|
14 | #include "euso.hh" |
---|
15 | #include "EsafConfigurable.hh" |
---|
16 | #include "EsafMsgSource.hh" |
---|
17 | #include "DetectorGeometry.hh" |
---|
18 | #include "EarthVector.hh" |
---|
19 | |
---|
20 | class PhotonsOnPupil; |
---|
21 | class PhotonsInAtmosphere; |
---|
22 | class Ground; |
---|
23 | class RadiativeProcessesCalculator; |
---|
24 | class DetectorGeometry; |
---|
25 | |
---|
26 | class EEvent; |
---|
27 | |
---|
28 | class RadiativeTransfer : public EsafConfigurable, public EsafMsgSource { |
---|
29 | public: |
---|
30 | // ctor |
---|
31 | RadiativeTransfer(); |
---|
32 | |
---|
33 | // dtor |
---|
34 | virtual ~RadiativeTransfer(); |
---|
35 | |
---|
36 | // Transfers atmospheric photons until EUSO pupil |
---|
37 | virtual PhotonsOnPupil *Get( PhotonsInAtmosphere*,const DetectorGeometry* dg ) = 0; |
---|
38 | |
---|
39 | // Get ground object |
---|
40 | inline const Ground* GetGround() const {return fGround;} |
---|
41 | |
---|
42 | // Set/Get wavelength bounds |
---|
43 | inline void SetWlRange(Double_t min, Double_t max) {fLambdaMin = min; fLambdaMax = max;} |
---|
44 | inline Double_t GetWlRangeMin() {return fLambdaMin;} |
---|
45 | inline Double_t GetWlRangeMax() {return fLambdaMax;} |
---|
46 | |
---|
47 | // get ready for next event |
---|
48 | // NB: fGround must be reset by child classes |
---|
49 | virtual void Reset() = 0; |
---|
50 | |
---|
51 | virtual Bool_t ClearMemory() = 0; |
---|
52 | |
---|
53 | EsafConfigClass(RadiativeTransfer,RadiativeTransfer) |
---|
54 | |
---|
55 | protected: |
---|
56 | |
---|
57 | Ground* fGround; // ground description |
---|
58 | Bool_t fDecoupled; // in case detector geometry is decoupled from RT simu |
---|
59 | Double_t fLambdaMin; |
---|
60 | Double_t fLambdaMax; |
---|
61 | |
---|
62 | // build PhotonsOnPupil's frame |
---|
63 | void BuildPupilFrame(PhotonsOnPupil*) const; |
---|
64 | |
---|
65 | // Sample a random photon position on pupil |
---|
66 | void RamdomPosOnPupil(const PhotonsOnPupil*, TVector3&, TVector3&) const; |
---|
67 | |
---|
68 | Bool_t fDetAtGrnd; // flag is true if ground detector simulation //GRNDetec |
---|
69 | |
---|
70 | // |
---|
71 | // handling of detector geometry (defined in Detector part) |
---|
72 | // |
---|
73 | const DetectorGeometry* fDetGeom; // copy of the object defined in Detector part |
---|
74 | |
---|
75 | // copy of detector geometry defined in Detector part |
---|
76 | virtual void CopyDetectorGeometry(const DetectorGeometry* dg) = 0; |
---|
77 | |
---|
78 | const DetectorGeometry* GetDetGeometry() const; |
---|
79 | inline EarthVector EUSO() const {return GetDetGeometry()->GetPos();} |
---|
80 | inline Double_t EusoRadius() const {return GetDetGeometry()->GetRadius();} |
---|
81 | // Returns the solid angle made by Euso pupil as seen from a position in the atmosphere |
---|
82 | inline Double_t EusoOmega(const EarthVector& pos) const; |
---|
83 | |
---|
84 | ClassDef(RadiativeTransfer,0) |
---|
85 | }; |
---|
86 | |
---|
87 | |
---|
88 | //_______________________________________________________________________________________________________________________ |
---|
89 | inline const DetectorGeometry* RadiativeTransfer::GetDetGeometry() const { |
---|
90 | if(!fDetGeom) Msg(EsafMsg::Panic) << "DetectorGeometry not defined" << MsgDispatch; |
---|
91 | return fDetGeom; |
---|
92 | } |
---|
93 | |
---|
94 | //_______________________________________________________________________________________________________________________ |
---|
95 | inline Double_t RadiativeTransfer::EusoOmega(const EarthVector& pos) const { |
---|
96 | if(fDecoupled) return GetDetGeometry()->MaxSolidAngle(pos); |
---|
97 | else return GetDetGeometry()->SolidAngle(pos); |
---|
98 | } |
---|
99 | |
---|
100 | #endif /* __RADIATIVETRANSFER_HH_ */ |
---|
101 | |
---|