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
cc13c82c
Commit
cc13c82c
authored
4 years ago
by
Andre Schmidt
Committed by
ralfulrich
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
min distance is no longer steplength
parent
95f6ad22
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!278
Magnetic Tracking
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Framework/Cascade/Cascade.h
+11
-6
11 additions, 6 deletions
Framework/Cascade/Cascade.h
Processes/ObservationPlane/ObservationPlane.cc
+1
-1
1 addition, 1 deletion
Processes/ObservationPlane/ObservationPlane.cc
with
12 additions
and
7 deletions
Framework/Cascade/Cascade.h
+
11
−
6
View file @
cc13c82c
...
...
@@ -408,7 +408,7 @@ namespace corsika::cascade {
// determine steplength for the magnetic field
// because Steplength should not be min_distance
/*
int
chargeNumber
;
if
(
corsika
::
particles
::
IsNucleus
(
vParticle
.
GetPID
()))
{
chargeNumber
=
vParticle
.
GetNuclearZ
();
...
...
@@ -419,16 +419,21 @@ namespace corsika::cascade {
auto
magneticfield
=
currentLogicalVolumeNode
->
GetModelProperties
().
GetMagneticField
(
vParticle
.
GetPosition
());
geometry
::
Vector
<
dimensionless_d
>
const
directionBefore
=
vParticle
.
GetMomentum
().
normalized
();
auto
c
=
directionBefore
.
cross
(
magneticfield
)
*
chargeNumber
*
corsika
::
units
::
constants
::
c
*
1
_eV
/
(vParticle.GetMomentum().norm() * 1_V)
(
vParticle
.
GetMomentum
().
norm
()
*
1
_V
)
;
LengthType
Steplength
=
min_distance
;
if
(
chargeNumber
!=
0
)
{
Steplength
=
sqrt
(
2
/
c
.
squaredNorm
()
*
(
sqrt
(
c
.
squaredNorm
()
*
min_distance
*
min_distance
+
1
)
-
1
));
std
::
cout
<<
"Steplength "
<<
Steplength
<<
std
::
endl
;
}
*/
}
if
(
Steplength
==
0
_m
)
{
Steplength
=
min_distance
;
}
// This formula hasnt been tested
auto
[
position
,
direction
,
L2
]
=
fTracking
.
MagneticStep
(
vParticle
,
min_distance
);
//auto [position, direction, L2] = fTracking.MagneticStep(vParticle, min_distance);
auto
[
position
,
direction
,
L2
]
=
fTracking
.
MagneticStep
(
vParticle
,
Steplength
);
//histL2(L2);
histLlog2
(
L2
);
int
pdg
=
static_cast
<
int
>
(
particles
::
GetPDG
(
vParticle
.
GetPID
()));
...
...
@@ -481,7 +486,7 @@ namespace corsika::cascade {
int
chargeNumber
=
0
;
//
int chargeNumber = 0;
if
(
corsika
::
particles
::
IsNucleus
(
vParticle
.
GetPID
()))
{
chargeNumber
=
vParticle
.
GetNuclearZ
();
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Processes/ObservationPlane/ObservationPlane.cc
+
1
−
1
View file @
cc13c82c
...
...
@@ -71,7 +71,7 @@ LengthType ObservationPlane::MaxStepLength(setup::Stack::ParticleType const& vPa
auto
magneticfield
=
currentLogicalVolumeNode
->
GetModelProperties
().
GetMagneticField
(
vParticle
.
GetPosition
());
auto
direction
=
trajectory
.
GetV0
().
normalized
();
if
(
chargeNumber
!=
0
&&
plane_
.
GetNormal
().
dot
(
trajectory
.
GetV0
().
cross
(
magneticfield
))
*
1
_s
/
1
_m
/
1
_T
>
1e-6
)
{
if
(
chargeNumber
!=
0
&&
abs
(
plane_
.
GetNormal
().
dot
(
trajectory
.
GetV0
().
cross
(
magneticfield
))
)
*
1
_s
/
1
_m
/
1
_T
>
1e-6
)
{
auto
const
*
currentLogicalVolumeNode
=
vParticle
.
GetNode
();
auto
magneticfield
=
currentLogicalVolumeNode
->
GetModelProperties
().
GetMagneticField
(
vParticle
.
GetPosition
());
auto
k
=
chargeNumber
*
corsika
::
units
::
constants
::
c
*
1
_eV
/
(
vParticle
.
GetMomentum
().
norm
()
*
1
_V
);
...
...
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