From 2af8ee6e983735a2ed2c4f637e3b7930825fcd69 Mon Sep 17 00:00:00 2001 From: adrien-matta <a.matta@surrey.ac.uk> Date: Mon, 12 Dec 2016 11:08:17 +0100 Subject: [PATCH] * Updating cout condition for NPBeam and NPReaction - Cout wasa occuring even when the token were not present - now test for the blocks vector size --- NPLib/Physics/NPBeam.cxx | 2 +- NPLib/Physics/NPReaction.cxx | 2 +- Projects/BeLise/13Be.reaction | 46 +++++++++++++++++------------------ Projects/BeLise/9Be.reaction | 46 +++++++++++++++++------------------ Projects/BeLise/9Li.reaction | 46 +++++++++++++++++------------------ Projects/BeLise/Analysis.cxx | 2 +- 6 files changed, 72 insertions(+), 72 deletions(-) diff --git a/NPLib/Physics/NPBeam.cxx b/NPLib/Physics/NPBeam.cxx index 608a9255c..edd0a5572 100644 --- a/NPLib/Physics/NPBeam.cxx +++ b/NPLib/Physics/NPBeam.cxx @@ -124,7 +124,7 @@ void Beam::ReadConfigurationFile(string Path){ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void Beam::ReadConfigurationFile(NPL::InputParser parser){ vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithToken("Beam"); - if(NPOptionManager::getInstance()->GetVerboseLevel()) + if(blocks.size()>0 && NPOptionManager::getInstance()->GetVerboseLevel()) cout << endl << "\033[1;35m//// Beam found " << endl; vector<string> token = {"Particle"}; diff --git a/NPLib/Physics/NPReaction.cxx b/NPLib/Physics/NPReaction.cxx index ce5b6119a..e8a7496fb 100644 --- a/NPLib/Physics/NPReaction.cxx +++ b/NPLib/Physics/NPReaction.cxx @@ -315,7 +315,7 @@ void Reaction::ReadConfigurationFile(string Path){ void Reaction::ReadConfigurationFile(NPL::InputParser parser){ vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithToken("TwoBodyReaction"); - if(NPOptionManager::getInstance()->GetVerboseLevel()) + if(blocks.size()>0 && NPOptionManager::getInstance()->GetVerboseLevel()) cout << endl << "\033[1;35m//// Two body reaction found " << endl; vector<string> token1 = {"Beam","Target","Light","Heavy"}; diff --git a/Projects/BeLise/13Be.reaction b/Projects/BeLise/13Be.reaction index dd2089e41..0f95d0c33 100644 --- a/Projects/BeLise/13Be.reaction +++ b/Projects/BeLise/13Be.reaction @@ -2,31 +2,31 @@ %%%%%%%%% Reaction file for 11Li(d,3He)10He reaction %%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Beam - Particle= 12Be - Energy= 360 - SigmaEnergy= 20 - SigmaThetaX= 0.6138 - SigmaPhiY= 0.3812 - SigmaX= 6.216 - SigmaY= 6.109 - MeanThetaX= 0 - MeanPhiY= 0 - MeanX= 0 - MeanY= 0 - %EnergyProfilePath= - %XThetaXProfilePath= - %YPhiYProfilePath= + Particle= 12Be + Energy= 360 MeV + SigmaEnergy= 20 MeV + SigmaThetaX= 0.6138 deg + SigmaPhiY= 0.3812 deg + SigmaX= 6.216 mm + SigmaY= 6.109 mm + MeanThetaX= 0 deg + MeanPhiY= 0 deg + MeanX= 0 mm + MeanY= 0 mm + %EnergyProfilePath= + %XThetaXProfilePath= + %YPhiYProfilePath= %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TwoBodyReaction - Beam= 12Be - Target= 2H - Light= 1H - Heavy= 13Be - ExcitationEnergyLight= 0.0 - ExcitationEnergyHeavy= 0 - CrossSectionPath= 11Li(d,3He)10He.txt CS10He - ShootLight= 1 - ShootHeavy= 1 + Beam= 12Be + Target= 2H + Light= 1H + Heavy= 13Be + ExcitationEnergyLight= 0.0 MeV + ExcitationEnergyHeavy= 0 MeV + CrossSectionPath= 11Li(d,3He)10He.txt CS10He + ShootLight= 1 + ShootHeavy= 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Projects/BeLise/9Be.reaction b/Projects/BeLise/9Be.reaction index 524cf6c4e..f079f75f1 100644 --- a/Projects/BeLise/9Be.reaction +++ b/Projects/BeLise/9Be.reaction @@ -2,31 +2,31 @@ %%%%%%%%% Reaction file for 11Li(d,3He)10He reaction %%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Beam - Particle= 10Be - Energy= 280 - SigmaEnergy= 20 - SigmaThetaX= 0.6138 - SigmaPhiY= 0.3812 - SigmaX= 6.216 - SigmaY= 6.109 - MeanThetaX= 0 - MeanPhiY= 0 - MeanX= 0 - MeanY= 0 - %EnergyProfilePath= - %XThetaXProfilePath= - %YPhiYProfilePath= + Particle= 10Be + Energy= 280 MeV + SigmaEnergy= 20 MeV + SigmaThetaX= 0.6138 deg + SigmaPhiY= 0.3812 deg + SigmaX= 6.216 mm + SigmaY= 6.109 mm + MeanThetaX= 0 deg + MeanPhiY= 0 deg + MeanX= 0 mm + MeanY= 0 mm + %EnergyProfilePath= + %XThetaXProfilePath= + %YPhiYProfilePath= %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TwoBodyReaction - Beam= 10Be - Target= 2H - Light= 3H - Heavy= 9Be - ExcitationEnergyLight= 0.0 - ExcitationEnergyHeavy= 0.0 - CrossSectionPath= 11Li(d,3He)10He.txt CS2 - ShootLight= 1 - ShootHeavy= 1 + Beam= 10Be + Target= 2H + Light= 3H + Heavy= 9Be + ExcitationEnergyLight= 0.0 MeV + ExcitationEnergyHeavy= 0.0 MeV + CrossSectionPath= 11Li(d,3He)10He.txt CS2 + ShootLight= 1 + ShootHeavy= 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Projects/BeLise/9Li.reaction b/Projects/BeLise/9Li.reaction index 65d343080..02db44e32 100644 --- a/Projects/BeLise/9Li.reaction +++ b/Projects/BeLise/9Li.reaction @@ -2,31 +2,31 @@ %%%%%%%%% Reaction file for 11Li(d,3He)10He reaction %%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Beam - Particle= 10Be - Energy= 280 - SigmaEnergy= 20 - SigmaThetaX= 0.6138 - SigmaPhiY= 0.3812 - SigmaX= 6.216 - SigmaY= 6.109 - MeanThetaX= 0 - MeanPhiY= 0 - MeanX= 0 - MeanY= 0 - %EnergyProfilePath= - %XThetaXProfilePath= - %YPhiYProfilePath= + Particle= 10Be + Energy= 280 MeV + SigmaEnergy= 20 MeV + SigmaThetaX= 0.6138 deg + SigmaPhiY= 0.3812 deg + SigmaX= 5.1 mm + SigmaY= 8.5 mm + MeanThetaX= 0 deg + MeanPhiY= 0 deg + MeanX= 2.5 mm + MeanY= -0.5 mm + %EnergyProfilePath= + %XThetaXProfilePath= + %YPhiYProfilePath= %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TwoBodyReaction - Beam= 10Be - Target= 2H - Light= 3He - Heavy= 9Li - ExcitationEnergyLight= 0.0 - ExcitationEnergyHeavy= 0 - CrossSectionPath= 11Li(d,3He)10He.txt CS10He - ShootLight= 1 - ShootHeavy= 1 + Beam= 10Be + Target= 2H + Light= 3He + Heavy= 9Li + ExcitationEnergyLight= 0.0 MeV + ExcitationEnergyHeavy= 0 MeV + CrossSectionPath= 11Li(d,3He)10He.txt CS10He + ShootLight= 1 + ShootHeavy= 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Projects/BeLise/Analysis.cxx b/Projects/BeLise/Analysis.cxx index e13da4e07..c8a8a07a7 100644 --- a/Projects/BeLise/Analysis.cxx +++ b/Projects/BeLise/Analysis.cxx @@ -36,7 +36,7 @@ Analysis::~Analysis(){ //////////////////////////////////////////////////////////////////////////////// void Analysis::Init(){ - M2= (TMust2Physics*) m_DetectorManager->GetDetector("MUST2Array"); + M2= (TMust2Physics*) m_DetectorManager->GetDetector("M2Telescope"); Initial=new TInitialConditions(); InitOutputBranch(); InitInputBranch(); -- GitLab