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
c9b778c8
Commit
c9b778c8
authored
3 years ago
by
Nikos Karastathis
Browse files
Options
Downloads
Patches
Plain Diff
TimeCut class implemented
parent
29aff2eb
No related branches found
No related tags found
1 merge request
!329
Radio interface
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
corsika/detail/modules/TimeCut.inl
+29
-0
29 additions, 0 deletions
corsika/detail/modules/TimeCut.inl
corsika/modules/TimeCut.hpp
+44
-0
44 additions, 0 deletions
corsika/modules/TimeCut.hpp
with
73 additions
and
0 deletions
corsika/detail/modules/TimeCut.inl
0 → 100644
+
29
−
0
View file @
c9b778c8
/*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
#include
<corsika/modules/TimeCut.hpp>
namespace
corsika
{
inline
TimeCut
::
TimeCut
(
const
TimeType
time
)
:
time_
(
time
)
{}
inline
ProcessReturn
TimeCut
::
doContinuous
(
corsika
::
setup
::
Stack
::
particle_type
&
particle
,
corsika
::
setup
::
Trajectory
const
&
,
bool
const
)
{
CORSIKA_LOG_TRACE
(
"TimeCut::doContinuous"
);
if
(
particle
.
getTime
()
>=
time_
)
{
CORSIKA_LOG_TRACE
(
"stopping continuous process"
);
return
ProcessReturn
::
ParticleAbsorbed
;
}
return
ProcessReturn
::
Ok
;
}
}
// namespace corsika
This diff is collapsed.
Click to expand it.
corsika/modules/TimeCut.hpp
0 → 100644
+
44
−
0
View file @
c9b778c8
/*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
#include
<corsika/framework/core/ParticleProperties.hpp>
#include
<corsika/framework/core/PhysicalUnits.hpp>
#include
<corsika/framework/process/ContinuousProcess.hpp>
#include
<corsika/setup/SetupStack.hpp>
#include
<corsika/setup/SetupTrajectory.hpp>
namespace
corsika
{
/*
* Simple TimeCut process. Stops the sequence at the indicated time
*/
class
TimeCut
:
public
ContinuousProcess
<
TimeCut
>
{
public:
TimeCut
(
TimeType
const
time
);
ProcessReturn
doContinuous
(
corsika
::
setup
::
Stack
::
particle_type
&
vParticle
,
corsika
::
setup
::
Trajectory
const
&
vTrajectory
,
const
bool
limitFlag
=
false
);
// this is not used for TimeCut
LengthType
getMaxStepLength
(
corsika
::
setup
::
Stack
::
particle_type
const
&
,
corsika
::
setup
::
Trajectory
const
&
)
{
return
meter
*
std
::
numeric_limits
<
double
>::
infinity
();
}
private
:
TimeType
time_
;
};
}
// namespace corsika
#include
<corsika/detail/modules/TimeCut.inl>
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