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

Fixed filter

parent bd791391
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !42. Comments created here will be created in the context of that merge request.
......@@ -150,7 +150,11 @@ 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, -1.0, 1.0}, "E_res");
auto hEres_lmom = d2.Filter("p_thr < 15.0")
auto hEres_lmom = d2.Filter([=](std::vector<dd4pod::Geant4ParticleData> const& input) {
auto Pthr = TMath::Sqrt(input[2].psx*input[2].psx + input[2].psy*input[2].psy + input[2].psz*input[2].psz + input[2].mass*input[2].mass);
if (Pthr < 15.0)
return true;
return false;}, {"mcparticles2"})
.Histo1D({"hEres_lmom", "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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment