Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 136 additions & 7 deletions Detectors/Upgrades/ALICE3/TRKFT3/TRK/macros/test/run_test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,139 @@
#Number of events to simulate
nEvents=10
#!/bin/bash

# Simulating
o2-sim-serial-run5 -n $nEvents -g pythia8hi -m TRK --configKeyValues "TRKBase.layoutML=kTurboStaves;TRKBase.layoutOT=kStaggered;">& sim_TRK.log
set -e
set -o pipefail

# Digitizing
o2-sim-digitizer-workflow -b >& digiTRK.log
########################################
# Configuration
########################################

root.exe -b -q CheckDigits.C+ >& CheckDigits.log
nEvents=${nEvents:-10}
PERFORM_RECO=${PERFORM_RECO:-0}

########################################
# Common execution function
########################################

run_step() {
local STEP="$1"
shift

local LOG="${STEP}.log"
local DONE="${STEP}.done"

if [[ -f "$DONE" ]]; then
echo "=== $STEP already completed, skipping ==="
return 0
fi

echo "=== Running $STEP ==="

if "$@" >"$LOG" 2>&1; then
touch "$DONE"
echo "=== $STEP completed successfully ==="
else
local STATUS=$?
echo "ERROR: $STEP failed (exit code $STATUS)"
echo "Check $LOG for details"
tail -n 30 "$LOG"
exit "$STATUS"
fi
}

########################################
# Simulation
########################################

run_step sim_TRK \
o2-sim-serial-run5 \
-n "$nEvents" \
-g pythia8hi \
-m TRK \
--configKeyValues "TRKBase.layoutMLOT=kSegmented"

########################################
# Digitization
########################################

run_step digiTRK \
o2-sim-digitizer-workflow \
-b \
--interactionRate 93e3 \
--shm-segment-size 16000000000 \
--condition-timestamp 1635659148972 \
--configKeyValues="ITSAlpideParam.roFrameLengthInBC=322;"

########################################
# Check digits
########################################

run_step CheckDigitsTRK \
root.exe -b -q CheckDigitsTRK.C+

########################################
# Optional reconstruction
########################################

if [[ "$PERFORM_RECO" -eq 0 ]]; then
exit 0
fi

OPT=""
OPT="$OPT -b "
OPT="$OPT --shm-segment-size 16000000000 "
# OPT="$OPT --severity debug"

########################################
# Clusterization
########################################

run_step clus \
time o2-alice3-trk-reco-workflow \
$OPT \
--outfile o2clus_trk.root

########################################
# Check clusters
########################################

run_step CheckClusters \
root -l -b -q 'CheckClusters.C("o2clus_trk.root")'

########################################
# Reconstruction with CA
########################################

reconstruct_ca() {
o2-alice3-trk-reco-workflow --disable-root-output |
o2-alice3-global-reconstruction-reco-workflow \
--tracking-from-clusters-config trkft3_reco.json \
-b || return $?

mv o2trac_trk.root o2trac_trk_ca.root
}

run_step reco_ca reconstruct_ca

run_step CheckTracksCA_ca \
root -b -q 'CheckTracksCA.C+("o2trac_trk_ca.root")'

########################################
# Reconstruction with ACTS
########################################

reconstruct_acts() {
o2-alice3-trk-reco-workflow --disable-root-output |
o2-alice3-global-reconstruction-reco-workflow \
--useACTS \
--tracking-from-clusters-config trkft3_reco.json \
-b || return $?

mv o2trac_trk.root o2trac_trk_acts.root
}

run_step reco_acts reconstruct_acts

run_step CheckTracksCA_acts \
root -b -q 'CheckTracksCA.C+("o2trac_trk_acts.root")'

echo "=== All steps completed successfully ==="
164 changes: 164 additions & 0 deletions Detectors/Upgrades/ALICE3/TRKFT3/TRK/macros/test/trkft3_reco.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
{
"inputfiles": {
"hits": "o2sim_HitsTRK.root",
"geometry": "o2sim_geometry.root",
"mcHeader": "o2sim_MCHeader.root",
"kinematics": "o2sim_Kine.root"
},
"geometry": {
"bz": 20.0,
"pitch": [
0.001,
0.001,
0.001,
0.001,
0.004,
0.004,
0.004,
0.004,
0.004,
0.004,
0.004
]
},
"trackingparams": [
{
"NLayers": 11,
"DeltaROF": 0,
"LayerZ": [
25.1,
25.1,
25.1,
64.2,
64.2,
64.2,
64.2,
64.2,
128.5,
128.5,
128.5
],
"LayerRadii": [
0.5,
1.2,
2.5,
7.05,
9.05,
12.05,
20.05,
30.05,
45.05,
60.5,
80.05
],
"LayerxX0": [
0.001,
0.001,
0.001,
0.01,
0.01,
0.01,
0.01,
0.01,
0.01,
0.01,
0.01
],
"LayerResolution": [
0.0003,
0.0003,
0.0003,
0.0003,
0.0012,
0.0012,
0.0012,
0.0012,
0.0012,
0.0012,
0.0012
],
"SystErrorY2": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"SystErrorZ2": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"AddTimeError": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"ZBins": 256,
"PhiBins": 128,
"nROFsPerIterations": -1,
"UseDiamond": false,
"Diamond": [
0.0,
0.0,
0.0
],
"AllowSharingFirstCluster": false,
"ClusterSharing": 0,
"MinTrackLength": 7,
"NSigmaCut": 10,
"PVres": 0.01,
"TrackletMinPt": 0.1,
"TrackletsPerClusterLimit": 2.0,
"CellDeltaTanLambdaSigma": 0.007,
"CellsPerClusterLimit": 2.0,
"MaxChi2ClusterAttachment": 60.0,
"MaxChi2NDF": 30.0,
"ReseedIfShorter": 6,
"MinPt": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"StartLayerMask": 4095,
"RepeatRefitOut": false,
"ShiftRefToCluster": true,
"FindShortTracks": false,
"PerPrimaryVertexProcessing": false,
"SaveTimeBenchmarks": false,
"DoUPCIteration": false,
"FataliseUponFailure": true,
"TrackFollower": "mix",
"TrackFollowerNSigmaCutZ": 1.0,
"TrackFollowerNSigmaCutPhi": 1.0,
"TrackFollowerMaxHypotheses": 1,
"createArtefactLabels": false,
"PrintMemory": false,
"DropTFUponFailure": false
}
]
}
Loading