Skip to content

Commit

Permalink
add validity guard to fitcentroid test
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesJieranShen committed Dec 9, 2024
1 parent 6d26a33 commit 7cd3061
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/full/fitcentroid/fitcentroid.C
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ void fitcentroid(std::string event_filename, std::string out_filename) {
new TProfile("hReconVsEnergy",
"Electrons at center (error bars are RMS);Kinetic energy (MeV);Reconstructed X (mm)", 5, 3, 15, "s");

T->Draw("ds.ev.fitResults.fit_position.fX>>hCenterRes", "ds.mc.particle.ke < 0.0205 && ds.mc.particle.pos.fX < 0.05",
"goff");
T->Draw("ds.ev.fitResults.fit_position.fX>>hCenterRes",
"ds.mc.particle.ke < 0.0205 && ds.mc.particle.pos.fX < 0.05 && ds.ev.fitResults.valid_position", "goff");
T->Draw("ds.ev.fitResults.fit_position.fX-ds.mc.particle.pos.fX:(ds.mc.particle.pos.Mag()/437)>>hReconVsRadius",
"ds.mc.particle.ke < 0.0205 && ds.mc.particle.pos.fX > 0.05", "goff prof");
"ds.mc.particle.ke < 0.0205 && ds.mc.particle.pos.fX > 0.05 && ds.ev.fitResults.valid_position", "goff prof");
T->Draw("ds.ev.fitResults.fit_position.fX:ds.mc.particle.ke>>hReconVsEnergy",
"ds.mc.particle.ke > 0.0205 && ds.mc.particle.pos.fX < 0.05", "goff prof");
"ds.mc.particle.ke > 0.0205 && ds.mc.particle.pos.fX < 0.05 && ds.ev.fitResults.valid_position", "goff prof");

hCenterRes->Fit("gaus");
hReconVsRadius->SetMinimum(-2000);
Expand Down

0 comments on commit 7cd3061

Please sign in to comment.