criptic v1
Cosmic Ray Interstellar Propagation Tool using Itô Calculus
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
criptic::CRPacket Class Reference

A class that holds data to describe a CR packet. More...

#include <CRPacket.H>

Public Member Functions

constexpr Real Z () const
 Particle charge.
 
constexpr Real m () const
 Particle mass.
 
constexpr bool isSecondary () const
 Is this a secondary packet?
 
Real gamma () const
 Lorentz factor of packet.
 
Real T () const
 Kinetic energy of packet.
 
void set_T (const Real T)
 Set the momentum of the packet by specifying its kinetic energy.
 
Real E () const
 Total energy of packet.
 
Real v () const
 Velocity of packet.
 
Real R () const
 Rigidity of packet.
 
Real dT_dp () const
 Derivative of kinetic energy with respect to momentum.
 
Real wG (const Real B) const
 Compute gyrofrequency of packet.
 
Real rG (const Real B) const
 Compute gyroradius of packet.
 

Public Attributes

partTypes::pType type
 
IdxType src
 
IdxType uniqueID
 
Real tInj
 
Real wInj
 
Real p
 
Real w
 
Real gr
 

Static Public Attributes

static constexpr IdxType noSrc = maxIdx
 
static constexpr IdxType secondaryFlag = ~(noSrc >> 1)
 

Detailed Description

A class that holds data to describe a CR packet.

This is a trivial class that holds data on CR packets. It provides some convenience functions to do special relativistic conversions of CR packet properties. All quantities are in code internal units, where m_proton = 1, c = 1, and e = 1.

Member Function Documentation

◆ dT_dp()

Real criptic::CRPacket::dT_dp ( ) const
inline

Derivative of kinetic energy with respect to momentum.

Returns
Derivative of kinetic energy with respect to momentum

◆ E()

Real criptic::CRPacket::E ( ) const
inline

Total energy of packet.

Returns
Total energy of packet

◆ gamma()

Real criptic::CRPacket::gamma ( ) const
inline

Lorentz factor of packet.

Returns
Lorentz factor of packet

◆ isSecondary()

constexpr bool criptic::CRPacket::isSecondary ( ) const
inlineconstexpr

Is this a secondary packet?

Returns
True if this is a secondary packet

◆ m()

constexpr Real criptic::CRPacket::m ( ) const
inlineconstexpr

Particle mass.

Returns
Particle mass

◆ R()

Real criptic::CRPacket::R ( ) const
inline

Rigidity of packet.

Returns
Rigidity of packet

◆ rG()

Real criptic::CRPacket::rG ( const Real  B) const
inline

Compute gyroradius of packet.

Parameters
BMagnetic field strength
Returns
Gyroradius of particles in packet

The gyroradius returned is in units of cm or m depending whether the code is compiled in CGS or MKS mode. If pitch angle tracking is off, the gyroradius returns is the mean for a population with an isotropic pitch angle distribution.

◆ set_T()

void criptic::CRPacket::set_T ( const Real  T)
inline

Set the momentum of the packet by specifying its kinetic energy.

Parameters
TKinetic energy of the packet

◆ T()

Real criptic::CRPacket::T ( ) const
inline

Kinetic energy of packet.

Returns
Kinetic energy of packet

◆ v()

Real criptic::CRPacket::v ( ) const
inline

Velocity of packet.

Returns
Velocity of packet

◆ wG()

Real criptic::CRPacket::wG ( const Real  B) const
inline

Compute gyrofrequency of packet.

Parameters
BMagnetic field strength
Returns
Angular frequency of gyration of packet

The angular frequency is returned in units of s^-1

◆ Z()

constexpr Real criptic::CRPacket::Z ( ) const
inlineconstexpr

Particle charge.

Returns
Particle charge

Member Data Documentation

◆ gr

Real criptic::CRPacket::gr

grammage traversed

◆ noSrc

constexpr IdxType criptic::CRPacket::noSrc = maxIdx
staticconstexpr

Flag for a packet with no source

◆ p

Real criptic::CRPacket::p

momentum

◆ secondaryFlag

constexpr IdxType criptic::CRPacket::secondaryFlag = ~(noSrc >> 1)
staticconstexpr

Flag for a packet that is a secondary

◆ src

IdxType criptic::CRPacket::src

index of source

◆ tInj

Real criptic::CRPacket::tInj

injection time

◆ type

partTypes::pType criptic::CRPacket::type

type of particle

◆ uniqueID

IdxType criptic::CRPacket::uniqueID

unique ID number

◆ w

Real criptic::CRPacket::w

statistical weight

◆ wInj

Real criptic::CRPacket::wInj

statistical weight at injection


The documentation for this class was generated from the following file: