Skip to content
Snippets Groups Projects
Commit a60821da authored by Jihee Kim's avatar Jihee Kim
Browse files

debugging

parent adf0d6cd
No related branches found
No related tags found
1 merge request!36Update Analysis Script
......@@ -113,17 +113,6 @@ void emcal_electrons_analysis(const char* input_fname = "rec_electron_10kEvt.roo
return result;
};
// Energy Ratio
auto E_ratio = [] (const std::vector<float>& Erec, const std::vector<float>& Ethr) {
std::vector<float> result;
for (const auto& E1 : Ethr) {
for (const auto& E2 : Erec) {
result.push_back(E2/E1);
}
}
return result;
};
// Define variables
auto d1 = d0.Define("ncluster", ncluster, {"EcalClusters"})
.Define("clusterE", clusterE, {"EcalClusters"})
......@@ -134,7 +123,6 @@ void emcal_electrons_analysis(const char* input_fname = "rec_electron_10kEvt.roo
.Define("p_thr", p_thr, {"mcparticles2"})
.Define("E_thr", E_thr, {"mcparticles2"})
.Define("E_res", E_res, {"clusterE","E_thr"})
.Define("E_ratio", E_ratio, {"clusterE","E_thr"})
;
// Define Histograms
......@@ -150,7 +138,16 @@ void emcal_electrons_analysis(const char* input_fname = "rec_electron_10kEvt.roo
auto d2 = d1.Filter("ncluster==1");
auto hClusterE1 = d2.Histo1D({"hClusterE1", "One Cluster Energy; Cluster Energy [GeV]; Events", 100, -0.5, 30.5}, "clusterE");
auto hEres = d2.Histo1D({"hEres", "Energy Resolution; #DeltaE/E; Events", 100,-0.3,0.3}, "E_res");
auto hPthr_accepted = d2.Filter("E_ratio > 0.9")
auto hPthr_accepted = d2.Filter([=] (const std::vector<float>& Erec, const std::vector<float>& Ethr) {
for (const auto& E1 : Ethr) {
for (const auto& E2 : Erec) {
auto Eratio = E2/E1;
if (Eratio > 0.9) {
return true;
}
}
}
return false;}, {"clusterE","E_thr"})
.Histo1D({"hPthr_accepted", "Thrown momentum for reconstructed particle; p_{thr} [GeV]; Events", 100, -0.5, 30.5}, "p_thr");
// Draw Histograms
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment