Jpp test-rotations-old-533-g2bdbdb559
the software that should make you happy
Loading...
Searching...
No Matches
JRadiationSource.hh
Go to the documentation of this file.
1#ifndef __JPHYSICS__JRADIATIONSOURCE__
2#define __JPHYSICS__JRADIATIONSOURCE__
3
4#include <memory>
5
6#include "TRandom3.h"
7
8#include "JLang/JObjectID.hh"
9
12#include "JPhysics/JDIS.hh"
14
15
16/**
17 * \author mdejong
18 */
19
20namespace JPHYSICS {}
21namespace JPP { using namespace JPHYSICS; }
22
23namespace JPHYSICS {
24
25 using JLANG::JObjectID;
26
27 /**
28 * Interface for calculation of inverse interaction length and shower energy.
29 */
31 public JObjectID
32 {
33 public:
34 /**
35 * Constructor.
36 *
37 * \param id radiation identifier
38 */
39 JRadiationInterface(const int id) :
40 JObjectID(id)
41 {}
42
43
44 /**
45 * Virtual destructor.
46 */
48 {}
49
50
51 /**
52 * Get inverse interaction length.
53 *
54 * \param E muon energy [GeV]
55 * \return inverse interaction length [m^-1]
56 */
57 virtual double getInverseInteractionLength(const double E) const = 0;
58
59
60 /**
61 * Get energy of shower.
62 *
63 * \param E muon energy [GeV]
64 * \return shower energy [GeV]
65 */
66 virtual double getEnergyOfShower(const double E) const = 0;
67
68
69 /**
70 * Get RMS of scattering angle.
71 *
72 * \param E muon energy [GeV]
73 * \param Es shower energy [GeV]
74 * \return RMS scattering angle [rad]
75 */
76 virtual double getThetaRMS(const double E, const double Es) const = 0;
77 };
78
79
80 /**
81 * Implementation for calculation of inverse interaction length and shower energy.
82 *
83 * This class implements the JRadiationInterface interface.
84 */
87 public std::shared_ptr<JRadiation>,
89 {
90 public:
91 /**
92 * Constructor.
93 *
94 * \param id radiation identifier
95 * \param radiation radiation
96 * \param density mass density of radiation material [gr/cm³]
97 * \param source radiation type
98 */
99 JRadiationSource(const int id,
100 const std::shared_ptr<JRadiation>& radiation,
101 const double density,
102 const JRadiation::radiation_type source) :
104 std::shared_ptr<JRadiation>(radiation),
105 radiation_type(source),
106 rho(density)
107 {}
108
109
110 /**
111 * Get inverse interaction length.
112 *
113 * \param E muon energy [GeV]
114 * \return inverse interaction length [m^-1]
115 */
116 virtual double getInverseInteractionLength(const double E) const override
117 {
118 return (get()->*sigma)(E) * rho * 1.0e6;
119 }
120
121
122 /**
123 * Get energy of shower.
124 *
125 * \param E muon energy [GeV]
126 * \return shower energy [GeV]
127 */
128 virtual double getEnergyOfShower(const double E) const override
129 {
130 return (get()->*eloss)(E);
131 }
132
133
134 /**
135 * Get RMS of scattering angle.
136 *
137 * \param E muon energy [GeV]
138 * \param Es shower energy [GeV]
139 * \return RMS scattering angle [rad]
140 */
141 virtual double getThetaRMS(const double E, const double Es) const override
142 {
143 return (get()->*theta)(E, Es/E);
144 }
145
146 protected:
147 const double rho;
148 };
149
150
151 /**
152 * Implementation for calculation of inverse interaction length and shower energy due to deep-inelastic muon-nucleon scattering.
153 *
154 * This class implements the JRadiationInterface interface.
155 */
157 public JRadiationInterface,
158 public JDIS
159 {
160 public:
161 /**
162 * Constructor.
163 *
164 * \param id radiation identifier
165 * \param density mass density of radiation material [gr/cm³]
166 */
167 JDISSource(const int id,
168 const double density) :
170 rho(density)
171 {}
172
173
174 /**
175 * Get inverse interaction length.
176 *
177 * \param E muon energy [GeV]
178 * \return inverse interaction length [m^-1]
179 */
180 virtual double getInverseInteractionLength(const double E) const override
181 {
182 return this->getCrossSection(E) * (rho / NUCLEON_MOLAR_MASS) * AVOGADRO * 1.0e2;
183 }
184
185
186 /**
187 * Get energy of shower.
188 *
189 * \param E muon energy [GeV]
190 * \return shower energy [GeV]
191 */
192 virtual double getEnergyOfShower(const double E) const override
193 {
194 return this->getE(E);
195 }
196
197
198 /**
199 * Get RMS of scattering angle.
200 *
201 * \param E muon energy [GeV]
202 * \param Es shower energy [GeV]
203 * \return RMS scattering angle [rad]
204 */
205 virtual double getThetaRMS(const double E, const double Es) const override
206 {
207 return static_cast<const JDIS*>(this)->getThetaRMS(E, Es/E);
208 }
209
210 protected:
211 const double rho;
212 };
213
214
215 /**
216 * Implementation for calculation of inverse interaction length and shower energy due to delta-rays from muon.
217 *
218 * This class implements the JRadiationInterface interface.
219 */
222 {
223 public:
224 /**
225 * Constructor.
226 *
227 * \param id radiation identifier
228 * \param density mass density of radiation material [gr/cm³]
229 * \param A atomic mass
230 * \param Z atomic number
231 * \param Tmin minimal kunetic energy [GeV]
232 */
233 JDeltaRaysSource(const int id,
234 const double density,
235 const double Tmin) :
237 rho(density),
238 Tmin(Tmin)
239 {}
240
241
242 /**
243 * Get inverse interaction length.
244 *
245 * \param E muon energy [GeV]
246 * \return inverse interaction length [m^-1]
247 */
248 virtual double getInverseInteractionLength(const double E) const override
249 {
250 const double Tmax = JDeltaRays::getTmax(E, MASS_MUON);
251
252 return JDeltaRays::getCount(E, MASS_MUON, Tmin, Tmax) * rho * 1.0e2;
253 }
254
255
256 /**
257 * Get energy of shower.
258 *
259 * \param E muon energy [GeV]
260 * \return shower energy [GeV]
261 */
262 virtual double getEnergyOfShower(const double E) const override
263 {
264 const double Tmax = JDeltaRays::getTmax(E, MASS_MUON);
265
266 const double xmin = 1.0 / Tmax;
267 const double xmax = 1.0 / Tmin;
268
269 return 1.0 / gRandom->Uniform(xmin, xmax);
270 }
271
272
273 /**
274 * Get RMS of scattering angle.
275 *
276 * \param E muon energy [GeV]
277 * \param Es shower energy [GeV]
278 * \return RMS scattering angle [rad]
279 */
280 virtual double getThetaRMS(const double E, const double Es) const override
281 {
282 return 0.0;
283 }
284
285 protected:
286 const double rho;
287 const double Tmin; //!< minimal kinetic energy [GeV]
288 };
289}
290
291#endif
Deep-inelastic muon-nucleon scattering.
Physics constants.
Muon radiative cross sections.
Auxiliary class for object identification.
Definition JObjectID.hh:25
Implementation for calculation of inverse interaction length and shower energy due to deep-inelastic ...
virtual double getThetaRMS(const double E, const double Es) const override
Get RMS of scattering angle.
virtual double getEnergyOfShower(const double E) const override
Get energy of shower.
virtual double getInverseInteractionLength(const double E) const override
Get inverse interaction length.
JDISSource(const int id, const double density)
Constructor.
Deep-inelastic muon-nucleon scattering.
Definition JDIS.hh:31
double getCrossSection(const double E) const
Get cross section.
Definition JDIS.hh:46
double getE(const double E) const
Get shower energy.
Definition JDIS.hh:78
Implementation for calculation of inverse interaction length and shower energy due to delta-rays from...
virtual double getThetaRMS(const double E, const double Es) const override
Get RMS of scattering angle.
virtual double getEnergyOfShower(const double E) const override
Get energy of shower.
virtual double getInverseInteractionLength(const double E) const override
Get inverse interaction length.
const double Tmin
minimal kinetic energy [GeV]
JDeltaRaysSource(const int id, const double density, const double Tmin)
Constructor.
Interface for calculation of inverse interaction length and shower energy.
JRadiationInterface(const int id)
Constructor.
virtual double getEnergyOfShower(const double E) const =0
Get energy of shower.
virtual double getThetaRMS(const double E, const double Es) const =0
Get RMS of scattering angle.
virtual ~JRadiationInterface()
Virtual destructor.
virtual double getInverseInteractionLength(const double E) const =0
Get inverse interaction length.
Implementation for calculation of inverse interaction length and shower energy.
JRadiationSource(const int id, const std::shared_ptr< JRadiation > &radiation, const double density, const JRadiation::radiation_type source)
Constructor.
virtual double getInverseInteractionLength(const double E) const override
Get inverse interaction length.
virtual double getThetaRMS(const double E, const double Es) const override
Get RMS of scattering angle.
virtual double getEnergyOfShower(const double E) const override
Get energy of shower.
Auxiliary class for the calculation of the muon radiative cross sections.
Definition JRadiation.hh:36
Auxiliary methods for light properties of deep-sea water.
static const double AVOGADRO
Avogadro's number.
static const double NUCLEON_MOLAR_MASS
nucleon molar mass [g/mol]
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static double getCount(const double E, const double M, const double Tmin, const double Tmax, const double Z, const double A, const JFormFactor_t &F, const int N=1000000)
Get number of delta-rays per unit track length for an ionising particle with given energy and given m...
static double getTmax(const double E, const double M)
Get maximum delta-ray kinetic energy for given lepton energy and mass.
Definition JDeltaRays.hh:79
Auxiliary data structure for handling member methods of class JRadiation.
double(JRadiation::* theta)(const double, const double) const
scattering angle method
double(JRadiation::* eloss)(const double) const
energy loss method
double(JRadiation::* sigma)(const double) const
total cross section method