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
dff92c25
Commit
dff92c25
authored
6 years ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
commented testCOMBoost
parent
4e16ef98
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/Utilities/testCOMBoost.cc
+13
-4
13 additions, 4 deletions
Framework/Utilities/testCOMBoost.cc
with
13 additions
and
4 deletions
Framework/Utilities/testCOMBoost.cc
+
13
−
4
View file @
dff92c25
...
...
@@ -39,33 +39,42 @@ TEST_CASE("boosts") {
return
E
*
E
/
cSquared
-
p
.
squaredNorm
();
};
MassType
const
projectileMass
=
4
_GeV
/
cSquared
;
Vector
<
momentum_d
>
pProjectileLab
{
rootCS
,
{
0
_GeV
/
c
,
100
_GeV
/
c
,
0
_GeV
/
c
}};
// define projectile kinematics in lab frame
MassType
const
projectileMass
=
1.
_GeV
/
cSquared
;
Vector
<
momentum_d
>
pProjectileLab
{
rootCS
,
{
0
_GeV
/
c
,
1
_PeV
/
c
,
0
_GeV
/
c
}};
EnergyType
const
eProjectileLab
=
energy
(
projectileMass
,
pProjectileLab
);
// define target kinematics in lab frame
MassType
const
targetMass
=
1
_GeV
/
cSquared
;
Vector
<
momentum_d
>
pTargetLab
{
rootCS
,
{
0
_Ns
,
0
_Ns
,
0
_Ns
}};
EnergyType
const
eTargetLab
=
energy
(
targetMass
,
pTargetLab
);
// define boost to com frame
COMBoost
boost
(
eProjectileLab
,
pProjectileLab
,
targetMass
);
// boost projecticle
auto
const
[
eProjectileCoM
,
pProjectileCoM
]
=
boost
.
toCoM
(
eProjectileLab
,
pProjectileLab
);
// boost target
auto
const
[
eTargetCoM
,
pTargetCoM
]
=
boost
.
toCoM
(
eTargetLab
,
pTargetLab
);
// sum of momenta in CoM, should be 0
auto
const
sumPCoM
=
pProjectileCoM
+
pTargetCoM
;
CHECK
(
sumPCoM
[
2
]
/
(
1
_GeV
/
c
)
==
Approx
(
0
).
margin
(
absMargin
));
// mandelstam-s should be invariant under transformation
CHECK
(
s
(
eProjectileLab
+
eTargetLab
,
pProjectileLab
.
GetComponents
()
+
pTargetLab
.
GetComponents
())
/
(
1
_GeV
/
c
)
/
(
1
_GeV
/
c
)
==
Approx
(
s
(
eProjectileCoM
+
eTargetCoM
,
pProjectileCoM
+
pTargetCoM
)
/
(
1
_GeV
/
c
)
/
(
1
_GeV
/
c
)));
CHECK
(
sumPCoM
[
2
]
/
(
1
_GeV
/
c
)
==
Approx
(
0
).
margin
(
absMargin
));
// boost back...
auto
const
[
eProjectileBack
,
pProjectileBack
]
=
boost
.
fromCoM
(
eProjectileCoM
,
pProjectileCoM
);
// ...should yield original values before the boosts
CHECK
(
eProjectileBack
/
eProjectileLab
==
Approx
(
1
));
CHECK
((
pProjectileBack
-
pProjectileLab
).
norm
()
/
(
1
_GeV
/
c
)
==
Approx
(
0
).
margin
(
absMargin
));
...
...
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