// ESAF : Euso Simulation and Analysis Framework // $Id: SlastShowerGenerator.hh,v 1.24 2005/10/29 16:24:14 naumov Exp $ // Naumov Dmitry 03/03/2004 //////////////////////////////////////////////////////////////////////////////// // SlastShowerGenerator // // // // // // // // // //////////////////////////////////////////////////////////////////////////////// #ifndef __SLASTSHOWERGENERATOR_HH_ #define __SLASTSHOWERGENERATOR_HH_ #include "euso.hh" #include "EventGenerator.hh" #include "ShowerTrack.hh" #include "EsafMsgSource.hh" #include "EarthVector.hh" #include class PhysicsData; class MCTruth; class Atmosphere; class TF2; class SlastShowerGenerator : public EventGenerator, public EsafMsgSource { public: // ctor SlastShowerGenerator(Bool_t quiet = kFALSE); // dtor virtual ~SlastShowerGenerator(); Bool_t Init(); // SLAST Initializations Double_t NucleonAirCrossSection(Double_t); // Nucleon-Air Cross-section at given energy Double_t HadronInteractionLength(Double_t, Double_t); // Hadron Interaction Length in Air void GetX1(); // First depth before the interaction Double_t GetEnergy() {return fEnergy;} // Returns generated energy in eV Double_t GetTheta() {return fTheta;} // Returns generated Theta in rad Double_t GetPhi() {return fPhi;} // Returns generate Phi in rad Bool_t GetFarFirstPoint(); // Generate a far point on the sphere void GetFirstPoint(); // Generate the first point Bool_t GetNextStep(); // Get next step of the shower const ShowerStep& GetShowerStep(); // Get Shower Step void GetShowerParametrization(Double_t); // Number of electrons in shower, age, etc... void GIL(Double_t); // QGSJET parametrization void GFA(Double_t); // Gaussian Function in Age void GHF(Double_t); // Gaisser-Hillas Function Bool_t DevelopShower(); // Build a shower track PhysicsData *Get(); // Returns the track MCTruth *GetTruth(); // Returns the MonteCarlo Truth virtual void Reset(); // Reset important variables for the next event void GetShowerInfo(); // Adds the general information about the track // Setters void SetShower(Double_t,Double_t,Double_t,EarthVector); // Set energy,theta,phi,position of shower to generate void SetEnergy(Double_t e) {fEnergy = e;} // Set shower energy void SetTheta(Double_t t) {fTheta = t;} // Set shower theta void SetPhi(Double_t p) {fPhi = p;} // Set shower phi void SetQuiet(Bool_t key=kTRUE) {fQuiet = key;} // Set/Unset quietness of generation void SetDepthStep(Double_t step) {fDepthStep = step*sou::g/sou::cm2;} private: ShowerTrack *fTrack; // pointer to Shower Track object ShowerStep fStep; // current ShowerStep object MCTruth *fTruth; // pointer to the Truth object Double_t fFoV; // Space Telescope Field of View (FoV) in rad Double_t fEusoAltitude; // Euso Altitude Double_t fEnergyMin; // Minimum Energy Range for the ShowerTrack generation Double_t fEnergyMax; // Maximum Energy Range for the ShowerTrack generation Double_t fEnergySlope; // Slope of the Differential Energy Spectrum Double_t fThetaMin; // Minimum Theta Range for the ShowerTrack generation Double_t fThetaMax; // Maximum Theta Range for the ShowerTrack generation Double_t fPhiMin; // Minimum Phi Range for the ShowerTrack generation Double_t fPhiMax; // Maximum Phi Range for the ShowerTrack generation Double_t fFirstPointX; // X coordinate of the first ShowerTrack point Double_t fFirstPointY; // Y coordinate of the first ShowerTrack point Double_t fFirstPointZ; // Z coordinate of the first ShowerTrack point string fFirstType; // Choice of the generation type for the first interaction // ( POS = fixed point , X1 = fixed X1, NONE = from hadronic interaction lenght ) Double_t fDepthStep; // depth step Double_t fEnergy; // Generated ShowerTrack energy Double_t fTheta; // Generated ShowerTrack theta Double_t fPhi; // Generated ShowerTrack phi Double_t fAge; // current age of the shower (varies from 0 to 2. Age = 1 // corresponds to the shower maximum Double_t fNe; // current number of electrons Double_t fX1; // atmosphere depth for the first point Double_t fXcurrent; // current slanth depth Double_t fXnext; // next slanth depth Double_t fTimecurrent; // time from the ShowerTrack origin (current) Double_t fTimenext; // time from the ShowerTrack origin (next) EarthVector fEusoVector; // vector pointing to EUSO EarthVector fInitPoint; // vector of init point EarthVector fOmega; // unit vector of the ShowerTrack object EarthVector fCurrentPoint; // vector of the current point. Z=0 on the Earth underneath EUSO EarthVector fNextPoint; // vector of the next point. Z=0 on the Earth underneath EUSO EarthVector fEarthImpact; // vector of the impact on the Earth. Z=0 on the Earth underneath EUSO Int_t fHitGround; // Boolian if the ShowerTrack hits the ground Bool_t fInCome; // Boolian if the ShowerTrack becomes visible to EUSO (in FoV) Bool_t fOutCome; // Boolian if the ShowerTrack becomes invisible to EUSO (in FoV) string fType; // Type of the UHECR particle: hadron, netrino string fEnergyDistribution; // Type of the Shower Parametrization for the energy distribution string fShowerParametrization; // Type of the Shower Parametrization for the number of charged particles Bool_t fQuiet; // kTRUE - no messages, kFALSE - with messages Double_t fAtomicMass; // Atomic mass of the UHECR's hadron EsafConfigClass(Generators, SlastShowerGenerator) ClassDef(SlastShowerGenerator,0) }; #endif /* __SLASTSHOWERGENERATOR_HH_ */