source: JEM-EUSO/esaf_cc_at_lal/packages/simulation/lightsources/include/TestLightSource.hh @ 114

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

actual version of ESAF at CCin2p3

File size: 4.2 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id: TestLightSource.hh 2681 2006-05-03 10:58:33Z moreggia $
3// Anne Stutz created Dec,  2 2003
4//
5// This class brings test photons in atmosphere to Euso
6// The type of events supported are the following:
7//     SPOT  light from a single point at the same time
8//     RANDSPOT light from a single point randomly chosen
9//     TRACK light making a track in atmosphere
10//     RANDTRACK light making a track in a randomly chosen direction
11//
12// The parameters needed are the following :
13//     TestLightSource.Type       see above
14//     TestLightSource.Duration   event duration in micro-seconds
15//     TestLightSource.Photons    number of photons generated per event
16//     TestLightSource.Theta1     constant if SPOT or TRACK
17//                                lower zenith angle if RANDTRACK...
18//     TestLightSource.Theta2     constant if SPOT or TRACK
19//                                higher zenith angle if RANDTRACK..
20//     TestLightSource.Phi1       constant if SPOT or TRACK
21//                                lower azimuth angle if RANDTRACK...
22//     TestLightSource.Phi2       constant if SPOT or TRACK
23//                                higher azimuth angle if RANDTRACK
24//     TestLightSource.Alt1       lower bound for point source in km
25//                                altitude of starting  point if TRACK ...
26//     TestLightSource.Alt2       higher bound for point source in km
27//                                altitude of end point if TRACK
28
29#ifndef __TESTLIGHTSOURCE_HH_
30#define __TESTLIGHTSOURCE_HH_
31
32#include "EsafMsgSource.hh"
33
34#include "euso.hh"
35#include "LightSource.hh"
36#include "SinglePhoton.hh" 
37#include "BunchOfPhotons.hh"
38#include "EarthVector.hh"
39
40class FluoCalculator;
41class ListPhotonsInAtmosphere;
42class PhysicsData;
43
44class TestLightSource : public LightSource, public EsafMsgSource {
45public:
46    // ctor
47    TestLightSource();
48
49    // dtor
50    virtual ~TestLightSource();
51
52    // return the list of photons in atmosphere
53    virtual PhotonsInAtmosphere* Get( const PhysicsData* );
54
55    // not meaningful in this case
56    virtual MCTruth* Truth() {return NULL;}
57
58    // get ready for next event
59    virtual void Reset();
60   
61    // release all the mem hold in the buffers
62    virtual Bool_t ClearMemory();
63
64    EsafConfigClass(LightSource,TestLightSource)
65
66private:
67    // produce light in a spot
68    PhotonsInAtmosphere *MakeSpot(const EarthVector& Posi, Double_t nbPhotons );
69   
70    // produce background photons
71    PhotonsInAtmosphere *MakeBgnd(Double_t nbPhotons );
72   
73    // produce light in a spot mimicking a shower maximum
74    PhotonsInAtmosphere *MakeHmaxSpot(const EarthVector& Posi, Double_t nbPhotons );
75   
76    // produce light in a spot mimicking a shower maximum
77    PhotonsInAtmosphere *MakeShowerLike(const EarthVector& Posi, Double_t nbPhotons );
78   
79    // produce light along a track
80    PhotonsInAtmosphere *MakeTrack(Double_t theta, Double_t phi, const EarthVector& Posi, Double_t nbPhotons);
81
82    // reset wavelenght spectrum
83    Double_t MakeSpectrum(const EarthVector& pos,EsafSpectrum* spectrum=0,string spectrumtype="MONO",string photontype="dummy"); 
84
85    // return to the lateral distribution
86    const TF12 GetLateralDistribution(const EarthVector& pos);
87
88    // return angular distribution
89    const TF12 GetAngularDistribution(Double_t alt);
90
91    // get energy threshold for cerenkov
92    Double_t GetEnergyThreshold(Double_t SC_alt) const;
93
94    // return last position of a bunch
95    EarthVector GetLongitudinalExtension(const EarthVector& pos, const EarthVector& dir);
96   
97    // get Hmax 3D-position -- for HmaxSPOT option only
98    EarthVector GetHmaxPos(const EarthVector&,const EarthVector&,Double_t) const;
99
100    // for CERENKOV RadiativeTransfer handling, when AlongTrack_CSPropagator is used
101    // tracklight contained within fPh_in_atmo object
102    void BuildLightTrack(const EarthVector& posi, const EarthVector& dir);
103
104    void Configure();
105   
106    // get detector position
107    EarthVector EUSO() const {return fEUSO;}
108    EarthVector fEUSO;
109
110    ListPhotonsInAtmosphere* fPh_in_atmo;
111    FluoCalculator* fFluocalcul;
112    TF2* fLateralDistribution;
113    TF2* fAngularDistribution;
114
115    ClassDef(TestLightSource,0)
116};
117
118#endif  /* __TESTLIGHTSOURCE_HH_ */
119
Note: See TracBrowser for help on using the repository browser.