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 394 additions and 83 deletions
image: eicweb.phy.anl.gov:4567/eic/juggler/juggler:$JUGGLER_TAG image: eicweb.phy.anl.gov:4567/eic/juggler/juggler:$JUGGLER_TAG
default: default:
artifacts:
expire_in: 20 weeks
paths:
- results/
- datasets/
- sim_output/
- data
reports:
dotenv: juggler.env
before_script: before_script:
- git clone https://eicweb.phy.anl.gov/EIC/NPDet.git
#- git clone https://eicweb.phy.anl.gov/EIC/NPDet.git && mkdir NPDet/build && cd NPDet/build && cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j20 install && cd ../..
- git clone https://eicweb.phy.anl.gov/EIC/detectors/topside.git && mkdir topside/build && cd topside/build && cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j20 install && cd ../.. - git clone https://eicweb.phy.anl.gov/EIC/detectors/topside.git && mkdir topside/build && cd topside/build && cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j20 install && cd ../..
- git clone https://eicweb.phy.anl.gov/EIC/detectors/accelerator.git && cd topside && ln -s ../accelerator/eic && cd ../. artifacts:
expire_in: 72 hours
paths:
- .local/detector
- .local/lib
- results
- config
stages: stages:
- config
- initialize
- data_init - data_init
- simulate - simulate
- benchmarks - benchmarks
- deploy - deploy
get_data: env:
stage: data_init stage: config
tags:
- silicon
script: script:
- git clone https://eicweb.phy.anl.gov/EIC/datasets.git datasets - ./util/print_env.sh
- ln -s datasets/data - mkdir -p /scratch/${CI_PROJECT_NAME}_${CI_PIPELINE_ID}
- mkdir -p results - mkdir -p /scratch/${CI_PROJECT_NAME}_${CI_PIPELINE_ID}/sim_output
- mkdir -p sim_output
roman_pot_simu: detector:
stage: simulate stage: initialize
needs: needs: ["env"]
- ["get_data"] timeout: 1 hours
tags: cache:
- silicon key:
files:
- options/env.sh
- util/build_detector.sh
prefix: "$CI_COMMIT_REF_SLUG"
paths:
- .local/detector
- .local/lib
script: script:
- cp NPDet/src/detectors/trackers/compact/elements.xml ./. - ./util/print_env.sh
- cp NPDet/src/detectors/trackers/compact/materials.xml ./. - ./util/build_detector.sh
- bash trackers/roman_pot_simu.sh - ./util/print_env.sh
- mkdir -p results
- mkdir -p config
roman_pot_nhits: get_data:
stage: benchmarks stage: data_init
needs: needs: ["detector"]
- ["roman_pot_simu"]
tags:
- silicon
script: script:
- root -b -q trackers/simple_tracking.cxx+ - source options/env.sh
allow_failure: true - ln -s ${LOCAL_DATA_PATH}/sim_output sim_output
- ln -s ${LOCAL_DATA_PATH}/datasets/data data
- cd ${LOCAL_DATA_PATH} && git clone --depth=1 https://eicweb.phy.anl.gov/EIC/datasets.git datasets
roman_pot_eta: .det_benchmark:
stage: benchmarks image: eicweb.phy.anl.gov:4567/eic/juggler/juggler:$JUGGLER_TAG
tags:
- silicon
needs: needs:
- ["roman_pot_simu"] - ["get_data"]
script: before_script:
- root -b -q trackers/roman_pot_hit_eta.cxx+ - source options/env.sh
allow_failure: true - ln -s ${LOCAL_DATA_PATH}/sim_output sim_output
- ln -s ${LOCAL_DATA_PATH}/datasets/data data
artifacts:
expire_in: 20 weeks
paths:
- results/
include:
- local: 'calorimeters/calorimeters_config.yml' include:
- local: 'benchmarks/trackers/config.yml'
- local: 'benchmarks/calorimeters/config.yml'
- local: 'benchmarks/pid/config.yml'
#roman_pot_simu:
# stage: simulate
# needs:
# - ["get_data","detector"]
# script:
# - bash benchmarks/trackers/roman_pot_simu.sh
#
#roman_pot_nhits:
# stage: benchmarks
# needs:
# - ["roman_pot_simu","detector"]
# script:
# - root -b -q benchmarks/trackers/simple_tracking.cxx+
# allow_failure: true
#
#roman_pot_eta:
# stage: benchmarks
# needs:
# - ["roman_pot_simu","detector"]
# script:
# - root -b -q benchmarks/trackers/roman_pot_hit_eta.cxx+
# allow_failure: true
#
#zdc_simulation:
# stage: simulate
# needs:
# - ["get_data","detector"]
# script:
# - bash benchmarks/calorimeters/run_simulation_zdc.sh
#
#cal_test_3_zdc_neutrons_reader:
# stage: benchmarks
# needs:
# - ["zdc_simulation","detector"]
# script:
# - root -b -q benchmarks/calorimeters/zdc_neutrons_reader.cxx
# allow_failure: true
#
#
#zdc_benchmark:
# stage: benchmarks
# needs:
# - ["zdc_simulation","detector"]
# script:
# - ls -lrth sim_output
# - root -b -q benchmarks/calorimeters/simple_checking.cxx+
# allow_failure: true
#
#zdc_benchmark_info_histogram:
# stage: benchmarks
# needs:
# - ["zdc_simulation","detector"]
# script:
# - root -b -q benchmarks/calorimeters/simple_info_plot_histograms.cxx+
# allow_failure: true
#
#crystal_emcal_simulation:
# stage: simulate
# needs:
# - ["get_data"]
# script:
# bash benchmarks/calorimeters/run_simulation_crystal.sh
#
#crystal_benchmark:
# stage: benchmarks
# needs:
# - ["crystal_emcal_simulation","detector"]
# script:
# - ls -lrth sim_output
# - root -b -q benchmarks/calorimeters/simple_checking_crystal.cxx+
# allow_failure: true
#
#crystal_pion_simulation:
# stage: simulate
# needs:
# - ["get_data","detector"]
# tags:
# - silicon
# script:
# - source options/env.sh
# - npsim --runType batch --numberOfEvents 100 --compactFile ${DETECTOR_PATH}/topside.xml --inputFiles data/emcal_electrons.hepmc --outputFile sim_output/output_emcal_electrons.root
deploy_results: deploy_results:
stage: deploy stage: deploy
needs: needs:
- ["ben_emcal_barrel_electrons"] - ["cal_bench:zdc_benchmark"]
tags: tags:
- silicon - silicon
script: script:
- echo "deploy results!" - echo "deploy results!"
pages: pages:
stage: deploy stage: deploy
rules: rules:
...@@ -89,3 +180,4 @@ pages: ...@@ -89,3 +180,4 @@ pages:
paths: paths:
- public - public
...@@ -6,10 +6,9 @@ EIC Detector Benchmarks ...@@ -6,10 +6,9 @@ EIC Detector Benchmarks
## Overview ## Overview
Detector benchmarks are meant to test for regressions in individual detector subsystems. Detector benchmarks are meant to test for regressions in individual detector subsystems.
The analysis is meant to avoid a complex reconstruction. The analysis is meant to avoid a reconstruction step.
So for now this precludes using [juggler](https://eicweb.phy.anl.gov/EIC/juggler) for processing the events. So this precludes using [juggler](https://eicweb.phy.anl.gov/EIC/juggler) for processing the events.
[Physics benchmarks](https://eicweb.phy.anl.gov/EIC/benchmarks/physics_benchmarks) will
include the full reconstruction chain processing.
## Adding new benchmarks ## Adding new benchmarks
......
File moved
File moved
#####################
# Simulations
# - Generate datasets
# - Run Geant4
# - Run Juggler
#####################
cal_sim:emcal_barrel_pions:
extends: .det_benchmark
stage: simulate
script:
- bash benchmarks/calorimeters/run_emcal_barrel_pions.sh
cal_sim:emcal_barrel_electrons:
extends: .det_benchmark
stage: simulate
script:
- bash benchmarks/calorimeters/run_emcal_barrel_electrons.sh
cal_sim:crystal_emcal:
extends: .det_benchmark
stage: simulate
script:
- bash benchmarks/calorimeters/run_simulation_crystal.sh
cal_sim:crystal_pion:
extends: .det_benchmark
stage: simulate
script:
- npsim --runType batch --numberOfEvents 100 --compactFile ${DETECTOR_PATH}/topside.xml --inputFiles data/emcal_electrons.hepmc --outputFile sim_output/output_emcal_electrons.root
cal_sim:zdc:
extends: .det_benchmark
stage: simulate
script:
- bash benchmarks/calorimeters/run_simulation_zdc.sh
###################
# Benchmarks
###################
cal_bench:emcal_barrel_pions:
extends: .det_benchmark
stage: benchmarks
needs:
- ["cal_sim:emcal_barrel_pions"]
script:
- root -b -q benchmarks/calorimeters/scripts/emcal_barrel_pions_analysis.cxx+
cal_bench:emcal_barrel_electrons:
extends: .det_benchmark
stage: benchmarks
needs:
- ["cal_sim:emcal_barrel_electrons"]
script:
- rootls -t sim_output/sim_emcal_barrel_uniform_electrons.root
- root -b -q benchmarks/calorimeters/scripts/emcal_barrel_electrons_analysis.cxx+
cal_bench:crystal_benchmark:
extends: .det_benchmark
stage: benchmarks
needs:
- ["cal_sim:crystal_emcal"]
script:
- rootls -t sim_output/output_emcal_electrons.root
- echo " Not yet complete"
#- root -b -q benchmarks/calorimeters/simple_checking_crystal.cxx+
#cal_test_3_zdc_neutrons_reader:
#stage: benchmarks
#tags:
#- sodium
#script:
#- root -b -q benchmarks/calorimeters/zdc_neutrons_reader.cxx
#artifact:
# paths:
# - results/
#allow_failure: true
cal_bench:zdc_benchmark:
extends: .det_benchmark
stage: benchmarks
needs:
- ["cal_sim:zdc"]
script:
- echo " Not yet complete"
#- root -b -q benchmarks/calorimeters/simple_checking.cxx+
cal_bench:zdc_benchmark_info_histogram:
extends: .det_benchmark
stage: benchmarks
needs:
- ["cal_sim:zdc"]
script:
- root -b -q benchmarks/calorimeters/simple_info_plot_histograms.cxx+
File moved
File moved
File moved
...@@ -8,9 +8,6 @@ if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then ...@@ -8,9 +8,6 @@ if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then
export JUGGLER_N_EVENTS=1000 export JUGGLER_N_EVENTS=1000
fi fi
if [[ ! -n "${JUGGLER_INSTALL_PREFIX}" ]] ; then
export JUGGLER_INSTALL_PREFIX="/usr/local"
fi
if [[ ! -n "${E_start}" ]] ; then if [[ ! -n "${E_start}" ]] ; then
export E_start=5.0 export E_start=5.0
...@@ -30,13 +27,13 @@ echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" ...@@ -30,13 +27,13 @@ echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}"
echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
# Generate the input events # Generate the input events
root -b -q "calorimeters/scripts/emcal_barrel_electrons.cxx(${JUGGLER_N_EVENTS}, ${E_start}, ${E_end}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")" root -b -q "benchmarks/calorimeters/scripts/emcal_barrel_electrons.cxx(${JUGGLER_N_EVENTS}, ${E_start}, ${E_end}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")"
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR running script: generating input events" echo "ERROR running script: generating input events"
exit 1 exit 1
fi fi
# Plot the input events # Plot the input events
root -b -q "calorimeters/scripts/emcal_barrel_electrons_reader.cxx(${E_start}, ${E_end}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")" root -b -q "benchmarks/calorimeters/scripts/emcal_barrel_electrons_reader.cxx(${E_start}, ${E_end}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")"
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR running script: plotting input events" echo "ERROR running script: plotting input events"
exit 1 exit 1
...@@ -47,7 +44,7 @@ npsim --runType batch \ ...@@ -47,7 +44,7 @@ npsim --runType batch \
-v WARNING \ -v WARNING \
--part.minimalKineticEnergy 0.5*GeV \ --part.minimalKineticEnergy 0.5*GeV \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${JUGGLER_DETECTOR}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \
--inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \
--outputFile sim_output/${JUGGLER_SIM_FILE} --outputFile sim_output/${JUGGLER_SIM_FILE}
...@@ -56,17 +53,9 @@ if [[ "$?" -ne "0" ]] ; then ...@@ -56,17 +53,9 @@ if [[ "$?" -ne "0" ]] ; then
exit 1 exit 1
fi fi
# Run Juggler
xenv -x ${JUGGLER_INSTALL_PREFIX}/Juggler.xenv \
gaudirun.py calorimeters/options/emcal_barrel_reco.py
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running juggler"
exit 1
fi
# Directory for plots # Directory for plots
mkdir -p results mkdir -p results
# Move ROOT output file # Move ROOT output file
mv ${JUGGLER_REC_FILE} sim_output/ #mv ${JUGGLER_REC_FILE} sim_output/
...@@ -30,13 +30,13 @@ echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" ...@@ -30,13 +30,13 @@ echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}"
echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
# Generate the input events # Generate the input events
root -b -q "calorimeters/scripts/emcal_barrel_pions.cxx(${JUGGLER_N_EVENTS}, ${E_start}, ${E_end}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")" root -b -q "benchmarks/calorimeters/scripts/emcal_barrel_pions.cxx(${JUGGLER_N_EVENTS}, ${E_start}, ${E_end}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")"
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR running script: generating input events" echo "ERROR running script: generating input events"
exit 1 exit 1
fi fi
# Plot the input events # Plot the input events
root -b -q "calorimeters/scripts/emcal_barrel_pions_reader.cxx(${E_start}, ${E_end}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")" root -b -q "benchmarks/calorimeters/scripts/emcal_barrel_pions_reader.cxx(${E_start}, ${E_end}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")"
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR running script: plotting input events" echo "ERROR running script: plotting input events"
exit 1 exit 1
...@@ -47,7 +47,7 @@ npsim --runType batch \ ...@@ -47,7 +47,7 @@ npsim --runType batch \
-v WARNING \ -v WARNING \
--part.minimalKineticEnergy 0.5*GeV \ --part.minimalKineticEnergy 0.5*GeV \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${JUGGLER_DETECTOR}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \
--inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \
--outputFile sim_output/${JUGGLER_SIM_FILE} --outputFile sim_output/${JUGGLER_SIM_FILE}
...@@ -56,17 +56,9 @@ if [[ "$?" -ne "0" ]] ; then ...@@ -56,17 +56,9 @@ if [[ "$?" -ne "0" ]] ; then
exit 1 exit 1
fi fi
# Run Juggler
xenv -x ${JUGGLER_INSTALL_PREFIX}/Juggler.xenv \
gaudirun.py calorimeters/options/emcal_barrel_reco.py
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running juggler"
exit 1
fi
# Directory for plots # Directory for plots
mkdir -p results mkdir -p results
# Move ROOT output file # Move ROOT output file
mv ${JUGGLER_REC_FILE} sim_output/ #mv ${JUGGLER_REC_FILE} sim_output/
#!/bin/bash #!/bin/bash
ddsim --runType batch --numberOfEvents 100 \ ddsim --runType batch --numberOfEvents 100 \
--compactFile ./calorimeters/Crystal_example.xml \ --compactFile benchmarks/calorimeters/Crystal_example.xml \
--inputFiles ./data/emcal_electrons.hepmc \ --inputFiles ./data/emcal_electrons.hepmc \
--outputFile ./sim_output/output_emcal_electrons.root --outputFile ./sim_output/output_emcal_electrons.root
#!/bin/bash #!/bin/bash
npsim --runType batch --numberOfEvents 10000 \ npsim --runType batch --numberOfEvents 10000 \
--compactFile ./calorimeters/topside.xml \ --compactFile benchmarks/calorimeters/topside.xml \
--inputFiles ./data/emcal_pions_upto1GeV_10kevents.hepmc \ --inputFiles ./data/emcal_pions_upto1GeV_10kevents.hepmc \
--outputFile ./sim_output/sim_crystal_pion_input.root --outputFile ./sim_output/sim_crystal_pion_input.root
#!/bin/bash #!/bin/bash
ddsim --runType batch --numberOfEvents 100 \ ddsim --runType batch --numberOfEvents 10 \
--compactFile ./calorimeters/ZDC_example.xml \ --compactFile benchmarks/calorimeters/ZDC_example.xml \
--inputFiles ./data/zdc_photons.hepmc \ --inputFiles ./data/zdc_photons.hepmc \
--outputFile ./sim_output/output_zdc_photons.root --outputFile ./sim_output/output_zdc_photons.root
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
using ROOT::RDataFrame; using ROOT::RDataFrame;
using namespace ROOT::VecOps; using namespace ROOT::VecOps;
void emcal_barrel_electrons_analysis(const char* input_fname = "sim_output/rec_emcal_barrel_uniform_electrons.root") void emcal_barrel_electrons_analysis(const char* input_fname = "sim_output/sim_emcal_barrel_uniform_electrons.root")
{ {
// Setting for graphs // Setting for graphs
gROOT->SetStyle("Plain"); gROOT->SetStyle("Plain");
...@@ -52,73 +52,92 @@ void emcal_barrel_electrons_analysis(const char* input_fname = "sim_output/rec_e ...@@ -52,73 +52,92 @@ void emcal_barrel_electrons_analysis(const char* input_fname = "sim_output/rec_e
for (const auto& i: evt) for (const auto& i: evt)
total_edep += i.energyDeposit; total_edep += i.energyDeposit;
result.push_back(total_edep); result.push_back(total_edep);
return result; return result;
}; };
// Sampling fraction = Esampling / Ethrown // Sampling fraction = Esampling / Ethrown
auto fsam = [](const std::vector<double>& sampled, const std::vector<double>& thrown) { auto fsam = [](const std::vector<double>& sampled,
const std::vector<double>& thrown) {
std::vector<double> result; std::vector<double> result;
for (const auto& E1 : thrown) { for (const auto& E1 : thrown) {
for (const auto& E2 : sampled) for (const auto& E2 : sampled)
result.push_back(E2/E1); result.push_back(E2 / E1);
} }
return result; return result;
}; };
// Define variables // Define variables
auto d1 = d0.Define("Ethr", Ethr, {"mcparticles2"}) auto d1 = d0.Define("Ethr", Ethr, {"mcparticles"})
.Define("nhits", nhits, {"EcalBarrelAstroPixHits2"}) .Define("nhits", nhits, {"EcalBarrelHits"})
.Define("Esim", Esim, {"EcalBarrelAstroPixHits2"}) .Define("Esim", Esim, {"EcalBarrelHits"})
.Define("fsam", fsam, {"Esim","Ethr"}) .Define("fsam", fsam, {"Esim", "Ethr"});
;
// Define Histograms // Define Histograms
auto hEthr = d1.Histo1D({"hEthr", "Thrown Energy; Thrown Energy [GeV]; Events", 100, 0.0, 7.5}, "Ethr"); auto hEthr = d1.Histo1D(
auto hNhits = d1.Histo1D({"hNhits", "Number of hits per events; Number of hits; Events", 100, 0.0, 2000.0}, "nhits"); {"hEthr", "Thrown Energy; Thrown Energy [GeV]; Events", 100, 0.0, 7.5},
auto hEsim = d1.Histo1D({"hEsim", "Energy Deposit; Energy Deposit [GeV]; Events", 100, 0.0, 1.0}, "Esim"); "Ethr");
auto hfsam = d1.Histo1D({"hfsam", "Sampling Fraction; Sampling Fraction; Events", 100, 0.0, 0.1}, "fsam"); auto hNhits =
d1.Histo1D({"hNhits", "Number of hits per events; Number of hits; Events",
100, 0.0, 2000.0},
"nhits");
auto hEsim = d1.Histo1D(
{"hEsim", "Energy Deposit; Energy Deposit [GeV]; Events", 100, 0.0, 1.0},
"Esim");
auto hfsam = d1.Histo1D(
{"hfsam", "Sampling Fraction; Sampling Fraction; Events", 100, 0.0, 0.1},
"fsam");
// Event Counts // Event Counts
auto nevents_thrown = d1.Count(); auto nevents_thrown = d1.Count();
std::cout << "Number of Thrown Events: " << (*nevents_thrown) << "\n"; std::cout << "Number of Thrown Events: " << (*nevents_thrown) << "\n";
// Draw Histograms // Draw Histograms
TCanvas *c1 = new TCanvas("c1", "c1", 700, 500); {
c1->SetLogy(1); TCanvas* c1 = new TCanvas("c1", "c1", 700, 500);
hEthr->GetYaxis()->SetTitleOffset(1.4); c1->SetLogy(1);
hEthr->SetLineWidth(2); auto h = hEthr->DrawCopy();
hEthr->SetLineColor(kBlue); //h->GetYaxis()->SetTitleOffset(1.4);
hEthr->DrawClone(); h->SetLineWidth(2);
c1->SaveAs("results/emcal_barrel_electrons_Ethr.png"); h->SetLineColor(kBlue);
c1->SaveAs("results/emcal_barrel_electrons_Ethr.pdf"); c1->SaveAs("results/emcal_barrel_electrons_Ethr.png");
c1->SaveAs("results/emcal_barrel_electrons_Ethr.pdf");
TCanvas *c2 = new TCanvas("c2", "c2", 700, 500); }
c2->SetLogy(1); std::cout << "derp1\n";
hNhits->GetYaxis()->SetTitleOffset(1.4);
hNhits->SetLineWidth(2); {
hNhits->SetLineColor(kBlue); TCanvas* c2 = new TCanvas("c2", "c2", 700, 500);
hNhits->DrawClone(); c2->SetLogy(1);
c2->SaveAs("results/emcal_barrel_electrons_nhits.png"); auto h = hNhits->DrawCopy();
c2->SaveAs("results/emcal_barrel_electrons_nhits.pdf"); //h->GetYaxis()->SetTitleOffset(1.4);
h->SetLineWidth(2);
TCanvas *c3 = new TCanvas("c3", "c3", 700, 500); h->SetLineColor(kBlue);
c3->SetLogy(1); c2->SaveAs("results/emcal_barrel_electrons_nhits.png");
hEsim->GetYaxis()->SetTitleOffset(1.4); c2->SaveAs("results/emcal_barrel_electrons_nhits.pdf");
hEsim->SetLineWidth(2); }
hEsim->SetLineColor(kBlue);
hEsim->DrawClone(); {
c3->SaveAs("results/emcal_barrel_electrons_Esim.png"); TCanvas* c3 = new TCanvas("c3", "c3", 700, 500);
c3->SaveAs("results/emcal_barrel_electrons_Esim.pdf"); c3->SetLogy(1);
auto h = hEsim->DrawCopy();
TCanvas *c4 = new TCanvas("c4", "c4", 700, 500); //h->GetYaxis()->SetTitleOffset(1.4);
c4->SetLogy(1); h->SetLineWidth(2);
hfsam->GetYaxis()->SetTitleOffset(1.4); h->SetLineColor(kBlue);
hfsam->SetLineWidth(2); c3->SaveAs("results/emcal_barrel_electrons_Esim.png");
hfsam->SetLineColor(kBlue); c3->SaveAs("results/emcal_barrel_electrons_Esim.pdf");
hfsam->Fit("gaus","","",0.01,0.1); }
hfsam->GetFunction("gaus")->SetLineWidth(2);
hfsam->GetFunction("gaus")->SetLineColor(kRed); std::cout << "derp4\n";
hfsam->DrawClone(); {
c4->SaveAs("results/emcal_barrel_electrons_fsam.png"); TCanvas* c4 = new TCanvas("c4", "c4", 700, 500);
c4->SaveAs("results/emcal_barrel_electrons_fsam.pdf"); c4->SetLogy(1);
auto h = hfsam->DrawCopy();
//h->GetYaxis()->SetTitleOffset(1.4);
h->SetLineWidth(2);
h->SetLineColor(kBlue);
//h->Fit("gaus", "", "", 0.01, 0.1);
//h->GetFunction("gaus")->SetLineWidth(2);
//h->GetFunction("gaus")->SetLineColor(kRed);
c4->SaveAs("results/emcal_barrel_electrons_fsam.png");
c4->SaveAs("results/emcal_barrel_electrons_fsam.pdf");
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment