Jpp 20.0.0-rc.8
the software that should make you happy
Loading...
Searching...
No Matches
JACoeffSource.hh
Go to the documentation of this file.
1#ifndef __JPHYSICS__JACOEFFSOURCE__
2#define __JPHYSICS__JACOEFFSOURCE__
3
4#include <memory>
5
7
8
9/**
10 * \author mdejong
11 */
12
13namespace JPHYSICS {}
14namespace JPP { using namespace JPHYSICS; }
15
16namespace JPHYSICS {
17
18
19 /**
20 * Interface for calculation of ionization constant.
21 */
23 public:
24 /**
25 * Virtual destructor.
26 */
28 {}
29
30 /**
31 * Get ionization constant a.
32 *
33 * \param E muon energy [GeV]
34 * \return ionization constant [GeV/m]
35 */
36 virtual double getA(const double E) const = 0;
37 };
38
39
40 /**
41 * Implementation for calculation of ionization constant.
42
43 * This class implements the JACoeffInterface interface.\n
44 * N.B: This class owns the object pointed to using JLANG::JSharedPointer.
45 */
47 public JACoeffInterface,
48 public std::shared_ptr<JRadiation>
49 {
50 public:
51 /**
52 * Constructor.
53 *
54 * \param radiation pointer to valid JRadition object
55 * \param density mass density of radiation material [gr/cm³]
56 */
57 JACoeffSource(const std::shared_ptr<JRadiation>& radiation,
58 const double density) :
59 std::shared_ptr<JRadiation>(radiation),
60 rho(density)
61 {}
62
63
64 /**
65 * Get ionization constant a.
66 *
67 * \param E muon energy [GeV]
68 * \return ionization constant [GeV/m]
69 */
70 virtual double getA(const double E) const override
71 {
72 return get()->CalculateACoeff(E) * rho * 1.0e6;
73 }
74
75 protected:
76 const double rho;
77 };
78}
79
80#endif
Muon radiative cross sections.
Interface for calculation of ionization constant.
virtual ~JACoeffInterface()
Virtual destructor.
virtual double getA(const double E) const =0
Get ionization constant a.
Implementation for calculation of ionization constant.
JACoeffSource(const std::shared_ptr< JRadiation > &radiation, const double density)
Constructor.
virtual double getA(const double E) const override
Get ionization constant a.
Auxiliary class for the calculation of the muon radiative cross sections.
Definition JRadiation.hh:36
Auxiliary methods for light properties of deep-sea water.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).