Skip to content
Snippets Groups Projects
Commit b97e982d authored by moukaddam's avatar moukaddam
Browse files

fixed Bug: switch from reading 1D to 2D profile for emittance use hist....

fixed Bug: switch from reading 1D to 2D profile for emittance use hist. Decoupling tokens energy and profile tokens
parent df582081
No related branches found
No related tags found
No related merge requests found
...@@ -131,7 +131,7 @@ void Beam::ReadConfigurationFile(NPL::InputParser parser){ ...@@ -131,7 +131,7 @@ void Beam::ReadConfigurationFile(NPL::InputParser parser){
vector<string> energyA = {"Energy","SigmaEnergy"}; vector<string> energyA = {"Energy","SigmaEnergy"};
vector<string> energyP = {"EnergyProfilePath"}; vector<string> energyP = {"EnergyProfilePath"};
vector<string> emmitA = {"SigmaThetaX","SigmaPhiY","SigmaX","SigmaY","MeanThetaX","MeanPhiY","MeanX","MeanY"}; 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++){ for(unsigned int i = 0 ; i < blocks.size() ; i++){
...@@ -172,9 +172,9 @@ void Beam::ReadConfigurationFile(NPL::InputParser parser){ ...@@ -172,9 +172,9 @@ void Beam::ReadConfigurationFile(NPL::InputParser parser){
// Emmitance profile // Emmitance profile
else if(blocks[i]->HasTokenList(emmitP)){ else if(blocks[i]->HasTokenList(emmitP)){
vector<string> XThetaX= blocks[i]->GetVectorString("XThetaXProfilePath"); 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"); vector<string> YPhiY= blocks[i]->GetVectorString("YPhiYProfilePath");
SetEnergyHist( Read1DProfile(YPhiY[0], YPhiY[1])); SetYPhiYHist( Read2DProfile(YPhiY[0], YPhiY[1]));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment