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

dis_analysis_ecal, dis_analysis_hcal, dis_analysis_raw

parent cfdbaeab
No related branches found
No related tags found
1 merge request!108Analysis: dis_analysis_ecal, dis_analysis_hcal, dis_analysis_raw
#include "common_bench/benchmark.h"
#include "common_bench/mt.h"
#include "common_bench/util.h"
#include "common_bench/plot.h"
#include <cmath>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include "ROOT/RDataFrame.hxx"
#include <TH1D.h>
#include <TFitResult.h>
#include <TRandom3.h>
#include <TCanvas.h>
#include "fmt/color.h"
#include "fmt/core.h"
#include "nlohmann/json.hpp"
#include "eicd/RawCalorimeterHit.h"
int dis_electrons_ecal(const std::string& config_name)
{
// read our configuration
std::ifstream config_file{config_name};
nlohmann::json config;
config_file >> config;
const std::string rec_file = config["rec_file"];
const std::string detector = config["detector"];
const std::string output_prefix = config["output_prefix"];
const std::string test_tag = config["test_tag"];
fmt::print(fmt::emphasis::bold | fg(fmt::color::forest_green),
"Running DIS electron analysis...\n");
fmt::print(" - Detector package: {}\n", detector);
fmt::print(" - input file: {}\n", rec_file);
fmt::print(" - output prefix: {}\n", output_prefix);
fmt::print(" - test tag: {}\n", test_tag);
// create our test definition
// test_tag
common_bench::Test dis_Q2_resolution{
{{"name", fmt::format("{}_Q2_resolution", test_tag)},
{"title", "DIS Q2 resolution"},
{"description",
fmt::format("DIS Q2 resolution with {}, estimated using a Gaussian fit.", detector)},
{"quantity", "resolution (in %)"},
{"target", "0.1"}}};
// Run this in multi-threaded mode if desired
ROOT::EnableImplicitMT(kNumThreads);
ROOT::RDataFrame d("events", rec_file);
return 0;
}
#include "common_bench/benchmark.h"
#include "common_bench/mt.h"
#include "common_bench/util.h"
#include "common_bench/plot.h"
#include <cmath>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include "ROOT/RDataFrame.hxx"
#include <TH1D.h>
#include <TFitResult.h>
#include <TRandom3.h>
#include <TCanvas.h>
#include "fmt/color.h"
#include "fmt/core.h"
#include "nlohmann/json.hpp"
#include "eicd/RawCalorimeterHit.h"
int dis_electrons_hcal(const std::string& config_name)
{
// read our configuration
std::ifstream config_file{config_name};
nlohmann::json config;
config_file >> config;
const std::string rec_file = config["rec_file"];
const std::string detector = config["detector"];
const std::string output_prefix = config["output_prefix"];
const std::string test_tag = config["test_tag"];
fmt::print(fmt::emphasis::bold | fg(fmt::color::forest_green),
"Running DIS electron analysis...\n");
fmt::print(" - Detector package: {}\n", detector);
fmt::print(" - input file: {}\n", rec_file);
fmt::print(" - output prefix: {}\n", output_prefix);
fmt::print(" - test tag: {}\n", test_tag);
// create our test definition
// test_tag
common_bench::Test dis_Q2_resolution{
{{"name", fmt::format("{}_Q2_resolution", test_tag)},
{"title", "DIS Q2 resolution"},
{"description",
fmt::format("DIS Q2 resolution with {}, estimated using a Gaussian fit.", detector)},
{"quantity", "resolution (in %)"},
{"target", "0.1"}}};
// Run this in multi-threaded mode if desired
ROOT::EnableImplicitMT(kNumThreads);
ROOT::RDataFrame d("events", rec_file);
return 0;
}
\ No newline at end of file
#include "common_bench/benchmark.h"
#include "common_bench/mt.h"
#include "common_bench/util.h"
#include "common_bench/plot.h"
#include <cmath>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include "ROOT/RDataFrame.hxx"
#include <TH1D.h>
#include <TFitResult.h>
#include <TRandom3.h>
#include <TCanvas.h>
#include "fmt/color.h"
#include "fmt/core.h"
#include "nlohmann/json.hpp"
#include "eicd/RawCalorimeterHit.h"
int dis_electrons_raw(const std::string& config_name)
{
// read our configuration
std::ifstream config_file{config_name};
nlohmann::json config;
config_file >> config;
const std::string rec_file = config["rec_file"];
const std::string detector = config["detector"];
const std::string output_prefix = config["output_prefix"];
const std::string test_tag = config["test_tag"];
fmt::print(fmt::emphasis::bold | fg(fmt::color::forest_green),
"Running DIS electron analysis...\n");
fmt::print(" - Detector package: {}\n", detector);
fmt::print(" - input file: {}\n", rec_file);
fmt::print(" - output prefix: {}\n", output_prefix);
fmt::print(" - test tag: {}\n", test_tag);
// create our test definition
// test_tag
common_bench::Test dis_Q2_resolution{
{{"name", fmt::format("{}_Q2_resolution", test_tag)},
{"title", "DIS Q2 resolution"},
{"description",
fmt::format("DIS Q2 resolution with {}, estimated using a Gaussian fit.", detector)},
{"quantity", "resolution (in %)"},
{"target", "0.1"}}};
// Run this in multi-threaded mode if desired
ROOT::EnableImplicitMT(kNumThreads);
ROOT::RDataFrame d("events", rec_file);
auto d0 = d.Define("n_EcalEndcapPRawHits", "EcalEndcapPRawHits.size()")
.Define("n_EcalBarrelImagingRawHits", "EcalBarrelImagingRawHits.size()")
.Define("n_EcalBarrelScFiRawHits", "EcalBarrelScFiRawHits.size()")
.Define("n_EcalEndcapNRawHits", "EcalEndcapNRawHits.size()")
.Define("n_HcalEndcapPRawHits", "HcalEndcapPRawHits.size()")
.Define("n_HcalBarrelRawHits", "HcalBarrelRawHits.size()")
.Define("n_HcalEndcapNRawHits", "HcalEndcapNRawHits.size()")
;
// Ecal
auto h_n_EcalEndcapPRawHits = d0.Histo1D({"h_n_EcalEndcapPRawHits", "; hits; counts", 100, 0, 25}, "n_EcalEndcapPRawHits");
auto h_n_EcalBarrlImagingRawHits = d0.Histo1D({"h_n_EcalBarrelImagingRawHits", "; hits; counts", 100, 0, 25}, "n_EcalBarrelImagingRawHits");
auto h_n_EcalBarrelScFiRawHits = d0.Histo1D({"h_n_EcalBarrelScFiRawHits", "; hits; counts", 100, 0, 25}, "n_EcalBarrelScFiRawHits");
auto h_n_EcalEndcapNRawHits = d0.Histo1D({"h_n_EcalEndcapNRawHits", "; hits; counts", 100, 0, 25}, "n_EcalEndcapNRawHits");
auto h_adc_EcalEndcapPRawHits = d0.Histo1D({"h_adc_EcalEndcapPRawHits", "; amplitude; counts", 100, 0, 4095}, "EcalEndcapPRawHits.amplitude");
auto h_adc_EcalBarrlImagingRawHits = d0.Histo1D({"h_adc_EcalBarrelImagingRawHits", "; amplitude; counts", 100, 0, 4095}, "EcalBarrelImagingRawHits.amplitude");
auto h_adc_EcalBarrelScFiRawHits = d0.Histo1D({"h_adc_EcalBarrelScFiRawHits", "; amplitude; counts", 100, 0, 4095}, "EcalBarrelScFiRawHits.amplitude");
auto h_adc_EcalEndcapNRawHits = d0.Histo1D({"h_adc_EcalEndcapNRawHits", "; amplitude; counts", 100, 0, 4095}, "EcalEndcapNRawHits.amplitude");
auto h_tdc_EcalEndcapPRawHits = d0.Histo1D({"h_tdc_EcalEndcapPRawHits", "; TDC channel; counts", 100, 0, 4095}, "EcalEndcapPRawHits.time");
auto h_tdc_EcalBarrlImagingRawHits = d0.Histo1D({"h_tdc_EcalBarrelImagingRawHits", "; TDC channel; counts", 100, 0, 4095}, "EcalBarrelImagingRawHits.time");
auto h_tdc_EcalBarrelScFiRawHits = d0.Histo1D({"h_tdc_EcalBarrelScFiRawHits", "; TDC channel; counts", 100, 0, 4095}, "EcalBarrelScFiRawHits.time");
auto h_tdc_EcalEndcapNRawHits = d0.Histo1D({"h_tdc_EcalEndcapNRawHits", "; TDC channel; counts", 100, 0, 4095}, "EcalEndcapNRawHits.time");
// Hcal
auto h_n_HcalEndcapPRawHits = d0.Histo1D({"h_n_HcalEndcapPRawHits", "; hits; counts", 100, 0, 25}, "n_HcalEndcapPRawHits");
auto h_n_HcalBarrelRawHits = d0.Histo1D({"h_n_HcalBarrelRawHits", "; hits; counts", 100, 0, 25}, "n_HcalBarrelRawHits");
auto h_n_HcalEndcapNRawHits = d0.Histo1D({"h_n_HcalEndcapNRawHits", "; hits; counts", 100, 0, 25}, "n_HcalEndcapNRawHits");
auto h_adc_HcalEndcapPRawHits = d0.Histo1D({"h_adc_HcalEndcapPRawHits", "; hits; counts", 100, 0, 25}, "HcalEndcapPRawHits.amplitude");
auto h_adc_HcalBarrelRawHits = d0.Histo1D({"h_adc_HcalBarrelRawHits", "; hits; counts", 100, 0, 25}, "HcalBarrelRawHits.amplitude");
auto h_adc_HcalEndcapNRawHits = d0.Histo1D({"h_adc_HcalEndcapNRawHits", "; hits; counts", 100, 0, 25}, "HcalEndcapNRawHits.amplitude");
auto h_tdc_HcalEndcapPRawHits = d0.Histo1D({"h_tdc_HcalEndcapPRawHits", "; TDC channel; counts", 100, 0, 25}, "HcalEndcapPRawHits.time");
auto h_tdc_HcalBarrelRawHits = d0.Histo1D({"h_tdc_HcalBarrelRawHits", "; TDC channel; counts", 100, 0, 25}, "HcalBarrelRawHits.time");
auto h_tdc_HcalEndcapNRawHits = d0.Histo1D({"h_tdc_HcalEndcapNRawHits", "; TDC channel; counts", 100, 0, 25}, "HcalEndcapNRawHits.time");
// Ecal nhits
{
TCanvas c("c", "c", 1200, 1200);
c.Divide(2,2);
c.cd(1);
gPad->SetLogy(true);
auto& h1 = *h_n_EcalEndcapPRawHits;
// histogram style
h1.SetLineColor(common_bench::plot::kMpBlue);
h1.SetLineWidth(2);
// axes
h1.GetXaxis()->CenterTitle();
h1.GetYaxis()->CenterTitle();
// draw everything
h1.DrawClone("hist");
c.cd(2);
gPad->SetLogy(true);
auto& h2 = *h_n_EcalEndcapNRawHits;
// histogram style
h2.SetLineColor(common_bench::plot::kMpBlue);
h2.SetLineWidth(2);
// axes
h2.GetXaxis()->CenterTitle();
h2.GetYaxis()->CenterTitle();
// draw everything
h2.DrawClone("hist");
c.cd(3);
gPad->SetLogy(true);
auto& h3 = *h_n_EcalBarrelImagingRawHits;
// histogram style
h3.SetLineColor(common_bench::plot::kMpBlue);
h3.SetLineWidth(2);
// axes
h3.GetXaxis()->CenterTitle();
h3.GetYaxis()->CenterTitle();
// draw everything
h3.DrawClone("hist");
c.cd(4);
gPad->SetLogy(true);
auto& h1 = *h_n_EcalBarrelScFiRawHits;
// histogram style
h4.SetLineColor(common_bench::plot::kMpBlue);
h4.SetLineWidth(2);
// axes
h4.GetXaxis()->CenterTitle();
h4.GetYaxis()->CenterTitle();
// draw everything
h4.DrawClone("hist");
// FIXME hardcoded beam configuration
common_bench::plot::draw_label(18, 275, detector);
TText* tptr1;
TPaveText t1(.6, .8417, .9, .925, "NB NDC");
t1.SetFillColorAlpha(kWhite, 0);
t1.SetTextFont(43);
t1.SetTextSize(25);
tptr1 = t1.AddText("simulated");
tptr1->SetTextColor(common_bench::plot::kMpBlue);
t1.Draw();
c.Print(fmt::format("{}EcalRawHits_n.png", output_prefix).c_str());
}
// Ecal adc
{
TCanvas c("c", "c", 1200, 1200);
c.Divide(2,2);
c.cd(1);
gPad->SetLogy(true);
auto& h1 = *h_adc_EcalEndcapPRawHits;
// histogram style
h1.SetLineColor(common_bench::plot::kMpBlue);
h1.SetLineWidth(2);
// axes
h1.GetXaxis()->CenterTitle();
h1.GetYaxis()->CenterTitle();
// draw everything
h1.DrawClone("hist");
c.cd(2);
gPad->SetLogy(true);
auto& h2 = *h_adc_EcalEndcapNRawHits;
// histogram style
h2.SetLineColor(common_bench::plot::kMpBlue);
h2.SetLineWidth(2);
// axes
h2.GetXaxis()->CenterTitle();
h2.GetYaxis()->CenterTitle();
// draw everything
h2.DrawClone("hist");
c.cd(3);
gPad->SetLogy(true);
auto& h3 = *h_adc_EcalBarrelImagingRawHits;
// histogram style
h3.SetLineColor(common_bench::plot::kMpBlue);
h3.SetLineWidth(2);
// axes
h3.GetXaxis()->CenterTitle();
h3.GetYaxis()->CenterTitle();
// draw everything
h3.DrawClone("hist");
c.cd(4);
gPad->SetLogy(true);
auto& h1 = *h_adc_EcalBarrelScFiRawHits;
// histogram style
h4.SetLineColor(common_bench::plot::kMpBlue);
h4.SetLineWidth(2);
// axes
h4.GetXaxis()->CenterTitle();
h4.GetYaxis()->CenterTitle();
// draw everything
h4.DrawClone("hist");
// FIXME hardcoded beam configuration
common_bench::plot::draw_label(18, 275, detector);
TText* tptr1;
TPaveText t1(.6, .8417, .9, .925, "NB NDC");
t1.SetFillColorAlpha(kWhite, 0);
t1.SetTextFont(43);
t1.SetTextSize(25);
tptr1 = t1.AddText("simulated");
tptr1->SetTextColor(common_bench::plot::kMpBlue);
t1.Draw();
c.Print(fmt::format("{}EcalRawHits_n.png", output_prefix).c_str());
}
// Ecal nhits
{
TCanvas c("c", "c", 1200, 1200);
c.Divide(2,2);
c.cd(1);
gPad->SetLogy(true);
auto& h1 = *h_tdc_EcalEndcapPRawHits;
// histogram style
h1.SetLineColor(common_bench::plot::kMpBlue);
h1.SetLineWidth(2);
// axes
h1.GetXaxis()->CenterTitle();
h1.GetYaxis()->CenterTitle();
// draw everything
h1.DrawClone("hist");
c.cd(2);
gPad->SetLogy(true);
auto& h2 = *h_tdc_EcalEndcapNRawHits;
// histogram style
h2.SetLineColor(common_bench::plot::kMpBlue);
h2.SetLineWidth(2);
// axes
h2.GetXaxis()->CenterTitle();
h2.GetYaxis()->CenterTitle();
// draw everything
h2.DrawClone("hist");
c.cd(3);
gPad->SetLogy(true);
auto& h3 = *h_tdc_EcalBarrelImagingRawHits;
// histogram style
h3.SetLineColor(common_bench::plot::kMpBlue);
h3.SetLineWidth(2);
// axes
h3.GetXaxis()->CenterTitle();
h3.GetYaxis()->CenterTitle();
// draw everything
h3.DrawClone("hist");
c.cd(4);
gPad->SetLogy(true);
auto& h1 = *h_tdc_EcalBarrelScFiRawHits;
// histogram style
h4.SetLineColor(common_bench::plot::kMpBlue);
h4.SetLineWidth(2);
// axes
h4.GetXaxis()->CenterTitle();
h4.GetYaxis()->CenterTitle();
// draw everything
h4.DrawClone("hist");
// FIXME hardcoded beam configuration
common_bench::plot::draw_label(18, 275, detector);
TText* tptr1;
TPaveText t1(.6, .8417, .9, .925, "NB NDC");
t1.SetFillColorAlpha(kWhite, 0);
t1.SetTextFont(43);
t1.SetTextSize(25);
tptr1 = t1.AddText("simulated");
tptr1->SetTextColor(common_bench::plot::kMpBlue);
t1.Draw();
c.Print(fmt::format("{}EcalRawHits_n.png", output_prefix).c_str());
}
// Hcal nhits
{
TCanvas c("c", "c", 1200, 1200);
c.cd();
c.cd(1);
gPad->SetLogy(true);
auto& h1 = *h_n_HcalEndcapPRawHits;
// histogram style
h1.SetLineColor(common_bench::plot::kMpBlue);
h1.SetLineWidth(2);
// axes
h1.GetXaxis()->CenterTitle();
h1.GetYaxis()->CenterTitle();
// draw everything
h1.DrawClone("hist");
c.cd(2);
gPad->SetLogy(true);
auto& h2 = *h_n_HcalEndcapNRawHits;
// histogram style
h2.SetLineColor(common_bench::plot::kMpBlue);
h2.SetLineWidth(2);
// axes
h2.GetXaxis()->CenterTitle();
h2.GetYaxis()->CenterTitle();
// draw everything
h2.DrawClone("hist");
c.cd(3);
gPad->SetLogy(true);
auto& h3 = *h_n_HcalBarrelRawHits;
// histogram style
h3.SetLineColor(common_bench::plot::kMpBlue);
h3.SetLineWidth(2);
// axes
h3.GetXaxis()->CenterTitle();
h3.GetYaxis()->CenterTitle();
// draw everything
h3.DrawClone("hist");
// FIXME hardcoded beam configuration
common_bench::plot::draw_label(18, 275, detector);
TText* tptr1;
TPaveText t1(.6, .8417, .9, .925, "NB NDC");
t1.SetFillColorAlpha(kWhite, 0);
t1.SetTextFont(43);
t1.SetTextSize(25);
tptr1 = t1.AddText("simulated");
tptr1->SetTextColor(common_bench::plot::kMpBlue);
t1.Draw();
c.Print(fmt::format("{}HcalRawHits_n.png", output_prefix).c_str());
}
// Hcal nhits
{
TCanvas c("c", "c", 1200, 1200);
c.cd();
c.cd(1);
gPad->SetLogy(true);
auto& h1 = *h_adc_HcalEndcapPRawHits;
// histogram style
h1.SetLineColor(common_bench::plot::kMpBlue);
h1.SetLineWidth(2);
// axes
h1.GetXaxis()->CenterTitle();
h1.GetYaxis()->CenterTitle();
// draw everything
h1.DrawClone("hist");
c.cd(2);
gPad->SetLogy(true);
auto& h2 = *h_adc_HcalEndcapNRawHits;
// histogram style
h2.SetLineColor(common_bench::plot::kMpBlue);
h2.SetLineWidth(2);
// axes
h2.GetXaxis()->CenterTitle();
h2.GetYaxis()->CenterTitle();
// draw everything
h2.DrawClone("hist");
c.cd(3);
gPad->SetLogy(true);
auto& h3 = *h_adc_HcalBarrelRawHits;
// histogram style
h3.SetLineColor(common_bench::plot::kMpBlue);
h3.SetLineWidth(2);
// axes
h3.GetXaxis()->CenterTitle();
h3.GetYaxis()->CenterTitle();
// draw everything
h3.DrawClone("hist");
// FIXME hardcoded beam configuration
common_bench::plot::draw_label(18, 275, detector);
TText* tptr1;
TPaveText t1(.6, .8417, .9, .925, "NB NDC");
t1.SetFillColorAlpha(kWhite, 0);
t1.SetTextFont(43);
t1.SetTextSize(25);
tptr1 = t1.AddText("simulated");
tptr1->SetTextColor(common_bench::plot::kMpBlue);
t1.Draw();
c.Print(fmt::format("{}HcalRawHits_n.png", output_prefix).c_str());
}
// Hcal nhits
{
TCanvas c("c", "c", 1200, 1200);
c.cd();
c.cd(1);
gPad->SetLogy(true);
auto& h1 = *h_tdc_HcalEndcapPRawHits;
// histogram style
h1.SetLineColor(common_bench::plot::kMpBlue);
h1.SetLineWidth(2);
// axes
h1.GetXaxis()->CenterTitle();
h1.GetYaxis()->CenterTitle();
// draw everything
h1.DrawClone("hist");
c.cd(2);
gPad->SetLogy(true);
auto& h2 = *h_tdc_HcalEndcapNRawHits;
// histogram style
h2.SetLineColor(common_bench::plot::kMpBlue);
h2.SetLineWidth(2);
// axes
h2.GetXaxis()->CenterTitle();
h2.GetYaxis()->CenterTitle();
// draw everything
h2.DrawClone("hist");
c.cd(3);
gPad->SetLogy(true);
auto& h3 = *h_tdc_HcalBarrelRawHits;
// histogram style
h3.SetLineColor(common_bench::plot::kMpBlue);
h3.SetLineWidth(2);
// axes
h3.GetXaxis()->CenterTitle();
h3.GetYaxis()->CenterTitle();
// draw everything
h3.DrawClone("hist");
// FIXME hardcoded beam configuration
common_bench::plot::draw_label(18, 275, detector);
TText* tptr1;
TPaveText t1(.6, .8417, .9, .925, "NB NDC");
t1.SetFillColorAlpha(kWhite, 0);
t1.SetTextFont(43);
t1.SetTextSize(25);
tptr1 = t1.AddText("simulated");
tptr1->SetTextColor(common_bench::plot::kMpBlue);
t1.Draw();
c.Print(fmt::format("{}HcalRawHits_n.png", output_prefix).c_str());
}
common_bench::write_test({dis_Q2_resolution}, fmt::format("{}dis_electrons.json", output_prefix));
return 0;
}
...@@ -111,11 +111,60 @@ cat << EOF > ${CONFIG} ...@@ -111,11 +111,60 @@ cat << EOF > ${CONFIG}
"test_tag": "${BEAM_TAG}" "test_tag": "${BEAM_TAG}"
} }
EOF EOF
#cat ${CONFIG}
root -b -q "benchmarks/dis/analysis/dis_electrons.cxx+(\"${CONFIG}\")" root -b -q "benchmarks/dis/analysis/dis_electrons.cxx+(\"${CONFIG}\")"
#root -b -q "benchmarks/dis/analysis/dis_electrons.cxx(\"${CONFIG}\")"
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR running rec_dis_electron script" echo "ERROR running dis_electron script"
exit 1
fi
CONFIG="${TMP_PATH}/${PLOT_TAG}.raw.json"
cat << EOF > ${CONFIG}
{
"rec_file": "${REC_FILE/.root/.raw.root}",
"detector": "${JUGGLER_DETECTOR}",
"output_prefix": "${RESULTS_PATH}/${PLOT_TAG}",
"ebeam": ${EBEAM},
"pbeam": ${PBEAM},
"test_tag": "${BEAM_TAG}"
}
EOF
root -b -q "benchmarks/dis/analysis/dis_electrons_raw.cxx+(\"${CONFIG}\")"
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running dis_electron_raw script"
exit 1
fi
CONFIG="${TMP_PATH}/${PLOT_TAG}.ecal.json"
cat << EOF > ${CONFIG}
{
"rec_file": "${REC_FILE/.root/.ecal.root}",
"detector": "${JUGGLER_DETECTOR}",
"output_prefix": "${RESULTS_PATH}/${PLOT_TAG}",
"ebeam": ${EBEAM},
"pbeam": ${PBEAM},
"test_tag": "${BEAM_TAG}"
}
EOF
root -b -q "benchmarks/dis/analysis/dis_electrons_ecal.cxx+(\"${CONFIG}\")"
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running dis_electron_ecal script"
exit 1
fi
CONFIG="${TMP_PATH}/${PLOT_TAG}.hcal.json"
cat << EOF > ${CONFIG}
{
"rec_file": "${REC_FILE/.root/.hcal.root}",
"detector": "${JUGGLER_DETECTOR}",
"output_prefix": "${RESULTS_PATH}/${PLOT_TAG}",
"ebeam": ${EBEAM},
"pbeam": ${PBEAM},
"test_tag": "${BEAM_TAG}"
}
EOF
root -b -q "benchmarks/dis/analysis/dis_electrons_hcal.cxx+(\"${CONFIG}\")"
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running dis_electron_hcal script"
exit 1 exit 1
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment