diff --git a/src/Detectors/SabreEfficiency.cpp b/src/Detectors/SabreEfficiency.cpp index 06f91b8..0312f8b 100644 --- a/src/Detectors/SabreEfficiency.cpp +++ b/src/Detectors/SabreEfficiency.cpp @@ -6,13 +6,14 @@ SabreEfficiency::SabreEfficiency() : - DetectorEfficiency(), deadlayer(DEADLAYER_THIN), sabre_eloss(SABRE_THICKNESS) + DetectorEfficiency(), deadlayer(DEADLAYER_THIN), sabre_eloss(SABRE_THICKNESS), degrader(DEGRADER_THICKNESS) { detectors.reserve(5); detectors.emplace_back(INNER_R,OUTER_R,PHI_COVERAGE*DEG2RAD,PHI0*DEG2RAD,TILT*DEG2RAD,DIST_2_TARG); detectors.emplace_back(INNER_R,OUTER_R,PHI_COVERAGE*DEG2RAD,PHI1*DEG2RAD,TILT*DEG2RAD,DIST_2_TARG); - detectors.emplace_back(INNER_R,OUTER_R,PHI_COVERAGE*DEG2RAD,PHI2*DEG2RAD,TILT*DEG2RAD,DIST_2_TARG); - detectors.emplace_back(INNER_R,OUTER_R,PHI_COVERAGE*DEG2RAD,PHI3*DEG2RAD,TILT*DEG2RAD,DIST_2_TARG); + //Only 0,1,4 valid in degrader land + //detectors.emplace_back(INNER_R,OUTER_R,PHI_COVERAGE*DEG2RAD,PHI2*DEG2RAD,TILT*DEG2RAD,DIST_2_TARG); + //detectors.emplace_back(INNER_R,OUTER_R,PHI_COVERAGE*DEG2RAD,PHI3*DEG2RAD,TILT*DEG2RAD,DIST_2_TARG); detectors.emplace_back(INNER_R,OUTER_R,PHI_COVERAGE*DEG2RAD,PHI4*DEG2RAD,TILT*DEG2RAD,DIST_2_TARG); @@ -21,6 +22,10 @@ SabreEfficiency::SabreEfficiency() : std::vector dead_stoich = {1}; deadlayer.SetElements(dead_z, dead_a, dead_stoich); sabre_eloss.SetElements(dead_z, dead_a, dead_stoich); + std::vector deg_z = {73}; + std::vector deg_a = {181}; + std::vector deg_s = {1}; + degrader.SetElements(deg_z, deg_a, deg_s); } SabreEfficiency::~SabreEfficiency() {} @@ -247,15 +252,19 @@ std::pair SabreEfficiency::IsSabre(Mask::Nucleus& nucleus) { Mask::Vec3 coords; double thetaIncident, eloss, e_deposited; + double ke = 0.0; for(int i=0; i<5; i++) { auto chan = detectors[i].GetTrajectoryRingWedge(nucleus.GetTheta(), nucleus.GetPhi()); if(chan.first != -1 && chan.second != -1) { if(dmap.IsDead(i, chan.first, 0) || dmap.IsDead(i, chan.second, 1)) break; //dead channel check coords = detectors[i].GetTrajectoryCoordinates(nucleus.GetTheta(), nucleus.GetPhi()); thetaIncident = std::acos(coords.Dot(detectors[i].GetNormTilted())/(coords.GetR())); - eloss = deadlayer.GetEnergyLossTotal(nucleus.GetZ(), nucleus.GetA(), nucleus.GetKE(), M_PI - thetaIncident); - if((nucleus.GetKE() - eloss) <= ENERGY_THRESHOLD) break; //deadlayer check - e_deposited = sabre_eloss.GetEnergyLossTotal(nucleus.GetZ(), nucleus.GetA(), nucleus.GetKE() - eloss, M_PI - thetaIncident); + eloss = degrader.GetEnergyLossTotal(nucleus.GetZ(), nucleus.GetA(), nucleus.GetKE(), thetaIncident); + ke = nucleus.GetKE() - eloss; + eloss = deadlayer.GetEnergyLossTotal(nucleus.GetZ(), nucleus.GetA(), ke, M_PI - thetaIncident); + ke -= eloss; + if(ke <= ENERGY_THRESHOLD) break; //deadlayer check + e_deposited = sabre_eloss.GetEnergyLossTotal(nucleus.GetZ(), nucleus.GetA(), ke, M_PI - thetaIncident); return std::make_pair(true, e_deposited); } } @@ -338,4 +347,4 @@ void SabreEfficiency::CountCoincidences(const Mask::MaskFileData& data, std::vec counts[10]++; } } -} \ No newline at end of file +} diff --git a/src/AngularDistribution.cpp b/src/Mask/AngularDistribution.cpp similarity index 100% rename from src/AngularDistribution.cpp rename to src/Mask/AngularDistribution.cpp diff --git a/src/DecaySystem.cpp b/src/Mask/DecaySystem.cpp similarity index 100% rename from src/DecaySystem.cpp rename to src/Mask/DecaySystem.cpp diff --git a/src/EnergyLoss.cpp b/src/Mask/EnergyLoss.cpp similarity index 100% rename from src/EnergyLoss.cpp rename to src/Mask/EnergyLoss.cpp diff --git a/src/LayeredTarget.cpp b/src/Mask/LayeredTarget.cpp similarity index 100% rename from src/LayeredTarget.cpp rename to src/Mask/LayeredTarget.cpp diff --git a/src/LegendrePoly.cpp b/src/Mask/LegendrePoly.cpp similarity index 100% rename from src/LegendrePoly.cpp rename to src/Mask/LegendrePoly.cpp diff --git a/src/MaskApp.cpp b/src/Mask/MaskApp.cpp similarity index 100% rename from src/MaskApp.cpp rename to src/Mask/MaskApp.cpp diff --git a/src/MaskFile.cpp b/src/Mask/MaskFile.cpp similarity index 100% rename from src/MaskFile.cpp rename to src/Mask/MaskFile.cpp diff --git a/src/MassLookup.cpp b/src/Mask/MassLookup.cpp similarity index 100% rename from src/MassLookup.cpp rename to src/Mask/MassLookup.cpp diff --git a/src/Nucleus.cpp b/src/Mask/Nucleus.cpp similarity index 100% rename from src/Nucleus.cpp rename to src/Mask/Nucleus.cpp diff --git a/src/OneStepSystem.cpp b/src/Mask/OneStepSystem.cpp similarity index 100% rename from src/OneStepSystem.cpp rename to src/Mask/OneStepSystem.cpp diff --git a/src/RandomGenerator.cpp b/src/Mask/RandomGenerator.cpp similarity index 100% rename from src/RandomGenerator.cpp rename to src/Mask/RandomGenerator.cpp diff --git a/src/Reaction.cpp b/src/Mask/Reaction.cpp similarity index 100% rename from src/Reaction.cpp rename to src/Mask/Reaction.cpp diff --git a/src/ReactionSystem.cpp b/src/Mask/ReactionSystem.cpp similarity index 100% rename from src/ReactionSystem.cpp rename to src/Mask/ReactionSystem.cpp diff --git a/src/Rotation.cpp b/src/Mask/Rotation.cpp similarity index 100% rename from src/Rotation.cpp rename to src/Mask/Rotation.cpp diff --git a/src/Stopwatch.cpp b/src/Mask/Stopwatch.cpp similarity index 100% rename from src/Stopwatch.cpp rename to src/Mask/Stopwatch.cpp diff --git a/src/Target.cpp b/src/Mask/Target.cpp similarity index 100% rename from src/Target.cpp rename to src/Mask/Target.cpp diff --git a/src/ThreeStepSystem.cpp b/src/Mask/ThreeStepSystem.cpp similarity index 100% rename from src/ThreeStepSystem.cpp rename to src/Mask/ThreeStepSystem.cpp diff --git a/src/TwoStepSystem.cpp b/src/Mask/TwoStepSystem.cpp similarity index 100% rename from src/TwoStepSystem.cpp rename to src/Mask/TwoStepSystem.cpp diff --git a/src/Vec3.cpp b/src/Mask/Vec3.cpp similarity index 100% rename from src/Vec3.cpp rename to src/Mask/Vec3.cpp diff --git a/src/Vec4.cpp b/src/Mask/Vec4.cpp similarity index 100% rename from src/Vec4.cpp rename to src/Mask/Vec4.cpp diff --git a/src/main.cpp b/src/MaskApp/main.cpp similarity index 100% rename from src/main.cpp rename to src/MaskApp/main.cpp diff --git a/src/Plotters/ROOT/RootPlotter.cpp b/src/Plotters/ROOT/RootPlotter.cpp index 9df6df3..4458bd5 100644 --- a/src/Plotters/ROOT/RootPlotter.cpp +++ b/src/Plotters/ROOT/RootPlotter.cpp @@ -16,6 +16,8 @@ void RootPlotter::FillData(const Mask::Nucleus& nuc, double detKE, const std::st std::string ke_vs_th_title = ke_vs_th_name + ";#theta_{lab} (degrees);Kinetic Energy (MeV)"; 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 th_vs_ph_name = sym + modifier + "_theta_vs_phi"; + std::string th_vs_ph_title = th_vs_ph_name + ";#theta_{lab};#phi_{lab}"; std::string ex_name = sym + modifier + "_ex"; std::string ex_title = ex_name + ";E_{ex} (MeV);counts"; std::string angdist_name = sym + modifier +"_angDist"; @@ -25,6 +27,7 @@ void RootPlotter::FillData(const Mask::Nucleus& nuc, double detKE, const std::st { MyFill(ke_vs_th_name.c_str(), ke_vs_th_title.c_str(), nuc.GetTheta()*rad2deg, nuc.GetKE(), 2); MyFill(ke_vs_ph_name.c_str(), ke_vs_ph_title.c_str(), nuc.GetPhi()*rad2deg, nuc.GetKE(), 4); + MyFill(th_vs_ph_name.c_str(), th_vs_ph_title.c_str(), nuc.GetTheta()*rad2deg, nuc.GetPhi()*rad2deg, 2); MyFill(ex_name.c_str(),ex_title.c_str(),260,-1.0,25,nuc.GetExcitationEnergy()); MyFill(angdist_name.c_str(), angdist_title.c_str(),100,-1.0,1.0,std::cos(nuc.GetThetaCM())); } @@ -32,6 +35,7 @@ void RootPlotter::FillData(const Mask::Nucleus& nuc, double detKE, const std::st { MyFill(ke_vs_th_name.c_str(), ke_vs_th_title.c_str(), nuc.GetTheta()*rad2deg, detKE, 2); MyFill(ke_vs_ph_name.c_str(), ke_vs_ph_title.c_str(), nuc.GetPhi()*rad2deg, detKE, 4); + MyFill(th_vs_ph_name.c_str(), th_vs_ph_title.c_str(), nuc.GetTheta()*rad2deg, nuc.GetPhi()*rad2deg, 2); MyFill(ex_name.c_str(),ex_title.c_str(),260,-1.0,25,nuc.GetExcitationEnergy()); MyFill(angdist_name.c_str(), angdist_title.c_str(),100,-1.0,1.0,std::cos(nuc.GetThetaCM())); } @@ -56,6 +60,9 @@ void RootPlotter::FillCorrelations(const Mask::MaskFileData& data, Mask::RxnType std::string theta_break1_theta_break2_name = "theta_break1_theta_break2_cor"; std::string theta_break1_theta_break2_title = theta_break1_theta_break2_name + ";#theta_{lab} Breakup1 (deg);#theta_{lab} Breakup2 (deg)"; MyFill(theta_break1_theta_break2_name, theta_break1_theta_break2_title, data.theta[4]*rad2deg, data.theta[5]*rad2deg, 4); + std::string theta_resid_theta_break1_name = "theta_resid_theta_break1_cor"; + std::string theta_resid_theta_break1_title = theta_resid_theta_break1_name + ";#theta_{lab} Residual (deg);#theta_{lab} Breakup1 (deg)"; + MyFill(theta_resid_theta_break1_name, theta_resid_theta_break1_title, data.theta[3]*rad2deg, data.theta[4]*rad2deg, 4); } if(type == Mask::RxnType::ThreeStepRxn) { @@ -77,6 +84,12 @@ void RootPlotter::FillCorrelationsDetected(const Mask::MaskFileData& data, Mask: { MyFill(theta_eject_theta_resid_name, theta_eject_theta_resid_title, data.theta[2]*rad2deg, data.theta[3]*rad2deg, 4); } + if((type == Mask::RxnType::TwoStepRxn || type == Mask::RxnType::ThreeStepRxn) && data.detect_flag[4]) + { + std::string theta_resid_theta_break1_name = "theta_resid_theta_break1_cor_detected"; + std::string theta_resid_theta_break1_title = theta_resid_theta_break1_name + ";#theta_{lab} Residual (deg);#theta_{lab} Breakup1 (deg)"; + MyFill(theta_resid_theta_break1_name, theta_resid_theta_break1_title, data.theta[3]*rad2deg, data.theta[4]*rad2deg, 4); + } if((type == Mask::RxnType::TwoStepRxn || type == Mask::RxnType::ThreeStepRxn) && data.detect_flag[4] && data.detect_flag[5]) { @@ -290,4 +303,4 @@ int main(int argc, char** argv) { root_out->Close(); return 0; -} \ No newline at end of file +}