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
40fb1cfd
Commit
40fb1cfd
authored
3 years ago
by
Felix Riehn
Browse files
Options
Downloads
Patches
Plain Diff
set qgsjet to run with energy per nucleon
parent
864558ae
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
corsika/detail/modules/qgsjetII/InteractionModel.inl
+19
-8
19 additions, 8 deletions
corsika/detail/modules/qgsjetII/InteractionModel.inl
with
19 additions
and
8 deletions
corsika/detail/modules/qgsjetII/InteractionModel.inl
+
19
−
8
View file @
40fb1cfd
...
...
@@ -104,14 +104,25 @@ namespace corsika::qgsjetII {
projectileId
,
corsika
::
qgsjetII
::
canInteract
(
projectileId
));
// define projectile, in lab frame
auto
const
sqrtS2
=
(
projectileP4
+
targetP4
).
getNormSqr
();
auto
const
sqrtS2
=
(
projectileP4
/
(
is_nucleus
(
projectileId
)
?
get_nucleus_A
(
projectileId
)
:
1
)
+
targetP4
/
(
is_nucleus
(
targetId
)
?
get_nucleus_A
(
targetId
)
:
1
))
.
getNormSqr
();
auto
const
sqrtS
=
sqrt
(
sqrtS2
);
if
(
!
corsika
::
qgsjetII
::
canInteract
(
projectileId
)
||
!
isValid
(
projectileId
,
targetId
,
sqrtS
))
{
throw
std
::
runtime_error
(
"invalid target/projectile/energy combination."
);
}
HEPEnergyType
const
Elab
=
calculate_lab_energy
(
sqrtS2
,
get_mass
(
projectileId
),
get_mass
(
targetId
));
auto
const
projectileMass
=
(
is_nucleus
(
projectileId
)
?
constants
::
nucleonMass
:
get_mass
(
projectileId
));
auto
const
targetMass
=
(
projectileId
==
Code
::
Proton
?
get_mass
(
Code
::
Proton
)
:
constants
::
nucleonMass
);
// qgsjet target is always proton or nucleon.
// always nucleon??
// lab energy/hadron
HEPEnergyType
const
Elab
=
calculate_lab_energy
(
sqrtS2
,
projectileMass
,
targetMass
);
int
beamA
=
0
;
if
(
is_nucleus
(
projectileId
))
{
beamA
=
get_nucleus_A
(
projectileId
);
}
...
...
@@ -163,18 +174,18 @@ namespace corsika::qgsjetII {
// rest.
// system of initial-state
COMBoost
boost
(
projectileP4
,
targetP4
);
COMBoost
boost
(
projectileP4
/
projectileMassNumber
,
targetP4
/
targetMassNumber
);
auto
const
&
originalCS
=
boost
.
getOriginalCS
();
auto
const
&
csPrime
=
boost
.
getRotatedCS
();
// z is along the CM motion (projectile, in Cascade)
HEPMomentumType
const
pLabMag
=
sqrt
((
Elab
-
get_mass
(
projectile
Id
)
)
*
(
Elab
+
get_mass
(
projectile
Id
)
));
sqrt
((
Elab
-
projectile
Mass
)
*
(
Elab
+
projectile
Mass
));
MomentumVector
pLab
(
csPrime
,
{
0
_eV
,
0
_eV
,
pLabMag
});
// internal QGSJetII system
COMBoost
boostInternal
({
Elab
,
pLab
},
get_mass
(
target
Id
)
);
// internal QGSJetII system
: hadron-nucleon lab. frame!
COMBoost
boostInternal
({
Elab
,
pLab
},
target
Mass
);
// fragments
QGSJetIIFragmentsStack
qfs
;
...
...
@@ -265,7 +276,7 @@ namespace corsika::qgsjetII {
Plab_final
+=
pnew
.
getMomentum
();
Elab_final
+=
pnew
.
getEnergy
();
}
}
// namespace corsika::qgsjetII
}
// secondaries
QGSJetIIStack
qs
;
...
...
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