From b97e982d6e6cadf69889969e164bd485de57d135 Mon Sep 17 00:00:00 2001 From: moukaddam <mhd.moukaddam@gmail.com> Date: Mon, 2 Oct 2017 02:42:23 +0100 Subject: [PATCH] fixed Bug: switch from reading 1D to 2D profile for emittance use hist. Decoupling tokens energy and profile tokens --- NPLib/Physics/NPBeam.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NPLib/Physics/NPBeam.cxx b/NPLib/Physics/NPBeam.cxx index edd0a5572..454f4f894 100644 --- a/NPLib/Physics/NPBeam.cxx +++ b/NPLib/Physics/NPBeam.cxx @@ -131,7 +131,7 @@ void Beam::ReadConfigurationFile(NPL::InputParser parser){ vector<string> energyA = {"Energy","SigmaEnergy"}; vector<string> energyP = {"EnergyProfilePath"}; vector<string> emmitA = {"SigmaThetaX","SigmaPhiY","SigmaX","SigmaY","MeanThetaX","MeanPhiY","MeanX","MeanY"}; - vector<string> emmitP = {"EnergyProfilePath","XThetaXProfilePath","YPhiYProfilePath"}; + vector<string> emmitP = {"XThetaXProfilePath","YPhiYProfilePath"}; for(unsigned int i = 0 ; i < blocks.size() ; i++){ @@ -172,9 +172,9 @@ void Beam::ReadConfigurationFile(NPL::InputParser parser){ // Emmitance profile else if(blocks[i]->HasTokenList(emmitP)){ vector<string> XThetaX= blocks[i]->GetVectorString("XThetaXProfilePath"); - SetEnergyHist( Read1DProfile(XThetaX[0], XThetaX[1])); + SetXThetaXHist( Read2DProfile(XThetaX[0], XThetaX[1])); vector<string> YPhiY= blocks[i]->GetVectorString("YPhiYProfilePath"); - SetEnergyHist( Read1DProfile(YPhiY[0], YPhiY[1])); + SetYPhiYHist( Read2DProfile(YPhiY[0], YPhiY[1])); } -- GitLab