Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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_type
source_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

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

Definition at line 236 of file JRadiationSource.hh.

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

Definition at line 237 of file JRadiationSource.hh.

Definition at line 239 of file JRadiationSource.hh.

Constructor & Destructor Documentation

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  {}
JLANG::JSharedPointer< JRadiation > rad

Member Function Documentation

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  }
JLANG::JSharedPointer< JRadiation > rad
then usage $script[input file[working directory[option]]] nWhere option can be E
Definition: JMuonPostfit.sh:37
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  }
JLANG::JSharedPointer< JRadiation > rad
then usage $script[input file[working directory[option]]] nWhere option can be E
Definition: JMuonPostfit.sh:37

Member Data Documentation

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

Definition at line 283 of file JRadiationSource.hh.

const double JPHYSICS::JRadiationSource::rho
protected

Definition at line 284 of file JRadiationSource.hh.

sigma_type JPHYSICS::JRadiationSource::sigma
protected

Definition at line 285 of file JRadiationSource.hh.

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: