Line data Source code
1 : #ifndef CRPROPA_FERRIERE_H 2 : #define CRPROPA_FERRIERE_H 3 : 4 : #include "crpropa/massDistribution/Density.h" 5 : 6 : #include <cmath> 7 : #include <string> 8 : 9 : namespace crpropa { 10 : /** 11 : @class Ferriere 12 : @brief model of the distribution of hydrogen in the Milky Way 13 : Here in model Ferriere 2007 14 : seperated in 2 regions (inner, outer). The border is for R=3 kpc in galactocentric radius. 15 : model is discribed in 16 : outer: ApJ, 497, 759 17 : inner: arxiv: astro-ph/0702532 18 : */ 19 2 : class Ferriere: public Density { 20 : private: 21 : // standard for all types of distribution 22 : bool isforHI = true; 23 : bool isforHII = true; 24 : bool isforH2 = true; 25 : double Rsun = 8.5 * kpc; // distance sun-galactic center 26 : 27 : public: 28 : /** Coordinate transformation for the CentralMolecularZone region. Rotation arround z-axis such that X is the major axis and Y is the minor axis 29 : @param position position in galactic coordinates with Earth at (-8.5kpc, 0, 0) 30 : @return position in local coordinates for the CMZ region 31 : */ 32 : Vector3d CMZTransformation(const Vector3d &position) const; 33 : 34 : /** Coordinate transformation for the galactic bulge disk region in galactic center. Rotation arround the x-axis, the y'-axis and the x''-axis. Difened with X along the major axis, Y along the minor axis and Z along the northern normal 35 : @param position position in galactic coordinates with Earth at (-8.5kpc, 0, 0) 36 : @return position in local coordinates for the GB disk region 37 : */ 38 : Vector3d DiskTransformation(const Vector3d &position) const; 39 : 40 : /** @param position position in galactic coordinates with Earth at (-8.5kpc, 0, 0) 41 : @return density in parts/m^3, only acitvated parts are summed up */ 42 : double getDensity(const Vector3d &position) const; 43 : /** @param position position in galactic coordinates with Earth at (-8.5kpc, 0, 0) 44 : @return density of atomic hydrogen in parts/m^3 */ 45 : double getHIDensity(const Vector3d &position) const; 46 : /** @param position position in galactic coordinates with Earth at (-8.5kpc, 0, 0) 47 : @return density of ionised hydrogen in parts/m^3 */ 48 : double getHIIDensity(const Vector3d &position) const; 49 : /** @param position position in galactic coordinates with Earth at (-8.5kpc, 0, 0) 50 : @return density of molecular hydrogen in parts/m^3 */ 51 : double getH2Density(const Vector3d &position) const; 52 : /** @param position position in galactic coordinates with Earth at (-8.5kpc, 0, 0) 53 : @return nucleon density in parts/m^3, only activated parts are summed up and H2 is weighted twice */ 54 : double getNucleonDensity(const Vector3d &position) const; 55 : 56 : /** changes activation status for atomic hydrogen */ 57 : void setIsForHI(bool HI); 58 : /** changes activation status for ionised hydrogen */ 59 : void setIsForHII(bool HII); 60 : /** changes activation status for molecular hydrogen */ 61 : void setIsForH2(bool H2); 62 : 63 : /** @return activation status for atomic hydrogen */ 64 : bool getIsForHI(); 65 : /** @return activation status for ionised hydrogen */ 66 : bool getIsForHII(); 67 : /** @return activation status for molecular hydrogen */ 68 : bool getIsForH2(); 69 : 70 : std::string getDescription(); 71 : }; 72 : 73 : } // namespace crpropa 74 : 75 : #endif // CRPROPA_FERRIERE_H 76 : 77 :