Jpp test-rotations-new
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
5
7
8
9/**
10 * \author mdejong
11 */
12
13namespace JPHYSICS {}
14namespace JPP { using namespace JPHYSICS; }
15
16namespace JPHYSICS {
17
19
20
21 /**
22 * Interface for calculation of ionization constant.
23 */
25 public:
26 /**
27 * Virtual destructor.
28 */
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 */
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 */
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
Muon radiative cross sections.
The template JSharedPointer class can be used to share a pointer to an object.
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 JSharedPointer< 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).