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

Added cuts on eta and theta to check

parent e461a816
No related branches found
No related tags found
1 merge request!41Adding Cuts
This commit is part of merge request !41. Comments created here will be created in the context of that merge request.
......@@ -148,19 +148,19 @@ void emcal_electrons_analysis(const char* input_fname = "rec_electron_10kEvt.roo
// Select Events with One Cluster
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, -1.0, 1.0}, "E_res");
auto hEres_cut = d2.Filter([=] (const std::vector<eic::ClusterData>& evt) {
for(const auto& i: evt) {
auto pos_x = i.position.x;
auto pos_y = i.position.y;
auto radial_dist = TMath::Sqrt(pos_x*pos_x + pos_y*pos_y);
if (radial_dist > 15.0 && radial_dist < 33.0)
return true;
}
return false;}, {"EcalClusters"})
.Histo1D({"hEres_cut", "Energy Resolution; #DeltaE/E; Events", 100, -1.0, 1.0}, "E_res");
auto hPratio = d2.Histo1D({"hPratio", "Momentum ratio; p_{rec}/p_{thr}; Events", 100, 0.0, 1.0}, "p_ratio");
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, -1.0, 1.0}, "E_res");
//auto hEres_cut = d2.Filter([=] (const std::vector<eic::ClusterData>& evt) {
// for(const auto& i: evt) {
// auto pos_x = i.position.x;
// auto pos_y = i.position.y;
// auto radial_dist = TMath::Sqrt(pos_x*pos_x + pos_y*pos_y);
// if (radial_dist > 15.0 && radial_dist < 33.0)
// return true;
// }
// return false;}, {"EcalClusters"})
// .Histo1D({"hEres_cut", "Energy Resolution; #DeltaE/E; Events", 100, -1.0, 1.0}, "E_res");
auto hPratio = d2.Histo1D({"hPratio", "Momentum ratio; p_{rec}/p_{thr}; Events", 100, 0.0, 1.0}, "p_ratio");
auto hPthr_accepted = d2.Filter([=] (const std::vector<float>& Prec, const std::vector<float>& Pthr) {
for (const auto& P1 : Pthr) {
for (const auto& P2 : Prec) {
......@@ -173,6 +173,20 @@ void emcal_electrons_analysis(const char* input_fname = "rec_electron_10kEvt.roo
return false;}, {"p_rec","p_thr"})
.Histo1D({"hPthr_accepted", "Thrown momentum for reconstructed particle; p_{thr} [GeV]; Events", 100, -0.5, 30.5}, "p_thr");
// Cut on Radial Distance
auto d3 = d2.Filter([=] (const std::vector<eic::ClusterData>& evt) {
for(const auto& i: evt) {
auto pos_x = i.position.x;
auto pos_y = i.position.y;
auto radial_dist = TMath::Sqrt(pos_x*pos_x + pos_y*pos_y);
if (radial_dist > 15.0 && radial_dist < 33.0)
return true;
}
return false;}, {"EcalClusters"});
auto hEres_cut = d3.Histo1D({"hEres_cut", "Energy Resolution; #DeltaE/E; Events", 100, -1.0, 1.0}, "E_res");
auto hTheta_cut = d3.Histo1D({"hTheta_cut", "Scattering Angle; #theta [degree]; Events", 100, 130.0, 180.0}, "theta");
auto hEta_cut = d3.Histo1D({"hEta_cut", "Pseudo-rapidity; #eta; Events", 100, -5.0, 0.0}, "eta");
// Event Counts
auto nevents_thrown = d1.Count();
auto nevents_cluster1 = d2.Count();
......@@ -292,4 +306,20 @@ void emcal_electrons_analysis(const char* input_fname = "rec_electron_10kEvt.roo
hEres_cut->DrawClone();
c13->SaveAs("results/emcal_electrons_Eres_cut.png");
c13->SaveAs("results/emcal_electrons_Eres_cut.pdf");
TCanvas *c14 = new TCanvas("c14", "c14", 500, 500);
hTheta_cut->GetYaxis()->SetTitleOffset(1.4);
hTheta_cut->SetLineWidth(2);
hTheta_cut->SetLineColor(kBlue);
hTheta_cut->DrawClone();
c14->SaveAs("results/emal_electrons_theta_cut.png");
c14->SaveAs("results/emal_electrons_theta_cut.pdf");
TCanvas *c15 = new TCanvas("c15", "c15", 500, 500);
hEta_cut->GetYaxis()->SetTitleOffset(1.4);
hEta_cut->SetLineWidth(2);
hEta_cut->SetLineColor(kBlue);
hEta_cut->DrawClone();
c15->SaveAs("results/emcal_electrons_eta_cut.png");
c15->SaveAs("results/emcal_electrons_eta_cut.pdf");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment