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
7c0743da
Commit
7c0743da
authored
2 years ago
by
Nikos Karastathis
Browse files
Options
Downloads
Patches
Plain Diff
get rid of counters in CoREAS.hpp & exclude code from testing - it is not necessary
parent
0fe17fc5
No related branches found
No related tags found
1 merge request
!329
Radio interface
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
corsika/detail/modules/radio/CoREAS.inl
+10
-8
10 additions, 8 deletions
corsika/detail/modules/radio/CoREAS.inl
corsika/detail/modules/radio/ZHS.inl
+1
-0
1 addition, 0 deletions
corsika/detail/modules/radio/ZHS.inl
corsika/modules/radio/CoREAS.hpp
+0
-5
0 additions, 5 deletions
corsika/modules/radio/CoREAS.hpp
with
11 additions
and
13 deletions
corsika/detail/modules/radio/CoREAS.inl
+
10
−
8
View file @
7c0743da
...
@@ -21,12 +21,9 @@ namespace corsika {
...
@@ -21,12 +21,9 @@ namespace corsika {
auto
const
startTime_
{
step
.
getTimePre
()};
// time at the start point of the track. I
auto
const
startTime_
{
step
.
getTimePre
()};
// time at the start point of the track. I
// should use something similar to fCoreHitTime (?)
// should use something similar to fCoreHitTime (?)
auto
const
endTime_
{
step
.
getTimePost
()};
// time at end point of track.
auto
const
endTime_
{
step
.
getTimePost
()};
// time at end point of track.
trackcounter_
+=
1
;
// CORSIKA_LOG_DEBUG("Number of total tracks for radio: {} ", trackcounter_);
if
(
startTime_
==
endTime_
)
{
if
(
startTime_
==
endTime_
)
{
tinycounter_
+=
1
;
CORSIKA_LOG_ERROR
(
"Time at the start and end of the track coincides! - radio"
);
// CORSIKA_LOG_ERROR("Tiny track number: {} ", tinycounter_);
return
ProcessReturn
::
Ok
;
return
ProcessReturn
::
Ok
;
}
else
{
}
else
{
...
@@ -80,6 +77,7 @@ namespace corsika {
...
@@ -80,6 +77,7 @@ namespace corsika {
// check if preDoppler has become zero in case of refractive index of unity
// check if preDoppler has become zero in case of refractive index of unity
// because of numerical limitations here you might need std::fabs(preDoppler)
// because of numerical limitations here you might need std::fabs(preDoppler)
// in the if statement - same with post & mid
// in the if statement - same with post & mid
// LCOV_EXCL_START
if
(
preDoppler_
==
0
)
{
if
(
preDoppler_
==
0
)
{
CORSIKA_LOG_WARN
(
"preDoppler factor numerically zero in COREAS"
);
CORSIKA_LOG_WARN
(
"preDoppler factor numerically zero in COREAS"
);
// redo calculation with higher precision
// redo calculation with higher precision
...
@@ -97,6 +95,7 @@ namespace corsika {
...
@@ -97,6 +95,7 @@ namespace corsika {
indexL_
*
(
betaX_
*
startX_
+
betaY_
*
startY_
+
betaZ_
*
startZ_
);
indexL_
*
(
betaX_
*
startX_
+
betaY_
*
startY_
+
betaZ_
*
startZ_
);
preDoppler_
=
doppler
;
preDoppler_
=
doppler
;
}
}
// LCOV_EXCL_STOP
// calculate postDoppler factor
// calculate postDoppler factor
double
postDoppler_
{
1.0
-
paths2
[
i
].
refractive_index_source_
*
double
postDoppler_
{
1.0
-
paths2
[
i
].
refractive_index_source_
*
...
@@ -104,6 +103,7 @@ namespace corsika {
...
@@ -104,6 +103,7 @@ namespace corsika {
// check if postDoppler has become zero in case of refractive index of unity
// check if postDoppler has become zero in case of refractive index of unity
// because of numerical limitations
// because of numerical limitations
// LCOV_EXCL_START
if
(
postDoppler_
==
0
)
{
if
(
postDoppler_
==
0
)
{
CORSIKA_LOG_WARN
(
"postDoppler factor numerically zero in CoREAS"
);
CORSIKA_LOG_WARN
(
"postDoppler factor numerically zero in CoREAS"
);
// redo calculation with higher precision
// redo calculation with higher precision
...
@@ -120,6 +120,7 @@ namespace corsika {
...
@@ -120,6 +120,7 @@ namespace corsika {
1.0
l
-
indexL_
*
(
betaX_
*
endX_
+
betaY_
*
endY_
+
betaZ_
*
endZ_
);
1.0
l
-
indexL_
*
(
betaX_
*
endX_
+
betaY_
*
endY_
+
betaZ_
*
endZ_
);
postDoppler_
=
doppler
;
postDoppler_
=
doppler
;
}
}
// LCOV_EXCL_STOP
// calculate receive time for startpoint (aka time delay)
// calculate receive time for startpoint (aka time delay)
auto
startPointReceiveTime_
{
auto
startPointReceiveTime_
{
...
@@ -141,10 +142,7 @@ namespace corsika {
...
@@ -141,10 +142,7 @@ namespace corsika {
if
((
paths1
[
i
].
refractive_index_destination_
>
1
)
&&
if
((
paths1
[
i
].
refractive_index_destination_
>
1
)
&&
((
std
::
fabs
(
preDoppler_
)
<
approxThreshold_
)
||
((
std
::
fabs
(
preDoppler_
)
<
approxThreshold_
)
||
(
std
::
fabs
(
postDoppler_
)
<
approxThreshold_
)))
{
(
std
::
fabs
(
postDoppler_
)
<
approxThreshold_
)))
{
CORSIKA_LOG_DEBUG
(
"Used ZHS-like approximation in CoREAS - radio"
);
// CORSIKA_LOG_INFO("used ZHS-like approximation in CoREAS");
zhscounter_
+=
1
;
// CORSIKA_LOG_INFO("Used ZHS approx: {} out of {} times", zhscounter_, trackcounter_);
// clear the existing paths for this particle and track, since we don't need
// clear the existing paths for this particle and track, since we don't need
// them anymore
// them anymore
...
@@ -170,6 +168,7 @@ namespace corsika {
...
@@ -170,6 +168,7 @@ namespace corsika {
path
.
refractive_index_source_
*
beta_
.
dot
(
path
.
emit_
)};
path
.
refractive_index_source_
*
beta_
.
dot
(
path
.
emit_
)};
// check if midDoppler has become zero because of numerical limitations
// check if midDoppler has become zero because of numerical limitations
// LCOV_EXCL_START
if
(
midDoppler_
==
0
)
{
if
(
midDoppler_
==
0
)
{
CORSIKA_LOG_WARN
(
"midDoppler factor numerically zero in COREAS"
);
CORSIKA_LOG_WARN
(
"midDoppler factor numerically zero in COREAS"
);
// redo calculation with higher precision
// redo calculation with higher precision
...
@@ -186,6 +185,7 @@ namespace corsika {
...
@@ -186,6 +185,7 @@ namespace corsika {
1.0
l
-
indexL_
*
(
betaX_
*
midX_
+
betaY_
*
midY_
+
betaZ_
*
midZ_
);
1.0
l
-
indexL_
*
(
betaX_
*
midX_
+
betaY_
*
midY_
+
betaZ_
*
midZ_
);
midDoppler_
=
doppler
;
midDoppler_
=
doppler
;
}
}
// LCOV_EXCL_STOP
// change the values of the receive unit vectors of start and end
// change the values of the receive unit vectors of start and end
ReceiveVectorStart_
=
path
.
receive_
;
ReceiveVectorStart_
=
path
.
receive_
;
...
@@ -371,9 +371,11 @@ namespace corsika {
...
@@ -371,9 +371,11 @@ namespace corsika {
}
// End of loop over both paths to get signal info
}
// End of loop over both paths to get signal info
}
// End of try block
}
// End of try block
// LCOV_EXCL_START
catch
(
size_t
i
)
{
catch
(
size_t
i
)
{
CORSIKA_LOG_ERROR
(
"Signal Paths do not have the same size in CoREAS"
);
CORSIKA_LOG_ERROR
(
"Signal Paths do not have the same size in CoREAS"
);
}
}
// LCOV_EXCL_STOP
}
// End of looping over antennas
}
// End of looping over antennas
return
ProcessReturn
::
Ok
;
return
ProcessReturn
::
Ok
;
...
...
This diff is collapsed.
Click to expand it.
corsika/detail/modules/radio/ZHS.inl
+
1
−
0
View file @
7c0743da
...
@@ -20,6 +20,7 @@ namespace corsika {
...
@@ -20,6 +20,7 @@ namespace corsika {
auto
const
endTime
{
step
.
getTimePost
()};
auto
const
endTime
{
step
.
getTimePost
()};
if
(
startTime
==
endTime
)
{
if
(
startTime
==
endTime
)
{
CORSIKA_LOG_ERROR
(
"Time at the start and end of the track coincides! - radio"
);
return
ProcessReturn
::
Ok
;
return
ProcessReturn
::
Ok
;
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
corsika/modules/radio/CoREAS.hpp
+
0
−
5
View file @
7c0743da
...
@@ -48,11 +48,6 @@ namespace corsika {
...
@@ -48,11 +48,6 @@ namespace corsika {
template
<
typename
Particle
>
template
<
typename
Particle
>
ProcessReturn
simulate
(
Step
<
Particle
>
const
&
step
);
ProcessReturn
simulate
(
Step
<
Particle
>
const
&
step
);
private
:
int
tinycounter_
{
0
};
int
trackcounter_
{
0
};
int
zhscounter_
{
0
};
using
Base
=
using
Base
=
RadioProcess
<
TRadioDetector
,
CoREAS
<
TRadioDetector
,
TPropagator
>
,
TPropagator
>
;
RadioProcess
<
TRadioDetector
,
CoREAS
<
TRadioDetector
,
TPropagator
>
,
TPropagator
>
;
using
Base
::
antennas_
;
using
Base
::
antennas_
;
...
...
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