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
68708780
Commit
68708780
authored
5 years ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
average cross-section of K0(bar) for K0Long
parent
b4f5d5b1
No related branches found
No related tags found
1 merge request
!124
Resolve "Neutral kaon mixing for UrQMD"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Processes/UrQMD/UrQMD.cc
+31
-21
31 additions, 21 deletions
Processes/UrQMD/UrQMD.cc
Processes/UrQMD/UrQMD.h
+2
-0
2 additions, 0 deletions
Processes/UrQMD/UrQMD.h
with
33 additions
and
21 deletions
Processes/UrQMD/UrQMD.cc
+
31
−
21
View file @
68708780
...
...
@@ -28,29 +28,20 @@ using SetupStack = corsika::setup::Stack;
using
SetupParticle
=
corsika
::
setup
::
Stack
::
StackIterator
;
using
SetupProjectile
=
corsika
::
setup
::
StackView
::
StackIterator
;
template
<
typename
TParticle
>
// need template here, as this is called both with
// SetupParticle as well as SetupProjectile
CrossSectionType
UrQMD
::
GetCrossSection
(
TParticle
const
&
vProjectile
,
corsika
::
particles
::
Code
vTargetCode
)
const
{
using
namespace
units
::
si
;
// TODO: energy cuts, return 0 for non-hadrons
auto
const
projectileCode
=
vProjectile
.
GetPID
();
auto
const
projectileEnergyLab
=
vProjectile
.
GetEnergy
();
CrossSectionType
UrQMD
::
GetCrossSection
(
particles
::
Code
vProjectileCode
,
corsika
::
particles
::
Code
vTargetCode
,
HEPEnergyType
vLabEnergy
,
int
vAProjectile
=
1
)
{
// the following is a translation of ptsigtot() into C++
if
(
p
rojectileCode
!=
particles
::
Code
::
Nucleus
&&
if
(
vP
rojectileCode
!=
particles
::
Code
::
Nucleus
&&
!
IsNucleus
(
vTargetCode
))
{
// both particles are "special"
auto
const
mProj
=
particles
::
GetMass
(
p
rojectileCode
);
auto
const
mProj
=
particles
::
GetMass
(
vP
rojectileCode
);
auto
const
mTar
=
particles
::
GetMass
(
vTargetCode
);
double
sqrtS
=
sqrt
(
units
::
si
::
detail
::
static_pow
<
2
>
(
mProj
)
+
units
::
si
::
detail
::
static_pow
<
2
>
(
mTar
)
+
2
*
projectileEnergyLab
*
mTar
)
*
(
1
/
1
_GeV
);
double
sqrtS
=
sqrt
(
units
::
si
::
detail
::
static_pow
<
2
>
(
mProj
)
+
units
::
si
::
detail
::
static_pow
<
2
>
(
mTar
)
+
2
*
vLabEnergy
*
mTar
)
*
(
1
/
1
_GeV
);
// we must set some UrQMD globals first...
auto
const
[
ityp
,
iso3
]
=
ConvertToUrQMD
(
p
rojectileCode
);
auto
const
[
ityp
,
iso3
]
=
ConvertToUrQMD
(
vP
rojectileCode
);
inputs_
.
spityp
[
0
]
=
ityp
;
inputs_
.
spiso3
[
0
]
=
iso3
;
...
...
@@ -62,8 +53,7 @@ CrossSectionType UrQMD::GetCrossSection(TParticle const& vProjectile,
int
two
=
2
;
return
sigtot_
(
one
,
two
,
sqrtS
)
*
1
_mb
;
}
else
{
int
const
Ap
=
(
projectileCode
==
particles
::
Code
::
Nucleus
)
?
vProjectile
.
GetNuclearA
()
:
1
;
int
const
Ap
=
vAProjectile
;
int
const
At
=
IsNucleus
(
vTargetCode
)
?
particles
::
GetNucleusA
(
vTargetCode
)
:
1
;
double
const
maxImpact
=
nucrad_
(
Ap
)
+
nucrad_
(
At
)
+
2
*
options_
.
CTParam
[
30
-
1
];
...
...
@@ -72,6 +62,26 @@ CrossSectionType UrQMD::GetCrossSection(TParticle const& vProjectile,
}
}
template
<
typename
TParticle
>
// need template here, as this is called both with
// SetupParticle as well as SetupProjectile
CrossSectionType
UrQMD
::
GetCrossSection
(
TParticle
const
&
vProjectile
,
corsika
::
particles
::
Code
vTargetCode
)
const
{
// TODO: return 0 for non-hadrons?
auto
const
projectileCode
=
vProjectile
.
GetPID
();
auto
const
projectileEnergyLab
=
vProjectile
.
GetEnergy
();
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
);
}
bool
UrQMD
::
CanInteract
(
particles
::
Code
vCode
)
const
{
// According to the manual, UrQMD can use all mesons, baryons and nucleons
// which are modeled also as input particles. I think it is safer to accept
...
...
@@ -82,7 +92,7 @@ bool UrQMD::CanInteract(particles::Code vCode) const {
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
::
K0
,
particles
::
Code
::
K0Bar
,
particles
::
Code
::
K0Long
};
return
std
::
find
(
std
::
cbegin
(
validProjectileCodes
),
std
::
cend
(
validProjectileCodes
),
vCode
)
!=
std
::
cend
(
validProjectileCodes
);
...
...
This diff is collapsed.
Click to expand it.
Processes/UrQMD/UrQMD.h
+
2
−
0
View file @
68708780
...
...
@@ -38,6 +38,8 @@ namespace corsika::process::UrQMD {
bool
CanInteract
(
particles
::
Code
)
const
;
private
:
static
corsika
::
units
::
si
::
CrossSectionType
GetCrossSection
(
particles
::
Code
,
particles
::
Code
,
corsika
::
units
::
si
::
HEPEnergyType
,
int
);
corsika
::
random
::
RNG
&
fRNG
=
corsika
::
random
::
RNGManager
::
GetInstance
().
GetRandomStream
(
"UrQMD"
);
};
...
...
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