CORSIKA8
0.0.0
The framework to simulate particle cascades for astroparticle physics
Interaction.hpp
1
/*
2
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
3
*
4
* This software is distributed under the terms of the GNU General Public
5
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
6
* the license.
7
*/
8
9
#pragma once
10
11
#include <
corsika/framework/core/ParticleProperties.hpp
>
12
#include <
corsika/framework/core/PhysicalUnits.hpp
>
13
#include <corsika/framework/random/RNGManager.hpp>
14
#include <corsika/framework/process/InteractionProcess.hpp>
15
#include <corsika/modules/qgsjetII/ParticleConversion.hpp>
16
#include <
corsika/framework/utility/CorsikaData.hpp
>
17
18
#include <boost/filesystem/path.hpp>
19
20
#include <qgsjet-II-04.hpp>
21
#include <string>
22
23
namespace
corsika::qgsjetII
{
24
25
class
Interaction
:
public
corsika::InteractionProcess
<Interaction> {
26
27
public
:
28
Interaction
(boost::filesystem::path dataPath = corsika_data(
"QGSJetII"
));
29
~
Interaction
();
30
31
bool
wasInitialized() {
return
initialized_; }
32
int
getMaxTargetMassNumber()
const
{
return
maxMassNumber_; }
33
bool
isValidTarget(corsika::Code TargetId)
const
{
34
return
is_nucleus
(TargetId) && (
get_nucleus_A
(TargetId) < maxMassNumber_);
35
}
36
37
CrossSectionType
getCrossSection(
const
Code,
const
Code,
const
HEPEnergyType
,
38
const
unsigned
int
Abeam = 0,
39
const
unsigned
int
Atarget = 0)
const
;
40
41
template
<
typename
TParticle>
42
GrammageType
getInteractionLength(TParticle
const
&)
const
;
43
49
template
<
typename
TSecondaryView>
50
void
doInteraction
(TSecondaryView&);
51
52
private
:
53
int
count_ = 0;
54
bool
initialized_ =
false
;
55
QgsjetIIHadronType alternate_ =
56
QgsjetIIHadronType::PiPlusType;
// for pi0, rho0 projectiles
57
58
corsika::default_prng_type& rng_ =
59
corsika::RNGManager<>::getInstance
().
getRandomStream
(
"qgsjet"
);
60
const
int
maxMassNumber_ = 208;
61
};
62
63
}
// namespace corsika::qgsjetII
64
65
#include <corsika/detail/modules/qgsjetII/Interaction.inl>
PhysicalUnits.hpp
Import and extend the phys::units package.
corsika::get_nucleus_A
int constexpr get_nucleus_A(Code const)
returns A for hard-coded nucleus, otherwise 0
corsika::qgsjetII::Interaction::doInteraction
void doInteraction(TSecondaryView &)
In this function QGSJETII is called to produce one event.
phys::units::quantity< area_d, double >
CorsikaData.hpp
returns the full path of the file filename within the CORSIKA_DATA directory
corsika::is_nucleus
bool constexpr is_nucleus(Code const)
true iff the particle is a hard-coded nucleus or Code::Nucleus
corsika::RNGManager
Definition:
RNGManager.hpp:26
corsika::qgsjetII
Definition:
Interaction.hpp:23
corsika::qgsjetII::Interaction
Definition:
Interaction.hpp:25
ParticleProperties.hpp
Interface to particle properties.
corsika::InteractionProcess
Process describing the interaction of particles.
Definition:
InteractionProcess.hpp:52
corsika::RNGManager::getRandomStream
prng_type & getRandomStream(string_type const &streamName)
corsika
modules
qgsjetII
Interaction.hpp
Generated by
1.8.13