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
f2861a30
Commit
f2861a30
authored
3 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
update test constants
parent
d55e5866
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
tests/modules/testEpos.cpp
+16
-16
16 additions, 16 deletions
tests/modules/testEpos.cpp
with
16 additions
and
16 deletions
tests/modules/testEpos.cpp
+
16
−
16
View file @
f2861a30
...
...
@@ -246,22 +246,22 @@ TEST_CASE("EposInterface", "modules") {
Interaction
model
;
/*
#ifndef __clang__
// This is very obscure since it fails for -O2, but for both clang and gcc ???
model.doInteraction(view);
auto const pSum = sumMomentum(view, cs);
CHECK(pSum.getComponents(cs).get
X
() /
P0 == Approx(1).margin(0.05));
CHECK(pSum.getComponents(cs).getY() / 1_GeV == Approx(0).margin(1e-4));
CHECK(pSum.getComponents(cs).getZ() / 1_GeV ==
Approx(0).margin(1e-4));
CHECK((pSum - plab).getNorm() / 1_GeV ==
Approx(0).margin(
plab.getNorm()
* 0.05
/ 1_GeV
));
CHECK(pSum.getNorm() / P0 ==
Approx(
1
).margin(
0.05
));
#endif
*/
#ifndef __clang__
// This is very obscure since it fails for -O2, but for both clang and gcc ???
model
.
doInteraction
(
view
);
auto
const
pSum
=
sumMomentum
(
view
,
cs
);
CHECK
(
pSum
.
getComponents
(
cs
).
getX
()
/
P0
==
Approx
(
1
).
margin
(
0.05
));
CHECK
(
pSum
.
getComponents
(
cs
).
get
Y
()
/
1
_GeV
==
Approx
(
0
).
margin
(
0.5
));
// this is not physics validation
CHECK
(
pSum
.
getComponents
(
cs
).
getZ
()
/
1
_GeV
==
Approx
(
0
).
margin
(
0.5
));
// this is not physics validation
CHECK
((
pSum
-
plab
)
.
getNorm
()
/
1
_GeV
==
Approx
(
0
).
margin
(
plab
.
getNorm
()
*
0.05
/
1
_GeV
));
CHECK
(
pSum
.
getNorm
()
/
P0
==
Approx
(
1
).
margin
(
0.05
));
#endif
[[
maybe_unused
]]
const
GrammageType
length
=
model
.
getInteractionLength
(
particle
);
CHECK
(
length
/
1
_g
*
1
_cm
*
1
_cm
==
Approx
(
30
).
margin
(
20
));
// this is no physics validation
...
...
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