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
635a62a9
Commit
635a62a9
authored
2 years ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
adapted tests
parent
552ddebc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/modules/testCONEX.cpp
+1
-1
1 addition, 1 deletion
tests/modules/testCONEX.cpp
tests/modules/testSibyll.cpp
+9
-9
9 additions, 9 deletions
tests/modules/testSibyll.cpp
with
10 additions
and
10 deletions
tests/modules/testCONEX.cpp
+
1
−
1
View file @
635a62a9
...
...
@@ -102,7 +102,7 @@ TEST_CASE("CONEX") {
ShowerAxis
const
showerAxis
{
injectionPos
,
(
showerCore
-
injectionPos
)
*
1.02
,
env
};
// need to initialize Sibyll, done in constructor:
corsika
::
sibyll
::
Interaction
sibyll
;
corsika
::
sibyll
::
Hadron
Interaction
Model
sibyll
;
[[
maybe_unused
]]
corsika
::
sibyll
::
NuclearInteractionModel
sibyllNuc
(
sibyll
,
env
);
EnergyLossWriter
<
WriterOff
>
w1
(
showerAxis
);
...
...
This diff is collapsed.
Click to expand it.
tests/modules/testSibyll.cpp
+
9
−
9
View file @
635a62a9
...
...
@@ -253,20 +253,20 @@ TEST_CASE("SibyllInterface", "modules") {
HEPMomentumType
const
P0
=
50
_TeV
;
MomentumVector
const
plab
=
MomentumVector
(
cs
,
{
P0
,
0
_eV
,
0
_eV
});
corsika
::
sibyll
::
HadronInteractionModel
hmodel
;
NuclearInteractionModel
m
odel
(
hmodel
,
*
env
);
NuclearInteractionModel
nuclearM
odel
(
hmodel
,
*
env
);
CHECK
(
m
odel
.
isValid
(
Code
::
Helium
,
Code
::
Oxygen
,
100
_GeV
));
CHECK_FALSE
(
m
odel
.
isValid
(
Code
::
PiPlus
,
Code
::
Oxygen
,
100
_GeV
));
CHECK_FALSE
(
m
odel
.
isValid
(
Code
::
Electron
,
Code
::
Oxygen
,
100
_GeV
));
CHECK
(
nuclearM
odel
.
isValid
(
Code
::
Helium
,
Code
::
Oxygen
,
100
_GeV
));
CHECK_FALSE
(
nuclearM
odel
.
isValid
(
Code
::
PiPlus
,
Code
::
Oxygen
,
100
_GeV
));
CHECK_FALSE
(
nuclearM
odel
.
isValid
(
Code
::
Electron
,
Code
::
Oxygen
,
100
_GeV
));
Code
const
pid
=
Code
::
Oxygen
;
HEPEnergyType
const
Elab
=
sqrt
(
static_pow
<
2
>
(
P0
)
+
static_pow
<
2
>
(
get_mass
(
pid
)));
FourMomentum
const
P4
(
Elab
,
plab
);
FourMomentum
const
targetP4
(
get_mass
(
Code
::
Oxygen
),
MomentumVector
(
cs
,
{
0
_eV
,
0
_eV
,
0
_eV
}));
m
odel
.
doInteraction
(
view
,
pid
,
Code
::
Oxygen
,
P4
,
targetP4
);
CrossSectionType
const
cx
=
m
odel
.
getCrossSection
(
pid
,
Code
::
Oxygen
,
P4
,
targetP4
);
CHECK
(
cx
/
1
_mb
>
0
);
// this is not physics validation
nuclearM
odel
.
doInteraction
(
view
,
pid
,
Code
::
Oxygen
,
P4
,
targetP4
);
CrossSectionType
const
cx
=
nuclearM
odel
.
getCrossSection
(
pid
,
Code
::
Oxygen
,
P4
,
targetP4
);
CHECK
(
cx
>
0
_mb
);
// this is not physics validation
CHECK
(
view
.
getSize
()
!=
0
);
// this is not physics validation
// invalid to underlying model
...
...
@@ -274,10 +274,10 @@ TEST_CASE("SibyllInterface", "modules") {
100
_GeV
,
{
cs
,
{
sqrt
(
static_pow
<
2
>
(
100
_GeV
)
-
static_pow
<
2
>
(
MuPlus
::
mass
)),
0
_eV
,
0
_eV
}});
CrossSectionType
const
cx0
=
m
odel
.
getCrossSection
(
Code
::
MuPlus
,
Code
::
Oxygen
,
P4mu
,
targetP4
);
nuclearM
odel
.
getCrossSection
(
Code
::
MuPlus
,
Code
::
Oxygen
,
P4mu
,
targetP4
);
CHECK
(
cx0
/
1
_mb
==
Approx
(
0
));
CHECK_THROWS
(
m
odel
.
doInteraction
(
view
,
Code
::
MuPlus
,
Code
::
Oxygen
,
P4mu
,
targetP4
));
CHECK_THROWS
(
nuclearM
odel
.
doInteraction
(
view
,
Code
::
MuPlus
,
Code
::
Oxygen
,
P4mu
,
targetP4
));
}
}
...
...
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