Skip to content

Commit 311d557

Browse files
author
James Vincent Mead
committed
Merge branch 'develop' of github.com:jvmead/ndlar_flow into develop
2 parents e8374d3 + 2fc26b2 commit 311d557

File tree

9 files changed

+780
-3
lines changed

9 files changed

+780
-3
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
# Runs proto_nd_flow on an example file.
3+
# Before using this script, use
4+
# >> source get_proto_nd_input.sh
5+
# to download all the necessary inputs into the correct directories
6+
#
7+
8+
INPUT_FILE=$1
9+
10+
OUTPUT_DIR=`pwd` #!!! change me
11+
OUTPUT_NAME=(${INPUT_FILE//"/"/ })
12+
OUTPUT_NAME=${OUTPUT_NAME[-1]}
13+
OUTPUT_FILE="${OUTPUT_DIR}/${OUTPUT_NAME}"
14+
OUTPUT_FILE=${OUTPUT_FILE//.hdf5/.proto_nd_flow.hdf5}
15+
echo ${OUTPUT_FILE}
16+
17+
# for running on a login node
18+
H5FLOW_CMD='h5flow'
19+
# for running on a single compute node with 32 cores
20+
#H5FLOW_CMD='srun -n32 h5flow'
21+
22+
# run all stages
23+
# run all stages
24+
#WORKFLOW1='yamls/proto_nd_flow/workflows/charge/charge_event_building_mc.yaml'
25+
#WORKFLOW2='yamls/proto_nd_flow/workflows/charge/charge_event_reconstruction_mc.yaml'
26+
#WORKFLOW3='yamls/proto_nd_flow/workflows/combined/combined_reconstruction_mc.yaml'
27+
#WORKFLOW4='yamls/proto_nd_flow/workflows/charge/prompt_calibration_mc.yaml'
28+
#WORKFLOW5='yamls/proto_nd_flow/workflows/charge/final_calibration_mc.yaml'
29+
WORKFLOW6='yamls/proto_nd_flow/workflows/rock_muon_selection_MC.yaml'
30+
31+
HERE=`pwd`
32+
#cd ndlar_flow
33+
# assumes this is being run from ndlar_flow/scripts/proto_nd_flow:
34+
cd ../../
35+
36+
# avoid being asked if we want to overwrite the file if it exists.
37+
# this is us answering "yes".
38+
if [ -e $OUTPUT_FILE ]; then
39+
rm $OUTPUT_FILE
40+
fi
41+
42+
#$H5FLOW_CMD -c $WORKFLOW1 $WORKFLOW2 $WORKFLOW3 $WORKFLOW4 $WORKFLOW5 $WORKFLOW6 -i $INPUT_FILE -o $OUTPUT_FILE
43+
44+
$H5FLOW_CMD -c $WORKFLOW6 -i $INPUT_FILE -o $OUTPUT_FILE
45+
46+
echo "Done!"
47+
echo "Output can be found at $OUTPUT_FILE"
48+
49+
cd ${HERE}
50+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
# Runs proto_nd_flow on an example file.
3+
# Before using this script, use
4+
# >> source get_proto_nd_input.sh
5+
# to download all the necessary inputs into the correct directories
6+
#
7+
8+
INPUT_FILE=$1
9+
10+
OUTPUT_DIR=`pwd` #!!! change me
11+
OUTPUT_NAME=(${INPUT_FILE//"/"/ })
12+
OUTPUT_NAME=${OUTPUT_NAME[-1]}
13+
OUTPUT_FILE="${OUTPUT_DIR}/${OUTPUT_NAME}"
14+
OUTPUT_FILE=${OUTPUT_FILE//.hdf5/.proto_nd_flow.hdf5}
15+
echo ${OUTPUT_FILE}
16+
17+
# for running on a login node
18+
H5FLOW_CMD='h5flow'
19+
# for running on a single compute node with 32 cores
20+
#H5FLOW_CMD='srun -n32 h5flow'
21+
22+
# run all stages
23+
# run all stages
24+
#WORKFLOW1='yamls/proto_nd_flow/workflows/charge/charge_event_building_data.yaml'
25+
#WORKFLOW2='yamls/proto_nd_flow/workflows/charge/charge_event_reconstruction_data.yaml'
26+
#WORKFLOW3='yamls/proto_nd_flow/workflows/combined/combined_reconstruction_data.yaml'
27+
#WORKFLOW4='yamls/proto_nd_flow/workflows/charge/prompt_calibration_data.yaml'
28+
#WORKFLOW5='yamls/proto_nd_flow/workflows/charge/final_calibration_data.yaml'
29+
WORKFLOW6='yamls/proto_nd_flow/workflows/rock_muon_selection_data.yaml'
30+
31+
HERE=`pwd`
32+
#cd ndlar_flow
33+
# assumes this is being run from ndlar_flow/scripts/proto_nd_flow:
34+
cd ../../
35+
36+
# avoid being asked if we want to overwrite the file if it exists.
37+
# this is us answering "yes".
38+
if [ -e $OUTPUT_FILE ]; then
39+
rm $OUTPUT_FILE
40+
fi
41+
42+
#$H5FLOW_CMD -c $WORKFLOW1 $WORKFLOW2 $WORKFLOW3 $WORKFLOW4 $WORKFLOW5 $WORKFLOW6 -i $INPUT_FILE -o $OUTPUT_FILE
43+
44+
$H5FLOW_CMD -c $WORKFLOW6 -i $INPUT_FILE -o $OUTPUT_FILE
45+
46+
echo "Done!"
47+
echo "Output can be found at $OUTPUT_FILE"
48+
49+
cd ${HERE}
50+

scripts/proto_nd_scripts/run_proto_nd_flow_example.sh

100644100755
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ echo "Done!"
4343
echo "Output can be found at $OUTPUT_FILE"
4444

4545
cd ${HERE}
46-

src/proto_nd_flow/reco/charge/raw_event_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ class ExtTrigRawEventBuilder(RawEventBuilder):
449449
An external trigger based event builder. Events are sliced such that they always follow an external trigger and the readout window is configurable. The default is set to 182 x 1.1 units (10% grace period). Note the event builder may contain more than one trigger if they are within a readout window time.
450450
'''
451451
default_window = 1820 * 1.1
452-
default_shifted_event_dt = -70 #This is for accounting the fact that the trigger packet can potentially arrive 7 microseconds later than the beam spill
452+
default_shifted_event_dt = 0 # This is to account for any offset between timing of trigger marker and corresponding event
453453
default_trig_io_grp = 1 # -1 -> all io groups
454454
default_extendable = False
455455

0 commit comments

Comments
 (0)