Jpp
Public Types | Public Member Functions | Protected Attributes | List of all members
JPHYSICS::JRadiationSource Class Reference

Source of radiation. More...

#include <JRadiationSource.hh>

Inheritance diagram for JPHYSICS::JRadiationSource:
JPHYSICS::JRadiationInterface

Public Types

typedef double(JRadiation::* sigma_type) (const double) const
 
typedef double(JRadiation::* eloss_type) (const double) const
 
typedef std::pair< sigma_type, eloss_typesource_type
 

Public Member Functions

 JRadiationSource (const JLANG::JSharedPointer< JRadiation > &radiation, const double density, const source_type source)
 Constructor. More...
 
virtual double getInverseInteractionLength (const double E) const
 Get inverse interaction length. More...
 
virtual double getEnergyOfShower (const double E) const
 Get energy of shower. More...
 

Protected Attributes

JLANG::JSharedPointer< JRadiationrad
 
const double rho
 
sigma_type sigma
 
eloss_type eloss
 

Detailed Description

Source of radiation.

This class implements the JRadiationInterface interface. N.B: This class owns the object pointed to using JSharedPointer<>.

Definition at line 231 of file JRadiationSource.hh.

Member Typedef Documentation

◆ sigma_type

typedef double(JRadiation::* JPHYSICS::JRadiationSource::sigma_type) (const double) const

Definition at line 236 of file JRadiationSource.hh.

◆ eloss_type

typedef double(JRadiation::* JPHYSICS::JRadiationSource::eloss_type) (const double) const

Definition at line 237 of file JRadiationSource.hh.

◆ source_type

Definition at line 239 of file JRadiationSource.hh.

Constructor & Destructor Documentation

◆ JRadiationSource()

JPHYSICS::JRadiationSource::JRadiationSource ( const JLANG::JSharedPointer< JRadiation > &  radiation,
const double  density,
const source_type  source 
)
inline

Constructor.

Parameters
radiationpointer to valid JRadition object
densityMass density of radiation material [gr/cm³]
sourcepointers to total cross section and energy loss methods

Definition at line 249 of file JRadiationSource.hh.

251  :
252  rad (radiation),
253  rho (density),
254  sigma(source.first),
255  eloss(source.second)
256  {}

Member Function Documentation

◆ getInverseInteractionLength()

virtual double JPHYSICS::JRadiationSource::getInverseInteractionLength ( const double  E) const
inlinevirtual

Get inverse interaction length.

Parameters
Emuon energy [GeV]
Returns
inverse interaction length [m^-1]

Implements JPHYSICS::JRadiationInterface.

Definition at line 265 of file JRadiationSource.hh.

266  {
267  return (*rad.*sigma)(E) * rho * 1.0e6;
268  }

◆ getEnergyOfShower()

virtual double JPHYSICS::JRadiationSource::getEnergyOfShower ( const double  E) const
inlinevirtual

Get energy of shower.

Parameters
Emuon energy [GeV]
Returns
shower energy [GeV]

Implements JPHYSICS::JRadiationInterface.

Definition at line 277 of file JRadiationSource.hh.

278  {
279  return (*rad.*eloss)(E);
280  }

Member Data Documentation

◆ rad

JLANG::JSharedPointer<JRadiation> JPHYSICS::JRadiationSource::rad
protected

Definition at line 283 of file JRadiationSource.hh.

◆ rho

const double JPHYSICS::JRadiationSource::rho
protected

Definition at line 284 of file JRadiationSource.hh.

◆ sigma

sigma_type JPHYSICS::JRadiationSource::sigma
protected

Definition at line 285 of file JRadiationSource.hh.

◆ eloss

eloss_type JPHYSICS::JRadiationSource::eloss
protected

Definition at line 286 of file JRadiationSource.hh.


The documentation for this class was generated from the following file:
JPHYSICS::JRadiationSource::eloss
eloss_type eloss
Definition: JRadiationSource.hh:286
JPHYSICS::JRadiationSource::sigma
sigma_type sigma
Definition: JRadiationSource.hh:285
JPHYSICS::JRadiationSource::rad
JLANG::JSharedPointer< JRadiation > rad
Definition: JRadiationSource.hh:283
JPHYSICS::JRadiationSource::rho
const double rho
Definition: JRadiationSource.hh:284