Jpp
18.5.0
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JPhysics
JACoeffSource.hh
Go to the documentation of this file.
1
#ifndef __JPHYSICS__JACOEFFSOURCE__
2
#define __JPHYSICS__JACOEFFSOURCE__
3
4
#include "
JLang/JSharedPointer.hh
"
5
6
#include "
JPhysics/JRadiation.hh
"
7
8
9
/**
10
* \author mdejong
11
*/
12
13
namespace
JPHYSICS {}
14
namespace
JPP {
using namespace
JPHYSICS; }
15
16
namespace
JPHYSICS {
17
18
using
JLANG::JSharedPointer
;
19
20
21
/**
22
* Interface for calculation of ionization constant.
23
*/
24
class
JACoeffInterface
{
25
public
:
26
/**
27
* Virtual destructor.
28
*/
29
virtual
~JACoeffInterface
()
30
{}
31
32
/**
33
* Get ionization constant a.
34
*
35
* \param E muon energy [GeV]
36
* \return ionization constant [GeV/m]
37
*/
38
virtual
double
getA
(
const
double
E
)
const
= 0;
39
};
40
41
42
/**
43
* Implementation for calculation of ionization constant.
44
45
* This class implements the JACoeffInterface interface.\n
46
* N.B: This class owns the object pointed to using JLANG::JSharedPointer.
47
*/
48
class
JACoeffSource
:
49
public
JACoeffInterface
,
50
public
JSharedPointer
<JRadiation>
51
{
52
public
:
53
/**
54
* Constructor.
55
*
56
* \param radiation pointer to valid JRadition object
57
* \param density mass density of radiation material [gr/cm³]
58
*/
59
JACoeffSource
(
const
JSharedPointer<JRadiation>
& radiation,
60
const
double
density) :
61
JSharedPointer
<
JRadiation
>(radiation),
62
rho
(density)
63
{}
64
65
66
/**
67
* Get ionization constant a.
68
*
69
* \param E muon energy [GeV]
70
* \return ionization constant [GeV/m]
71
*/
72
virtual
double
getA
(
const
double
E
)
const override
73
{
74
return
(*this)->CalculateACoeff(E) *
rho
* 1.0e6;
75
}
76
77
protected
:
78
const
double
rho
;
79
};
80
}
81
82
#endif
JPHYSICS::JACoeffSource::rho
const double rho
Definition:
JACoeffSource.hh:78
E
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
Definition:
JMuonPostfit.sh:40
JPHYSICS::JACoeffSource
Implementation for calculation of ionization constant.
Definition:
JACoeffSource.hh:48
JRadiation.hh
Muon radiative cross sections.
JSharedPointer.hh
JLANG::JSharedPointer
The template JSharedPointer class can be used to share a pointer to an object.
Definition:
JSharedPointer.hh:28
JPHYSICS::JRadiation
Auxiliary class for the calculation of the muon radiative cross sections.
Definition:
JRadiation.hh:34
JPHYSICS::JACoeffSource::JACoeffSource
JACoeffSource(const JSharedPointer< JRadiation > &radiation, const double density)
Constructor.
Definition:
JACoeffSource.hh:59
JPHYSICS::JACoeffSource::getA
virtual double getA(const double E) const override
Get ionization constant a.
Definition:
JACoeffSource.hh:72
JPHYSICS::JACoeffInterface::~JACoeffInterface
virtual ~JACoeffInterface()
Virtual destructor.
Definition:
JACoeffSource.hh:29
JPHYSICS::JACoeffInterface::getA
virtual double getA(const double E) const =0
Get ionization constant a.
JPHYSICS::JACoeffInterface
Interface for calculation of ionization constant.
Definition:
JACoeffSource.hh:24
Generated by
1.8.5