source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/simulation/radiativetransfer/include/MCRadiativeTransfer.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: 6.4 KB
Line 
1// $Id: MCRadiativeTransfer.hh 2679 2006-05-03 08:28:58Z moreggia $
2// Author: Sylvain Moreggia   2005/08/16
3
4/*****************************************************************************
5 * ESAF: Euso Simulation and Analysis Framework                              *
6 *                                                                           *
7 *  Id: MCRadiativeTransfer                                                  *
8 *  Package: radiativetransfer                                               *
9 *  Coordinator: Sylvain Moreggia                                            *
10 *                                                                           *
11 *****************************************************************************/
12
13#ifndef __MCRADIATIVETRANSFER_HH__
14#define __MCRADIATIVETRANSFER_HH__
15
16#include "euso.hh"
17#include "RadiativeTransfer.hh"
18#include "DetectorGeometry.hh"
19#include "EarthVector.hh"
20#include "SinglePhotonPropagator.hh"
21
22////////////////////////////////////////////////////////////////////////////////
23//                                                                            //
24// MCRadiativeTransfer                                                        //
25//                                                                            // 
26// Detector Solid Angle applied to reduce nb of photons to propagate          // 
27// then a full MC simu is done                                                // 
28//                                                                            // 
29//  NB : aerosols not simulated in this propagation mode                      // 
30//                                                                            // 
31////////////////////////////////////////////////////////////////////////////////
32
33
34class PhotonsInAtmosphere;
35class ListPhotonsInAtmosphere;
36class ListPhotonsOnPupil;
37class BunchOfPhotons;
38class Ground;
39class ClearSkyPropagator;
40class InCloudsPropagator;
41class SinglePhoton;
42class LowtranRadiativeProcessesCalculator;
43class FastRadiativeProcessesCalculator;
44
45class EEvent;
46
47
48class MCRadiativeTransfer : public RadiativeTransfer {
49public:
50    MCRadiativeTransfer();
51    virtual ~MCRadiativeTransfer();
52   
53    // Transfer photons in atmosphere, return a list of photons on Euso pupil
54    virtual PhotonsOnPupil* Get(PhotonsInAtmosphere*, const DetectorGeometry* dg);
55   
56    // get ready for next event
57    void Reset();
58       
59    // release all the memoty hold in the buffers
60    Bool_t ClearMemory(); 
61
62    EsafConfigClass(RadiativeTransfer,MCRadiativeTransfer)
63   
64
65private:
66    // Get photons directly emitted within the Euso solid angle
67    // stored in fTotalList, THEY WILL NOT UNDERGO SCATTERING SIMU
68    void DirectToEuso(const BunchOfPhotons&);
69   
70    // - Detector solid angle is applied here -> the resulting photons will be propagated
71    // - Photon features are set here (lambda, position, direction)
72    // - if nb of photons is > 1e6, generation is splitted in several parts, creating 1e6 photons each time
73    //   then, present method returns remaining nb of photons to be generated
74    Int_t PhotonsInOmega(const BunchOfPhotons&,Int_t);
75   
76    // Scan fTempList before filling fTotalList, applying relevant cuts
77    void ScanTempList();
78       
79    // Final phase of the transfer : propagation of the SinglePhotons
80    // always uses LowtranCalculator, to get ozone effect
81    void PropagateAllToDetector();
82   
83    // same as PropagateToDetector but :
84    // - act on fTempList
85    // - disable fine transmission study
86    void PropagateTempListToDetector();
87   
88    // generate PhotonsOnPupil (fPhotons) from ListPhotonsInAtmosphere (fTotalList)
89    void ConvertIntoPonP();
90   
91    // for ground detector only, assumed to be half a sphere
92    // if dist(photon,detec) < fDistance_cut, photon is lost
93    // distribute photons on a sphere : if photons are on the bottom hemisphere, they are lost
94    Bool_t IsSeenByGroundDetector(const SinglePhoton&) const;
95   
96    ListPhotonsOnPupil* fPhotons;         // keep in memory the list returned to detector
97    ListPhotonsInAtmosphere* fTotalList;  // pointer on the list created by LightSource module
98                                          // STORE SINGLEPHOTONS AFTER THEIR SCATTERING SIMU
99                                          // once inside a photon MUST NOT BE DELETED before conversion into ParentPhoton
100                                          // _must not be reset nor deleted_ by the present class
101
102    SinglePhotonPropagator* fPropagator;                 // propagator for scattering simulation
103    string fTransMode;                                   // to set below propagator
104    RadiativeProcessesCalculator* fTransToDetec;         // calculator for last transmission to detector
105    vector<SinglePhoton*> fTempList;                     // photons kept here during scattering simu. Then copied in fTotalList
106
107   
108    size_t fNbBunch;                      // number of bunches to handle
109    Double_t fNbTot;                      // total number of photons created by LightSource
110    Double_t fNbSingles;                  // total nb of photons to propagate
111    Double_t fMaxPhNb;                    // max nb of photons to be transported --> if nb of photons is larger, simu is splitted in several steps
112    Int_t fScatOrder;                     // scattering order to be simulated
113    Double_t fMaxPhaseFunction;           // to normalize all the phase function
114    Double_t fOmegaMax;                   // factor which determines nb of photons to be simulated
115    Int_t fMScattAnalysis;                // if >0, scattering simu is switched to pure MScatt analysis
116                                          // 1 : check if photons goes out atmosphere, 2 : does not check
117
118    Double_t fDistance_cut;               // for ground detector mode : if dist(photon,detec) < fDistance_cut, photon is lost
119    Bool_t fKeepAll;                      // tell if simu keeps also photons not transimitted to detector
120                                          // ALLOW to fine study transmission values along last travel to detector
121                                          // if disabled : it reduces memory compsumption (particularly for GROUND detector case)
122
123   
124    // copy of detector geometry defined in Detector part
125    inline virtual void CopyDetectorGeometry(const DetectorGeometry* dg);
126
127    ClassDef(MCRadiativeTransfer,0)
128};
129
130inline void MCRadiativeTransfer::CopyDetectorGeometry(const DetectorGeometry* dg) {
131    //
132    // set DetectorGeometry for the propagator
133    //
134    fDetGeom = dg;
135    fPropagator->CopyDetectorGeometry(fDetGeom,fDecoupled);
136}
137
138#endif  /* __MCRADIATIVETRANSFER_HH__ */
139
Note: See TracBrowser for help on using the repository browser.