Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
calypso
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
Charlotte Cavanagh
calypso
Commits
771f81f0
Commit
771f81f0
authored
2 years ago
by
Carl Gwilliam
Browse files
Options
Downloads
Patches
Plain Diff
Update foresee generation to allow testing with new version. Old version default for now
parent
91798887
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
Generators/ForeseeGenerator/share/generate_forsee_events.py
+10
-3
10 additions, 3 deletions
Generators/ForeseeGenerator/share/generate_forsee_events.py
with
10 additions
and
3 deletions
Generators/ForeseeGenerator/share/generate_forsee_events.py
+
10
−
3
View file @
771f81f0
...
...
@@ -4,8 +4,6 @@ import numpy as np
import
matplotlib.pyplot
as
plt
import
matplotlib
from
foresee
import
Foresee
,
Model
,
Utility
class
ForeseeGenerator
(
object
):
"""
Generate LLP particles within FASER acceptance from FORESEE
...
...
@@ -328,6 +326,11 @@ def setup_foresee(path):
return
def
add_to_python_path
(
path
):
if
path
in
sys
.
path
:
return
path
=
os
.
path
.
expandvars
(
os
.
path
.
expanduser
(
path
))
os
.
sys
.
path
.
append
(
path
)
return
def
parse_couplings
(
data
,
write_hepMC
=
False
):
...
...
@@ -364,6 +367,10 @@ if __name__ == "__main__":
parser
.
add_argument
(
"
--nevents
"
,
"
-n
"
,
default
=
10
,
type
=
int
,
help
=
"
Number of HepMC events
"
)
args
=
parser
.
parse_args
()
add_to_python_path
(
f
"
{
args
.
path
}
/src
"
)
from
foresee
import
Foresee
,
Model
,
Utility
# Create PIDs
if
args
.
pid2
is
None
:
args
.
pid2
=
-
args
.
pid1
...
...
@@ -373,7 +380,7 @@ if __name__ == "__main__":
print
(
f
"
Generating
{
args
.
model
}
events at Ecom =
{
args
.
Ecom
}
"
)
print
(
f
"
mother mass =
{
args
.
mass
}
GeV
"
)
print
(
f
"
decay =
{
args
.
pid1
}
{
args
.
pid2
}
"
)
print
(
f
"
couplings =
{
couplings
}
"
)
print
(
f
"
couplings =
{
couplings
}
"
)
f
=
ForeseeGenerator
(
args
.
model
,
args
.
Ecom
,
args
.
mass
,
couplings
,
args
.
pid1
,
args
.
pid2
,
outdir
=
args
.
outdir
,
path
=
args
.
path
)
...
...
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