Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
KM3BUU
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
simulation
KM3BUU
Commits
1170b196
Commit
1170b196
authored
3 years ago
by
Johannes Schumann
Browse files
Options
Downloads
Plain Diff
Merge branch 'Qsquared' into 'master'
Add Q² to the output dataset See merge request
!15
parents
41f5df54
c7bb7619
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!15
Add Q² to the output dataset
Pipeline
#22707
passed
3 years ago
Stage: test
Stage: coverage
Stage: doc
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
km3buu/output.py
+35
-6
35 additions, 6 deletions
km3buu/output.py
with
35 additions
and
6 deletions
km3buu/output.py
+
35
−
6
View file @
1170b196
...
...
@@ -346,13 +346,10 @@ class GiBUUOutput:
return
retval
@staticmethod
def
bjorken_x
(
roottuple_data
):
def
_q
(
roottuple_data
):
"""
Calculate Bjorken x variable for the GiBUU events
Parameters
----------
roottuple_data: awkward.highlevel.Array
Calculate the difference of the four vectors from
in and out going lepton (k_in - k_out)
"""
d
=
roottuple_data
k_in
=
np
.
vstack
([
...
...
@@ -368,8 +365,39 @@ class GiBUUOutput:
np
.
array
(
d
.
lepOut_Pz
)
])
q
=
k_in
-
k_out
return
q
@staticmethod
def
Qsquared
(
roottuple_data
):
"""
Calculate the passed energy from the neutrino interaction to the
nucleus denoted by the variable Q²
Parameters
----------
roottuple_data: awkward.highlevel.Array
Returns
-------
"""
q
=
GiBUUOutput
.
_q
(
roottuple_data
)
qtmp
=
np
.
power
(
q
,
2
)
q2
=
qtmp
[
0
,
:]
-
np
.
sum
(
qtmp
[
1
:
4
,
:],
axis
=
0
)
return
q2
@staticmethod
def
bjorken_x
(
roottuple_data
):
"""
Calculate Bjorken x variable for the GiBUU events
Parameters
----------
roottuple_data: awkward.highlevel.Array
"""
d
=
roottuple_data
q
=
GiBUUOutput
.
_q
(
d
)
q2
=
GiBUUOutput
.
Qsquared
(
d
)
pq
=
q
[
0
,
:]
*
d
.
nuc_E
-
q
[
1
,
:]
*
d
.
nuc_Px
-
q
[
2
,
:]
*
d
.
nuc_Py
-
q
[
3
,
:]
*
d
.
nuc_Pz
x
=
np
.
divide
(
-
q2
,
2
*
pq
)
...
...
@@ -439,6 +467,7 @@ class GiBUUOutput:
retval
[
"
xsec
"
]
=
self
.
_event_xsec
(
retval
)
retval
[
"
Bx
"
]
=
GiBUUOutput
.
bjorken_x
(
retval
)
retval
[
"
By
"
]
=
GiBUUOutput
.
bjorken_y
(
retval
)
retval
[
"
Q2
"
]
=
GiBUUOutput
.
Qsquared
(
retval
)
return
retval
@property
...
...
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