Skip to content
Snippets Groups Projects
Commit d71076e6 authored by Maria Zurek's avatar Maria Zurek
Browse files

Cast to TH1D*

parent fe1988ce
No related branches found
No related tags found
1 merge request!153Draft: Resolve "Add energy scan for Barrel Ecal"
...@@ -30,8 +30,8 @@ imaging_ecal_energy_scan_e: ...@@ -30,8 +30,8 @@ imaging_ecal_energy_scan_e:
extends: .rec_benchmark extends: .rec_benchmark
stage: run stage: run
timeout: 24 hours timeout: 24 hours
# rules: rules:
# - if: '$RUN_EXTENDED_RECO_BENCHMARK == "true"' - if: '$RUN_EXTENDED_RECO_BENCHMARK == "true"'
script: script:
- export E_file="sim_output/emcal_barrel_energy_scan_points_${PARTICLE}.txt" - export E_file="sim_output/emcal_barrel_energy_scan_points_${PARTICLE}.txt"
- bash benchmarks/imaging_ecal/run_emcal_barrel.sh -t emcal_barrel_${PARTICLE}_${ENERGY} -n 100 -p "${PARTICLE}" -e "${ENERGY}" && echo "${ENERGY}" >> "$E_file" - bash benchmarks/imaging_ecal/run_emcal_barrel.sh -t emcal_barrel_${PARTICLE}_${ENERGY} -n 100 -p "${PARTICLE}" -e "${ENERGY}" && echo "${ENERGY}" >> "$E_file"
...@@ -51,20 +51,19 @@ imaging_ecal_energy_scan_ph: ...@@ -51,20 +51,19 @@ imaging_ecal_energy_scan_ph:
- bash benchmarks/imaging_ecal/run_emcal_barrel.sh -t emcal_barrel_${PARTICLE}_${ENERGY} -n 100 -p "${PARTICLE}" -e "${ENERGY}" && echo "${ENERGY}" >> "$E_file" - bash benchmarks/imaging_ecal/run_emcal_barrel.sh -t emcal_barrel_${PARTICLE}_${ENERGY} -n 100 -p "${PARTICLE}" -e "${ENERGY}" && echo "${ENERGY}" >> "$E_file"
parallel: parallel:
matrix: matrix:
- ENERGY: ["0.5", "1", "2", "5", "10"] - ENERGY: ["0.5"]
PARTICLE: [photon] PARTICLE: [photon]
imaging_ecal_energy_scan_analysis_electrons: imaging_ecal_energy_scan_analysis_electrons:
extends: .rec_benchmark extends: .rec_benchmark
stage: process stage: process
timeout: 24 hours timeout: 24 hours
# rules: rules:
# - if: '$RUN_EXTENDED_RECO_BENCHMARK == "true"' - if: '$RUN_EXTENDED_RECO_BENCHMARK == "true"'
needs: needs:
- ["imaging_ecal_energy_scan_e"] - ["imaging_ecal_energy_scan_e"]
script: script:
- ls -lhtR sim_output/ - ls -lhtR sim_output/
- rootls -t sim_output/rec_emcal_barrel_electron_1.root
- root -b -q 'benchmarks/imaging_ecal/scripts/emcal_barrel_energy_scan_analysis.cxx+("electron")' - root -b -q 'benchmarks/imaging_ecal/scripts/emcal_barrel_energy_scan_analysis.cxx+("electron")'
# - root -b -q 'benchmarks/imaging_ecal/scripts/energy_scan_analysis.cxx+' # - root -b -q 'benchmarks/imaging_ecal/scripts/energy_scan_analysis.cxx+'
...@@ -78,7 +77,6 @@ imaging_ecal_energy_scan_analysis_photons: ...@@ -78,7 +77,6 @@ imaging_ecal_energy_scan_analysis_photons:
- ["imaging_ecal_energy_scan_ph"] - ["imaging_ecal_energy_scan_ph"]
script: script:
- ls -lhtR sim_output/ - ls -lhtR sim_output/
- rootls -t sim_output/rec_emcal_barrel_photon_5.root
- root -b -q 'benchmarks/imaging_ecal/scripts/emcal_barrel_energy_scan_analysis.cxx+("photon")' - root -b -q 'benchmarks/imaging_ecal/scripts/emcal_barrel_energy_scan_analysis.cxx+("photon")'
# - root -b -q 'benchmarks/imaging_ecal/scripts/energy_scan_analysis.cxx+' # - root -b -q 'benchmarks/imaging_ecal/scripts/energy_scan_analysis.cxx+'
......
...@@ -53,7 +53,8 @@ void save_canvas(TCanvas* c, std::string var_label, std::string E_label, std::st ...@@ -53,7 +53,8 @@ void save_canvas(TCanvas* c, std::string var_label, std::string E_label, std::st
save_canvas(c, label_with_E); save_canvas(c, label_with_E);
} }
void set_histo_range(TH1D* h){ void set_histo_range(TH1D* h)
{
double up_fit = h->GetMean() + 5*h->GetStdDev(); double up_fit = h->GetMean() + 5*h->GetStdDev();
double down_fit = h->GetMean() - 5*h->GetStdDev(); double down_fit = h->GetMean() - 5*h->GetStdDev();
h->GetXaxis()->SetRangeUser(down_fit,up_fit); h->GetXaxis()->SetRangeUser(down_fit,up_fit);
...@@ -120,20 +121,20 @@ std::tuple <double, double, double, double, double, double, double, double> extr ...@@ -120,20 +121,20 @@ std::tuple <double, double, double, double, double, double, double, double> extr
.Define("fsamClusterScFi", fsam, {"EClusterScFi", "Ethr"}); .Define("fsamClusterScFi", fsam, {"EClusterScFi", "Ethr"});
// Define Histograms // Define Histograms
auto hEthr = d1.Histo1D({"hEthr", "Thrown Energy; Thrown Energy [GeV]; Events", 100, 0.0, 25.0},"Ethr"); auto hEthr = (TH1D*)d1.Histo1D({"hEthr", "Thrown Energy; Thrown Energy [GeV]; Events", 100, 0.0, 25.0},"Ethr");
auto hEdigiImg = d1.Histo1D({"hEdigiImg", "Digi energy deposit; Amplitude [QCD]; Events", 1000, 0, 200000},"EdigiImg"); auto hEdigiImg = (TH1D*)d1.Histo1D({"hEdigiImg", "Digi energy deposit; Amplitude [QCD]; Events", 1000, 0, 200000},"EdigiImg");
auto hErecImg = d1.Histo1D({"hErecImg", "Reconstructed energy deposit; Energy Deposit [GeV]; Events", 500, 0.0, 0.5},"ErecImg"); auto hErecImg = (TH1D*)d1.Histo1D({"hErecImg", "Reconstructed energy deposit; Energy Deposit [GeV]; Events", 500, 0.0, 0.5},"ErecImg");
auto hEClusterImg = d1.Histo1D({"hEClusterImg", "Cluster Energy; Cluster Energy [GeV]; Events", 200, 0.0, 25.0},"EClusterImg"); auto hEClusterImg = (TH1D*)d1.Histo1D({"hEClusterImg", "Cluster Energy; Cluster Energy [GeV]; Events", 200, 0.0, 25.0},"EClusterImg");
auto hNClusterImg = d1.Histo1D({"hNClusterImg", "Number of Clusters; # of Clusters; Events", 100, 0.0, 100.0}, "NClusterImg"); auto hNClusterImg = (TH1D*)d1.Histo1D({"hNClusterImg", "Number of Clusters; # of Clusters; Events", 100, 0.0, 100.0}, "NClusterImg");
auto hfsamImg = d1.Histo1D({"hfsamImg", "Cluster Energy/E true; Cluster Energy/E true; Events", 100, 0.0, 1.5},"fsamClusterImg"); auto hfsamImg = (TH1D*)d1.Histo1D({"hfsamImg", "Cluster Energy/E true; Cluster Energy/E true; Events", 100, 0.0, 1.5},"fsamClusterImg");
auto hfsamRecImg = d1.Histo1D({"hfsamRecImg", "Reco Hits Energy/E true; Reco Hits Energy/E true; Events", 50, 0.0, 0.1},"fsamRecImg"); auto hfsamRecImg = (TH1D*)d1.Histo1D({"hfsamRecImg", "Reco Hits Energy/E true; Reco Hits Energy/E true; Events", 50, 0.0, 0.1},"fsamRecImg");
auto hErecScFi = d1.Histo1D({"hErecScFi", "Reconstructed energy deposit; Energy Deposit [GeV]; Events", 500, 0.0, 15.0},"ErecScFi"); auto hErecScFi = (TH1D*)d1.Histo1D({"hErecScFi", "Reconstructed energy deposit; Energy Deposit [GeV]; Events", 500, 0.0, 15.0},"ErecScFi");
auto hEdigiScFi = d1.Histo1D({"hEdigiScFi", "Digi energy deposit; Amplitude [QCD]; Events", 1000, 0, 200000},"EdigiScFi"); auto hEdigiScFi = (TH1D*)d1.Histo1D({"hEdigiScFi", "Digi energy deposit; Amplitude [QCD]; Events", 1000, 0, 200000},"EdigiScFi");
auto hEClusterScFi = d1.Histo1D({"hEClusterScFi", "Cluster Energy; Cluster Energy [GeV]; Events", 500, 0.0, 25.0},"EClusterScFi"); auto hEClusterScFi = (TH1D*)d1.Histo1D({"hEClusterScFi", "Cluster Energy; Cluster Energy [GeV]; Events", 500, 0.0, 25.0},"EClusterScFi");
auto hNClusterScFi = d1.Histo1D({"hNClusterScFi", "Number of Clusters; # of Clusters; Events", 100, 0.0, 100.0}, "NClusterScFi"); auto hNClusterScFi = (TH1D*)d1.Histo1D({"hNClusterScFi", "Number of Clusters; # of Clusters; Events", 100, 0.0, 100.0}, "NClusterScFi");
auto hfsamScFi = d1.Histo1D({"hfsamScFi", "Cluster Energy/E true; Cluster Energy/E true; Events", 100, 0.8, 1.2},"fsamClusterScFi"); auto hfsamScFi = (TH1D*)d1.Histo1D({"hfsamScFi", "Cluster Energy/E true; Cluster Energy/E true; Events", 100, 0.8, 1.2},"fsamClusterScFi");
auto hfsamRecScFi = d1.Histo1D({"hfsamRecScFi", "Reco Hits Energy/E true; Reco Hits Energy/E true; Events", 50, 0.0, 0.25},"fsamRecScFi"); auto hfsamRecScFi = (TH1D*)d1.Histo1D({"hfsamRecScFi", "Reco Hits Energy/E true; Reco Hits Energy/E true; Events", 50, 0.0, 0.25},"fsamRecScFi");
// Event Counts // Event Counts
auto nevents_thrown = d1.Count(); auto nevents_thrown = d1.Count();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment