diff --git a/include/Plotter.h b/include/Plotter.h index cbc159c..5e4bb16 100644 --- a/include/Plotter.h +++ b/include/Plotter.h @@ -27,7 +27,7 @@ public: GenerateGraphs(); return table; }; - void FillData(const Nucleus& nuc); + void FillData(const Nucleus& nuc, const std::string& modifier = ""); private: THashTable* table; diff --git a/src/Kinematics.cpp b/src/Kinematics.cpp index b6d4997..50d25a6 100644 --- a/src/Kinematics.cpp +++ b/src/Kinematics.cpp @@ -267,10 +267,10 @@ void Kinematics::RunOneStepRxn() { tree->Fill(); } if(do_plotter_flag) { - plotman.FillData(this_sys->GetTarget()); - plotman.FillData(this_sys->GetProjectile()); - plotman.FillData(this_sys->GetEjectile()); - plotman.FillData(this_sys->GetResidual()); + plotman.FillData(this_sys->GetTarget(), "targ"); + plotman.FillData(this_sys->GetProjectile(), "proj"); + plotman.FillData(this_sys->GetEjectile(), "eject"); + plotman.FillData(this_sys->GetResidual(), "resid"); } } @@ -322,9 +322,9 @@ void Kinematics::RunOneStepDecay() { tree->Fill(); } if(do_plotter_flag) { - plotman.FillData(this_sys->GetTarget()); - plotman.FillData(this_sys->GetEjectile()); - plotman.FillData(this_sys->GetResidual()); + plotman.FillData(this_sys->GetTarget(), "targ"); + plotman.FillData(this_sys->GetEjectile(), "eject"); + plotman.FillData(this_sys->GetResidual(), "resid"); } } @@ -384,12 +384,12 @@ void Kinematics::RunTwoStep() { tree->Fill(); } if(do_plotter_flag) { - plotman.FillData(this_sys->GetTarget()); - plotman.FillData(this_sys->GetProjectile()); - plotman.FillData(this_sys->GetEjectile()); - plotman.FillData(this_sys->GetResidual()); - plotman.FillData(this_sys->GetBreakup1()); - plotman.FillData(this_sys->GetBreakup2()); + plotman.FillData(this_sys->GetTarget(), "targ"); + plotman.FillData(this_sys->GetProjectile(), "proj"); + plotman.FillData(this_sys->GetEjectile(), "eject"); + plotman.FillData(this_sys->GetResidual(), "resid"); + plotman.FillData(this_sys->GetBreakup1(), "break1"); + plotman.FillData(this_sys->GetBreakup2(), "break2"); } } @@ -452,14 +452,14 @@ void Kinematics::RunThreeStep() { tree->Fill(); } if(do_plotter_flag) { - plotman.FillData(this_sys->GetTarget()); - plotman.FillData(this_sys->GetProjectile()); - plotman.FillData(this_sys->GetEjectile()); - plotman.FillData(this_sys->GetResidual()); - plotman.FillData(this_sys->GetBreakup1()); - plotman.FillData(this_sys->GetBreakup2()); - plotman.FillData(this_sys->GetBreakup3()); - plotman.FillData(this_sys->GetBreakup4()); + plotman.FillData(this_sys->GetTarget(), "targ"); + plotman.FillData(this_sys->GetProjectile(), "proj"); + plotman.FillData(this_sys->GetEjectile(), "eject"); + plotman.FillData(this_sys->GetResidual(), "resid"); + plotman.FillData(this_sys->GetBreakup1(), "break1"); + plotman.FillData(this_sys->GetBreakup2(), "break2"); + plotman.FillData(this_sys->GetBreakup3(), "break3"); + plotman.FillData(this_sys->GetBreakup4(), "break4"); } } diff --git a/src/Plotter.cpp b/src/Plotter.cpp index f0b233f..f9a5753 100644 --- a/src/Plotter.cpp +++ b/src/Plotter.cpp @@ -16,15 +16,15 @@ Plotter::~Plotter() { delete table; } -void Plotter::FillData(const Nucleus& nuc) { +void Plotter::FillData(const Nucleus& nuc, const std::string& modifier) { std::string sym = nuc.GetIsotopicSymbol(); - std::string ke_vs_th_name = sym + "_ke_vs_theta"; + std::string ke_vs_th_name = sym + modifier + "_ke_vs_theta"; std::string ke_vs_th_title = ke_vs_th_name + ";#theta_{lab} (degrees);Kinetic Energy (MeV)"; - std::string ke_vs_ph_name = sym + "_ke_vs_phi"; + std::string ke_vs_ph_name = sym + modifier + "_ke_vs_phi"; std::string ke_vs_ph_title = ke_vs_ph_name + ";#phi_{lab} (degrees);Kinetic Energy (MeV)"; - std::string ex_name = sym + "_ex"; + std::string ex_name = sym + modifier + "_ex"; std::string ex_title = ex_name + ";E_{ex} (MeV);counts"; - std::string angdist_name = sym+"_angDist"; + std::string angdist_name = sym + modifier +"_angDist"; std::string angdist_title = angdist_name+";cos#right(#theta_{CM}#left);counts"; MyFill(ke_vs_th_name.c_str(), ke_vs_th_title.c_str(), nuc.GetTheta()*rad2deg, nuc.GetKE(), 2);