source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/simulation/generators/showers/include/SlastShowerGenerator.hh @ 117

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

ESAF version compilable on mac OS

File size: 9.3 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id: SlastShowerGenerator.hh 2775 2006-11-18 16:53:53Z moreggia $
3// Naumov Dmitry 03/03/2004
4
5////////////////////////////////////////////////////////////////////////////////
6// SlastShowerGenerator                                                       //
7//                                                                            //
8//                                                                            // 
9// <brief class description>                                                  // 
10//                                                                            // 
11////////////////////////////////////////////////////////////////////////////////
12
13#ifndef __SLASTSHOWERGENERATOR_HH_
14#define __SLASTSHOWERGENERATOR_HH_
15
16#include "euso.hh"
17#include "EventGenerator.hh"
18#include "ShowerTrack.hh"
19#include "EsafMsgSource.hh"
20#include "EarthVector.hh"
21#include <map>
22
23
24class PhysicsData;
25class MCTruth;
26class Atmosphere;
27class TF2;
28class TH1F;
29
30class SlastShowerGenerator : public EventGenerator, public EsafMsgSource {
31public:
32    // ctor
33    SlastShowerGenerator(Bool_t quiet = kFALSE);
34    // dtor
35    virtual     ~SlastShowerGenerator();
36    Bool_t       Init();                                        // SLAST Initializations
37    Double_t     NucleonAirCrossSection(Double_t);              // Nucleon-Air Cross-section at given energy
38    Double_t     HadronInteractionLength(Double_t, Double_t);   // Hadron Interaction Length in Air
39    void         GetX1();                                       // First depth before the interaction
40    Double_t     GetXmax();                                     // Returns expected Xmax in g/cm2
41    Double_t     GetEnergy() {return fEnergy;}                  // Returns generated energy in eV
42    Double_t     GetTheta()  {return fTheta_mes;}                   // Returns generated Theta in rad
43    Double_t     GetPhi()    {return fPhi_mes;}                     // Returns generate Phi in rad
44    Bool_t       GetFirstPoint();                               // Generate the first point
45    Bool_t       IsXmaxInFoV();                                 // Assess Xmax position (used to reject event with Xmax out of FoV)
46    Bool_t       GetNextStep();                                 // Get next step of the shower
47    const ShowerStep& GetShowerStep();                          // Get Shower Step
48    void         GetShowerParametrization(Double_t);            // Number of electrons in shower, age, etc...
49    void         GIL(Double_t);                                 // QGSJET parametrization
50    void         GFA(Double_t);                                 // Gaussian Function in Age
51    void         GHF(Double_t);                                 // Gaisser-Hillas Function
52    Bool_t       DevelopShower();                               // Build a shower track
53    PhysicsData *Get();                                         // Returns the track
54    MCTruth     *GetTruth();                                    // Returns the MonteCarlo Truth
55    virtual void Reset();                                       // Reset important variables for the next event
56    void         GetShowerInfo();                               // Adds the general information about the track
57    // Setters
58    void         SetShower(Double_t,Double_t,Double_t,EarthVector); // Set energy,theta,phi,position of shower to generate
59    void         SetEnergy(Double_t e) {fEnergy = e;}               // Set shower energy
60    void         SetTheta(Double_t  t) {fTheta_mes  = t;}           // Set shower theta in MES
61    void         SetPhi(Double_t p)    {fPhi_mes    = p;}           // Set shower phi in MES
62    void         SetQuiet(Bool_t key=kTRUE) {fQuiet = key;}         // Set/Unset quietness of generation
63    void         SetDepthStep(Double_t step) {fDepthStep = step*sou::g/sou::cm2;}
64
65    EarthVector  FoVintersection(const EarthVector&, const EarthVector&) const;  // returns track intersection with EUSO FoV cone
66    Bool_t       FindImpactOnTOA();                                              // first step of event generation : find entering point in atmosphere
67    Bool_t       IsInFoV(const EarthVector&) const;                              // check if position stands within EUSO FoV
68
69     
70private:
71    ShowerTrack        *fTrack;                  // pointer to Shower Track object                     
72    ShowerStep          fStep;                   // current ShowerStep object
73    MCTruth            *fTruth;                  // pointer to the Truth object
74    Double_t            fFoV;                    // Space Telescope Field of View (FoV) in rad
75    Double_t            fEusoAltitude;           // Euso Altitude
76    string              fSpectrumType;           // Spectrum type (powermaw / GZKHiRes2005 ..)
77    TH1F*               fSpectrumRdnm;           // for non-analytical spectrum, used to get random energy
78    Double_t            fEnergyMin;              // Minimum Energy Range for the ShowerTrack generation
79    Double_t            fEnergyMax;              // Maximum Energy Range for the ShowerTrack generation
80    Double_t            fEnergySlope;            // Slope of the Differential Energy Spectrum           
81    Double_t            fThetaMin;               // Minimum Theta Range for the ShowerTrack generation
82    Double_t            fThetaMax;               // Maximum Theta Range for the ShowerTrack generation
83    Double_t            fPhiMin;                 // Minimum Phi Range for the ShowerTrack generation
84    Double_t            fPhiMax;                 // Maximum Phi Range for the ShowerTrack generation
85    Double_t            fFirstPointX;            // X coordinate of the first ShowerTrack point
86    Double_t            fFirstPointY;            // Y coordinate of the first ShowerTrack point
87    Double_t            fFirstPointZ;            // Z coordinate of the first ShowerTrack point
88    string              fFirstType;              // Choice of the generation type for the first interaction
89                                                 // ( POS = fixed point , X1 = fixed X1, NONE = from hadronic interaction lenght )
90    Double_t            fDepthStep;              // depth step
91    Double_t            fEnergy;                 // Generated ShowerTrack energy
92    Double_t            fTheta_local;            // Generated ShowerTrack theta - frame defined at TOAimpact
93    Double_t            fPhi_local;              // Generated ShowerTrack phi - frame defined at TOAimpact
94    Double_t            fTheta_mes;              // Generated ShowerTrack theta - in mes frame
95    Double_t            fPhi_mes;                // Generated ShowerTrack phi - in mes frame
96    Double_t            fAge;                    // current age of the shower (varies from 0 to 2. Age = 1
97                                               // corresponds to the shower maximum
98    Double_t            fNe;                     // current number of electrons
99    Double_t            fX1;                     // atmosphere depth for the first point
100    Double_t            fXcurrent;               // current slanth depth (from X1, not TOA !!)
101    Double_t            fXnext;                  // next slanth depth (from X1, not TOA !!)
102    Double_t            fTimecurrent;            // time from the ShowerTrack origin (current)
103    Double_t            fTimenext;               // time from the ShowerTrack origin (next)
104    EarthVector         fEusoVector;             // vector pointing to EUSO
105    EarthVector         fInitPoint;              // vector of init point
106    EarthVector         fOmega;                  // unit vector of the ShowerTrack object
107    EarthVector         fCurrentPoint;           // vector of the current point. Z=0 on the Earth underneath EUSO
108    EarthVector         fNextPoint;              // vector of the next point. Z=0 on the Earth underneath EUSO
109    EarthVector         fEarthImpact;            // vector of the impact on the Earth. Z=0 on the Earth underneath EUSO
110    EarthVector         fTOAImpact;              // vector of the impact on top of atmosphere
111    Int_t               fHitGround;              // Boolian if the ShowerTrack hits the ground
112    Bool_t              fInCome;                 // Boolian if the ShowerTrack becomes visible to EUSO (in FoV)
113    Bool_t              fOutCome;                // Boolian if the ShowerTrack becomes invisible to EUSO (in FoV)
114    string              fType;                   // Type of the UHECR particle: hadron, netrino
115    string              fEnergyDistribution;     // Type of the Shower Parametrization for the energy distribution
116    string              fShowerParametrization;  // Type of the Shower Parametrization for the number of charged particles
117    Bool_t              fQuiet;                  // kTRUE - no messages, kFALSE - with messages                 
118    Bool_t              fRejectFakeEvents;       // kTRUE : if cosmic ray (not in the FoV || has not interacted in  atmosphere) --> re-try               
119    Bool_t              fRejectNoXmax;           // kTRUE : if Xmax is not in FoV --> re-try for another event
120    Bool_t              fOutOfFoV;               // if kTRUE : shower dvpt is switched off               
121    Double_t            fAtomicMass;             // Atomic mass of the UHECR's hadron
122
123    EsafConfigClass(Generators, SlastShowerGenerator)   
124    ClassDef(SlastShowerGenerator,0)
125};
126
127#endif  /* __SLASTSHOWERGENERATOR_HH_ */
128
Note: See TracBrowser for help on using the repository browser.