1
0
Fork 0
mirror of https://github.com/gwm17/Mask.git synced 2024-11-22 10:18:50 -05:00

Added a modifier option to the plotter to allow for separation of identical particles

This commit is contained in:
Gordon McCann 2021-08-24 15:41:09 -04:00
parent a30bfa2555
commit c5ff59a242
3 changed files with 27 additions and 27 deletions

View File

@ -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;

View File

@ -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");
}
}

View File

@ -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);