IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Pranav Sampathkumar
corsika
Commits
ade57877
Commit
ade57877
authored
4 years ago
by
Andre Schmidt
Committed by
ralfulrich
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mal 1.0001
parent
f7175af2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Framework/Cascade/Cascade.h
+7
-8
7 additions, 8 deletions
Framework/Cascade/Cascade.h
Processes/ObservationPlane/ObservationPlane.cc
+1
-0
1 addition, 0 deletions
Processes/ObservationPlane/ObservationPlane.cc
Processes/TrackingLine/TrackingLine.h
+5
-4
5 additions, 4 deletions
Processes/TrackingLine/TrackingLine.h
with
13 additions
and
12 deletions
Framework/Cascade/Cascade.h
+
7
−
8
View file @
ade57877
...
@@ -227,12 +227,11 @@ namespace corsika::cascade {
...
@@ -227,12 +227,11 @@ namespace corsika::cascade {
std
::
cout
<<
"distance_max="
<<
distance_max
<<
std
::
endl
;
std
::
cout
<<
"distance_max="
<<
distance_max
<<
std
::
endl
;
// take minimum of geometry, interaction, decay for next step
// take minimum of geometry, interaction, decay for next step
std
::
cout
<<
"Interaction: "
<<
distance_interact
<<
std
::
endl
;
auto
min_distance
=
std
::
min
(
std
::
cout
<<
"Decay: "
<<
distance_decay
<<
std
::
endl
;
std
::
cout
<<
"ObsPlane: "
<<
distance_max
<<
std
::
endl
;
std
::
cout
<<
"Transition: "
<<
geomMaxLength
<<
std
::
endl
;
auto
const
min_distance
=
std
::
min
(
{
distance_interact
,
distance_decay
,
distance_max
,
geomMaxLength
});
{
distance_interact
,
distance_decay
,
distance_max
,
geomMaxLength
});
if
(
min_distance
==
geomMaxLength
)
{
min_distance
=
1.001
*
geomMaxLength
;
}
C8LOG_DEBUG
(
"transport particle by : {} m"
,
min_distance
/
1
_m
);
C8LOG_DEBUG
(
"transport particle by : {} m"
,
min_distance
/
1
_m
);
...
@@ -260,11 +259,11 @@ namespace corsika::cascade {
...
@@ -260,11 +259,11 @@ namespace corsika::cascade {
// Second Movement
// Second Movement
position
=
position
+
directionAfter
*
min_distance
/
2
;
position
=
position
+
directionAfter
*
min_distance
/
2
;
auto
distance
=
position
-
vParticle
.
GetPosition
();
auto
distance
=
position
-
vParticle
.
GetPosition
();
//distance.norm() != min_distance if q != 0
//
distance.norm() != min_distance if q != 0
//small error can be neglected
//
small error can be neglected
if
(
distance
.
norm
()
!=
0
_m
)
{
if
(
distance
.
norm
()
!=
0
_m
)
{
velocity
=
distance
.
normalized
()
*
velocity
.
norm
();
velocity
=
distance
.
normalized
()
*
velocity
.
norm
();
}
//no velocity update for very small steps
}
//
no velocity update for very small steps
// here the particle is actually moved along the trajectory to new position:
// here the particle is actually moved along the trajectory to new position:
// std::visit(setup::ParticleUpdate<Particle>{vParticle}, step);
// std::visit(setup::ParticleUpdate<Particle>{vParticle}, step);
...
...
This diff is collapsed.
Click to expand it.
Processes/ObservationPlane/ObservationPlane.cc
+
1
−
0
View file @
ade57877
...
@@ -88,6 +88,7 @@ LengthType ObservationPlane::MaxStepLength(setup::Stack::ParticleType const& vPa
...
@@ -88,6 +88,7 @@ LengthType ObservationPlane::MaxStepLength(setup::Stack::ParticleType const& vPa
plane_
.
GetNormal
().
dot
(
velocity
.
cross
(
magneticfield
))
*
2
*
k
))
-
plane_
.
GetNormal
().
dot
(
velocity
.
cross
(
magneticfield
))
*
2
*
k
))
-
velocity
.
dot
(
plane_
.
GetNormal
())
/
velocity
.
GetNorm
()
)
/
velocity
.
dot
(
plane_
.
GetNormal
())
/
velocity
.
GetNorm
()
)
/
(
plane_
.
GetNormal
().
dot
(
velocity
.
cross
(
magneticfield
))
*
k
);
(
plane_
.
GetNormal
().
dot
(
velocity
.
cross
(
magneticfield
))
*
k
);
if
(
MaxStepLength1
<=
0
_m
&&
MaxStepLength2
<=
0
_m
)
{
if
(
MaxStepLength1
<=
0
_m
&&
MaxStepLength2
<=
0
_m
)
{
return
std
::
numeric_limits
<
double
>::
infinity
()
*
1
_m
;
return
std
::
numeric_limits
<
double
>::
infinity
()
*
1
_m
;
}
else
if
(
MaxStepLength1
<=
0
_m
||
MaxStepLength2
<
MaxStepLength1
)
{
}
else
if
(
MaxStepLength1
<=
0
_m
||
MaxStepLength2
<
MaxStepLength1
)
{
...
...
This diff is collapsed.
Click to expand it.
Processes/TrackingLine/TrackingLine.h
+
5
−
4
View file @
ade57877
...
@@ -135,7 +135,7 @@ namespace corsika::process {
...
@@ -135,7 +135,7 @@ namespace corsika::process {
(
position
-
currentPosition
).
GetNorm
();
(
position
-
currentPosition
).
GetNorm
();
velocity1
=
direction
*
velocity
.
GetNorm
();
velocity1
=
direction
*
velocity
.
GetNorm
();
}
// instead of changing the line with magnetic field, the TimeOfIntersection() could be changed
}
// instead of changing the line with magnetic field, the TimeOfIntersection() could be changed
// line has some errors
//
using
line has some errors
for huge steps
geometry
::
Line
line
(
currentPosition
,
velocity1
);
geometry
::
Line
line
(
currentPosition
,
velocity1
);
if
(
auto
opt
=
TimeOfIntersection
(
line
,
sphere
);
opt
.
has_value
())
{
if
(
auto
opt
=
TimeOfIntersection
(
line
,
sphere
);
opt
.
has_value
())
{
...
@@ -232,9 +232,10 @@ namespace corsika::process {
...
@@ -232,9 +232,10 @@ namespace corsika::process {
min
*
k
;
min
*
k
;
// Second Movement
// Second Movement
position
=
position
+
directionAfter
*
velocity
.
norm
()
*
min
/
2
;
position
=
position
+
directionAfter
*
velocity
.
norm
()
*
min
/
2
;
geometry
::
Vector
<
dimensionless_d
>
const
direction
=
(
position
-
currentPosition
)
/
if
((
position
-
currentPosition
).
GetNorm
()
!=
0
_m
)
{
(
position
-
currentPosition
).
GetNorm
();
geometry
::
Vector
<
dimensionless_d
>
const
direction
=
(
position
-
currentPosition
).
normalized
();
velocity
=
direction
*
velocity
.
GetNorm
();
velocity
=
direction
*
velocity
.
norm
();
}
// no velocity update for very small steps
geometry
::
Line
lineWithB
(
currentPosition
,
velocity
);
geometry
::
Line
lineWithB
(
currentPosition
,
velocity
);
return
std
::
make_tuple
(
geometry
::
Trajectory
<
geometry
::
Line
>
(
lineWithoutB
,
min
),
return
std
::
make_tuple
(
geometry
::
Trajectory
<
geometry
::
Line
>
(
lineWithoutB
,
min
),
...
...
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