From f22399253153cf622351cd687420db81bba1b104 Mon Sep 17 00:00:00 2001
From: Adrien Matta <matta@lpccaen.in2p3.fr>
Date: Wed, 28 Apr 2021 17:33:29 +0200
Subject: [PATCH] * fixing issue in Miniball simulation and analysis         -
 The Interraction scorer was not cleared, making the angle           wrong in
 the analysis

---
 NPSimulation/Scorers/InteractionScorers.cc   |  1 +
 Projects/TRex_Miniball/79Zndp.reaction       | 52 ++++++++++++++++++++
 Projects/TRex_Miniball/Analysis.cxx          | 10 ++--
 Projects/TRex_Miniball/PhysicsListOption.txt | 12 +++++
 4 files changed, 70 insertions(+), 5 deletions(-)
 create mode 100644 Projects/TRex_Miniball/79Zndp.reaction
 create mode 100644 Projects/TRex_Miniball/PhysicsListOption.txt

diff --git a/NPSimulation/Scorers/InteractionScorers.cc b/NPSimulation/Scorers/InteractionScorers.cc
index 860a8962b..1ab9bed3e 100644
--- a/NPSimulation/Scorers/InteractionScorers.cc
+++ b/NPSimulation/Scorers/InteractionScorers.cc
@@ -82,4 +82,5 @@ void PS_Interactions::EndOfEvent(G4HCofThisEvent*){
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 void PS_Interactions::clear(){
   m_DataVector.clear();
+  m_InterractionCoordinates->Clear();
 }
diff --git a/Projects/TRex_Miniball/79Zndp.reaction b/Projects/TRex_Miniball/79Zndp.reaction
new file mode 100644
index 000000000..49da0c026
--- /dev/null
+++ b/Projects/TRex_Miniball/79Zndp.reaction
@@ -0,0 +1,52 @@
+%%%%%%%%%%%%%%%%%%%%%% S1107 at Triumf %%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Beam
+  Particle= 79Zn
+  ExcitationEnergy= 0 MeV
+  Energy= 435 MeV
+  SigmaEnergy= 0.448 MeV
+  SigmaThetaX= 0.01  deg
+  SigmaPhiY= 0.01    deg
+  SigmaX= 0.5 mm
+  SigmaY= 0.5 mm
+  MeanThetaX= 0 deg
+  MeanPhiY= 0 deg
+  MeanX= 0 mm
+  MeanY= 0 mm
+  %EnergyProfilePath=
+  %XThetaXProfilePath=
+  %YPhiYProfilePath=
+ 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+TwoBodyReaction
+ Beam= 79Zn
+ Target= 2H
+ Light= 1H
+ Heavy= 80Zn
+ ExcitationEnergyLight= 0.0 MeV
+ ExcitationEnergyHeavy= 3.7 MeV
+  CrossSectionPath= 79Zndp_d5half_3.7MeV.dat CSR
+ ShootLight= 1
+ ShootHeavy= 1
+  
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
+Decay 80Zn
+ Threshold= 3.7
+ Daughter= 80Zn gamma gamma gamma gamma
+ BranchingRatio= 0.5
+ ExcitationEnergy= 0 0.879 0.842 0.482 1.497
+ Shoot= 1 1 1 1 1   
+ LifeTime= 0 ns
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
+Decay 80Zn
+ Threshold= 3.7
+ Daughter= 80Zn gamma gamma gamma 
+ BranchingRatio= 0.5
+ ExcitationEnergy= 0 1.497 0.482 1.721
+ Shoot= 1 1 1 1    
+ LifeTime= 0 ns
+                   
+                   
+                   
+                   
+                   
diff --git a/Projects/TRex_Miniball/Analysis.cxx b/Projects/TRex_Miniball/Analysis.cxx
index 690a54a62..38a2b0c11 100644
--- a/Projects/TRex_Miniball/Analysis.cxx
+++ b/Projects/TRex_Miniball/Analysis.cxx
@@ -47,7 +47,7 @@ void Analysis::Init(){
   else
     ligth = "deuteron";
 
-  heavy = "Mg29";
+  heavy = "Zn79";
 
 
   Sharc = (TSharcPhysics*)  m_DetectorManager -> GetDetector("Sharc");
@@ -145,8 +145,8 @@ void Analysis::TreatEvent(){
     X_Trifoil = P.X();
     Y_Trifoil = P.Y();
 
-    myReaction->SetThetaCM(0);
-    myReaction->SetExcitationHeavy(0);
+   // myReaction->SetThetaCM(0);
+   // myReaction->SetExcitationHeavy(0);
 
 
     /************************************************/
@@ -200,8 +200,8 @@ void Analysis::TreatEvent(){
     X_Trifoil = P.X();
     Y_Trifoil = P.Y();
 
-    myReaction->SetThetaCM(0);
-    myReaction->SetExcitationHeavy(0);
+//    myReaction->SetThetaCM(0);
+//    myReaction->SetExcitationHeavy(0);
 
 
     /************************************************/
diff --git a/Projects/TRex_Miniball/PhysicsListOption.txt b/Projects/TRex_Miniball/PhysicsListOption.txt
new file mode 100644
index 000000000..f061bf71f
--- /dev/null
+++ b/Projects/TRex_Miniball/PhysicsListOption.txt
@@ -0,0 +1,12 @@
+EmPhysicsList Option4
+DefaultCutOff 1000000
+IonBinaryCascadePhysics 0
+NPIonInelasticPhysics 0
+EmExtraPhysics 0
+HadronElasticPhysics 0
+StoppingPhysics 0
+OpticalPhysics 0
+HadronPhysicsINCLXX 0
+HadronPhysicsQGSP_BIC_HP 0
+Decay 0
+Menate_R 0
-- 
GitLab