1 | // $Id: PureMCRadiativeTransfer.hh 2681 2006-05-03 10:58:33Z moreggia $ |
---|
2 | // Author: Sylvain Moreggia 2006/03/09 |
---|
3 | |
---|
4 | /***************************************************************************** |
---|
5 | * ESAF: Euso Simulation and Analysis Framework * |
---|
6 | * * |
---|
7 | * Id: PureMCRadiativeTransfer * |
---|
8 | * Package: RadiativeTransfer * |
---|
9 | * Coordinator: S. Moreggia * |
---|
10 | * * |
---|
11 | *****************************************************************************/ |
---|
12 | |
---|
13 | #ifndef __PUREMCRADIATIVETRANSFER_HH__ |
---|
14 | #define __PUREMCRADIATIVETRANSFER_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 | // PureMCRadiativeTransfer // |
---|
25 | // // |
---|
26 | // Pure Monte Carlo propagation of photons in the atmosphere // |
---|
27 | // MUST NOT BE USED TO SIMULATE SIGNAL ON DETECTOR PUPIL : // |
---|
28 | // indeed present simulation is dedicated to pure radiative transfer studies // |
---|
29 | // // |
---|
30 | //////////////////////////////////////////////////////////////////////////////// |
---|
31 | |
---|
32 | class PhotonsInAtmosphere; |
---|
33 | class ListPhotonsInAtmosphere; |
---|
34 | class ListPhotonsOnPupil; |
---|
35 | class BunchOfPhotons; |
---|
36 | class Ground; |
---|
37 | class ClearSkyPropagator; |
---|
38 | class InCloudsPropagator; |
---|
39 | class SinglePhoton; |
---|
40 | |
---|
41 | class EEvent; |
---|
42 | |
---|
43 | class PureMCRadiativeTransfer : public RadiativeTransfer { |
---|
44 | public: |
---|
45 | PureMCRadiativeTransfer(); |
---|
46 | virtual ~PureMCRadiativeTransfer(); |
---|
47 | |
---|
48 | // Transfer photons in atmosphere, return a list of photons on Euso pupil |
---|
49 | // NO PHOTONSONPUPIL produced in this mode |
---|
50 | virtual PhotonsOnPupil* Get(PhotonsInAtmosphere*, const DetectorGeometry* dg); |
---|
51 | |
---|
52 | // get ready for next event |
---|
53 | void Reset(); |
---|
54 | |
---|
55 | EsafConfigClass(RadiativeTransfer,PureMCRadiativeTransfer) |
---|
56 | |
---|
57 | |
---|
58 | private: |
---|
59 | |
---|
60 | // Scan fTempList before filling fTotalList, applying relevant cuts |
---|
61 | void ScanTempList(); |
---|
62 | |
---|
63 | // convert the bunch of created photons into single photons to be propagated |
---|
64 | Double_t ConvertIntoSingles(const BunchOfPhotons&, Double_t); |
---|
65 | |
---|
66 | ListPhotonsInAtmosphere* fTotalList; // pointer on the list created by LightSource module |
---|
67 | // STORE SINGLEPHOTONS AFTER THEIR SCATTERING SIMU |
---|
68 | // once inside a photon MUST NOT BE DELETED before conversion into ParentPhoton |
---|
69 | // _must not be reset nor deleted_ by the present class |
---|
70 | |
---|
71 | SinglePhotonPropagator* fPropagator; // propagator for scattering simulation |
---|
72 | vector<SinglePhoton*> fTempList; // photons kept here during scattering simu. Then copied in fTotalList |
---|
73 | |
---|
74 | |
---|
75 | size_t fNbBunch; // number of bunches to handle |
---|
76 | Double_t fNbTot; // total number of photons created by LightSource |
---|
77 | Double_t fNbSingles; // total nb of photons to propagate |
---|
78 | Double_t fMaxPhNb; // max nb of photons to be transported --> if nb of photons is larger, simu is splitted in several steps |
---|
79 | Int_t fMaxScatOrder; // if photon needs more scattering, it is lost |
---|
80 | |
---|
81 | virtual Bool_t ClearMemory(); |
---|
82 | // release all the mem hold in the buffers |
---|
83 | |
---|
84 | // copy of detector geometry defined in Detector part |
---|
85 | inline virtual void CopyDetectorGeometry(const DetectorGeometry* dg); |
---|
86 | |
---|
87 | ClassDef(PureMCRadiativeTransfer,0) |
---|
88 | }; |
---|
89 | |
---|
90 | //____________________________________________________________________________________________ |
---|
91 | inline void PureMCRadiativeTransfer::CopyDetectorGeometry(const DetectorGeometry* dg) { |
---|
92 | // |
---|
93 | // set DetectorGeometry for the propagator |
---|
94 | // |
---|
95 | fDetGeom = dg; |
---|
96 | fPropagator->CopyDetectorGeometry(fDetGeom,fDecoupled); |
---|
97 | } |
---|
98 | |
---|
99 | #endif /* __PUREMCRADIATIVETRANSFER_HH__ */ |
---|
100 | |
---|