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
39e8aed6
Commit
39e8aed6
authored
2 years ago
by
Nikos Karastathis
Committed by
Maximilian Reininghaus
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix hybrid_MC.cpp
parent
3182d3a0
No related branches found
No related tags found
1 merge request
!426
Resolve "Cascade: Problems with Multiple Scattering (in combination with tracking)"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/hybrid_MC.cpp
+6
-5
6 additions, 5 deletions
examples/hybrid_MC.cpp
with
6 additions
and
5 deletions
examples/hybrid_MC.cpp
+
6
−
5
View file @
39e8aed6
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include
<corsika/framework/core/Logging.hpp>
#include
<corsika/framework/core/Logging.hpp>
#include
<corsika/framework/core/PhysicalUnits.hpp>
#include
<corsika/framework/core/PhysicalUnits.hpp>
#include
<corsika/framework/core/Cascade.hpp>
#include
<corsika/framework/core/Cascade.hpp>
#include
<corsika/framework/core/Step.hpp>
#include
<corsika/framework/core/EnergyMomentumOperations.hpp>
#include
<corsika/framework/core/EnergyMomentumOperations.hpp>
#include
<corsika/framework/random/RNGManager.hpp>
#include
<corsika/framework/random/RNGManager.hpp>
...
@@ -117,14 +118,14 @@ public:
...
@@ -117,14 +118,14 @@ public:
* @param particle
* @param particle
* @return ProcessReturn
* @return ProcessReturn
*/
*/
template
<
typename
TParticle
,
typename
TTrack
>
template
<
typename
TParticle
>
ProcessReturn
doContinuous
(
TParticle
const
&
particle
,
TTrack
const
&
,
bool
const
)
{
ProcessReturn
doContinuous
(
Step
<
TParticle
>
const
&
step
,
bool
const
)
{
auto
const
delta
=
p
article
.
getPosition
()
-
plane_
.
getCenter
();
auto
const
delta
=
step
.
getP
article
Pre
()
.
getPosition
()
-
plane_
.
getCenter
();
auto
const
n
=
plane_
.
getNormal
();
auto
const
n
=
plane_
.
getNormal
();
auto
const
proj
=
n
.
dot
(
delta
);
auto
const
proj
=
n
.
dot
(
delta
);
if
(
proj
<
-
1
_m
)
{
if
(
proj
<
-
1
_m
)
{
CORSIKA_LOG_INFO
(
"particle {} failes: proj={}, delta={}, p={}"
,
p
article
.
asString
(),
CORSIKA_LOG_INFO
(
"particle {} failes: proj={}, delta={}, p={}"
,
step
.
getP
article
Pre
()
.
asString
(),
proj
,
delta
,
particle
.
getPosition
());
proj
,
delta
,
step
.
getPosition
Post
());
throw
std
::
runtime_error
(
"particle below obs level"
);
throw
std
::
runtime_error
(
"particle below obs level"
);
}
}
return
ProcessReturn
::
Ok
;
return
ProcessReturn
::
Ok
;
...
...
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