source: trunk/WuerzburgSoft/Thomas/mphys/MCascade.h@ 12426

Last change on this file since 12426 was 1462, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.0 KB
Line 
1#ifndef MARS_MCascade
2#define MARS_MCascade
3
4#ifndef ROOT_TH1
5#include <TH1.h>
6#endif
7
8#ifndef MARS_MPairProduction
9#include "MPairProduction.h"
10#endif
11
12class TList;
13class TFile;
14class TBranch;
15
16class MPhoton;
17class MElectron;
18
19class MCascade : public TObject
20{
21private:
22 Double_t fSrcZ;
23 Double_t fSrcR;
24
25 Double_t fB;
26 Double_t fBubbleZ;
27
28 Double_t fRuntime;
29
30 Double_t fEHi;
31 Double_t fELo;
32
33 Double_t fSpectralIndex;
34 Double_t fDisplayIndex;
35
36 Int_t fNumBins;
37 Int_t fNumMaxInvCompton;
38 Double_t fRatioInvCompton;
39
40 // -------------------------------
41
42 MPairProduction fPair; //!
43 TBranch *fBranchGammas; //!
44 TBranch *fBranchElectrons; //!
45
46 TH1D fHist; //!
47
48 Bool_t fIsBatch; //!
49
50 Double_t GetEnergy();
51 TFile *OpenFile(TString fFilename);
52 void CloseFile(TFile *fFile);
53 void ProcessElectron(MElectron &e, TList &fListGammas);
54 Bool_t ProcessGamma(MPhoton &p, Double_t weight, TList &fListElectrons);
55 Double_t ProcessGammas(TList &fListGammas, TList &fListElectrons, Double_t weight);
56 Double_t ProcessElectrons(TList &fListElectrons, TList &fListGammas);
57 void ProcessPrimaryGamma(Double_t E, Double_t weight);
58
59public:
60 MCascade();
61 ~MCascade();
62
63 void SetSourceZ(Double_t z);
64 void SetSourceRZ(Double_t r); // [kpc]
65 void SetB(Double_t B) { fB = B*1e-4; } // [G=1e-4T] mean magnetic field
66 void SetRuntime(Double_t min) { fRuntime = min*60; } // [s] maximum time to run the simulation
67 void SetEnergyBins(Int_t n, Double_t lo, Double_t hi);
68 void SetMaxInvCompton(Int_t max) { fNumMaxInvCompton = max; } // maximum number of inv. Compton (-1 means infinite)
69 void SetRatioInvCompton(Double_t r) { fRatioInvCompton=r; }
70 void SetSpectralIndex(Double_t idx) { fSpectralIndex=idx; }
71 void SetDisplayIndex(Double_t idx) { fDisplayIndex=idx; }
72 void SetBradius(Double_t r); // [Mpc]
73
74 void Run(TString filename, Bool_t draw);
75
76 ClassDef(MCascade, 1)
77};
78
79#endif
Note: See TracBrowser for help on using the repository browser.