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
f98c436d
Commit
f98c436d
authored
4 years ago
by
Maximilian Reininghaus
Committed by
Maximilian Reininghaus
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
resemble ptsigtot() better
parent
6a282ffa
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
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Processes/UrQMD/UrQMD.cc
+36
-3
36 additions, 3 deletions
Processes/UrQMD/UrQMD.cc
Processes/UrQMD/UrQMD.h
+10
-3
10 additions, 3 deletions
Processes/UrQMD/UrQMD.h
Processes/UrQMD/urqmdInterface.F
+13
-0
13 additions, 0 deletions
Processes/UrQMD/urqmdInterface.F
with
59 additions
and
6 deletions
Processes/UrQMD/UrQMD.cc
+
36
−
3
View file @
f98c436d
...
...
@@ -30,8 +30,9 @@ using SetupProjectile = corsika::setup::StackView::StackIterator;
CrossSectionType
UrQMD
::
GetCrossSection
(
particles
::
Code
vProjectileCode
,
corsika
::
particles
::
Code
vTargetCode
,
HEPEnergyType
vLabEnergy
,
int
vAProjectile
=
1
)
{
// the following is a translation of ptsigtot() into C++
HEPEnergyType
vLabEnergy
,
int
vAProjectile
)
const
{
// the following is a (incomplete!) translation of ptsigtot() into C++
if
(
vProjectileCode
!=
particles
::
Code
::
Nucleus
&&
!
IsNucleus
(
vTargetCode
))
{
// both particles are "special"
auto
const
mProj
=
particles
::
GetMass
(
vProjectileCode
);
...
...
@@ -51,7 +52,39 @@ CrossSectionType UrQMD::GetCrossSection(particles::Code vProjectileCode,
int
one
=
1
;
int
two
=
2
;
return
sigtot_
(
one
,
two
,
sqrtS
)
*
1
_mb
;
int
three
=
3
;
double
const
totalXS
=
sigtot_
(
one
,
two
,
sqrtS
);
// subtract elastic cross-section as in ptsigtot()
int
itypmn
,
itypmx
,
iso3mn
,
iso3mx
;
if
(
ityp
<
itypTar
)
{
itypmn
=
ityp
;
itypmx
=
itypTar
;
iso3mn
=
iso3
;
iso3mx
=
iso3Tar
;
}
else
{
itypmx
=
ityp
;
itypmn
=
itypTar
;
iso3mx
=
iso3
;
iso3mn
=
iso3Tar
;
}
int
isigline
=
collclass_
(
itypmx
,
iso3mx
,
itypmn
,
iso3mn
);
int
iline
=
readsigmaln_
(
three
,
one
,
isigline
);
double
sigEl
;
double
massProj
=
mProj
/
1
_GeV
;
double
massTar
=
mTar
/
1
_GeV
;
crossx_
(
iline
,
sqrtS
,
ityp
,
iso3
,
massProj
,
itypTar
,
iso3Tar
,
massTar
,
sigEl
);
if
(
totalXS
>
sigEl
)
{
return
(
totalXS
-
sigEl
)
*
1
_mb
;
}
else
{
return
sigEl
*
0
_mb
;
}
}
else
{
int
const
Ap
=
vAProjectile
;
int
const
At
=
IsNucleus
(
vTargetCode
)
?
particles
::
GetNucleusA
(
vTargetCode
)
:
1
;
...
...
This diff is collapsed.
Click to expand it.
Processes/UrQMD/UrQMD.h
+
10
−
3
View file @
f98c436d
...
...
@@ -33,14 +33,16 @@ namespace corsika::process::UrQMD {
corsika
::
units
::
si
::
CrossSectionType
GetCrossSection
(
TParticle
const
&
,
corsika
::
particles
::
Code
)
const
;
corsika
::
units
::
si
::
CrossSectionType
GetCrossSection
(
particles
::
Code
,
particles
::
Code
,
corsika
::
units
::
si
::
HEPEnergyType
,
int
Ap
=
1
)
const
;
corsika
::
process
::
EProcessReturn
DoInteraction
(
corsika
::
setup
::
StackView
::
StackIterator
&
);
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"
);
...
...
@@ -66,13 +68,18 @@ namespace corsika::process::UrQMD {
using
nmaxDoubleArray
=
nmaxArray
<
double
>
;
extern
"C"
{
// FORTRAN functions defined in UrQMD
void
iniurqmd_
();
double
ranf_
(
int
&
);
void
cascinit_
(
int
const
&
,
int
const
&
,
int
const
&
);
double
nucrad_
(
int
const
&
);
void
urqmd_
(
int
&
);
int
pdgid_
(
int
&
,
in
t
&
);
int
pdgid_
(
int
const
&
,
int
cons
t
&
);
double
sigtot_
(
int
&
,
int
&
,
double
&
);
int
collclass_
(
int
&
,
int
&
,
int
&
,
int
&
);
double
crossx_
(
int
const
&
,
double
const
&
,
int
const
&
,
int
const
&
,
double
const
&
,
int
const
&
,
int
const
&
,
double
const
&
,
double
&
);
int
readsigmaln_
(
int
const
&
,
int
const
&
,
int
const
&
);
// defined in coms.f
extern
struct
{
...
...
This diff is collapsed.
Click to expand it.
Processes/UrQMD/urqmdInterface.F
+
13
−
0
View file @
f98c436d
...
...
@@ -432,3 +432,16 @@ c~ xsegymin=0.25d0
end
c
c
M
.
Reininghaus
,
2020-04-08
c
integer
function
ReadSigmaLn
(
ia
,
ib
,
ic
)
implicit
none
include
'comres.f'
integer
::
ia
,
ib
,
ic
ReadSigmaLn
=
SigmaLn
(
ia
,
ib
,
ic
)
end
function
ReadSigmaLn
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