mirror of
https://github.com/gwm17/Mask.git
synced 2024-11-25 19:58:50 -05:00
Reorganized. Now make static lib of Mask and link to appropriate exes.
This commit is contained in:
parent
fc9c211b6a
commit
fe770fe6ca
|
@ -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<int> dead_stoich = {1};
|
||||
deadlayer.SetElements(dead_z, dead_a, dead_stoich);
|
||||
sabre_eloss.SetElements(dead_z, dead_a, dead_stoich);
|
||||
std::vector<int> deg_z = {73};
|
||||
std::vector<int> deg_a = {181};
|
||||
std::vector<int> deg_s = {1};
|
||||
degrader.SetElements(deg_z, deg_a, deg_s);
|
||||
}
|
||||
|
||||
SabreEfficiency::~SabreEfficiency() {}
|
||||
|
@ -247,15 +252,19 @@ std::pair<bool,double> 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]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user