IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Air Shower Physics
corsika
Merge requests
!594
Neutrino interactions with pythia 8310
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Neutrino interactions with pythia 8310
neutrino-interactions-with-pythia-8245
into
master
Overview
21
Commits
18
Pipelines
14
Changes
1
All threads resolved!
Show all comments
Merged
Felix Riehn
requested to merge
neutrino-interactions-with-pythia-8245
into
master
1 year ago
Overview
21
Commits
18
Pipelines
14
Changes
1
All threads resolved!
Show all comments
Expand
Never mind the branch name. This uses the latest pythia 8.310.
Edited
1 year ago
by
Felix Riehn
0
0
Merge request reports
Viewing commit
9410a5f7
Prev
Next
Show latest version
1 file
+
8
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
9410a5f7
added comment about neutrino cross section, check minimal energy
· 9410a5f7
Felix Riehn
authored
1 year ago
corsika/modules/pythia8/NeutrinoInteraction.hpp
0 → 100644
+
85
−
0
Options
/*
* (c) Copyright 2024 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
#include
<tuple>
#include
<boost/filesystem/path.hpp>
#include
<corsika/framework/utility/CorsikaData.hpp>
#include
<corsika/framework/core/ParticleProperties.hpp>
#include
<corsika/framework/core/PhysicalUnits.hpp>
#include
<corsika/framework/random/RNGManager.hpp>
#include
<corsika/framework/process/InteractionProcess.hpp>
#include
<corsika/modules/pythia8/Pythia8.hpp>
namespace
corsika
::
pythia8
{
using
HEPEnergyTypeSqr
=
decltype
(
1
_GeV
*
1
_GeV
);
class
NeutrinoInteraction
:
public
InteractionProcess
<
NeutrinoInteraction
>
{
public:
NeutrinoInteraction
(
bool
const
&
handleNC
=
true
,
bool
const
&
handleCC
=
true
,
bool
const
print_listing
=
false
);
~
NeutrinoInteraction
();
/**
* Returns inelastic (production) cross section.
*
* This cross section must correspond to the process described in doInteraction.
* Allowed targets are: nuclei or single nucleons (p,n,hydrogen).
*
* @param projectile is the Code of the projectile
* @param target is the Code of the target
* @param projectileP4 is the four momentum of the projectile
* @param targetP4 is the four momentum of the target
*
* @return inelastic cross section
*/
/* NOTE: the cross section for neutrino interactions is fixed to an arbitrary small
* value. This is needed just so the interaction process is not skipped in the process
* loop when the interaction is forced. If needed the exact value could be made
* accessible. */
CrossSectionType
getCrossSection
(
Code
const
projectile
,
Code
const
target
,
FourMomentum
const
&
projectileP4
,
FourMomentum
const
&
targetP4
)
const
{
if
(
isValid
(
projectile
,
target
,
projectileP4
,
targetP4
))
return
cross_section_
;
else
return
CrossSectionType
::
zero
();
};
bool
isValid
(
Code
const
projectileId
,
[[
maybe_unused
]]
Code
const
targetId
,
FourMomentum
const
&
projectileP4
,
FourMomentum
const
&
targetP4
)
const
{
auto
const
S
=
(
projectileP4
+
targetP4
).
getNormSqr
();
return
is_neutrino
(
projectileId
)
&&
(
is_nucleus
(
targetId
)
||
targetId
==
Code
::
Proton
||
targetId
==
Code
::
Neutron
)
&&
S
>=
minQ2_
;
};
/**
* In this function PYTHIA is called to produce one event. The
* event is copied (and boosted) into the shower lab frame.
*/
template
<
typename
TView
>
void
doInteraction
(
TView
&
output
,
Code
const
projectileId
,
Code
const
targetId
,
FourMomentum
const
&
projectileP4
,
FourMomentum
const
&
targetP4
);
private
:
CrossSectionType
const
cross_section_
=
4
_nb
;
int
count_
=
0
;
bool
const
print_listing_
=
false
;
bool
const
handle_nc_
=
true
;
bool
const
handle_cc_
=
true
;
HEPEnergyTypeSqr
minQ2_
=
25
_GeV
*
1
_GeV
;
Pythia8
::
Pythia
pythiaMain_
;
};
}
// namespace corsika::pythia8
#include
<corsika/detail/modules/pythia8/NeutrinoInteraction.inl>
\ No newline at end of file
Loading