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
2c3aac2c
Commit
2c3aac2c
authored
3 years ago
by
ralfulrich
Committed by
Ralf Ulrich
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
checking for failing tracks
parent
37c88f26
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/hybrid_MC.cpp
+34
-6
34 additions, 6 deletions
examples/hybrid_MC.cpp
with
34 additions
and
6 deletions
examples/hybrid_MC.cpp
+
34
−
6
View file @
2c3aac2c
...
...
@@ -82,6 +82,34 @@ void registerRandomStreams(uint64_t const seed) {
RNGManager
<>::
getInstance
().
setSeed
(
seed
);
}
class
TrackCheck
:
public
ContinuousProcess
<
TrackCheck
>
{
public:
TrackCheck
(
Plane
const
&
plane
)
:
plane_
(
plane
)
{}
template
<
typename
TParticle
,
typename
TTrack
>
ProcessReturn
doContinuous
(
TParticle
const
&
particle
,
TTrack
const
&
,
bool
const
)
{
auto
const
delta
=
plane_
.
getCenter
()
-
particle
.
getPosition
();
auto
const
n
=
plane_
.
getNormal
();
auto
const
proj
=
n
.
dot
(
delta
);
if
(
proj
<
-
0
_mm
)
{
CORSIKA_LOG_INFO
(
"particle {} failes"
,
particle
.
asString
());
throw
std
::
runtime_error
(
"particle below obs level"
);
}
return
ProcessReturn
::
Ok
;
}
template
<
typename
TParticle
,
typename
TTrack
>
LengthType
getMaxStepLength
(
TParticle
const
&
,
TTrack
const
&
)
const
{
return
std
::
numeric_limits
<
double
>::
infinity
()
*
1
_m
;
}
private
:
Plane
plane_
;
};
template
<
typename
T
>
using
MyExtraEnv
=
MediumPropertyModel
<
UniformMagneticField
<
T
>>
;
...
...
@@ -151,7 +179,7 @@ int main(int argc, char** argv) {
<<
", norm = "
<<
plab
.
getNorm
()
<<
endl
;
auto
const
observationHeight
=
0
_km
+
builder
.
getEarthRadius
();
auto
const
injectionHeight
=
1
12.75
_km
+
builder
.
getEarthRadius
();
auto
const
injectionHeight
=
1
_km
+
builder
.
getEarthRadius
();
auto
const
t
=
-
observationHeight
*
cos
(
thetaRad
)
+
sqrt
(
-
static_pow
<
2
>
(
sin
(
thetaRad
)
*
observationHeight
)
+
static_pow
<
2
>
(
injectionHeight
));
...
...
@@ -209,7 +237,7 @@ int main(int argc, char** argv) {
decaySibyll
.
printDecayConfig
();
ParticleCut
cut
{
60
_GeV
,
false
,
true
};
ParticleCut
cut
{
3
_GeV
,
false
,
true
};
BetheBlochPDG
eLoss
{
showerAxis
};
CONEXhybrid
conex_model
(
center
,
showerAxis
,
t
,
injectionHeight
,
E0
,
...
...
@@ -239,16 +267,16 @@ int main(int argc, char** argv) {
auto
hadronSequence
=
make_select
(
EnergySwitch
(
55
_GeV
),
urqmdCounted
,
make_sequence
(
sibyllNucCounted
,
sibyllCounted
));
auto
decaySequence
=
make_sequence
(
decayPythia
,
decaySibyll
);
auto
sequence
=
make_sequence
(
hadronSequence
,
reset_particle_mass
,
decaySequence
,
eLoss
,
cut
,
conex_model
,
longprof
,
observationLevel
);
auto
sequence
=
make_sequence
(
TrackCheck
(
obsPlane
),
hadronSequence
,
reset_particle_mass
,
decaySequence
,
eLoss
,
cut
,
conex_model
,
longprof
,
observationLevel
);
// define air shower object, run simulation
setup
::
Tracking
tracking
;
Cascade
EAS
(
env
,
tracking
,
sequence
,
output
,
stack
);
// to fix the point of first interaction, uncomment the following two lines:
// EAS.SetNodes();
// EAS.forceInteraction();
EAS
.
forceInteraction
();
output
.
startOfShower
();
EAS
.
run
();
...
...
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