Skip to content
Snippets Groups Projects
Commit 11bb0012 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

- Moved scripts into benchmarks directory.

- Using local storage to avoid large artifacts.
- Make sure new jobs inherit the setup of local storage.
parent 3fa88316
No related branches found
No related tags found
1 merge request!20Restructuring repo
Showing
with 1091 additions and 171 deletions
......@@ -19,7 +19,7 @@
using ROOT::RDataFrame;
using namespace ROOT::VecOps;
void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/rec_emcal_barrel_uniform_pions.root")
void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal_barrel_uniform_pions.root")
{
// Setting for graphs
gROOT->SetStyle("Plain");
......@@ -66,9 +66,9 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/rec_emcal
};
// Define variables
auto d1 = d0.Define("Ethr", Ethr, {"mcparticles2"})
.Define("nhits", nhits, {"EcalBarrelAstroPixHits2"})
.Define("Esim", Esim, {"EcalBarrelAstroPixHits2"})
auto d1 = d0.Define("Ethr", Ethr, {"mcparticles"})
.Define("nhits", nhits, {"EcalBarrelHits"})
.Define("Esim", Esim, {"EcalBarrelHits"})
.Define("fsam", fsam, {"Esim","Ethr"})
;
......
......@@ -9,14 +9,14 @@ void simple_checking_crystal(const char* fname = "sim_output/output_emcal_electr
ROOT::EnableImplicitMT(); // Tell ROOT you want to go parallel
double degree = TMath::Pi()/180.0;
TChain* t = new TChain("EVENT");
TChain* t = new TChain("events");
t->Add(fname);
ROOT::RDataFrame d0(*t);//, {"EcalHits","MCParticles"});
auto nhits = [] (std::vector<dd4hep::sim::Geant4Calorimeter::Hit*>& hits){ return (int) hits.size(); };
auto nhits = [] (const std::vector<dd4pod::CalorimeterHit>& hits){ return (int) hits.size(); };
auto d1 = d0.Define("nhits", nhits, {"EcalHits"});
auto d1 = d0.Define("nhits", nhits, {"CrystalEcalHits"});
auto h0 = d1.Histo1D(TH1D("h0", "nhits; ", 20, 0,20), "nhits");
auto n0 = d1.Filter([](int n){ return (n>0); },{"nhits"}).Count();
......
......@@ -54,7 +54,7 @@ void simple_info_plot_histograms(const char* fname = "sim_output/output_zdc_phot
// Detector
dd4hep::Detector& detector = dd4hep::Detector::getInstance();
detector.fromCompact("./calorimeters/ZDC_example.xml");
detector.fromCompact("benchmarks/calorimeters/ZDC_example.xml");
// Volume
dd4hep::VolumeManager volman = dd4hep::VolumeManager::getVolumeManager(detector);
// CellID Coverter
......@@ -209,7 +209,7 @@ void simple_info_plot_histograms(const char* fname = "sim_output/output_zdc_phot
h6->DrawClone();
c4->SaveAs("sim_output/detID_volID_histo_zdc_photons.png");
if(*n0<5) {
if(*n0<1) {
std::quick_exit(1);
}
}
......
File moved
File moved
......@@ -4,8 +4,8 @@
pid_test_1_dummy_test:
stage: benchmarks
script:
- bash pid/dummy_test.sh
artifact:
- bash benchmarks/pid/dummy_test.sh
artifacts:
paths:
- results/
allow_failure: true
......
File moved
File moved
sim_trackers:roman_pot:
stage: simulate
extends: .det_benchmark
script:
- bash benchmarks/trackers/roman_pot_simu.sh
roman_pot_nhits:
stage: benchmarks
extends: .det_benchmark
needs:
- ["sim_trackers:roman_pot"]
script:
- root -b -q benchmarks/trackers/simple_tracking.cxx+
roman_pot_eta:
stage: benchmarks
extends: .det_benchmark
needs:
- ["sim_trackers:roman_pot"]
script:
- root -b -q benchmarks/trackers/roman_pot_hit_eta.cxx+
allow_failure: true
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<materials>
<!--
Air by weight from
http://www.engineeringtoolbox.com/air-composition-24_212.html
-->
<material name="Air">
<D type="density" unit="g/cm3" value="0.0012"/>
<fraction n="0.754" ref="N"/>
<fraction n="0.234" ref="O"/>
<fraction n="0.012" ref="Ar"/>
</material>
<material name="air">
<D type="density" unit="g/cm3" value="0.0012"/>
<fraction n="0.754" ref="N"/>
<fraction n="0.234" ref="O"/>
<fraction n="0.012" ref="Ar"/>
</material>
<!-- We model vakuum just as very thin air -->
<material name="Vacuum">
<D type="density" unit="g/cm3" value="0.0000000001" />
<fraction n="0.754" ref="N"/>
<fraction n="0.234" ref="O"/>
<fraction n="0.012" ref="Ar"/>
</material>
<material name="Epoxy">
<D type="density" value="1.3" unit="g/cm3"/>
<composite n="44" ref="H"/>
<composite n="15" ref="C"/>
<composite n="7" ref="O"/>
</material>
<material name="Quartz">
<D type="density" value="2.2" unit="g/cm3"/>
<composite n="1" ref="Si"/>
<composite n="2" ref="O"/>
</material>
<material name="G10">
<D type="density" value="1.7" unit="g/cm3"/>
<fraction n="0.08" ref="Cl"/>
<fraction n="0.773" ref="Quartz"/>
<fraction n="0.147" ref="Epoxy"/>
</material>
<material name="Polystyrene">
<D value="1.032" unit="g/cm3"/>
<composite n="19" ref="C"/>
<composite n="21" ref="H"/>
</material>
<material name="Steel235">
<D value="7.85" unit="g/cm3"/>
<fraction n="0.998" ref="Fe"/>
<fraction n=".002" ref="C"/>
</material>
<material name="SiliconOxide">
<D type="density" value="2.65" unit="g/cm3"/>
<composite n="1" ref="Si"/>
<composite n="2" ref="O"/>
</material>
<material name="SiliconNitride">
<D type="density" value="3.17" unit="g/cm3"/>
<composite n="3" ref="Si"/>
<composite n="4" ref="N"/>
</material>
<material name="BoronOxide">
<D type="density" value="2.46" unit="g/cm3"/>
<composite n="2" ref="B"/>
<composite n="3" ref="O"/>
</material>
<material name="SodiumOxide">
<D type="density" value="2.65" unit="g/cm3"/>
<composite n="2" ref="Na"/>
<composite n="1" ref="O"/>
</material>
<material name="AluminumOxide">
<D type="density" value="3.89" unit="g/cm3"/>
<composite n="2" ref="Al"/>
<composite n="3" ref="O"/>
</material>
<material name="PyrexGlass">
<D type="density" value="2.23" unit="g/cm3"/>
<fraction n="0.806" ref="SiliconOxide"/>
<fraction n="0.130" ref="BoronOxide"/>
<fraction n="0.040" ref="SodiumOxide"/>
<fraction n="0.023" ref="AluminumOxide"/>
</material>
<material name="CarbonFiber">
<D type="density" value="1.5" unit="g/cm3"/>
<fraction n="0.65" ref="C"/>
<fraction n="0.35" ref="Epoxy"/>
</material>
<material name="CarbonFiber_50D">
<D type="density" value="0.75" unit="g/cm3"/>
<fraction n="0.65" ref="C"/>
<fraction n="0.35" ref="Epoxy"/>
</material>
<material name="Rohacell31">
<D type="density" value="0.032" unit="g/cm3"/>
<composite n="9" ref="C"/>
<composite n="13" ref="H"/>
<composite n="2" ref="O"/>
<composite n="1" ref="N"/>
</material>
<material name="Rohacell31_50D">
<D type="density" value="0.016" unit="g/cm3"/>
<composite n="9" ref="C"/>
<composite n="13" ref="H"/>
<composite n="2" ref="O"/>
<composite n="1" ref="N"/>
</material>
<material name="RPCGasDefault" state="gas">
<D type="density" value="0.0037" unit="g/cm3"/>
<composite n="209" ref="C"/>
<composite n="239" ref="H"/>
<composite n="381" ref="F"/>
</material>
<material name="PolystyreneFoam">
<D type="density" value="0.0056" unit="g/cm3"/>
<fraction n="1.0" ref="Polystyrene"/>
</material>
<material name="Kapton">
<D value="1.43" unit="g/cm3" />
<composite n="22" ref="C"/>
<composite n="10" ref="H" />
<composite n="2" ref="N" />
<composite n="5" ref="O" />
</material>
<material name="PEEK">
<D value="1.37" unit="g/cm3" />
<composite n="19" ref="C"/>
<composite n="12" ref="H" />
<composite n="3" ref="O" />
</material>
<material name="FR4">
<D type="density" value="1.025*g/cm3" />
<fraction n="0.18077359" ref="Si" />
<fraction n="0.4056325" ref="O" />
<fraction n="0.27804208" ref="C" />
<fraction n="0.068442752" ref="H" />
<fraction n="0.067109079" ref="Br" />
</material>
<material name="GEMGas" state="gas">
<D type="density" value="0.0037" unit="g/cm3"/>
<composite n="209" ref="C"/>
<composite n="239" ref="H"/>
<composite n="381" ref="F"/>
</material>
......@@ -62,8 +62,7 @@
</display>
<detectors>
<detector id = "1" name = "MyRomanPot" type = "RomanPot" readout =
"ForwardRomanPotHits" vis = "InvisibleWithDaughters">
<detector id="1" name="MyRomanPot" type="RomanPot" readout="ForwardRomanPotHits" vis="InvisibleWithDaughters">
<dimensions x = "5.0*cm" y = "5.0*cm" delta = "0.05*mm" />
<frame x = "20.0*cm" y = "10.0*cm" z = "2*cm" />
<position z_offset = "20.0*m" rotation = "false" vmax = "10*cm" v = "0.5*cm" />
......
......@@ -2,5 +2,5 @@
ddsim --runType batch -N 300 \
--inputFiles ./data/forward_ions.hepmc \
--compactFile ./trackers/roman_pot.xml \
--compactFile benchmarks/trackers/roman_pot.xml \
--outputFile ./sim_output/roman_pot_out.root
......@@ -116,7 +116,7 @@ void simple_tracking(const char* fname = "./sim_output/roman_pot_out.root"){
h0->DrawClone();
std::cout << *n0 << " events with nonzero hits\n";
if(*n0<5) {
if(*n0<1) {
std::quick_exit(1);
}
......
#####################
# Simulations
# - Generate datasets
# - Run Geant4
# - Run Juggler
#####################
sim_emcal_barrel_pions:
image: eicweb.phy.anl.gov:4567/eic/juggler/juggler:$JUGGLER_TAG
stage: simulate
tags:
- silicon
artifacts:
expire_in: 20 weeks
paths:
- results/
- sim_output/
script:
- bash calorimeters/run_emcal_barrel_pions.sh
allow_failure: true
sim_emcal_barrel_electrons:
image: eicweb.phy.anl.gov:4567/eic/juggler/juggler:$JUGGLER_TAG
stage: simulate
tags:
- silicon
artifacts:
expire_in: 20 weeks
paths:
- results/
- sim_output/
script:
- bash calorimeters/run_emcal_barrel_electrons.sh
allow_failure: true
crystal_emcal_simulation:
stage: simulate
needs:
- ["get_data"]
tags:
- silicon
script:
- cp NPDet/src/detectors/calorimeters/compact/elements.xml ./.
- cp NPDet/src/detectors/calorimeters/compact/materials.xml ./.
- bash calorimeters/run_simulation_crystal.sh
crystal_pion_simulation:
stage: simulate
needs:
- ["get_data"]
tags:
- silicon
script:
- cd topside && ls -l
- npsim --runType batch --numberOfEvents 100 --compactFile topside.xml --inputFiles ../data/emcal_electrons.hepmc --outputFile ../sim_output/output_emcal_electrons.root
#zdc_simulation:
#stage: simulate
#needs:
#- ["get_data"]
#tags:
#- silicon
#script:
#- cp NPDet/src/detectors/calorimeters/compact/elements.xml ./.
#- cp NPDet/src/detectors/calorimeters/compact/materials.xml ./.
#- bash calorimeters/run_simulation_zdc.sh
###################
# Benchmarks
###################
ben_emcal_barrel_pions:
stage: benchmarks
tags:
- silicon
artifacts:
expire_in: 20 weeks
paths:
- results/
needs:
- ["sim_emcal_barrel_pions"]
script:
- ls -lrth sim_output
- root -b -q calorimeters/scripts/emcal_barrel_pions_analysis.cxx+
allow_failure: true
ben_emcal_barrel_electrons:
stage: benchmarks
tags:
- silicon
artifacts:
expire_in: 20 weeks
paths:
- results/
needs:
- ["sim_emcal_barrel_electrons"]
script:
- ls -lrth sim_output
- root -b -q calorimeters/scripts/emcal_barrel_electrons_analysis.cxx+
allow_failure: true
crystal_benchmark:
stage: benchmarks
tags:
- silicon
needs:
- ["crystal_emcal_simulation"]
script:
- ls -lrth sim_output
- root -b -q calorimeters/simple_checking_crystal.cxx+
allow_failure: true
#cal_test_3_zdc_neutrons_reader:
#stage: benchmarks
#tags:
#- sodium
#script:
#- root -b -q calorimeters/zdc_neutrons_reader.cxx
#artifact:
# paths:
# - results/
#allow_failure: true
#zdc_benchmark:
#stage: benchmarks
#tags:
#- silicon
#needs:
#- ["zdc_simulation"]
#dependencies:
#- zdc_simulation
#script:
#- ls -lrth sim_output
#- root -b -q calorimeters/simple_checking.cxx+
#allow_failure: true
#zdc_benchmark_info_histogram:
#stage: benchmarks
#needs:
#- ["zdc_simulation"]
#tags:
#- silicon
#dependencies:
#- zdc_simulation
#script:
#- cp NPDet/src/detectors/calorimeters/compact/elements.xml calorimeters/
#- cp NPDet/src/detectors/calorimeters/compact/materials.xml calorimeters/
#- root -b -q calorimeters/simple_info_plot_histograms.cxx+
#allow_failure: true
#!/bin/bash
echo "Calorimeter Dummy Test..."
echo "fails."
exit 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment