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
2c8b209a
Commit
2c8b209a
authored
5 years ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
added radiative losses with constant b
parent
b34661b5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!142
Radiative losses with constant b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Documentation/Examples/stopping_power.cc
+1
-1
1 addition, 1 deletion
Documentation/Examples/stopping_power.cc
Processes/EnergyLoss/EnergyLoss.cc
+18
-4
18 additions, 4 deletions
Processes/EnergyLoss/EnergyLoss.cc
Processes/EnergyLoss/EnergyLoss.h
+6
-2
6 additions, 2 deletions
Processes/EnergyLoss/EnergyLoss.h
with
25 additions
and
7 deletions
Documentation/Examples/stopping_power.cc
+
1
−
1
View file @
2c8b209a
...
...
@@ -76,7 +76,7 @@ int main() {
beamCode
,
E0
,
plab
,
pos
,
0
_ns
});
auto
const
p
=
stack
.
GetNextParticle
();
HEPEnergyType
dE
=
eLoss
.
BetheBloch
(
p
,
1
_g
/
square
(
1
_cm
));
HEPEnergyType
dE
=
eLoss
.
TotalEnergyLoss
(
p
,
1
_g
/
square
(
1
_cm
));
file
<<
P0
/
mass
<<
"
\t
"
<<
-
dE
/
1
_eV
<<
std
::
endl
;
}
}
This diff is collapsed.
Click to expand it.
Processes/EnergyLoss/EnergyLoss.cc
+
18
−
4
View file @
2c8b209a
...
...
@@ -146,6 +146,20 @@ namespace corsika::process::energy_loss {
(
0.5
*
log
(
aux
)
-
beta2
-
Cadj
/
Z
-
delta
/
2
+
barkas
+
bloch
)
*
dX
;
}
// radiation losses according to PDG 2018, ch. 33 ref. [5]
HEPEnergyType
EnergyLoss
::
RadiationLosses
(
SetupParticle
const
&
vP
,
GrammageType
const
vDX
)
{
// simple-minded hard-coded value for b(E) inspired by data from
// http://pdg.lbl.gov/2018/AtomicNuclearProperties/ for N and O.
auto
constexpr
b
=
3.0
*
1e-6
*
square
(
1
_cm
)
/
1
_g
;
return
-
vP
.
GetEnergy
()
*
b
*
vDX
;
}
HEPEnergyType
EnergyLoss
::
TotalEnergyLoss
(
SetupParticle
const
&
vP
,
GrammageType
const
vDX
)
{
return
BetheBloch
(
vP
,
vDX
)
+
RadiationLosses
(
vP
,
vDX
);
}
process
::
EProcessReturn
EnergyLoss
::
DoContinuous
(
SetupParticle
&
p
,
SetupTrack
const
&
t
)
{
if
(
p
.
GetChargeNumber
()
==
0
)
return
process
::
EProcessReturn
::
eOk
;
...
...
@@ -153,7 +167,7 @@ namespace corsika::process::energy_loss {
p
.
GetNode
()
->
GetModelProperties
().
IntegratedGrammage
(
t
,
t
.
GetLength
());
cout
<<
"EnergyLoss "
<<
p
.
GetPID
()
<<
", z="
<<
p
.
GetChargeNumber
()
<<
", dX="
<<
dX
/
1
_g
*
square
(
1
_cm
)
<<
"g/cm2"
<<
endl
;
HEPEnergyType
dE
=
BetheBloch
(
p
,
dX
);
HEPEnergyType
dE
=
TotalEnergyLoss
(
p
,
dX
);
auto
E
=
p
.
GetEnergy
();
const
auto
Ekin
=
E
-
p
.
GetMass
();
auto
Enew
=
E
+
dE
;
...
...
@@ -173,14 +187,14 @@ namespace corsika::process::energy_loss {
return
status
;
}
units
::
si
::
LengthType
EnergyLoss
::
MaxStepLength
(
SetupParticle
const
&
vParticle
,
SetupTrack
const
&
vTrack
)
const
{
LengthType
EnergyLoss
::
MaxStepLength
(
SetupParticle
const
&
vParticle
,
SetupTrack
const
&
vTrack
)
const
{
if
(
vParticle
.
GetChargeNumber
()
==
0
)
{
return
units
::
si
::
meter
*
std
::
numeric_limits
<
double
>::
infinity
();
}
auto
constexpr
dX
=
1
_g
/
square
(
1
_cm
);
auto
const
dE
=
-
BetheBloch
(
vParticle
,
dX
);
// dE > 0
auto
const
dE
=
-
TotalEnergyLoss
(
vParticle
,
dX
);
// dE > 0
//~ auto const Ekin = vParticle.GetEnergy() - vParticle.GetMass();
auto
const
maxLoss
=
0.01
*
vParticle
.
GetEnergy
();
auto
const
maxGrammage
=
maxLoss
/
dE
*
dX
;
...
...
This diff is collapsed.
Click to expand it.
Processes/EnergyLoss/EnergyLoss.h
+
6
−
2
View file @
2c8b209a
...
...
@@ -38,8 +38,12 @@ namespace corsika::process::energy_loss {
units
::
si
::
HEPEnergyType
GetTotal
()
const
{
return
fEnergyLossTot
;
}
void
PrintProfile
()
const
;
static
units
::
si
::
HEPEnergyType
BetheBloch
(
setup
::
Stack
::
ParticleType
const
&
p
,
const
units
::
si
::
GrammageType
dX
);
static
units
::
si
::
HEPEnergyType
BetheBloch
(
setup
::
Stack
::
ParticleType
const
&
,
const
units
::
si
::
GrammageType
);
static
units
::
si
::
HEPEnergyType
RadiationLosses
(
setup
::
Stack
::
ParticleType
const
&
,
const
units
::
si
::
GrammageType
);
static
units
::
si
::
HEPEnergyType
TotalEnergyLoss
(
setup
::
Stack
::
ParticleType
const
&
,
const
units
::
si
::
GrammageType
);
private
:
int
GetXbin
(
setup
::
Stack
::
ParticleType
const
&
,
setup
::
Trajectory
const
&
,
...
...
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