Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gnn_cleanup
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
Greta Heine
gnn_cleanup
Commits
6cfac98a
Commit
6cfac98a
authored
5 months ago
by
grheine
Browse files
Options
Downloads
Patches
Plain Diff
added setup script
parent
0399f72c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+2
-2
2 additions, 2 deletions
.gitignore
scripts/setup.sh
+26
-0
26 additions, 0 deletions
scripts/setup.sh
scripts/test.py
+0
-46
0 additions, 46 deletions
scripts/test.py
with
28 additions
and
48 deletions
.gitignore
+
2
−
2
View file @
6cfac98a
...
...
@@ -2,5 +2,5 @@ examples/tests
**.pyc
src/utils/__pycache__
*.npy
scripts
cleanup_env
scripts/test.py
\ No newline at end of file
This diff is collapsed.
Click to expand it.
scripts/setup.sh
0 → 100644
+
26
−
0
View file @
6cfac98a
#!/bin/bash
echo
'Start setting up environment'
export
SOURCING_DIR
=
$PWD
source
/cvmfs/belle.cern.ch/tools/b2setup
b2setup release-06-00-08
# store current path and venv path
OLD_PATH
=
$PATH
# save PATH to fix venv stuff later
export
VENV_PATH
=
$(
pwd
)
/cleanup_env
# create virtual environment and install packages if it does not exist
if
[
!
-d
"
$VENV_PATH
"
]
;
then
echo
'Creating virtual environment'
python3.8
-m
venv
$VENV_PATH
export
PATH
=
$OLD_PATH
:
$VENV_PATH
/bin
export
PYTHONPATH
=
$PYTHONPATH
:
$VENV_PATH
/lib/python3.8/site-packages/
export
PYTHONUSERBASE
=
$VENV_PATH
pip
install
-r
requirements.txt
fi
# source the virtual environment and set the paths
source
$VENV_PATH
/bin/activate
export
PATH
=
$OLD_PATH
:
$VENV_PATH
/bin
export
PYTHONPATH
=
$PYTHONPATH
:
$VENV_PATH
/lib/python3.8/site-packages/
export
PYTHONUSERBASE
=
$VENV_PATH
\ No newline at end of file
This diff is collapsed.
Click to expand it.
scripts/test.py
deleted
100644 → 0
+
0
−
46
View file @
0399f72c
import
basf2
as
b2
import
mdst
from
basf2
import
statistics
from
modularAnalysis
import
inputMdstList
from
tracking
import
add_time_extraction
from
tracking.path_utils
import
add_cdc_track_finding
,
add_mc_matcher
,
add_prefilter_track_fit_and_track_creator
import
torch
import
sys
sys
.
path
.
append
(
'
/work/grheine/Promotion/BelleII
'
)
from
gnn_cleanup.src.utils.add_cdc_track_finding
import
add_cdc_track_finding
from
gnn_cleanup.src.modules.HitCleanupModule
import
HitCleanup
root
=
'
/ceph/grheine/belleII/hitcleanup/data/git_hash=release-06-00-08/background_level=22_26/level=train_samples/sample_setup=dimuon/nevents=100/GeneratorOutput.root
'
model_path
=
'
IN_trained_lowbg.pt
'
path
=
b2
.
Path
()
inputMdstList
(
filelist
=
[
root
],
path
=
path
,
environmentType
=
'
default
'
)
path
.
add_module
(
'
Gearbox
'
)
path
.
add_module
(
'
Geometry
'
)
path
.
add_module
(
'
Progress
'
)
# tracking preparation
if
'
RegisterEventLevelTrackingInfo
'
not
in
path
:
path
.
add_module
(
'
RegisterEventLevelTrackingInfo
'
)
path
.
add_module
(
'
TFCDC_WireHitPreparer
'
,
wirePosition
=
'
aligned
'
,
flightTimeEstimation
=
'
outwards
'
,
filter
=
'
cuts_from_DB
'
)
# path.add_module(HitCleanup(model_path, 0.2))
#track finding modules
add_cdc_track_finding
(
path
)
#track fitting
path
.
add_module
(
'
SetupGenfitExtrapolation
'
,
energyLossBrems
=
False
,
noiseBrems
=
False
)
add_time_extraction
(
path
,
components
=
[
'
CDC
'
])
add_mc_matcher
(
path
,
components
=
[
"
CDC
"
])
add_prefilter_track_fit_and_track_creator
(
path
,
trackFitHypotheses
=
[
211
])
mdst
.
add_mdst_output
(
path
,
filename
=
'
test_mdst.root
'
,
additionalBranches
=
[
'
CDCHits
'
,
'
RecoTracks
'
])
b2
.
process
(
path
)
print
(
statistics
)
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