// ESAF : Euso Simulation and Analysis Framework // $Id: SlastShowerGenerator.hh,v 1.32 2006/11/18 16:53:53 moreggia Exp $ // Naumov Dmitry 03/03/2004 //////////////////////////////////////////////////////////////////////////////// // SlastShowerGenerator // // // // // // <brief class description> // // // //////////////////////////////////////////////////////////////////////////////// #ifndef __SLASTSHOWERGENERATOR_HH_ #define __SLASTSHOWERGENERATOR_HH_ #include "euso.hh" #include "EventGenerator.hh" #include "ShowerTrack.hh" #include "EsafMsgSource.hh" #include "EarthVector.hh" #include <map> class PhysicsData; class MCTruth; class Atmosphere; class //root.cern.ch/root/html/TF2.html">TF2; class //root.cern.ch/root/html/TH1F.html">TH1F; 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 GetXmax(); // Returns expected Xmax in g/cm2 Double_t GetEnergy() {return fEnergy;} // Returns generated energy in eV Double_t GetTheta() {return fTheta_mes;} // Returns generated Theta in rad Double_t GetPhi() {return fPhi_mes;} // Returns generate Phi in rad Bool_t GetFirstPoint(); // Generate the first point Bool_t IsXmaxInFoV(); // Assess Xmax position (used to reject event with Xmax out of FoV) 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_mes = t;} // Set shower theta in MES void SetPhi(Double_t p) {fPhi_mes = p;} // Set shower phi in MES void SetQuiet(Bool_t key=kTRUE) {fQuiet = key;} // Set/Unset quietness of generation void SetDepthStep(Double_t step) {fDepthStep = step*sou::g/sou::cm2;} EarthVector FoVintersection(const EarthVector&, const EarthVector&) const; // returns track intersection with EUSO FoV cone Bool_t FindImpactOnTOA(); // first step of event generation : find entering point in atmosphere Bool_t IsInFoV(const EarthVector&) const; // check if position stands within EUSO FoV 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 string fSpectrumType; // Spectrum type (powermaw / GZKHiRes2005 ..) //root.cern.ch/root/html/TH1F.html">TH1F* fSpectrumRdnm; // for non-analytical spectrum, used to get random energy 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_local; // Generated ShowerTrack theta - frame defined at TOAimpact Double_t fPhi_local; // Generated ShowerTrack phi - frame defined at TOAimpact Double_t fTheta_mes; // Generated ShowerTrack theta - in mes frame Double_t fPhi_mes; // Generated ShowerTrack phi - in mes frame 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 (from X1, not TOA !!) Double_t fXnext; // next slanth depth (from X1, not TOA !!) 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 EarthVector fTOAImpact; // vector of the impact on top of atmosphere 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 Bool_t fRejectFakeEvents; // kTRUE : if cosmic ray (not in the FoV || has not interacted in atmosphere) --> re-try Bool_t fRejectNoXmax; // kTRUE : if Xmax is not in FoV --> re-try for another event Bool_t fOutOfFoV; // if kTRUE : shower dvpt is switched off Double_t fAtomicMass; // Atomic mass of the UHECR's hadron EsafConfigClass(Generators, SlastShowerGenerator) ClassDef(SlastShowerGenerator,0) }; #endif /* __SLASTSHOWERGENERATOR_HH_ */