Class containing a general description of the galaxy. More...
#include <galaxy.h>
Class containing a general description of the galaxy.
Definition at line 576 of file galaxy.h.
| Galaxy::Galaxy | ( | Input * | in | ) |
Constructor given user input.
| in | User input. |
Definition at line 670 of file galaxy.cc.
References _fB, _fCoordinates, _fDperp, _fDperpEl, _fDpp, _fDppEl, _fGas, _fInjSpectrum, _fISRF, _fSource, _fSourceAbundances, _fTotalGas, _fVC, ab_Al26, ab_Al27, ab_Ar36, ab_Ar38, ab_B10, ab_B11, ab_Be10, ab_Be9, Input::ab_C, ab_C13, ab_C14, ab_Ca40, ab_Ca42, ab_Ca44, ab_Ca48, ab_Cl35, ab_Cl37, ab_Co59, ab_Cr50, ab_Cr52, ab_Cr53, ab_Cr54, ab_F19, ab_Fe54, ab_Fe56, ab_Fe57, ab_Fe58, ab_He3, ab_He4, ab_K39, ab_Mg24, ab_Mg25, ab_Mg26, ab_Mn55, Input::ab_N, ab_N15, ab_Na22, ab_Na23, ab_Ne20, ab_Ne21, ab_Ne22, ab_Ni58, ab_Ni60, ab_Ni61, ab_Ni62, ab_Ni64, ab_O, ab_O17, ab_O18, ab_P31, ab_pr, ab_S32, ab_S33, ab_S34, ab_S36, ab_Sc45, ab_Si28, ab_Si29, ab_Si30, ab_Si32, ab_Ti46, ab_Ti47, ab_Ti48, ab_Ti49, ab_Ti50, ab_V51, Input::D0, Input::delta, Input::dmprof, Input::dvdz, Input::Ekfact, Input::etaT, TGrid::GetMomentum(), TGrid::GetMomentumEl(), ind_low_nucl, Input::index_radial, inj_low_nucl, inp, ISRFfile, Input::mx, Input::numr, Input::numz, prop_el, prop_extracomp, Input::set_profile, Input::sigmav, spect_ind_Al, spect_ind_Ar, spect_ind_B, spect_ind_Be, spect_ind_C, spect_ind_Ca, spect_ind_Cl, spect_ind_Co, spect_ind_Cr, spect_ind_F, spect_ind_Fe, spect_ind_He, spect_ind_K, spect_ind_Mg, spect_ind_Mn, spect_ind_N, spect_ind_Na, spect_ind_Ne, spect_ind_Ni, spect_ind_O, spect_ind_P, spect_ind_pr, spect_ind_S, spect_ind_Sc, spect_ind_Si, spect_ind_Ti, spect_ind_V, Input::taudec, Input::v0, Input::vAlfven, Input::zmax, and Input::zt.
00670 { 00671 00672 if (in == NULL) { 00673 cerr << "No Input specified!" << endl; 00674 return ; 00675 } 00676 inp = in; 00677 00678 #ifndef HAVE_DS 00679 00680 _fSourceAbundances[1001] = ab_pr; 00681 00682 _fSourceAbundances[2003] = ab_He3; 00683 _fSourceAbundances[2004] = ab_He4; 00684 00685 _fSourceAbundances[4009] = ab_Be9; 00686 _fSourceAbundances[4010] = ab_Be10; 00687 00688 _fSourceAbundances[5010] = ab_B10; 00689 _fSourceAbundances[5011] = ab_B11; 00690 00691 _fSourceAbundances[6012] = in->ab_C; 00692 _fSourceAbundances[6013] = ab_C13; 00693 _fSourceAbundances[6014] = ab_C14; 00694 00695 _fSourceAbundances[7014] = in->ab_N; 00696 _fSourceAbundances[7015] = ab_N15; 00697 00698 _fSourceAbundances[8016] = ab_O; 00699 _fSourceAbundances[8017] = ab_O17; 00700 _fSourceAbundances[8018] = ab_O18; 00701 00702 _fSourceAbundances[9019] = ab_F19; 00703 00704 _fSourceAbundances[10020] = ab_Ne20; 00705 _fSourceAbundances[10021] = ab_Ne21; 00706 _fSourceAbundances[10022] = ab_Ne22; 00707 00708 _fSourceAbundances[11022] = ab_Na22; 00709 _fSourceAbundances[11023] = ab_Na23; 00710 00711 _fSourceAbundances[12024] = ab_Mg24; 00712 _fSourceAbundances[12025] = ab_Mg25; 00713 _fSourceAbundances[12026] = ab_Mg26; 00714 00715 _fSourceAbundances[13026] = ab_Al26; 00716 _fSourceAbundances[13027] = ab_Al27; 00717 00718 _fSourceAbundances[14028] = ab_Si28; 00719 _fSourceAbundances[14029] = ab_Si29; 00720 _fSourceAbundances[14030] = ab_Si30; 00721 _fSourceAbundances[14032] = ab_Si32; 00722 00723 _fSourceAbundances[15031] = ab_P31; 00724 00725 _fSourceAbundances[16032] = ab_S32; 00726 _fSourceAbundances[16033] = ab_S33; 00727 _fSourceAbundances[16034] = ab_S34; 00728 _fSourceAbundances[16036] = ab_S36; 00729 00730 _fSourceAbundances[17035] = ab_Cl35; 00731 _fSourceAbundances[17037] = ab_Cl37; 00732 00733 _fSourceAbundances[18036] = ab_Ar36; 00734 _fSourceAbundances[18038] = ab_Ar38; 00735 00736 _fSourceAbundances[19039] = ab_K39; 00737 00738 _fSourceAbundances[20040] = ab_Ca40; 00739 _fSourceAbundances[20042] = ab_Ca42; 00740 _fSourceAbundances[20044] = ab_Ca44; 00741 _fSourceAbundances[20048] = ab_Ca48; 00742 00743 _fSourceAbundances[21045] = ab_Sc45; 00744 00745 _fSourceAbundances[22046] = ab_Ti46; 00746 _fSourceAbundances[22047] = ab_Ti47; 00747 _fSourceAbundances[22048] = ab_Ti48; 00748 _fSourceAbundances[22049] = ab_Ti49; 00749 _fSourceAbundances[22050] = ab_Ti50; 00750 00751 _fSourceAbundances[23051] = ab_V51; 00752 00753 _fSourceAbundances[24050] = ab_Cr50; 00754 _fSourceAbundances[24052] = ab_Cr52; 00755 _fSourceAbundances[24053] = ab_Cr53; 00756 _fSourceAbundances[24054] = ab_Cr54; 00757 00758 _fSourceAbundances[25055] = ab_Mn55; 00759 00760 _fSourceAbundances[26054] = ab_Fe54; 00761 _fSourceAbundances[26056] = ab_Fe56; 00762 _fSourceAbundances[26057] = ab_Fe57; 00763 _fSourceAbundances[26058] = ab_Fe58; 00764 00765 _fSourceAbundances[27059] = ab_Co59; 00766 00767 _fSourceAbundances[28058] = ab_Ni58; 00768 _fSourceAbundances[28060] = ab_Ni60; 00769 _fSourceAbundances[28061] = ab_Ni61; 00770 _fSourceAbundances[28062] = ab_Ni62; 00771 _fSourceAbundances[28064] = ab_Ni64; 00772 00773 inj_low_nucl = ind_low_nucl-in->delta; 00774 00775 _fInjSpectrum[1001] = spect_ind_pr-in->delta; 00776 00777 _fInjSpectrum[2004] = spect_ind_He-in->delta; 00778 00779 _fInjSpectrum[4009] = spect_ind_Be-in->delta; 00780 _fInjSpectrum[4010] = spect_ind_Be-in->delta; 00781 00782 _fInjSpectrum[5010] = spect_ind_B-in->delta; 00783 _fInjSpectrum[5011] = spect_ind_B-in->delta; 00784 00785 _fInjSpectrum[6012] = spect_ind_C-in->delta; 00786 _fInjSpectrum[6013] = spect_ind_C-in->delta; 00787 _fInjSpectrum[6014] = spect_ind_C-in->delta; 00788 00789 _fInjSpectrum[7014] = spect_ind_N-in->delta; 00790 _fInjSpectrum[7015] = spect_ind_N-in->delta; 00791 00792 _fInjSpectrum[8016] = spect_ind_O-in->delta; 00793 _fInjSpectrum[8017] = spect_ind_O-in->delta; 00794 _fInjSpectrum[8018] = spect_ind_O-in->delta; 00795 00796 _fInjSpectrum[9019] = spect_ind_F-in->delta; 00797 00798 _fInjSpectrum[10020] = spect_ind_Ne-in->delta; 00799 _fInjSpectrum[10021] = spect_ind_Ne-in->delta; 00800 _fInjSpectrum[10022] = spect_ind_Ne-in->delta; 00801 00802 _fInjSpectrum[11022] = spect_ind_Na-in->delta; 00803 _fInjSpectrum[11023] = spect_ind_Na-in->delta; 00804 00805 _fInjSpectrum[12024] = spect_ind_Mg-in->delta; 00806 _fInjSpectrum[12025] = spect_ind_Mg-in->delta; 00807 _fInjSpectrum[12026] = spect_ind_Mg-in->delta; 00808 00809 _fInjSpectrum[13026] = spect_ind_Al-in->delta; 00810 _fInjSpectrum[13027] = spect_ind_Al-in->delta; 00811 00812 _fInjSpectrum[14028] = spect_ind_Si-in->delta; 00813 _fInjSpectrum[14029] = spect_ind_Si-in->delta; 00814 _fInjSpectrum[14030] = spect_ind_Si-in->delta; 00815 _fInjSpectrum[14032] = spect_ind_Si-in->delta; 00816 00817 _fInjSpectrum[15031] = spect_ind_P-in->delta; 00818 00819 _fInjSpectrum[16032] = spect_ind_S-in->delta; 00820 _fInjSpectrum[16033] = spect_ind_S-in->delta; 00821 _fInjSpectrum[16034] = spect_ind_S-in->delta; 00822 _fInjSpectrum[16036] = spect_ind_S-in->delta; 00823 00824 _fInjSpectrum[17035] = spect_ind_Cl-in->delta; 00825 _fInjSpectrum[17037] = spect_ind_Cl-in->delta; 00826 00827 _fInjSpectrum[18036] = spect_ind_Ar-in->delta; 00828 _fInjSpectrum[18038] = spect_ind_Ar-in->delta; 00829 00830 _fInjSpectrum[19039] = spect_ind_K-in->delta; 00831 00832 _fInjSpectrum[20040] = spect_ind_Ca-in->delta; 00833 _fInjSpectrum[20042] = spect_ind_Ca-in->delta; 00834 _fInjSpectrum[20044] = spect_ind_Ca-in->delta; 00835 _fInjSpectrum[20048] = spect_ind_Ca-in->delta; 00836 00837 _fInjSpectrum[21045] = spect_ind_Sc-in->delta; 00838 00839 _fInjSpectrum[22046] = spect_ind_Ti-in->delta; 00840 _fInjSpectrum[22047] = spect_ind_Ti-in->delta; 00841 _fInjSpectrum[22048] = spect_ind_Ti-in->delta; 00842 _fInjSpectrum[22049] = spect_ind_Ti-in->delta; 00843 _fInjSpectrum[22050] = spect_ind_Ti-in->delta; 00844 00845 _fInjSpectrum[23051] = spect_ind_V-in->delta; 00846 00847 _fInjSpectrum[24050] = spect_ind_Cr-in->delta; 00848 _fInjSpectrum[24052] = spect_ind_Cr-in->delta; 00849 _fInjSpectrum[24053] = spect_ind_Cr-in->delta; 00850 _fInjSpectrum[24054] = spect_ind_Cr-in->delta; 00851 00852 _fInjSpectrum[25055] = spect_ind_Mn-in->delta; 00853 00854 _fInjSpectrum[26054] = spect_ind_Fe-in->delta; 00855 _fInjSpectrum[26056] = spect_ind_Fe-in->delta; 00856 _fInjSpectrum[26057] = spect_ind_Fe-in->delta; 00857 _fInjSpectrum[26058] = spect_ind_Fe-in->delta; 00858 00859 _fInjSpectrum[27059] = spect_ind_Co-in->delta; 00860 00861 _fInjSpectrum[28058] = spect_ind_Ni-in->delta; 00862 _fInjSpectrum[28060] = spect_ind_Ni-in->delta; 00863 _fInjSpectrum[28061] = spect_ind_Ni-in->delta; 00864 _fInjSpectrum[28062] = spect_ind_Ni-in->delta; 00865 _fInjSpectrum[28064] = spect_ind_Ni-in->delta; 00866 #endif 00867 _fSourceAbundances[-1000] = 1.0; 00868 _fSourceAbundances[1000] = 0.0; 00869 _fSourceAbundances[-999] = 0.0; 00870 00871 _fCoordinates = new TGrid(in->Ekfact, in->numr, in->numz, in->zmax); 00872 00873 _fGas.push_back(new TH2Gas(_fCoordinates)); 00874 _fGas.push_back(new THIGas(_fCoordinates)); 00875 _fGas.push_back(new THIIGas(_fCoordinates)); 00876 _fTotalGas = new TGas(_fCoordinates); 00877 00878 #ifdef HAVE_DS 00879 _fSource = new TDMSource(_fCoordinates, in->dmprof, in->mx, in->sigmav, in->taudec); 00880 #else 00881 _fSource = new TAstrophysicalSource(_fCoordinates); 00882 #endif 00883 00884 _fDperp = new TDiffusionCoefficient(_fCoordinates, in->D0, in->delta, in->zt, in->etaT, in->index_radial, in->set_profile); 00885 00886 #ifdef REAC 00887 _fDpp = new TReaccelerationCoefficient(_fCoordinates->GetMomentum(), _fDperp, in->vAlfven); 00888 #else 00889 _fDpp = NULL; 00890 #endif 00891 00892 #ifdef CONVECTION 00893 _fVC = new TConvectionVelocity(_fCoordinates, in->v0, in->dvdz); 00894 #else 00895 _fVC = NULL; 00896 #endif 00897 00898 if (prop_el || prop_extracomp) { 00899 _fDperpEl = new TDiffusionCoefficient(_fCoordinates, in->D0, in->delta, in->zt, in->etaT, in->index_radial, in->set_profile, prop_el); 00900 00901 #ifdef REAC 00902 _fDppEl = new TReaccelerationCoefficient(_fCoordinates->GetMomentumEl(), _fDperpEl, in->vAlfven); 00903 #else 00904 _fDppEl = NULL; 00905 #endif 00906 00907 _fB = new TBField(_fCoordinates); 00908 _fISRF = new TISRF(_fCoordinates, ISRFfile); 00909 } 00910 else { 00911 _fDperpEl = NULL; 00912 _fDppEl = NULL; 00913 _fB = NULL; 00914 _fISRF = NULL; 00915 } 00916 }
| Galaxy::~Galaxy | ( | ) |
Destructor.
Definition at line 918 of file galaxy.cc.
References _fB, _fCoordinates, _fDperp, _fDperpEl, _fDpp, _fDppEl, _fGas, _fInjSpectrum, _fISRF, _fSource, _fSourceAbundances, _fTotalGas, and _fVC.
00918 { 00919 if (_fCoordinates) delete _fCoordinates; 00920 if (_fSource) delete _fSource; 00921 if (_fDperp) delete _fDperp; 00922 if (_fDpp) delete _fDpp; 00923 if (_fDperpEl) delete _fDperpEl; 00924 if (_fDppEl) delete _fDppEl; 00925 if (_fVC) delete _fVC; 00926 if (_fISRF) delete _fISRF; 00927 if (_fB) delete _fB; 00928 if (_fTotalGas) delete _fTotalGas; 00929 for (vector<TGas*>::iterator i = _fGas.begin(); i != _fGas.end(); ++i) { 00930 if (*i) delete *i; 00931 } 00932 _fGas.clear(); 00933 _fInjSpectrum.clear(); 00934 _fSourceAbundances.clear(); 00935 }
| void Galaxy::Delete | ( | ) |
Definition at line 937 of file galaxy.cc.
References _fB, _fGas, _fISRF, and _fTotalGas.
00937 { 00938 if (_fTotalGas) delete _fTotalGas; 00939 for (vector<TGas*>::iterator i = _fGas.begin(); i != _fGas.end(); ++i) { 00940 if (*i) delete *i; 00941 } 00942 _fGas.clear(); 00943 if (_fISRF) delete _fISRF; 00944 if (_fB) delete _fB; 00945 }
| TBField* Galaxy::GetBField | ( | ) | [inline] |
Obtain the Magnetic Field.
Definition at line 605 of file galaxy.h.
References _fB.
Referenced by TParticle::TParticle().
| TGrid* Galaxy::GetCoordinates | ( | ) | [inline] |
Obtain the Geometry description.
Definition at line 582 of file galaxy.h.
References _fCoordinates.
Referenced by TParticle::ComputeSecondarySource(), TParticle::FindNormalization(), DRAGON::particle_modulated_spectrum(), DRAGON::PrintChi2(), DRAGON::PrintRatios(), TParticle::PrintSpectrum(), DRAGON::Run(), TCREvolutor::TCREvolutor(), TCREvolutorADI::TCREvolutorADI(), and TParticle::TParticle().
| TDiffusionCoefficient* Galaxy::GetDiffCoeff | ( | ) | [inline] |
Obtain the diffusion coefficient.
Definition at line 591 of file galaxy.h.
References _fDperp.
Referenced by TCREvolutorADI::Run(), and TCREvolutor::Run().
| TDiffusionCoefficient* Galaxy::GetDiffCoeffEl | ( | ) | [inline] |
Obtain the diffusion coefficient for electrons/positrons.
Definition at line 596 of file galaxy.h.
References _fDperpEl.
Referenced by TCREvolutorADI::Run(), and TCREvolutor::Run().
| vector<TGas*>& Galaxy::GetGas | ( | ) | [inline] |
Obtain the ISM gas components.
Definition at line 586 of file galaxy.h.
References _fGas.
Referenced by TParticle::TParticle().
| const double Galaxy::GetInjLowSpectrum | ( | ) | const [inline] |
Obtain the injection spectral index at low energy (below some ref rigidity.
Definition at line 620 of file galaxy.h.
References inj_low_nucl.
Referenced by TParticle::TParticle().
| double Galaxy::GetInjSpectrum | ( | int | uid | ) | [inline] |
Obtain high energy injection index of specified nucleus.
| uid | Unique ID of nucleus. |
Definition at line 623 of file galaxy.h.
References _fInjSpectrum.
Referenced by TParticle::Print(), TParticle::PrintSpectrum(), and TParticle::TParticle().
00623 { 00624 map<int,double>::iterator found = _fInjSpectrum.find(uid); 00625 if (found != _fInjSpectrum.end()) return (*found).second; 00626 else return 0; 00627 }
| Input* Galaxy::GetInput | ( | ) | [inline] |
| TISRF* Galaxy::GetISRF | ( | ) | [inline] |
Obtain the description of InterStellar Radiation Fields.
Definition at line 603 of file galaxy.h.
References _fISRF.
Referenced by TParticle::TParticle().
| TReaccelerationCoefficient* Galaxy::GetReaccCoeff | ( | ) | [inline] |
Obtain the diffusion coefficient in momentum space.
Definition at line 593 of file galaxy.h.
References _fDpp.
Referenced by TCREvolutorADI::Run(), and TCREvolutor::Run().
| TReaccelerationCoefficient* Galaxy::GetReaccCoeffEl | ( | ) | [inline] |
Obtain the diffusion coefficient for electrons/positrons in momentum space.
Definition at line 598 of file galaxy.h.
References _fDppEl.
Referenced by TCREvolutorADI::Run(), and TCREvolutor::Run().
| TSource* Galaxy::GetSource | ( | ) | [inline] |
Obtain the CR source distribution.
Definition at line 584 of file galaxy.h.
References _fSource.
Referenced by TCREvolutor::TCREvolutor(), and TCREvolutorADI::TCREvolutorADI().
| double Galaxy::GetSourceAbundance | ( | int | uid | ) | [inline] |
Obtain source abundance of specified nucleus.
| uid | Unique ID of nucleus. |
Definition at line 611 of file galaxy.h.
References _fSourceAbundances.
Referenced by TParticle::Print(), TParticle::PrintSpectrum(), DRAGON::Run(), TCREvolutorADI::Run(), and TCREvolutor::Run().
00611 { 00612 map<int,double>::iterator found = _fSourceAbundances.find(uid); 00613 if (found != _fSourceAbundances.end()) return (*found).second; 00614 else return -1; 00615 }
| TGas* Galaxy::GetTotalGas | ( | ) | [inline] |
Obtain the distribution of total gas in the galaxy.
Definition at line 588 of file galaxy.h.
References _fTotalGas.
Referenced by TParticle::ComputeSecondarySource(), TCREvolutor::TCREvolutor(), TCREvolutorADI::TCREvolutorADI(), and TParticle::TParticle().
| TConvectionVelocity* Galaxy::GetVC | ( | ) | [inline] |
Obtain the convection velocity.
Definition at line 600 of file galaxy.h.
References _fVC.
Referenced by TCREvolutor::TCREvolutor(), and TCREvolutorADI::TCREvolutorADI().
TBField* Galaxy::_fB [protected] |
TGrid* Galaxy::_fCoordinates [protected] |
Geometry and kinematics.
Definition at line 646 of file galaxy.h.
Referenced by Galaxy(), GetCoordinates(), and ~Galaxy().
TDiffusionCoefficient* Galaxy::_fDperp [protected] |
Diffusion coefficient.
Definition at line 650 of file galaxy.h.
Referenced by Galaxy(), GetDiffCoeff(), and ~Galaxy().
TDiffusionCoefficient* Galaxy::_fDperpEl [protected] |
Diffusion coefficient for electrons/positrons.
Definition at line 654 of file galaxy.h.
Referenced by Galaxy(), GetDiffCoeffEl(), and ~Galaxy().
TReaccelerationCoefficient* Galaxy::_fDpp [protected] |
Reacceleration coefficient.
Definition at line 651 of file galaxy.h.
Referenced by Galaxy(), GetReaccCoeff(), and ~Galaxy().
TReaccelerationCoefficient* Galaxy::_fDppEl [protected] |
Reacceleration coefficient for electrons/positrons.
Definition at line 655 of file galaxy.h.
Referenced by Galaxy(), GetReaccCoeffEl(), and ~Galaxy().
vector<TGas*> Galaxy::_fGas [protected] |
map< int, double > Galaxy::_fInjSpectrum [protected] |
Map associating to each nucleus its corresponding injection index.
Definition at line 636 of file galaxy.h.
Referenced by Galaxy(), GetInjSpectrum(), and ~Galaxy().
TISRF* Galaxy::_fISRF [protected] |
TSource* Galaxy::_fSource [protected] |
CR sources.
Definition at line 647 of file galaxy.h.
Referenced by Galaxy(), GetSource(), and ~Galaxy().
map< int, double > Galaxy::_fSourceAbundances [protected] |
Map associating to each nucleus its corresponding source abundance.
Definition at line 642 of file galaxy.h.
Referenced by Galaxy(), GetSourceAbundance(), and ~Galaxy().
TGas* Galaxy::_fTotalGas [protected] |
TConvectionVelocity* Galaxy::_fVC [protected] |
double Galaxy::inj_low_nucl [protected] |
Injection index at low energy (common to all nuclei).
Definition at line 641 of file galaxy.h.
Referenced by Galaxy(), and GetInjLowSpectrum().
Input* Galaxy::inp [protected] |
Definition at line 660 of file galaxy.h.
Referenced by Galaxy(), and GetInput().
1.6.3