TEnergyLoss Class Reference

General class describing energy losses in DRAGON. Refer to Strong and Moskalenko, ApJ 509 (1998) for formulae. More...

#include <galaxy.h>

Inheritance diagram for TEnergyLoss:
TBremsstrahlungLoss TCoulombLoss TICSLoss TIonizationLoss TSynchrotronLoss

List of all members.

Public Member Functions

virtual ~TEnergyLoss ()
 TEnergyLoss (TGrid *coord)
 TEnergyLoss (const TEnergyLoss &el)
int GetDimr ()
int GetDimz ()
int GetDimE ()
vector< double > & GetDpdt ()
double GetDpdt (int ir, int iz, int ip)
 Get energy loss at given position and energy with matrix to linear representation conversion.
double GetDpdt (int i)
TEnergyLossoperator+= (const TEnergyLoss &el)

Protected Member Functions

int index (int ir, int iz, int ip)
 Convert matrix to linear representation.

Protected Attributes

int dimE
int dimr
int dimz
vector< double > dpdt

Detailed Description

General class describing energy losses in DRAGON. Refer to Strong and Moskalenko, ApJ 509 (1998) for formulae.

Author:
Luca Maccione luca.maccione@desy.de

Definition at line 164 of file galaxy.h.


Constructor & Destructor Documentation

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

Destructor.

Definition at line 166 of file galaxy.h.

References dpdt.

TEnergyLoss::TEnergyLoss ( TGrid coord  ) 

Constructor given a geometry.

Definition at line 16 of file galaxy.cc.

References dimE, dimr, dimz, dpdt, TGrid::GetDimE(), TGrid::GetDimR(), and TGrid::GetDimZ().

00016                                      { 
00017 
00018         dimr = coord->GetDimR();
00019         dimz = coord->GetDimZ();
00020         dimE = coord->GetDimE();
00021         dpdt = vector<double>(dimr*dimz*dimE, 0.0);
00022 }

TEnergyLoss::TEnergyLoss ( const TEnergyLoss el  )  [inline]

Copy constructor.

Definition at line 170 of file galaxy.h.


Member Function Documentation

int TEnergyLoss::GetDimE (  )  [inline]

Get energy dimension of simulation box.

Definition at line 180 of file galaxy.h.

References dimE.

int TEnergyLoss::GetDimr (  )  [inline]

Get radial dimension of simulation box.

Definition at line 178 of file galaxy.h.

References dimr.

int TEnergyLoss::GetDimz (  )  [inline]

Get vertical dimension of simulation box.

Definition at line 179 of file galaxy.h.

References dimz.

double TEnergyLoss::GetDpdt ( int  i  )  [inline]

Get energy loss at given position and energy in linear representation.

Definition at line 187 of file galaxy.h.

References dpdt.

double TEnergyLoss::GetDpdt ( int  ir,
int  iz,
int  ip 
) [inline]

Get energy loss at given position and energy with matrix to linear representation conversion.

Parameters:
ir Radial position
iz Vertical position
ip Energy position

Definition at line 182 of file galaxy.h.

References dpdt, and index().

00182 { return dpdt[index(ir,iz,ip)]; }

vector<double>& TEnergyLoss::GetDpdt (  )  [inline]

Get energy loss distribution.

Definition at line 181 of file galaxy.h.

References dpdt.

Referenced by TParticle::Evolve().

int TEnergyLoss::index ( int  ir,
int  iz,
int  ip 
) [inline, protected]

Convert matrix to linear representation.

Returns:
(ir*dimz+iz)*dimE+ip

Definition at line 200 of file galaxy.h.

References dimE, and dimz.

Referenced by GetDpdt(), TBremsstrahlungLoss::TBremsstrahlungLoss(), TCoulombLoss::TCoulombLoss(), TICSLoss::TICSLoss(), TIonizationLoss::TIonizationLoss(), and TSynchrotronLoss::TSynchrotronLoss().

00200 { return (ir*dimz+iz)*dimE+ip; }

TEnergyLoss& TEnergyLoss::operator+= ( const TEnergyLoss el  )  [inline]

Sum up several energy loss terms.

Definition at line 189 of file galaxy.h.

References dpdt.


Member Data Documentation

int TEnergyLoss::dimE [protected]
int TEnergyLoss::dimr [protected]
int TEnergyLoss::dimz [protected]
vector<double> TEnergyLoss::dpdt [protected]

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