// ESAF : Euso Simulation and Analysis Framework // $Id: TestLightSource.hh,v 1.20 2005/08/04 16:09:43 moreggia Exp $ // Anne Stutz created Dec, 2 2003 // // This class brings test photons in atmosphere to Euso // The type of events supported are the following: // SPOT light from a single point at the same time // RANDSPOT light from a single point randomly chosen // TRACK light making a track in atmosphere // RANDTRACK light making a track in a randomly chosen direction // // The parameters needed are the following : // TestLightSource.Type see above // TestLightSource.Duration event duration in micro-seconds // TestLightSource.Photons number of photons generated per event // TestLightSource.Theta1 constant if SPOT or TRACK // lower zenith angle if RANDTRACK... // TestLightSource.Theta2 constant if SPOT or TRACK // higher zenith angle if RANDTRACK.. // TestLightSource.Phi1 constant if SPOT or TRACK // lower azimuth angle if RANDTRACK... // TestLightSource.Phi2 constant if SPOT or TRACK // higher azimuth angle if RANDTRACK // TestLightSource.Alt1 lower bound for point source in km // altitude of starting point if TRACK ... // TestLightSource.Alt2 higher bound for point source in km // altitude of end point if TRACK #ifndef __TESTLIGHTSOURCE_HH_ #define __TESTLIGHTSOURCE_HH_ #include "EsafMsgSource.hh" #include "euso.hh" #include "LightSource.hh" #include "SinglePhoton.hh" #include "BunchOfPhotons.hh" #include "EarthVector.hh" class FluoCalculator; class ListPhotonsInAtmosphere; class PhysicsData; class TestLightSource : public LightSource, public EsafMsgSource { public: // ctor TestLightSource(); // dtor virtual ~TestLightSource(); // return the list of photons in atmosphere virtual PhotonsInAtmosphere* Get( const PhysicsData* ); // not meaningful in this case virtual MCTruth* Truth() {return NULL;} // get ready for next event virtual void Reset(); EsafConfigClass(LightSource,TestLightSource) private: // produce light in a spot PhotonsInAtmosphere *MakeSpot(const EarthVector& Posi, double nbPhotons ); // produce light in a spot mimicking a shower maximum PhotonsInAtmosphere *MakeHmaxSpot(const EarthVector& Posi, double nbPhotons ); // produce light along a track PhotonsInAtmosphere *MakeTrack(Double_t theta, Double_t phi, const EarthVector& Posi, Double_t nbPhotons); // reset wavelenght spectrum Double_t MakeSpectrum(const EarthVector& pos,EsafSpectrum* spectrum=0,string photontype="dummy"); // return to the lateral distribution const TF12 GetLateralDistribution(const EarthVector& pos); // return angular distribution const TF12 GetAngularDistribution(Double_t alt); // get energy threshold for cerenkov Double_t GetEnergyThreshold(Double_t SC_alt) const; // return last position of a bunch EarthVector GetLongitudinalExtension(const EarthVector& pos, const EarthVector& dir); // get Hmax 3D-position -- for HmaxSPOT option only EarthVector GetHmaxPos(const EarthVector&,const EarthVector&,Double_t) const; // for CERENKOV RadiativeTransfer handling, when AlongTrack_CSPropagator is used // tracklight contained within fPh_in_atmo object void BuildLightTrack(const EarthVector& posi, const EarthVector& dir); void Configure(); // get detector position EarthVector EUSO() const {return fEUSO;} EarthVector fEUSO; ListPhotonsInAtmosphere* fPh_in_atmo; FluoCalculator* fFluocalcul; TF2* fLateralDistribution; TF2* fAngularDistribution; ClassDef(TestLightSource,0) }; #endif /* __TESTLIGHTSOURCE_HH_ */