From bbcaa4f7b3d64d80e2bdf87a17ed37cd2f54cee8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?GIRARD=20ALCINDOR=20Val=C3=A9rian?=
 <girard-alcindor@ijclab.in2p3.fr>
Date: Tue, 5 Dec 2023 17:03:47 +0100
Subject: [PATCH] Updating e870

---
 Projects/e870/Analysis.cxx                       | 10 +++++-----
 .../DetectorConfiguration/MUGAST_LISE.detector   |  2 +-
 Projects/e870/launch_simu.sh                     | 16 +++++++++++++++-
 Projects/e870/reaction/10Bepalpha.reaction       |  3 ++-
 4 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/Projects/e870/Analysis.cxx b/Projects/e870/Analysis.cxx
index 395e31bd6..3bbcd6c02 100644
--- a/Projects/e870/Analysis.cxx
+++ b/Projects/e870/Analysis.cxx
@@ -160,7 +160,7 @@ void Analysis::TreatEvent() {
 
     /************************************************/
     // Part 2 : Impact Energy
-    Energy = ELab = 0;
+    Energy = 0;
     Si_E_M2 = M2->Si_E[countMust2];
     CsI_E_M2 = M2->CsI_E[countMust2];
 
@@ -173,16 +173,16 @@ void Analysis::TreatEvent() {
       }
       Energy += Si_E_M2;
     }
-
-    else
+    else {
       Energy = Si_E_M2;
+    }
 
     Energy = LightAl.EvaluateInitialEnergy(Energy, 0.4 * micrometer, ThetaM2Surface);
     // Evaluate energy using the thickness
     // Target Correction
-    Energy = LightTarget.EvaluateInitialEnergy(ELab, TargetThickness * 0.5, ThetaNormalTarget);
-    ELab = Energy;
+    Energy = LightTarget.EvaluateInitialEnergy(Energy, TargetThickness * 0.5, ThetaNormalTarget);
 
+    ELab = Energy;
     /************************************************/
     // Part 3 : Excitation Energy Calculation
     Ex = reaction.ReconstructRelativistic(ELab, ThetaLab);
diff --git a/Projects/e870/DetectorConfiguration/MUGAST_LISE.detector b/Projects/e870/DetectorConfiguration/MUGAST_LISE.detector
index afbd79f23..670c6f6a7 100644
--- a/Projects/e870/DetectorConfiguration/MUGAST_LISE.detector
+++ b/Projects/e870/DetectorConfiguration/MUGAST_LISE.detector
@@ -3,7 +3,7 @@
 Target
  THICKNESS= 26 micrometer
  ANGLE= 0 deg
- RADIUS= 10 mm
+ RADIUS= 13 mm
  MATERIAL= CH2
  X= 0
  Y= 0
diff --git a/Projects/e870/launch_simu.sh b/Projects/e870/launch_simu.sh
index 9e98ac9a0..9005ba4a2 100755
--- a/Projects/e870/launch_simu.sh
+++ b/Projects/e870/launch_simu.sh
@@ -34,8 +34,22 @@
 # npsimulation -D DetectorConfiguration/MUGAST_LISE_CD2_thick.detector -E reaction/10Bed6Li.reaction -O MugastAtLise10Bed6LiThick.root -B simu10Bed6Li.mac
 # ninja && npanalysis -D DetectorConfiguration/MUGAST_LISE_CD2.detector -E reaction/10Bed6Li.reaction -T /Users/valerian/Software/nptool_gitlab/nptool/Outputs/Simulation/MugastAtLise10Bed6Li.root SimulatedTree -O AnaMugastAtLise10Bed6LiThick.root
 
-ninja && npanalysis -D DetectorConfiguration/MUGAST_LISE_CD2.detector -E reaction/10Bed6Li.reaction -T /Users/valerian/Software/nptool_gitlab/nptool/Outputs/Simulation/MugastAtLise10Bed6Li.root SimulatedTree -O test.root
+# ninja && npanalysis -D DetectorConfiguration/MUGAST_LISE_CD2.detector -E reaction/10Bed6Li.reaction -T /Users/valerian/Software/nptool_gitlab/nptool/Outputs/Simulation/MugastAtLise10Bed6Li.root SimulatedTree -O test.root
 
+#################################################################################################
+
+# # Recompile the lib:
+# #npcompilation -l 
+# # Recompile the simulation:
+# #npcompilation -s 
+# # Compile the local analysis:
+# # make
+# All of the above:
+npcompilation
+
+npsimulation -D DetectorConfiguration/MUGAST_LISE.detector -E reaction/10Bepalpha.reaction -O test -B run.mac
+
+npanalysis -D DetectorConfiguration/MUGAST_LISE.detector -E reaction/10Bepalpha.reaction -T $NPTOOL/Outputs/Simulation/test.root SimulatedTree -O test
 
 
 
diff --git a/Projects/e870/reaction/10Bepalpha.reaction b/Projects/e870/reaction/10Bepalpha.reaction
index 053f9f49e..755979e2b 100644
--- a/Projects/e870/reaction/10Bepalpha.reaction
+++ b/Projects/e870/reaction/10Bepalpha.reaction
@@ -2,7 +2,8 @@
 Beam
   Particle= 10Be
   Energy= 380 MeV
-  SigmaEnergy= 22.8 MeV
+  %SigmaEnergy= 22.8 MeV
+  SigmaEnergy= 0 MeV
   MeanThetaX= 0 deg
   MeanPhiY= 0 deg
   MeanX= 0 mm
-- 
GitLab