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
Commits
60a345b5
Commit
60a345b5
authored
5 years ago
by
Maximilian Reininghaus
Committed by
Maximilian Reininghaus
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
use tabulated cross-sections in UrQMD
parent
8a9ba767
No related branches found
No related tags found
2 merge requests
!234
WIP: Initial example of python as script language from C++
,
!205
UrQMD improvements
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Processes/UrQMD/UrQMD.cc
+18
-16
18 additions, 16 deletions
Processes/UrQMD/UrQMD.cc
with
18 additions
and
16 deletions
Processes/UrQMD/UrQMD.cc
+
18
−
16
View file @
60a345b5
...
...
@@ -185,22 +185,24 @@ CrossSectionType UrQMD::GetCrossSection(particles::Code vProjectileCode,
template
<
typename
TParticle
>
// need template here, as this is called both with
// SetupParticle as well as SetupProjectile
CrossSectionType
UrQMD
::
GetCrossSection
(
TParticle
const
&
vP
rojectile
,
corsika
::
particles
::
Code
vT
argetCode
)
const
{
CrossSectionType
UrQMD
::
GetCrossSection
(
TParticle
const
&
p
rojectile
,
corsika
::
particles
::
Code
t
argetCode
)
const
{
// TODO: return 0 for non-hadrons?
auto
const
projectileCode
=
vP
rojectile
.
GetPID
();
auto
const
projectileEnergyLab
=
vP
rojectile
.
GetEnergy
();
auto
const
projectileCode
=
p
rojectile
.
GetPID
();
auto
const
projectileEnergyLab
=
p
rojectile
.
GetEnergy
();
if
(
projectileCode
==
particles
::
Code
::
K0Long
)
{
return
0.5
*
(
GetCrossSection
(
particles
::
Code
::
K0
,
vTargetCode
,
projectileEnergyLab
)
+
GetCrossSection
(
particles
::
Code
::
K0Bar
,
vTargetCode
,
projectileEnergyLab
));
}
return
GetTabulatedCrossSection
(
projectileCode
,
targetCode
,
projectileEnergyLab
);
// if (projectileCode == particles::Code::K0Long) {
// return 0.5 *
// (GetCrossSection(particles::Code::K0, vTargetCode, projectileEnergyLab) +
// GetCrossSection(particles::Code::K0Bar, vTargetCode, projectileEnergyLab));
// }
int
const
Ap
=
(
projectileCode
==
particles
::
Code
::
Nucleus
)
?
vProjectile
.
GetNuclearA
()
:
1
;
return
GetCrossSection
(
projectileCode
,
vTargetCode
,
projectileEnergyLab
,
Ap
);
//
int const Ap =
//
(projectileCode == particles::Code::Nucleus) ? vProjectile.GetNuclearA() : 1;
//
return GetCrossSection(projectileCode, vTargetCode, projectileEnergyLab, Ap);
}
bool
UrQMD
::
CanInteract
(
particles
::
Code
vCode
)
const
{
...
...
@@ -210,10 +212,10 @@ bool UrQMD::CanInteract(particles::Code vCode) const {
// TODO: Charmed mesons should be added to the list, too
static
particles
::
Code
const
validProjectileCodes
[]
=
{
particles
::
Code
::
Nucleus
,
particles
::
Code
::
Proton
,
particles
::
Code
::
AntiProton
,
particles
::
Code
::
Neutron
,
particles
::
Code
::
AntiNeutron
,
particles
::
Code
::
PiPlus
,
particles
::
Code
::
PiMinus
,
particles
::
Code
::
KPlus
,
particles
::
Code
::
KMinus
,
particles
::
Code
::
K0
,
particles
::
Code
::
K0Bar
,
particles
::
Code
::
K0Long
};
particles
::
Code
::
Proton
,
particles
::
Code
::
AntiProton
,
particles
::
Code
::
Neutron
,
particles
::
Code
::
AntiNeutron
,
particles
::
Code
::
PiPlus
,
particles
::
Code
::
PiMinus
,
particles
::
Code
::
KPlus
,
particles
::
Code
::
KMinus
,
particles
::
Code
::
K0Short
,
particles
::
Code
::
K0Long
};
return
std
::
find
(
std
::
cbegin
(
validProjectileCodes
),
std
::
cend
(
validProjectileCodes
),
vCode
)
!=
std
::
cend
(
validProjectileCodes
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment