From 157829af82bb85b0c33f5c2cc5176aa71be72470 Mon Sep 17 00:00:00 2001
From: adrien matta <matta@lpccaen.in2p3.fr>
Date: Thu, 12 Oct 2023 15:53:58 +0200
Subject: [PATCH] * Fixing Kinematic and Example1         - If statement was
 commented out for inverse kinematic case

---
 Examples/Example1/RunToTreat.txt               | 2 +-
 Examples/Example1/ShowResults.C                | 3 +++
 Examples/Example1/configs/ConfigMust2.dat      | 2 +-
 Inputs/DetectorConfiguration/Example1.detector | 2 --
 NPLib/Physics/NPReaction.cxx                   | 4 ++--
 5 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Examples/Example1/RunToTreat.txt b/Examples/Example1/RunToTreat.txt
index 82908222e..4baf9cb3a 100644
--- a/Examples/Example1/RunToTreat.txt
+++ b/Examples/Example1/RunToTreat.txt
@@ -1,5 +1,5 @@
 TTreeName 
 	SimulatedTree
 RootFileName 
-	../../Outputs/Simulation/Example1.root
+	./root/simulation/Example1.root
 
diff --git a/Examples/Example1/ShowResults.C b/Examples/Example1/ShowResults.C
index 6d7c2ed41..78853c616 100644
--- a/Examples/Example1/ShowResults.C
+++ b/Examples/Example1/ShowResults.C
@@ -6,6 +6,7 @@ TChain* chain=NULL ;
 
 ////////////////////////////////////////////////////////////////////////////////
 void LoadCuts(){
+    std::cout << "Loading Cuts" << std::endl;
     TFile* File_ETOF = new TFile("cuts/ETOF.root","READ");
     ETOF = (TCutG*) File_ETOF->FindObjectAny("ETOF");
     
@@ -15,6 +16,8 @@ void LoadCuts(){
 
 ////////////////////////////////////////////////////////////////////////////////
 void LoadChain(){
+
+    std::cout << "Loading Chain" << std::endl;
     chain = new TChain("PhysicsTree");
     chain->Add("root/analysis/Example1.root");
 }
diff --git a/Examples/Example1/configs/ConfigMust2.dat b/Examples/Example1/configs/ConfigMust2.dat
index bebb0bf9e..4a76b40c8 100755
--- a/Examples/Example1/configs/ConfigMust2.dat
+++ b/Examples/Example1/configs/ConfigMust2.dat
@@ -14,4 +14,4 @@ ConfigMust2
 	DISABLE_ALL MM6
 	DISABLE_ALL MM7
 	DISABLE_ALL MM8
-  CSI_SIZE 256
+  CSI_SIZE 32
diff --git a/Inputs/DetectorConfiguration/Example1.detector b/Inputs/DetectorConfiguration/Example1.detector
index e67ae572d..0b9645962 100644
--- a/Inputs/DetectorConfiguration/Example1.detector
+++ b/Inputs/DetectorConfiguration/Example1.detector
@@ -94,8 +94,6 @@ M2Telescope
  CSI=    0
  VIS=    all
 
-%%%%%%%%%%%%%%%%%%%%%     
-SSSDArray
 %%%%%%%%%% Det 1 %%%%%%%%     
 SSSD
  A= 17.61 9.85  104.11 mm
diff --git a/NPLib/Physics/NPReaction.cxx b/NPLib/Physics/NPReaction.cxx
index b548dc168..46aefd569 100644
--- a/NPLib/Physics/NPReaction.cxx
+++ b/NPLib/Physics/NPReaction.cxx
@@ -261,10 +261,10 @@ void Reaction::KineRelativistic(double& ThetaLab3, double& KineticEnergyLab3, do
   // case of inverse kinematics
 
   double theta = fThetaCM;
-  /*if (m1 > m2){
+  if (m1 > m2){
     theta = M_PI - fThetaCM;
     //fThetaCM = M_PI - fThetaCM;
-  }*/
+  }
   fEnergyImpulsionCM_3 = TLorentzVector(pCM_3 * sin(theta), 0, pCM_3 * cos(theta), ECM_3);
   fEnergyImpulsionCM_4 = fTotalEnergyImpulsionCM - fEnergyImpulsionCM_3;
 
-- 
GitLab