From 7e26d60fe892ddc7f60a78cd8cf9973abb617b08 Mon Sep 17 00:00:00 2001 From: "Ryan@WorkStation" Date: Wed, 21 Feb 2024 17:17:35 -0500 Subject: [PATCH] fix Check_Simulation.C --- Cleopatra/Check_Simulation.C | 4 +++- Cleopatra/Simulation_Helper.C | 15 +++++++++++++-- working/DWBA | 4 ++-- working/detectorGeo.txt | 2 +- working/reactionConfig.txt | 14 ++++++-------- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/Cleopatra/Check_Simulation.C b/Cleopatra/Check_Simulation.C index a332853..d7c005f 100644 --- a/Cleopatra/Check_Simulation.C +++ b/Cleopatra/Check_Simulation.C @@ -178,7 +178,7 @@ void Check_Simulation(TString filename = "transfer.root", }else{ - numEx = exListTxt->GetListOfLines()->GetSize(); + numEx = exListTxt->GetListOfLines()->GetSize()-1; for( int i = 0 ; i < numEx ; i++){ double ex = atof(exListTxt->GetListOfLines()->At(i)->GetName()); if( ex < ExRange[0] ) ExRange[0] = ex; @@ -187,6 +187,8 @@ void Check_Simulation(TString filename = "transfer.root", } } + + exList.Print(); double dExRange = ExRange[1] - ExRange[0]; ExRange[0] = ExRange[0] - dExRange * 0.1; diff --git a/Cleopatra/Simulation_Helper.C b/Cleopatra/Simulation_Helper.C index 11cedbe..41d3b99 100644 --- a/Cleopatra/Simulation_Helper.C +++ b/Cleopatra/Simulation_Helper.C @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -42,6 +43,8 @@ private: TGTextEdit * editor; TString fileName; + + TGComboBox * detGeoSelector; TGLabel * fileLabel; TGLabel * statusLabel; @@ -143,10 +146,18 @@ MyMainFrame::MyMainFrame(const TGWindow *p,UInt_t w,UInt_t h) { openRec->Connect("Clicked()","MyMainFrame",this, "OpenFile(=1)"); simFrame->AddFrame(openRec,new TGLayoutHints(kLHintsRight, 5,5,3,4)); + detGeoSelector = new TGComboBox(simFrame); + detGeoSelector->SetHeight(20); + detGeoSelector->SetWidth(150); + detGeoSelector->AddEntry("Array 1", 0); + detGeoSelector->AddEntry("Array 2", 1); + detGeoSelector->Select(0); + simFrame->AddFrame(detGeoSelector, new TGLayoutHints(kLHintsRight, 5, 5, 3, 4)); + withDWBA = new TGCheckButton(simFrame, "Sim with DWBA\n+DWBA.root\n+DWBA.Ex.txt"); withDWBA->SetWidth(140); withDWBA->ChangeOptions(kFixedSize ); - simFrame->AddFrame(withDWBA, new TGLayoutHints(kLHintsLeft, 5,5,3,4)); + simFrame->AddFrame(withDWBA, new TGLayoutHints(kLHintsRight, 5,5,3,4)); TGTextButton *Sim = new TGTextButton(simFrame,"Simulate"); Sim->SetWidth(150); @@ -485,7 +496,7 @@ void MyMainFrame::Command(int ID) { statusLabel->SetText("Running simulation......."); - Transfer( basicConfig, heliosDetGeoFile, 0, ptolemyRoot, saveFileName); + Transfer( basicConfig, heliosDetGeoFile, detGeoSelector->GetSelected(), ptolemyRoot, saveFileName); statusLabel->SetText("Plotting simulation......."); diff --git a/working/DWBA b/working/DWBA index f380e7a..c7a5a31 100644 --- a/working/DWBA +++ b/working/DWBA @@ -45,5 +45,5 @@ #36Ar(d,a)34Cl 0 4L=2 3+ 0.000 8MeV/u As # (d,a) reaction -20F(d,t)19F 2 1s1/2 3/2+ 0.000 10MeV/u Vl -20F(d,t)19F 2 0d5/2 5/2+ 0.197 10MeV/u Vl \ No newline at end of file +32Si(d,p)33Si 0 1s1/2 1/2+ 0.000 10MeV/u Vl +32Si(d,p)33Si 0 0d5/2 5/2+ 0.197 10MeV/u Vl diff --git a/working/detectorGeo.txt b/working/detectorGeo.txt index 35730a3..0cf3c97 100644 --- a/working/detectorGeo.txt +++ b/working/detectorGeo.txt @@ -48,4 +48,4 @@ Out //detector_facing_Out_or_In 235.8 //5th_det 290.0 -################## end of file \ No newline at end of file +################## end of file diff --git a/working/reactionConfig.txt b/working/reactionConfig.txt index cd9fa6c..4b7f261 100644 --- a/working/reactionConfig.txt +++ b/working/reactionConfig.txt @@ -1,5 +1,5 @@ #--- '#---' comment line identifier -#--- beam +#------------- beam 32 //beam_A 14 //beam_Z 0.0 //excitation_energy_of_beam[MeV] @@ -10,7 +10,7 @@ 0.00 //x_offset_of_Beam_in_mm 0.00 //y_offset_of_Beam_in_mm -#--- target +#------------- target 2 //target_A 1 //target_Z false //isTargetScattering @@ -18,11 +18,11 @@ false //isTargetScattering 2.2e-4 //targetThickness_in_cm ../SRIM/20F_in_CD2.txt //stopping_power_for_beam -#--- Monte Carlo Setting +#------------- Monte Carlo Setting 1000000 //number_of_Event_being_generated false //Redo_until_hit_array=all_events_hit_array -#=====reaction_for_1st_Array +#=================reaction_for_1st_Array 1 //recoil_light_A 1 //recoil-light_Z ../SRIM/3H_in_CD2.txt //stopping_power_for_light_recoil @@ -36,7 +36,7 @@ false //isDacay 1.000 1.0 1.0 0.01 2.000 1.0 1.0 0.01 -#=====_reaction_for_2nd_Array_use_ony_when_2nd_array_used +#==================_reaction_for_2nd_Array_use_ony_when_2nd_array_used 3 //recoil_light_A 2 //recoil-light_Z ../SRIM/3H_in_CD2.txt //stopping_power_for_light_recoil @@ -45,12 +45,10 @@ false //isDacay 32 //decayNucleus_A 14 //decayNucleus_Z -#--- List of Ex of heavy recoil #---Ex relative_xsec SF sigma_in_MeV - 0.000 1.0 1.0 0.01 1.000 1.0 1.0 0.01 2.000 1.0 1.0 0.01 -################## end of file \ No newline at end of file +################## end of file