// $Id: ShowerTrack.hh,v 1.39 2005/04/18 17:17:17 moreggia Exp $ // Alessandro Thea, Sergio Bottai, Dmitry Naumov 23/11/2003 /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * Id: ShowerTrack * * Package: Shower * * Coordinator: Sergio.Bottai, Dmitry.Naumov * * * *****************************************************************************/ #ifndef __SHOWERTRACK_HH__ #define __SHOWERTRACK_HH__ #include "euso.hh" #include "PhysicsData.hh" #include "ShowerStep.hh" #include "EVector.hh" #include "EsafMsgSource.hh" #include #include #include #include #include class UnisimFileShowerGenerator; class SlastShowerGenerator; class SlastLightToEuso; class ShowerTrack; //////////////////////////////////////////////////////////////////////////////// // // // ShowerTrack // // // // // // // //////////////////////////////////////////////////////////////////////////////// class ShowerTrack : public PhysicsData, public EsafMsgSource { public: // ctor ShowerTrack(); // dtor virtual ~ShowerTrack(); // Reset the shower track information void Reset(); // add the new step void Add( ShowerStep step ); // Cleaning the memory from all histos associated to the track Bool_t Clear(); // return the Number of steps inline UInt_t GetNumStep() const { return fSteps.size(); } // return the Energy Threshold of electrons inline Double_t GetEthrEl() const { return fEthrEl; } // return the Direction versor in MES of the track axis inline EVector GetDirVers() const { return fDirVers; } // return the Direction versor in MES of the track axis inline EVector GetInitPos() const { return fInitPos; } // returns true if shower can hit ground in Euso FoV inline Bool_t GetHitGround() const { return fHitGround; } // returns the UHECR energy inline Double_t GetEnergy() const {return fEnergy; } // returns the UHECR Theta inline Double_t GetTheta() const {return fTheta; } // returns the UHECR Phi inline Double_t GetPhi() const {return fPhi; } // returns the UHECR first interaction depth inline Double_t GetX1() const {return fX1; } // return the i-th step of the shower const ShowerStep& GetStep( UInt_t ) const; // return last step of the shower const ShowerStep& GetLastStep( ) const; // return the i-th step using an operator const ShowerStep& operator[]( UInt_t ) const; // returns all steps in the track const vector& GetSteps( ) const; // returns number of steps in the track inline UInt_t Size() const { return fSteps.size(); } // Draw 3D of the track. Can be usefull for debug, visualizations etc void DrawXYZ(Option_t *opt="box"); // Draw 2D of the track. Can be usefull for debug, visualizations etc void DrawXY(Option_t *opt="colz"); // update the Track to the density profile of the atmosphere currently setted in ESAF void AtmUpdateTrack() ; // return resp. entry of the first ShowerStep and exit of the last EarthVector FirstPos() const; EarthVector LastPos() const; // Get Pointer to the energy distribution of electrons in the shower static TF2* GetEnergyDistribution(TString); // GetLateralDistribution returns a pointer to a TF2 function dNe/dx(x,age) // where x is x=D/Ro with D = distance to shower axis and Ro=moliere // radius (depending on density). The integration of dNe/dx(x,age) over dx // from 0 to infinity is normalized to 1 // The integral from x=x1=D1/Ro to x=x2=D2/Ro gives the fraction of // total number of electrons which lie inside such corona identified by // the interval D2-D1 in the distance from the shower axis.*/ static TF2* GetLateralDistribution(TString); // GetAngularDistribution returns a pointer to a TF2 function // dNe/dtheta(theta,Et) where theta is the // angle between the electrons and the shower axis and Et (MeV) is the // energy thr for electrons considered. // The integration of dNe/dtheta(theta,Et) over dtheta from 0 to pi is // normalized to 1. The integral from theta1 to theta2 give the fraction // of total number of electrons which lie inside // such angular interval (distribution in phi is supposed uniform). static TF2* GetAngularDistribution(TString); Int_t GetNumEnergyHistos() {return fNumEnergyHistos;} Int_t GetNumLateralHistos() {return fNumLateralHistos;} void SetNumEnergyHistos(Int_t n) {fNumEnergyHistos = n;} void SetNumLateralHistos(Int_t n) {fNumLateralHistos = n;} private: vector fSteps; // vector of ShowerStep's Double_t fEnergy; // UHECR energy Double_t fTheta; // UHECR Theta Double_t fPhi; // UHECR Phi Double_t fX1; // UHECR first interaction depth Double_t fEthrEl; // Energy Threshold of electrons EVector fDirVers; // Unit vector of the track direction EVector fInitPos; // first interaction point (3D coord, meters) in MES EVector fEarthImpact;// Impact point on the Earth if any Bool_t fHitGround;// kTRUE is the track can hit the Ground in EUSO FoV, kFALSE otherwise Int_t fNumEnergyHistos; // number of energy distribution histograms Int_t fNumLateralHistos; // number of lateral distribution histograms static TF2* fEnergyAgeDistributionDefault; // default 2d function of energy and age distribution static TF2* fEnergyAgeDistributionHillas; // hillas 2d function of energy and age distribution static TF2* fEnergyAgeDistributionNerling; // nerling 2d function of energy and age distribution static TF2* fEnergyAgeDistributionMelot; // melot 2d function of energy and age distribution static TF2* fEnergyAgeDistributionGiller; // giller 2d function of energy and age distribution static TF2* fLateralDistributionDefalt; // default 2d function of lateral distribution static TF2* fLateralDistribution1; // NKG1 2d function of lateral distribution static TF2* fLateralDistribution2; // NKG2 2d function of lateral distribution static TF2* fAngularDistribution1; // 2d angular distribution friend class UnisimFileShowerGenerator; friend class CorsikaFileShowerGenerator; friend class SlastShowerGenerator; friend class SlastLightToEuso; ClassDef(ShowerTrack,0) }; #endif /* __SHOWERTRACK_HH_ */