TIonizationLoss Class Reference

Ionization energy losses. More...

#include <galaxy.h>

Inheritance diagram for TIonizationLoss:
TEnergyLoss

List of all members.

Public Member Functions

 TIonizationLoss (TGrid *, vector< TGas * >, TGas *, double, double)
 Initialize ionization losses.
virtual ~TIonizationLoss ()

Detailed Description

Ionization energy losses.

Author:
Luca Maccione luca.maccione@desy.de

Definition at line 215 of file galaxy.h.


Constructor & Destructor Documentation

TIonizationLoss::TIonizationLoss ( TGrid coord,
vector< TGas * >  gas,
TGas totalgas,
double  A,
double  Z 
)

Initialize ionization losses.

Parameters:
coord geometry
gas ISM gas components
totalgas Total ISM gas
A Nucleus mass
Z Nucleus charge

Definition at line 24 of file galaxy.cc.

References TEnergyLoss::dimE, TEnergyLoss::dimr, TEnergyLoss::dimz, TEnergyLoss::dpdt, EH, EHe, EiH, EiHe, TGrid::GetBeta(), TGrid::GetBetaEl(), TGrid::GetGamma(), TGrid::GetGammaEl(), TGas::GetGas(), He_abundance, TEnergyLoss::index(), TGrid::index(), Mele, mp, Myr, PIR02MC2C, and ZHe.

00024                                                                                                     : TEnergyLoss(coord) {
00025 
00026   const double factor = 1e-9*Myr;
00027 
00028   if (A != 0) { // hadrons
00029 
00030     vector<double> bet = coord->GetBeta();
00031     vector<double> gamma = coord->GetGamma();
00032 
00033     const double MA = A*mp*1.e3;  // nucleus mass MeV
00034     
00035     for (int k = 0; k < dimE; ++k) {
00036       double gammak = gamma[k];
00037       double betak = bet[k];
00038       double qmax = 2.*Mele*(gammak*gammak-1.)/(1. +2.*gammak*Mele/MA);
00039       double bh   = log(2.*Mele*(gammak*gammak-1.)*qmax /(EH*EH))  -2.*betak*betak;
00040       double bhe  = log(2.*Mele*(gammak*gammak-1.)*qmax /(EHe*EHe))-2.*betak*betak;  
00041 
00042       for (int i = 0; i < dimr; ++i) {
00043         for (int j = 0; j < dimz; ++j) {
00044           
00045           int ind = coord->index(i,j);
00046           double nh = totalgas->GetGas(ind) - gas[2]->GetGas(ind);
00047           dpdt[index(i,j,k)] = 2.*PIR02MC2C*fabs(Z)*fabs(Z)/betak*nh*(bh +He_abundance*bhe) * factor / betak;
00048           
00049         }
00050       }
00051     }
00052   }
00053   else { // leptons
00054 
00055     vector<double> bet = coord->GetBetaEl();
00056     vector<double> gamma = coord->GetGammaEl();
00057     
00058     for (int k = 0; k < dimE; ++k) {
00059       double gammak = gamma[k];
00060       double betk = bet[k];
00061 
00062       for (int i = 0; i < dimr; ++i) {
00063         for (int j = 0; j < dimz; ++j) {
00064           
00065           int ind = coord->index(i,j);
00066           double nh = totalgas->GetGas(ind) - gas[2]->GetGas(ind);
00067           dpdt[index(i,j,k)] = 2.*PIR02MC2C/betk*(  nh*(1.0+ZHe*He_abundance)*( log(gammak-1.)- M_LN2 +1./8.
00068                                                                                 +2.*log(gammak*betk*Mele) )-nh*2.*log(EiH)-ZHe*nh*He_abundance*2.*log(EiHe)  ) * factor / betk;
00069         }
00070       }
00071     }
00072   }
00073 }

virtual TIonizationLoss::~TIonizationLoss (  )  [inline, virtual]

Destructor.

Definition at line 223 of file galaxy.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator
Generated on Mon Sep 27 12:59:57 2010 for DRAGON by  doxygen 1.6.3