Skip to content
Snippets Groups Projects
Commit ab4939ce authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

edm4hep updates

parent 58cf5386
No related tags found
1 merge request!139edm4hep updates
Showing
with 119 additions and 61 deletions
...@@ -13,6 +13,7 @@ default: ...@@ -13,6 +13,7 @@ default:
- .local/bin - .local/bin
- .local/include - .local/include
- .local/share - .local/share
- .local/root_build
- results - results
- config - config
- juggler.env - juggler.env
...@@ -22,6 +23,7 @@ default: ...@@ -22,6 +23,7 @@ default:
stages: stages:
- config - config
- initialize - initialize
- compile
- generate - generate
- process - process
- collect - collect
...@@ -49,6 +51,12 @@ common:detector: ...@@ -49,6 +51,12 @@ common:detector:
- mkdir -p config - mkdir -p config
- print_env.sh - print_env.sh
.compile_benchmark:
needs:
- ["common:setup"]
before_script:
- source .local/bin/env.sh
.phy_benchmark: .phy_benchmark:
needs: needs:
- ["common:detector"] - ["common:detector"]
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
## ============================================================================= ## =============================================================================
## Run the DIS benchmarks in 5 steps: ## Run the DIS benchmarks in 5 steps:
## 1. Parse the command line and setup environment ## 1. Parse the command line and setup environment
## 2. Detector simulation through npsim ## 2. Detector simulation through ddsim
## 3. Digitization and reconstruction through Juggler ## 3. Digitization and reconstruction through Juggler
## 4. Root-based Physics analyses ## 4. Root-based Physics analyses
## 5. Finalize ## 5. Finalize
...@@ -45,7 +45,7 @@ source benchmarks/dis/env.sh ...@@ -45,7 +45,7 @@ source benchmarks/dis/env.sh
## Get a unique file names based on the configuration options ## Get a unique file names based on the configuration options
GEN_FILE=${INPUT_PATH}/gen-${CONFIG}_${JUGGLER_N_EVENTS}.hepmc GEN_FILE=${INPUT_PATH}/gen-${CONFIG}_${JUGGLER_N_EVENTS}.hepmc
SIM_FILE=${TMP_PATH}/sim-${CONFIG}.root SIM_FILE=${TMP_PATH}/sim-${CONFIG}.edm4hep.root
SIM_LOG=${TMP_PATH}/sim-${CONFIG}.log SIM_LOG=${TMP_PATH}/sim-${CONFIG}.log
...@@ -57,15 +57,16 @@ PLOT_TAG=${CONFIG} ...@@ -57,15 +57,16 @@ PLOT_TAG=${CONFIG}
## ============================================================================= ## =============================================================================
## Step 2: Run the simulation ## Step 2: Run the simulation
echo "Running Geant4 simulation" echo "Running Geant4 simulation"
#npsim --runType batch \ #ddsim --runType batch \
# --part.minimalKineticEnergy 1000*GeV \ # --part.minimalKineticEnergy 1000*GeV \
# --filter.tracker edep0 \
# -v WARNING \ # -v WARNING \
# --numberOfEvents ${JUGGLER_N_EVENTS} \ # --numberOfEvents ${JUGGLER_N_EVENTS} \
# --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ # --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \
# --inputFiles ${GEN_FILE} \ # --inputFiles ${GEN_FILE} \
# --outputFile ${SIM_FILE} # --outputFile ${SIM_FILE}
#if [ "$?" -ne "0" ] ; then #if [ "$?" -ne "0" ] ; then
# echo "ERROR running npsim" # echo "ERROR running ddsim"
# exit 1 # exit 1
#fi #fi
......
...@@ -101,10 +101,10 @@ int rec_analysis_raw(const std::string& config_name) ...@@ -101,10 +101,10 @@ int rec_analysis_raw(const std::string& config_name)
auto h_adc_EcalBarrelScFiRawHits = d0.Histo1D({"h_adc_EcalBarrelScFiRawHits", "EcalBarrelScFi; amplitude; counts", 1024, 0, 32768}, "EcalBarrelScFiRawHits.amplitude"); auto h_adc_EcalBarrelScFiRawHits = d0.Histo1D({"h_adc_EcalBarrelScFiRawHits", "EcalBarrelScFi; amplitude; counts", 1024, 0, 32768}, "EcalBarrelScFiRawHits.amplitude");
auto h_adc_EcalEndcapNRawHits = d0.Histo1D({"h_adc_EcalEndcapNRawHits", "EcalEndcapN; amplitude; counts", 1024, 0, 32768}, "EcalEndcapNRawHits.amplitude"); auto h_adc_EcalEndcapNRawHits = d0.Histo1D({"h_adc_EcalEndcapNRawHits", "EcalEndcapN; amplitude; counts", 1024, 0, 32768}, "EcalEndcapNRawHits.amplitude");
// Ecal tdc // Ecal tdc
auto h_tdc_EcalEndcapPRawHits = d0.Histo1D({"h_tdc_EcalEndcapPRawHits", "EcalEndcapP; TDC channel; counts", 1024, 0, 32768}, "EcalEndcapPRawHits.time"); auto h_tdc_EcalEndcapPRawHits = d0.Histo1D({"h_tdc_EcalEndcapPRawHits", "EcalEndcapP; TDC channel; counts", 1024, 0, 32768}, "EcalEndcapPRawHits.timeStamp");
auto h_tdc_EcalBarrelImagingRawHits = d0.Histo1D({"h_tdc_EcalBarrelImagingRawHits", "EcalBarrelImaging; TDC channel; counts", 1024, 0, 32768}, "EcalBarrelImagingRawHits.time"); auto h_tdc_EcalBarrelImagingRawHits = d0.Histo1D({"h_tdc_EcalBarrelImagingRawHits", "EcalBarrelImaging; TDC channel; counts", 1024, 0, 32768}, "EcalBarrelImagingRawHits.timeStamp");
auto h_tdc_EcalBarrelScFiRawHits = d0.Histo1D({"h_tdc_EcalBarrelScFiRawHits", "EcalBarrelScFi; TDC channel; counts", 1024, 0, 32768}, "EcalBarrelScFiRawHits.time"); auto h_tdc_EcalBarrelScFiRawHits = d0.Histo1D({"h_tdc_EcalBarrelScFiRawHits", "EcalBarrelScFi; TDC channel; counts", 1024, 0, 32768}, "EcalBarrelScFiRawHits.timeStamp");
auto h_tdc_EcalEndcapNRawHits = d0.Histo1D({"h_tdc_EcalEndcapNRawHits", "EcalEndcapN; TDC channel; counts", 1024, 0, 32768}, "EcalEndcapNRawHits.time"); auto h_tdc_EcalEndcapNRawHits = d0.Histo1D({"h_tdc_EcalEndcapNRawHits", "EcalEndcapN; TDC channel; counts", 1024, 0, 32768}, "EcalEndcapNRawHits.timeStamp");
// Hcal hits // Hcal hits
auto h_n_HcalEndcapPRawHits = d0.Histo1D({"h_n_HcalEndcapPRawHits", "HcalEndcapP; hits; counts", 100, 0, 1000}, "n_HcalEndcapPRawHits"); auto h_n_HcalEndcapPRawHits = d0.Histo1D({"h_n_HcalEndcapPRawHits", "HcalEndcapP; hits; counts", 100, 0, 1000}, "n_HcalEndcapPRawHits");
auto h_n_HcalBarrelRawHits = d0.Histo1D({"h_n_HcalBarrelRawHits", "HcalBarrel; hits; counts", 100, 0, 1000}, "n_HcalBarrelRawHits"); auto h_n_HcalBarrelRawHits = d0.Histo1D({"h_n_HcalBarrelRawHits", "HcalBarrel; hits; counts", 100, 0, 1000}, "n_HcalBarrelRawHits");
...@@ -118,9 +118,9 @@ int rec_analysis_raw(const std::string& config_name) ...@@ -118,9 +118,9 @@ int rec_analysis_raw(const std::string& config_name)
auto h_adc_HcalBarrelRawHits = d0.Histo1D({"h_adc_HcalBarrelRawHits", "HcalBarrel; hits; counts", 1024, 0, 32768}, "HcalBarrelRawHits.amplitude"); auto h_adc_HcalBarrelRawHits = d0.Histo1D({"h_adc_HcalBarrelRawHits", "HcalBarrel; hits; counts", 1024, 0, 32768}, "HcalBarrelRawHits.amplitude");
auto h_adc_HcalEndcapNRawHits = d0.Histo1D({"h_adc_HcalEndcapNRawHits", "HcalEndcapN; hits; counts", 1024, 0, 32768}, "HcalEndcapNRawHits.amplitude"); auto h_adc_HcalEndcapNRawHits = d0.Histo1D({"h_adc_HcalEndcapNRawHits", "HcalEndcapN; hits; counts", 1024, 0, 32768}, "HcalEndcapNRawHits.amplitude");
// Hcal tdc // Hcal tdc
auto h_tdc_HcalEndcapPRawHits = d0.Histo1D({"h_tdc_HcalEndcapPRawHits", "HcalEndcapP; TDC channel; counts", 1024, 0, 32768}, "HcalEndcapPRawHits.time"); auto h_tdc_HcalEndcapPRawHits = d0.Histo1D({"h_tdc_HcalEndcapPRawHits", "HcalEndcapP; TDC channel; counts", 1024, 0, 32768}, "HcalEndcapPRawHits.timeStamp");
auto h_tdc_HcalBarrelRawHits = d0.Histo1D({"h_tdc_HcalBarrelRawHits", "HcalBarrel; TDC channel; counts", 1024, 0, 32768}, "HcalBarrelRawHits.time"); auto h_tdc_HcalBarrelRawHits = d0.Histo1D({"h_tdc_HcalBarrelRawHits", "HcalBarrel; TDC channel; counts", 1024, 0, 32768}, "HcalBarrelRawHits.timeStamp");
auto h_tdc_HcalEndcapNRawHits = d0.Histo1D({"h_tdc_HcalEndcapNRawHits", "HcalEndcapN; TDC channel; counts", 1024, 0, 32768}, "HcalEndcapNRawHits.time"); auto h_tdc_HcalEndcapNRawHits = d0.Histo1D({"h_tdc_HcalEndcapNRawHits", "HcalEndcapN; TDC channel; counts", 1024, 0, 32768}, "HcalEndcapNRawHits.timeStamp");
// other detector stats // other detector stats
//auto stats_n_B0PreshowerRawHits = d0.Stats("n_B0PreshowerRawHits"); //auto stats_n_B0PreshowerRawHits = d0.Stats("n_B0PreshowerRawHits");
......
dis:compile:
stage: compile
extends: .compile_benchmark
script:
- compile_analyses.py dis
dis:generate: dis:generate:
stage: generate stage: generate
extends: .phy_benchmark extends: .phy_benchmark
needs: ["common:detector"] needs: ["common:detector", "dis:compile"]
parallel: parallel:
matrix: matrix:
- EBEAM: 5 - EBEAM: 5
...@@ -17,7 +23,7 @@ dis:generate: ...@@ -17,7 +23,7 @@ dis:generate:
dis:process: dis:process:
stage: process stage: process
extends: .phy_benchmark extends: .phy_benchmark
needs: ["common:detector", "dis:generate"] needs: ["dis:generate"]
parallel: parallel:
matrix: matrix:
- EBEAM: 5 - EBEAM: 5
...@@ -28,7 +34,6 @@ dis:process: ...@@ -28,7 +34,6 @@ dis:process:
PBEAM: 275 PBEAM: 275
timeout: 2 hour timeout: 2 hour
script: script:
- compile_analyses.py dis
- bash benchmarks/dis/dis.sh --config dis_${EBEAM}x${PBEAM} --ebeam ${EBEAM} --pbeam ${PBEAM} - bash benchmarks/dis/dis.sh --config dis_${EBEAM}x${PBEAM} --ebeam ${EBEAM} --pbeam ${PBEAM}
retry: retry:
max: 2 max: 2
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
## ============================================================================= ## =============================================================================
## Run the DIS benchmarks in 5 steps: ## Run the DIS benchmarks in 5 steps:
## 1. Parse the command line and setup environment ## 1. Parse the command line and setup environment
## 2. Detector simulation through npsim ## 2. Detector simulation through ddsim
## 3. Digitization and reconstruction through Juggler ## 3. Digitization and reconstruction through Juggler
## 4. Root-based Physics analyses ## 4. Root-based Physics analyses
## 5. Finalize ## 5. Finalize
...@@ -48,7 +48,7 @@ source benchmarks/dis/env.sh ...@@ -48,7 +48,7 @@ source benchmarks/dis/env.sh
## Get a unique file names based on the configuration options ## Get a unique file names based on the configuration options
GEN_FILE=${INPUT_PATH}/gen-${CONFIG}_${JUGGLER_N_EVENTS}.hepmc GEN_FILE=${INPUT_PATH}/gen-${CONFIG}_${JUGGLER_N_EVENTS}.hepmc
SIM_FILE=${TMP_PATH}/sim-${CONFIG}.root SIM_FILE=${TMP_PATH}/sim-${CONFIG}.edm4hep.root
SIM_LOG=${TMP_PATH}/sim-${CONFIG}.log SIM_LOG=${TMP_PATH}/sim-${CONFIG}.log
...@@ -60,17 +60,20 @@ PLOT_TAG=${CONFIG} ...@@ -60,17 +60,20 @@ PLOT_TAG=${CONFIG}
## ============================================================================= ## =============================================================================
## Step 2: Run the simulation ## Step 2: Run the simulation
echo "Running Geant4 simulation" echo "Running Geant4 simulation"
npsim --runType batch \ if [ ! -f ${SIM_FILE} ] ; then
ddsim --runType batch \
--part.minimalKineticEnergy 1000*GeV \ --part.minimalKineticEnergy 1000*GeV \
--filter.tracker edep0 \
-v INFO \ -v INFO \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \
--inputFiles ${GEN_FILE} \ --inputFiles ${GEN_FILE} \
--outputFile ${SIM_FILE} --outputFile ${SIM_FILE}
if [ "$?" -ne "0" ] ; then if [ "$?" -ne "0" ] ; then
echo "ERROR running npsim" echo "ERROR running ddsim"
exit 1 exit 1
fi fi
fi
## ============================================================================= ## =============================================================================
## Step 3: Run digitization & reconstruction ## Step 3: Run digitization & reconstruction
...@@ -110,11 +113,13 @@ cat << EOF > ${CONFIG} ...@@ -110,11 +113,13 @@ cat << EOF > ${CONFIG}
"test_tag": "${BEAM_TAG}" "test_tag": "${BEAM_TAG}"
} }
EOF EOF
root -b -q "benchmarks/dis/analysis/dis_electrons.cxx+(\"${CONFIG}\")"
if [[ "$?" -ne "0" ]] ; then #FIXME DIS analysis disabled
echo "ERROR running dis_electron script" #root -b -q "benchmarks/dis/analysis/dis_electrons.cxx+(\"${CONFIG}\")"
exit 1 #if [[ "$?" -ne "0" ]] ; then
fi # echo "ERROR running dis_electron script"
# exit 1
#fi
CONFIG="${TMP_PATH}/${PLOT_TAG}.raw.json" CONFIG="${TMP_PATH}/${PLOT_TAG}.raw.json"
cat << EOF > ${CONFIG} cat << EOF > ${CONFIG}
......
dvcs:compile:
stage: compile
extends: .compile_benchmark
script:
- compile_analyses.py dvcs
dvcs:process: dvcs:process:
stage: process stage: process
extends: .phy_benchmark extends: .phy_benchmark
tags: tags:
- phy - phy
needs: ["common:detector"] needs: ["common:detector", "dvcs:compile"]
script: script:
- compile_analyses.py dvcs #- bash benchmarks/dvcs/dvcs.sh --all
- bash benchmarks/dvcs/dvcs.sh --all - bash benchmarks/dvcs/dvcs.sh --data-init --sim --rec
dvcs:results: dvcs:results:
stage: collect stage: collect
......
...@@ -74,7 +74,7 @@ FILE_NAME_TAG="dvcs" ...@@ -74,7 +74,7 @@ FILE_NAME_TAG="dvcs"
DATA_URL="S3/eictest/ATHENA/EVGEN/DVCS/DVCS_10x100_2M/DVCS.1.hepmc" DATA_URL="S3/eictest/ATHENA/EVGEN/DVCS/DVCS_10x100_2M/DVCS.1.hepmc"
export JUGGLER_MC_FILE="${LOCAL_DATA_PATH}/mc_${FILE_NAME_TAG}.hepmc" export JUGGLER_MC_FILE="${LOCAL_DATA_PATH}/mc_${FILE_NAME_TAG}.hepmc"
export JUGGLER_SIM_FILE="${LOCAL_DATA_PATH}/sim_${FILE_NAME_TAG}.root" export JUGGLER_SIM_FILE="${LOCAL_DATA_PATH}/sim_${FILE_NAME_TAG}.edm4hep.root"
export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root" export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root"
echo "FILE_NAME_TAG = ${FILE_NAME_TAG}" echo "FILE_NAME_TAG = ${FILE_NAME_TAG}"
...@@ -100,15 +100,16 @@ fi ...@@ -100,15 +100,16 @@ fi
### Step 2. Run the simulation (geant4) ### Step 2. Run the simulation (geant4)
if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
## run geant4 simulations ## run geant4 simulations
npsim --runType batch \ ddsim --runType batch \
--part.minimalKineticEnergy 1000*GeV \ --part.minimalKineticEnergy 1000*GeV \
--filter.tracker edep0 \
-v ERROR \ -v ERROR \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \
--inputFiles "${JUGGLER_MC_FILE}" \ --inputFiles "${JUGGLER_MC_FILE}" \
--outputFile ${JUGGLER_SIM_FILE} --outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR running npsim" echo "ERROR running ddsim"
exit 1 exit 1
fi fi
fi fi
......
...@@ -83,7 +83,7 @@ int vm_invar(const std::string& config_name) ...@@ -83,7 +83,7 @@ int vm_invar(const std::string& config_name)
// Define analysis flow // Define analysis flow
auto d_im = d.Define("p_rec_sorted", momenta_sort_rec, {"ReconstructedParticles"}) auto d_im = d.Define("p_rec_sorted", momenta_sort_rec, {"ReconstructedParticles"})
.Define("p_sim_sorted", momenta_sort_sim, {"mcparticles"}) .Define("p_sim_sorted", momenta_sort_sim, {"MCParticles"})
.Define("N", "p_rec_sorted.size()") .Define("N", "p_rec_sorted.size()")
.Define("invariant_quantities_rec", util::calc_inv_quant, {"p_rec_sorted"}) .Define("invariant_quantities_rec", util::calc_inv_quant, {"p_rec_sorted"})
.Define("invariant_quantities_sim", util::calc_inv_quant, {"p_sim_sorted"}) .Define("invariant_quantities_sim", util::calc_inv_quant, {"p_sim_sorted"})
......
...@@ -94,11 +94,11 @@ int vm_mass(const std::string& config_name) ...@@ -94,11 +94,11 @@ int vm_mass(const std::string& config_name)
return common_bench::find_decay_pair(parts, vm_mass, decay_mass); return common_bench::find_decay_pair(parts, vm_mass, decay_mass);
}; };
// common_bench::PrintGeant4(mcparticles); // common_bench::PrintGeant4(MCParticles);
// Define analysis flow // Define analysis flow
auto d_im = d.Define("p_rec", common_bench::momenta_RC, {"ReconstructedParticles"}) //using dummy rc auto d_im = d.Define("p_rec", common_bench::momenta_RC, {"ReconstructedParticles"}) //using dummy rc
.Define("N", "p_rec.size()") .Define("N", "p_rec.size()")
.Define("p_sim", common_bench::momenta_from_simulation, {"mcparticles"}) .Define("p_sim", common_bench::momenta_from_simulation, {"MCParticles"})
.Define("decay_pair_rec", find_decay_pair, {"p_rec"}) .Define("decay_pair_rec", find_decay_pair, {"p_rec"})
.Define("decay_pair_sim", find_decay_pair, {"p_sim"}) .Define("decay_pair_sim", find_decay_pair, {"p_sim"})
.Define("p_vm_rec", "decay_pair_rec.first + decay_pair_rec.second") .Define("p_vm_rec", "decay_pair_rec.first + decay_pair_rec.second")
......
dvmp:compile:
stage: compile
extends: .compile_benchmark
script:
- compile_analyses.py dvmp
dvmp:generate: dvmp:generate:
needs: ["common:detector"] needs: ["common:detector", "dvmp:compile"]
image: eicweb.phy.anl.gov:4567/monte_carlo/lager/lager:unstable image: eicweb.phy.anl.gov:4567/monte_carlo/lager/lager:unstable
extends: .phy_benchmark extends: .phy_benchmark
stage: generate stage: generate
...@@ -14,11 +20,9 @@ dvmp:generate: ...@@ -14,11 +20,9 @@ dvmp:generate:
dvmp:process: dvmp:process:
stage: process stage: process
extends: .phy_benchmark extends: .phy_benchmark
needs: ["common:detector", "dvmp:generate"] needs: ["dvmp:generate"]
timeout: 2 hour timeout: 2 hour
script: script:
- ls -lrth
- compile_analyses.py dvmp
- ls -lrth - ls -lrth
- run_many.py ./benchmarks/dvmp/dvmp.sh - run_many.py ./benchmarks/dvmp/dvmp.sh
-c jpsi_barrel -c jpsi_barrel
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
## ============================================================================= ## =============================================================================
## Run the DVMP benchmarks in 5 steps: ## Run the DVMP benchmarks in 5 steps:
## 1. Parse the command line and setup environment ## 1. Parse the command line and setup environment
## 2. Detector simulation through npsim ## 2. Detector simulation through ddsim
## 3. Digitization and reconstruction through Juggler ## 3. Digitization and reconstruction through Juggler
## 4. Root-based Physics analyses ## 4. Root-based Physics analyses
## 5. Finalize ## 5. Finalize
...@@ -44,7 +44,7 @@ source benchmarks/dvmp/env.sh ...@@ -44,7 +44,7 @@ source benchmarks/dvmp/env.sh
## Get a unique file names based on the configuration options ## Get a unique file names based on the configuration options
GEN_FILE=${INPUT_PATH}/gen-${CONFIG}_${DECAY}_${JUGGLER_N_EVENTS}.hepmc GEN_FILE=${INPUT_PATH}/gen-${CONFIG}_${DECAY}_${JUGGLER_N_EVENTS}.hepmc
SIM_FILE=${TMP_PATH}/sim-${CONFIG}_${DECAY}.root SIM_FILE=${TMP_PATH}/sim-${CONFIG}_${DECAY}.edm4hep.root
SIM_LOG=${TMP_PATH}/sim-${CONFIG}_${DECAY}.log SIM_LOG=${TMP_PATH}/sim-${CONFIG}_${DECAY}.log
...@@ -60,15 +60,16 @@ ls -lrth ...@@ -60,15 +60,16 @@ ls -lrth
ls -lrth input ls -lrth input
echo ${TMP_PATH} echo ${TMP_PATH}
ls -lrth ${TMP_PATH} ls -lrth ${TMP_PATH}
npsim --runType batch \ ddsim --runType batch \
--part.minimalKineticEnergy 100*GeV \ --part.minimalKineticEnergy 100*GeV \
--filter.tracker edep0 \
-v WARNING \ -v WARNING \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \
--inputFiles ${GEN_FILE} \ --inputFiles ${GEN_FILE} \
--outputFile ${SIM_FILE} --outputFile ${SIM_FILE}
if [ "$?" -ne "0" ] ; then if [ "$?" -ne "0" ] ; then
echo "ERROR running npsim" echo "ERROR running ddsim"
exit 1 exit 1
fi fi
......
single:compile:
extends: .compile_benchmark
stage: compile
script:
- compile_analyses.py single
single:process: single:process:
extends: .phy_benchmark extends: .phy_benchmark
timeout: 24 hours timeout: 24 hours
stage: process stage: process
needs: ["common:detector", "single:compile"]
script: script:
- compile_analyses.py single
- bash benchmarks/single/single.sh e-_1GeV_45to135deg - bash benchmarks/single/single.sh e-_1GeV_45to135deg
...@@ -6,20 +6,21 @@ fi ...@@ -6,20 +6,21 @@ fi
export JUGGLER_FILE_NAME_TAG="${1:-e-_1GeV_45to135deg}" export JUGGLER_FILE_NAME_TAG="${1:-e-_1GeV_45to135deg}"
export JUGGLER_GEN_FILE="benchmarks/single/${JUGGLER_FILE_NAME_TAG}.steer" export JUGGLER_GEN_FILE="benchmarks/single/${JUGGLER_FILE_NAME_TAG}.steer"
export JUGGLER_SIM_FILE="sim_${JUGGLER_FILE_NAME_TAG}.root" export JUGGLER_SIM_FILE="sim_${JUGGLER_FILE_NAME_TAG}.edm4hep.root"
export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root" export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root"
# Simulate # Simulate
npsim --runType run \ ddsim --runType run \
--printLevel WARNING \ --printLevel WARNING \
--enableGun \ --enableGun \
--steeringFile ${JUGGLER_GEN_FILE} \ --steeringFile ${JUGGLER_GEN_FILE} \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--part.minimalKineticEnergy 1*TeV \ --part.minimalKineticEnergy 1*TeV \
--filter.tracker edep0 \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \
--outputFile ${JUGGLER_SIM_FILE} --outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR running npsim" echo "ERROR running ddsim"
exit 1 exit 1
fi fi
......
...@@ -20,7 +20,7 @@ R__LOAD_LIBRARY(libDD4pod.so) ...@@ -20,7 +20,7 @@ R__LOAD_LIBRARY(libDD4pod.so)
#include "eicd/ReconstructedParticleCollection.h" #include "eicd/ReconstructedParticleCollection.h"
void synchrotron_sim(const char* fname = "sim_synchrotron.root"){ void synchrotron_sim(const char* fname = "sim_synchrotron.edm4hep.root"){
fmt::print(fmt::emphasis::bold | fg(fmt::color::forest_green), "Running synchrotron analysis...\n"); fmt::print(fmt::emphasis::bold | fg(fmt::color::forest_green), "Running synchrotron analysis...\n");
......
synchrotron:compile:
stage: compile
extends: .compile_benchmark
script:
- compile_analyses.py synchrotron
synchrotron:process: synchrotron:process:
stage: process stage: process
extends: .phy_benchmark extends: .phy_benchmark
tags: tags:
- s3 - s3
needs: ["common:detector"] needs: ["common:detector", "synchrotron:compile"]
script: script:
- compile_analyses.py synchrotron
- bash benchmarks/synchrotron/synchrotron.sh --all - bash benchmarks/synchrotron/synchrotron.sh --all
synchrotron:results: synchrotron:results:
......
...@@ -74,7 +74,7 @@ FILE_NAME_TAG="synchrotron" ...@@ -74,7 +74,7 @@ FILE_NAME_TAG="synchrotron"
DATA_URL="S3/eictest/ATHENA/EVGEN/SR/SR.10GeV_5kVthreshold_hepmc/25098.hepmc" DATA_URL="S3/eictest/ATHENA/EVGEN/SR/SR.10GeV_5kVthreshold_hepmc/25098.hepmc"
export JUGGLER_MC_FILE="${LOCAL_DATA_PATH}/mc_${FILE_NAME_TAG}.hepmc" export JUGGLER_MC_FILE="${LOCAL_DATA_PATH}/mc_${FILE_NAME_TAG}.hepmc"
export JUGGLER_SIM_FILE="${LOCAL_DATA_PATH}/sim_${FILE_NAME_TAG}.root" export JUGGLER_SIM_FILE="${LOCAL_DATA_PATH}/sim_${FILE_NAME_TAG}.edm4hep.root"
export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root" export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root"
echo "FILE_NAME_TAG = ${FILE_NAME_TAG}" echo "FILE_NAME_TAG = ${FILE_NAME_TAG}"
...@@ -100,7 +100,7 @@ fi ...@@ -100,7 +100,7 @@ fi
### Step 2. Run the simulation (geant4) ### Step 2. Run the simulation (geant4)
if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
## run geant4 simulations ## run geant4 simulations
npsim --runType batch \ ddsim --runType batch \
--part.minimalKineticEnergy 1000*GeV \ --part.minimalKineticEnergy 1000*GeV \
--filter.tracker edep0 \ --filter.tracker edep0 \
-v ERROR \ -v ERROR \
...@@ -109,7 +109,7 @@ if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then ...@@ -109,7 +109,7 @@ if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
--inputFiles ${JUGGLER_MC_FILE} \ --inputFiles ${JUGGLER_MC_FILE} \
--outputFile ${JUGGLER_SIM_FILE} --outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR running npsim" echo "ERROR running ddsim"
exit 1 exit 1
fi fi
fi fi
......
...@@ -35,8 +35,10 @@ void tcs_tests(const char* fname = "rec_tcs.root"){ ...@@ -35,8 +35,10 @@ void tcs_tests(const char* fname = "rec_tcs.root"){
) -> std::vector<float> { ) -> std::vector<float> {
std::vector<float> theta; std::vector<float> theta;
for (const auto& p: v) for (const auto& p: v)
if (p.status == status) if (p.status == status) {
theta.push_back(1000. * p.direction.theta); const auto& mom = p.p;
theta.push_back(1000. * std::atan2(std::hypot(mom.x, mom.y), mom.z));
}
return theta; return theta;
}; };
......
tcs:compile:
stage: compile
extends: .compile_benchmark
script:
- compile_analyses.py tcs
tcs:process: tcs:process:
stage: process stage: process
extends: .phy_benchmark extends: .phy_benchmark
tags: tags:
- phy - phy
needs: ["common:detector"] needs: ["common:detector", "tcs:compile"]
parallel: parallel:
matrix: matrix:
- EBEAM: 5 - EBEAM: 5
...@@ -16,8 +22,8 @@ tcs:process: ...@@ -16,8 +22,8 @@ tcs:process:
PBEAM: 275 PBEAM: 275
TAG: s800 TAG: s800
script: script:
- compile_analyses.py tcs #- bash benchmarks/tcs/tcs.sh --all --ebeam ${EBEAM} --pbeam ${PBEAM} --tag ${TAG}
- bash benchmarks/tcs/tcs.sh --all --ebeam ${EBEAM} --pbeam ${PBEAM} --tag ${TAG} - bash benchmarks/tcs/tcs.sh --data-init --sim --rec --ebeam ${EBEAM} --pbeam ${PBEAM} --tag ${TAG}
tcs:results: tcs:results:
stage: collect stage: collect
......
...@@ -95,7 +95,7 @@ FILE_NAME_TAG="tcs" ...@@ -95,7 +95,7 @@ FILE_NAME_TAG="tcs"
DATA_URL="S3/eictest/ATHENA/EVGEN/EXCLUSIVE/TCS_ABCONV/${EBEAM}x${PBEAM}/hel_minus/TCS_gen_ab_hiAcc_${EBEAM}x${PBEAM}m_${TAG}_novtx.hepmc.gz" DATA_URL="S3/eictest/ATHENA/EVGEN/EXCLUSIVE/TCS_ABCONV/${EBEAM}x${PBEAM}/hel_minus/TCS_gen_ab_hiAcc_${EBEAM}x${PBEAM}m_${TAG}_novtx.hepmc.gz"
export JUGGLER_MC_FILE="${LOCAL_DATA_PATH}/mc_${FILE_NAME_TAG}.hepmc" export JUGGLER_MC_FILE="${LOCAL_DATA_PATH}/mc_${FILE_NAME_TAG}.hepmc"
export JUGGLER_SIM_FILE="${LOCAL_DATA_PATH}/sim_${FILE_NAME_TAG}.root" export JUGGLER_SIM_FILE="${LOCAL_DATA_PATH}/sim_${FILE_NAME_TAG}.edm4hep.root"
export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root" export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root"
echo "FILE_NAME_TAG = ${FILE_NAME_TAG}" echo "FILE_NAME_TAG = ${FILE_NAME_TAG}"
...@@ -121,15 +121,16 @@ fi ...@@ -121,15 +121,16 @@ fi
### Step 2. Run the simulation (geant4) ### Step 2. Run the simulation (geant4)
if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
## run geant4 simulations ## run geant4 simulations
npsim --runType batch \ ddsim --runType batch \
--part.minimalKineticEnergy 1000*GeV \ --part.minimalKineticEnergy 1000*GeV \
--filter.tracker edep0 \
-v ERROR \ -v ERROR \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \
--inputFiles "${JUGGLER_MC_FILE}" \ --inputFiles "${JUGGLER_MC_FILE}" \
--outputFile ${JUGGLER_SIM_FILE} --outputFile ${JUGGLER_SIM_FILE}
if [ "$?" -ne "0" ] ; then if [ "$?" -ne "0" ] ; then
echo "ERROR running npsim" echo "ERROR running ddsim"
exit 1 exit 1
fi fi
fi fi
......
u_omega:compile:
stage: compile
extends: .compile_benchmark
script:
- compile_analyses.py u_omega
u_omega:process: u_omega:process:
stage: process stage: process
extends: .phy_benchmark extends: .phy_benchmark
tags: tags:
- phy - phy
needs: ["common:detector"] needs: ["common:detector", "u_omega:compile"]
script: script:
- compile_analyses.py u_omega #- bash benchmarks/u_omega/u_omega.sh --all
- bash benchmarks/u_omega/u_omega.sh --all - bash benchmarks/u_omega/u_omega.sh --data-init --sim --rec
u_omega:results: u_omega:results:
stage: collect stage: collect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment