From 040576ca04177903d0aaacb0dda6fc548efdc43c Mon Sep 17 00:00:00 2001
From: adrien-matta <a.matta@surrey.ac.uk>
Date: Sun, 3 Apr 2016 22:33:09 +0100
Subject: [PATCH] * update on S1554

---
 NPLib/Detectors/AGATA/TAGATAData.cxx          |  24 +-
 NPLib/Detectors/AGATA/TAGATAData.h            |  37 ++-
 NPLib/Detectors/AGATA/TAGATAPhysics.cxx       |  94 +++----
 NPLib/Detectors/AGATA/TAGATAPhysics.h         |   3 +-
 NPSimulation/Detectors/AGATA/AGATA.cc         |  26 +-
 .../Detectors/GASPARD/GaspardTracker.cc       |   2 +-
 NPSimulation/Detectors/Miniball/Miniball.cc   |   2 +-
 NPSimulation/Detectors/TRex/TRex.cc           |   2 +-
 NPSimulation/PhysicsListOption.txt            |   2 +-
 Projects/MUGAST/Show.C                        |  67 -----
 Projects/S1554/Reaction/28Mgdp_EXD.reaction   |   2 +-
 Projects/S1554/macro/Mg.cxx                   |   9 +-
 Projects/S1554/macro/MgCS2.cxx                |  23 +-
 Projects/S1554/macro/SM.cxx                   |   9 +-
 Projects/SharcEfficiency/Analysis.cxx         | 102 +++++--
 .../SharcEfficiency/configs/ConfigSharc.dat   | 249 ++++++++++++------
 Projects/TRex_Miniball/18N.mac                |  16 +-
 Projects/TRex_Miniball/Analysis.cxx           |   7 +-
 .../TRex_Miniball/Reaction/17Ndp.reaction     |   2 +-
 .../TRex_Miniball/Reaction/17Ndp_1.reaction   |   4 +-
 .../TRex_Miniball/Reaction/17Ndp_2.reaction   |   4 +-
 .../TRex_Miniball/Reaction/17Ndp_3.reaction   |   2 +-
 .../TRex_Miniball/Reaction/17Ndp_4.reaction   |   2 +-
 .../TRex_Miniball/Reaction/17Ndp_5.reaction   |   4 +-
 .../TRex_Miniball/Reaction/17Ndp_6.reaction   |   8 +-
 Projects/TRex_Miniball/Show.cxx               | 160 ++++++++++-
 26 files changed, 550 insertions(+), 312 deletions(-)
 delete mode 100644 Projects/MUGAST/Show.C

diff --git a/NPLib/Detectors/AGATA/TAGATAData.cxx b/NPLib/Detectors/AGATA/TAGATAData.cxx
index 26eededde..5d7f9af65 100644
--- a/NPLib/Detectors/AGATA/TAGATAData.cxx
+++ b/NPLib/Detectors/AGATA/TAGATAData.cxx
@@ -1,18 +1,18 @@
 /*****************************************************************************
- * Copyright (C) 2009-2016   this file is part of the NPTool Project       *
+ * Copyright (C) 2009-2016   this file is part of the NPTool Project         *
  *                                                                           *
  * For the licensing terms see $NPTOOL/Licence/NPTool_Licence                *
  * For the list of contributors see $NPTOOL/Licence/Contributors             *
  *****************************************************************************/
 
 /*****************************************************************************
- * Original Author: Adrien Matta  contact address: a.matta@surrey.ac.uk                        *
+ * Original Author: Adrien Matta  contact address: a.matta@surrey.ac.uk      *
  *                                                                           *
- * Creation Date  : January 2016                                           *
+ * Creation Date  : January 2016                                             *
  * Last update    :                                                          *
  *---------------------------------------------------------------------------*
  * Decription:                                                               *
- *  This class hold AGATA Raw data                                    *
+ *  This class hold AGATA Raw data                                        *
  *                                                                           *
  *---------------------------------------------------------------------------*
  * Comment:                                                                  *
@@ -47,13 +47,17 @@ void TAGATAData::Clear() {
   // Energy
   fAGATA_E_DetectorNbr.clear();
   fAGATA_Energy.clear();
+
+  // Angle
+  fAGATA_A_DetectorNbr.clear();
+  fAGATA_Angle.clear();
+
   // Time
   fAGATA_T_DetectorNbr.clear();
   fAGATA_Time.clear();
 }
 
 
-
 //////////////////////////////////////////////////////////////////////
 void TAGATAData::Dump() const {
   // This method is very useful for debuging and worth the dev.
@@ -68,6 +72,16 @@ void TAGATAData::Dump() const {
          << " Energy: " << fAGATA_Energy[i];
   }
   
+  // Angle
+  mysize = fAGATA_A_DetectorNbr.size();
+  cout << "AGATA_E_Mult: " << mysize << endl;
+ 
+  for (size_t i = 0 ; i < mysize ; i++){
+    cout << "DetNbr: " << fAGATA_A_DetectorNbr[i]
+         << " Angle: " << fAGATA_Angle[i];
+  }
+  
+
   // Time
   mysize = fAGATA_T_DetectorNbr.size();
   cout << "AGATA_T_Mult: " << mysize << endl;
diff --git a/NPLib/Detectors/AGATA/TAGATAData.h b/NPLib/Detectors/AGATA/TAGATAData.h
index 4f8f9c490..eb78e4490 100644
--- a/NPLib/Detectors/AGATA/TAGATAData.h
+++ b/NPLib/Detectors/AGATA/TAGATAData.h
@@ -1,20 +1,20 @@
 #ifndef __AGATADATA__
 #define __AGATADATA__
 /*****************************************************************************
- * Copyright (C) 2009-2016   this file is part of the NPTool Project       *
+ * Copyright (C) 2009-2016   this file is part of the NPTool Project         *
  *                                                                           *
  * For the licensing terms see $NPTOOL/Licence/NPTool_Licence                *
  * For the list of contributors see $NPTOOL/Licence/Contributors             *
  *****************************************************************************/
 
 /*****************************************************************************
- * Original Author: Adrien Matta  contact address: a.matta@surrey.ac.uk                        *
+ * Original Author: Adrien Matta  contact address: a.matta@surrey.ac.uk      *
  *                                                                           *
- * Creation Date  : January 2016                                           *
+ * Creation Date  : January 2016                                             *
  * Last update    :                                                          *
  *---------------------------------------------------------------------------*
  * Decription:                                                               *
- *  This class hold AGATA Raw data                                    *
+ *  This class hold AGATA Raw data                                        *
  *                                                                           *
  *---------------------------------------------------------------------------*
  * Comment:                                                                  *
@@ -29,9 +29,7 @@ using namespace std;
 // ROOT
 #include "TObject.h"
 
-
-class TAGATAData : public TObject 
-{
+class TAGATAData : public TObject {
   //////////////////////////////////////////////////////////////
   // data members are hold into vectors in order 
   // to allow multiplicity treatment
@@ -40,6 +38,10 @@ class TAGATAData : public TObject
     vector<UShort_t>   fAGATA_E_DetectorNbr;
     vector<Double_t>   fAGATA_Energy;
 
+    // Angle
+    vector<UShort_t>   fAGATA_A_DetectorNbr;
+    vector<Double_t>   fAGATA_Angle;
+
     // Time
     vector<UShort_t>   fAGATA_T_DetectorNbr;
     vector<Double_t>   fAGATA_Time;
@@ -78,6 +80,18 @@ class TAGATAData : public TObject
       Set_Energy(Energy);
     };//!
 
+    // Angle
+    inline void SetA_DetectorNbr(const UShort_t& DetNbr)
+      {fAGATA_A_DetectorNbr.push_back(DetNbr);} //!
+    inline void Set_Angle(const Double_t& Angle)
+      {fAGATA_Angle.push_back(Angle);}//!
+    // Prefer global setter so that all vectors have the same size
+    inline void SetAngle(const UShort_t& DetNbr,const Double_t& Angle) {
+      SetA_DetectorNbr(DetNbr);
+      Set_Angle(Angle);
+    };//!
+
+
     // Time
     inline void SetT_DetectorNbr(const UShort_t& DetNbr)
       {fAGATA_T_DetectorNbr.push_back(DetNbr);} //!
@@ -99,6 +113,15 @@ class TAGATAData : public TObject
     inline Double_t Get_Energy(const unsigned int &i) const 
       {return fAGATA_Energy[i];}//!
 
+    // Angle
+    inline UShort_t GetMultAngle() const
+      {return fAGATA_A_DetectorNbr.size();}
+    inline UShort_t GetA_DetectorNbr(const unsigned int &i) const 
+      {return fAGATA_A_DetectorNbr[i];}//!
+    inline Double_t Get_Angle(const unsigned int &i) const 
+      {return fAGATA_Angle[i];}//!
+
+
     // Time
     inline UShort_t GetMultTime() const
       {return fAGATA_T_DetectorNbr.size();}
diff --git a/NPLib/Detectors/AGATA/TAGATAPhysics.cxx b/NPLib/Detectors/AGATA/TAGATAPhysics.cxx
index c9c40d706..db2e1aa67 100644
--- a/NPLib/Detectors/AGATA/TAGATAPhysics.cxx
+++ b/NPLib/Detectors/AGATA/TAGATAPhysics.cxx
@@ -1,18 +1,18 @@
 /*****************************************************************************
- * Copyright (C) 2009-2016   this file is part of the NPTool Project       *
+ * Copyright (C) 2009-2016   this file is part of the NPTool Project         *
  *                                                                           *
  * For the licensing terms see $NPTOOL/Licence/NPTool_Licence                *
  * For the list of contributors see $NPTOOL/Licence/Contributors             *
  *****************************************************************************/
 
 /*****************************************************************************
- * Original Author: Adrien Matta  contact address: a.matta@surrey.ac.uk                        *
+ * Original Author: Adrien Matta  contact address: a.matta@surrey.ac.uk      *
  *                                                                           *
- * Creation Date  : January 2016                                           *
+ * Creation Date  : January 2016                                             *
  * Last update    :                                                          *
  *---------------------------------------------------------------------------*
  * Decription:                                                               *
- *  This class hold AGATA Raw data                                    *
+ *  This class hold AGATA Treated  data                                      *
  *                                                                           *
  *---------------------------------------------------------------------------*
  * Comment:                                                                  *
@@ -41,16 +41,16 @@ using namespace std;
 ClassImp(TAGATAPhysics)
 
 
-///////////////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////////////
 TAGATAPhysics::TAGATAPhysics()
-   : m_EventData(new TAGATAData),
-     m_PreTreatedData(new TAGATAData),
-     m_EventPhysics(this),
-     m_Spectra(0),
-     m_E_RAW_Threshold(0), // adc channels
-     m_E_Threshold(0),     // MeV
-     m_NumberOfDetectors(0) {
-}
+  : m_EventData(new TAGATAData),
+  m_PreTreatedData(new TAGATAData),
+  m_EventPhysics(this),
+  m_Spectra(0),
+  m_E_RAW_Threshold(0), // adc channels
+  m_E_Threshold(0),     // MeV
+  m_NumberOfDetectors(0) {
+  }
 
 
 
@@ -65,33 +65,33 @@ void TAGATAPhysics::BuildSimplePhysicalEvent() {
 void TAGATAPhysics::BuildPhysicalEvent() {
   // apply thresholds and calibration
   PreTreat();
-
   // match energy and time together
   for (UShort_t e = 0; e < m_PreTreatedData->GetMultEnergy(); e++) {
     for (UShort_t t = 0; t < m_PreTreatedData->GetMultTime(); t++) {
-      if (m_PreTreatedData->GetE_DetectorNbr(e) == m_PreTreatedData->GetT_DetectorNbr(t)) {
-        DetectorNumber.push_back(m_PreTreatedData->GetE_DetectorNbr(e));
-        Energy.push_back(m_PreTreatedData->Get_Energy(e));
-        Time.push_back(m_PreTreatedData->Get_Time(t));
+      for (UShort_t a = 0; a < m_PreTreatedData->GetMultAngle(); a++) {
+        if (m_PreTreatedData->GetE_DetectorNbr(e) == m_PreTreatedData->GetT_DetectorNbr(t) 
+         && m_PreTreatedData->GetE_DetectorNbr(e) == m_PreTreatedData->GetA_DetectorNbr(a)) {
+          DetectorNumber.push_back(m_PreTreatedData->GetE_DetectorNbr(e));
+          Energy.push_back(m_PreTreatedData->Get_Energy(e));
+          Angle.push_back(m_PreTreatedData->Get_Angle(a));
+          Time.push_back(m_PreTreatedData->Get_Time(t));
+        }
       }
     }
   }
 }
 
-
-
 ///////////////////////////////////////////////////////////////////////////
 void TAGATAPhysics::PreTreat() {
-  // This method ypically applies thresholds and calibrations
-  // Might test for desabled channel for more complex detector
+  // This method typically applies thresholds and calibrations
+  // Might test for disabled channels for more complex detector
 
   // clear pre-treated object
   ClearPreTreatedData();
-
   // instantiate CalibrationManager
   static CalibrationManager* Cal = CalibrationManager::getInstance();
-
   // Energy
+
   for (UShort_t i = 0; i < m_EventData->GetMultEnergy(); ++i) {
     if (m_EventData->Get_Energy(i) > m_E_RAW_Threshold) {
       Double_t Energy = Cal->ApplyCalibration("AGATA/ENERGY"+NPL::itoa(m_EventData->GetE_DetectorNbr(i)),m_EventData->Get_Energy(i));
@@ -100,7 +100,13 @@ void TAGATAPhysics::PreTreat() {
       }
     }
   }
-
+  
+  // Angle
+  for (UShort_t i = 0; i < m_EventData->GetMultAngle(); ++i) {
+    Double_t Angle = m_EventData->Get_Angle(i);
+    m_PreTreatedData->SetAngle(m_EventData->GetA_DetectorNbr(i), Angle);
+  }
+  
   // Time 
   for (UShort_t i = 0; i < m_EventData->GetMultTime(); ++i) {
     Double_t Time= Cal->ApplyCalibration("AGATA/TIME"+NPL::itoa(m_EventData->GetT_DetectorNbr(i)),m_EventData->Get_Time(i));
@@ -178,6 +184,7 @@ void TAGATAPhysics::ReadAnalysisConfig() {
 void TAGATAPhysics::Clear() {
   DetectorNumber.clear();
   Energy.clear();
+  Angle.clear();
   Time.clear();
 }
 
@@ -193,10 +200,6 @@ void TAGATAPhysics::ReadConfiguration(string Path) {
   bool check_Theta = false          ;
   bool check_Phi  = false           ;
   bool check_R     = false          ;
-  bool check_Shape = false          ;
-  bool check_X = false              ;
-  bool check_Y = false              ;
-  bool check_Z = false              ;
   bool ReadingStatus = false        ;
 
   while (!ConfigFile.eof()){
@@ -247,33 +250,6 @@ void TAGATAPhysics::ReadConfiguration(string Path) {
         cout << "R:  " << atof( DataBuffer.c_str() ) << "mm" << endl;
       }
 
-      //Position method
-      else if (DataBuffer=="X=") {
-        check_X = true;
-        ConfigFile >> DataBuffer ;
-        cout << "X:  " << atof( DataBuffer.c_str() ) << "mm" << endl;
-      }
-
-      else if (DataBuffer=="Y=") {
-        check_Y = true;
-        ConfigFile >> DataBuffer ;
-        cout << "Y:  " << atof( DataBuffer.c_str() ) << "mm"<< endl;
-      }
-
-      else if (DataBuffer=="Z=") {
-        check_Z = true;
-        ConfigFile >> DataBuffer ;
-        cout << "Z:  " << atof( DataBuffer.c_str() ) << "mm" << endl;
-      }
-
-
-      //General
-      else if (DataBuffer=="Shape=") {
-        check_Shape = true;
-        ConfigFile >> DataBuffer ;
-        cout << "Shape:  " << DataBuffer << endl;
-      }
-
       ///////////////////////////////////////////////////
       //   If no Detector Token and no comment, toggle out
       else{
@@ -283,17 +259,13 @@ void TAGATAPhysics::ReadConfiguration(string Path) {
       /////////////////////////////////////////////////
       //   If All necessary information there, toggle out
 
-      if ( ((check_Theta && check_Phi && check_R) ||( check_X && check_Y && check_Z)  ) && check_Shape ){
+      if (check_Theta && check_Phi && check_R){
         m_NumberOfDetectors++;
 
         //   Reinitialisation of Check Boolean
         check_Theta = false          ;
         check_Phi  = false           ;
         check_R     = false          ;
-        check_Shape = false          ;
-        check_X = false              ;
-        check_Y = false              ;
-        check_Z = false              ;
         ReadingStatus = false        ;
         cout << "///"<< endl         ;
       }
diff --git a/NPLib/Detectors/AGATA/TAGATAPhysics.h b/NPLib/Detectors/AGATA/TAGATAPhysics.h
index 0cbf21fe3..e43d8d9a0 100644
--- a/NPLib/Detectors/AGATA/TAGATAPhysics.h
+++ b/NPLib/Detectors/AGATA/TAGATAPhysics.h
@@ -14,7 +14,7 @@
  * Last update    :                                                          *
  *---------------------------------------------------------------------------*
  * Decription:                                                               *
- *  This class hold AGATA Raw data                                    *
+ *  This class hold AGATA Treated data                                *
  *                                                                           *
  *---------------------------------------------------------------------------*
  * Comment:                                                                  *
@@ -65,6 +65,7 @@ class TAGATAPhysics : public TObject, public NPL::VDetector {
   public:
     vector<int>      DetectorNumber;
     vector<double>   Energy;
+    vector<double>   Angle;
     vector<double>   Time;
 
 
diff --git a/NPSimulation/Detectors/AGATA/AGATA.cc b/NPSimulation/Detectors/AGATA/AGATA.cc
index 254167898..8fa0af621 100644
--- a/NPSimulation/Detectors/AGATA/AGATA.cc
+++ b/NPSimulation/Detectors/AGATA/AGATA.cc
@@ -56,9 +56,10 @@ using namespace CLHEP;
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 namespace AGATA_NS{
   // Energy and time Resolution
-  const double EnergyThreshold = 0.1*MeV;
+  const double EnergyThreshold = 1*keV;
   const double ResoTime = 4.5*ns ;
-  const double ResoEnergy = 5.0*MeV ;
+  const double ResoEnergy = 2*keV ;
+  const double ResoAngle = 5*deg;
 }
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -110,14 +111,17 @@ G4AssemblyVolume* AGATA::BuildTripleCluster(){
 
     G4ThreeVector Pos_Red= ATC->GetDaughter(0)->GetTranslation();
     G4RotationMatrix* Rot_Red =new G4RotationMatrix( (ATC->GetDaughter(0)->GetObjectRotationValue()));
+    ATC->GetDaughter(0)->GetLogicalVolume()->GetDaughter(0)->GetLogicalVolume()->GetDaughter(0)->GetLogicalVolume()->SetSensitiveDetector(m_AGATAScorer);
     m_TripleCluster->AddPlacedVolume(RedCrystal,Pos_Red, Rot_Red);
 
     G4ThreeVector Pos_Green= ATC->GetDaughter(1)->GetTranslation();
     G4RotationMatrix* Rot_Green =new G4RotationMatrix( (ATC->GetDaughter(1)->GetObjectRotationValue()));
+    ATC->GetDaughter(1)->GetLogicalVolume()->GetDaughter(0)->GetLogicalVolume()->GetDaughter(0)->GetLogicalVolume()->SetSensitiveDetector(m_AGATAScorer);
     m_TripleCluster->AddPlacedVolume(GreenCrystal,Pos_Green, Rot_Green);
     
     G4ThreeVector Pos_Blue= ATC->GetDaughter(2)->GetTranslation();
     G4RotationMatrix* Rot_Blue =new G4RotationMatrix( (ATC->GetDaughter(2)->GetObjectRotationValue()));
+    ATC->GetDaughter(2)->GetLogicalVolume()->GetDaughter(0)->GetLogicalVolume()->GetDaughter(0)->GetLogicalVolume()->SetSensitiveDetector(m_AGATAScorer);
     m_TripleCluster->AddPlacedVolume(BlueCrystal,Pos_Blue, Rot_Blue);
   }
   return m_TripleCluster;
@@ -290,7 +294,7 @@ void AGATA::ConstructDetector(G4LogicalVolume* world){
     G4double wX = m_R[i] * sin(m_Theta[i] ) * cos(m_Phi[i] ) ;
     G4double wY = m_R[i] * sin(m_Theta[i] ) * sin(m_Phi[i] ) ;
     G4double wZ = m_R[i] * cos(m_Theta[i] ) ;
-    G4ThreeVector Det_pos = G4ThreeVector(wX, wY, wZ) ;
+    G4ThreeVector Det_pos = G4ThreeVector(wX, wY, wZ+85) ;
     // So the face of the detector is at R instead of the middle
     Det_pos+=Det_pos.unit();
     // Building Detector reference frame
@@ -311,10 +315,8 @@ void AGATA::ConstructDetector(G4LogicalVolume* world){
       Rot->rotate(72*deg,w);
 
     BuildTripleCluster();
-    if(m_Shape[i] == "Square"){
-      G4Transform3D Trans(*Rot,Det_pos);
-      m_TripleCluster->MakeImprint(world,Trans,i+1);
-    }
+    G4Transform3D Trans(*Rot,Det_pos);
+    m_TripleCluster->MakeImprint(world,Trans,i+1);
   }
 }
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -338,7 +340,7 @@ void AGATA::ReadSensitive(const G4Event* event){
   G4THitsMap<G4double*>* CaloHitMap;
   std::map<G4int, G4double**>::iterator Calo_itr;
 
-  G4int CaloCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("AGATAScorer/Calorimeter");
+  G4int CaloCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("AGATAScorer/Crystal");
   CaloHitMap = (G4THitsMap<G4double*>*)(event->GetHCofThisEvent()->GetHC(CaloCollectionID));
 
   // Loop on the Calo map
@@ -350,8 +352,10 @@ void AGATA::ReadSensitive(const G4Event* event){
     double Energy = RandGauss::shoot(Info[0],AGATA_NS::ResoEnergy);
     if(Energy>AGATA_NS::EnergyThreshold){
       double Time = RandGauss::shoot(Info[1],AGATA_NS::ResoTime);
-      int DetectorNbr = (int) Info[2];
+      int DetectorNbr = (int) Info[7];
+      double Angle = RandGauss::shoot(Info[5]/deg,AGATA_NS::ResoAngle);
       m_Event->SetEnergy(DetectorNbr,Energy);
+      m_Event->SetAngle(DetectorNbr,Angle);
       m_Event->SetTime(DetectorNbr,Time); 
     }
   }
@@ -370,8 +374,8 @@ void AGATA::InitializeScorers() {
     return ;
 
   // Otherwise the scorer is initialised
-  vector<int> level; level.push_back(0);
-  G4VPrimitiveScorer* Calorimeter= new CALORIMETERSCORERS::PS_Calorimeter("Calorimeter",level, 0) ;
+  vector<int> level; level.push_back(1);
+  G4VPrimitiveScorer* Calorimeter= new CALORIMETERSCORERS::PS_CalorimeterWithInteraction("Crystal",level, 0) ;
   //and register it to the multifunctionnal detector
   m_AGATAScorer->RegisterPrimitive(Calorimeter);
   G4SDManager::GetSDMpointer()->AddNewDetector(m_AGATAScorer) ;
diff --git a/NPSimulation/Detectors/GASPARD/GaspardTracker.cc b/NPSimulation/Detectors/GASPARD/GaspardTracker.cc
index ac51760da..d1ce2b3c9 100644
--- a/NPSimulation/Detectors/GASPARD/GaspardTracker.cc
+++ b/NPSimulation/Detectors/GASPARD/GaspardTracker.cc
@@ -243,7 +243,7 @@ G4AssemblyVolume* GaspardTracker::BuildMugastChamber(){
   G4AssemblyVolume* Chamber = new G4AssemblyVolume();
   G4Material* Alu = MaterialManager::getInstance()->GetMaterialFromLibrary("Al");
 
-  G4Sphere* Sphere = new G4Sphere("Mugast_sphere",228*mm,230*mm,0,360*deg,115*deg,60*deg);
+  G4Sphere* Sphere = new G4Sphere("Mugast_sphere",153*mm,155*mm,0,360*deg,100*deg,60*deg);
   G4Sphere* Sphere2 = new G4Sphere("Mugast_sphere2",250*mm,252*mm,0,360*deg,55*deg,20*deg);
 
   G4UnionSolid* Rear= new G4UnionSolid("MugastChamber_RearSol" , Sphere, Sphere2,0,G4ThreeVector(0,0,-228));
diff --git a/NPSimulation/Detectors/Miniball/Miniball.cc b/NPSimulation/Detectors/Miniball/Miniball.cc
index 567a6cced..57a4911eb 100644
--- a/NPSimulation/Detectors/Miniball/Miniball.cc
+++ b/NPSimulation/Detectors/Miniball/Miniball.cc
@@ -87,7 +87,7 @@ G4AssemblyVolume* Miniball::BuildClusterDetector(){
     cout << "Miniball geometry is based on Munich Group Simulation exported in GDML"<< endl;
     string basepath = getenv("NPTOOL");
     string path=basepath+"/NPSimulation/Detectors/Miniball/Miniball.gdml";
-    m_gdmlparser.Read(path);
+    m_gdmlparser.Read(path,false);
 
     G4VisAttributes* Red = new G4VisAttributes(G4Color(1,0.5,0.5));
     G4VisAttributes* Green= new G4VisAttributes(G4Color(0.5,1,0.5));
diff --git a/NPSimulation/Detectors/TRex/TRex.cc b/NPSimulation/Detectors/TRex/TRex.cc
index d6f4f125c..2becc7af0 100644
--- a/NPSimulation/Detectors/TRex/TRex.cc
+++ b/NPSimulation/Detectors/TRex/TRex.cc
@@ -96,7 +96,7 @@ G4AssemblyVolume* TRex::BuildBarrelDetector(){
       cout << "TRex geometry is based on Munich Group Simulation exported in GDML"<< endl;
       string basepath = getenv("NPTOOL");
       string path=basepath+"/NPSimulation/Detectors/TRex/TRex_Miniball.gdml";
-      m_gdmlparser.Read(path);
+      m_gdmlparser.Read(path,false);
     }   
     m_BarrelDetector = new G4AssemblyVolume();
     G4LogicalVolume* PCB =  m_gdmlparser.GetVolume("PCBForwardBarrel_log");
diff --git a/NPSimulation/PhysicsListOption.txt b/NPSimulation/PhysicsListOption.txt
index 80d2aac3d..6e6fc7c04 100644
--- a/NPSimulation/PhysicsListOption.txt
+++ b/NPSimulation/PhysicsListOption.txt
@@ -6,5 +6,5 @@ HadronElasticPhysics 0
 StoppingPhysics 0
 OpticalPhysics 0
 HadronPhysicsQGSP_BIC_HP 0
-Decay 1
+Decay 0
 
diff --git a/Projects/MUGAST/Show.C b/Projects/MUGAST/Show.C
deleted file mode 100644
index 24c35ee22..000000000
--- a/Projects/MUGAST/Show.C
+++ /dev/null
@@ -1,67 +0,0 @@
-void Show(){
-TF1* f = new TF1("f","sin(x*3.14159/180.)",0,180);
-TFile* ResultTreeFile= new TFile("../../Outputs/Analysis/74Kr_g.root");
-TTree* ResultTree = (TTree*) ResultTreeFile->FindObjectAny("ResultTree");
-ResultTree->Draw("ThetaCM>>h(36,0,180)","MUST2.Si_E@.size()==0","",ResultTree->GetEntries()*0.03);
-TH1F* h = (TH1F*) gDirectory->FindObjectAny("h");
-h->Sumw2();
-TFile* Feff = new TFile("Eff74Kr.root");
-TH1F* eff = (TH1F*) Feff->FindObjectAny("hDetecThetaCM");
-eff->Sumw2();
-eff->Rebin(5);
-double hnorm = h->Integral();
-h->Divide(eff);
-h->Divide(f);
-h->SetMarkerColor(kBlack);
-h->SetLineColor(kBlack);
-
-h->Draw();
-
-/*TFile* ResultTreeFile2= new TFile("../../Outputs/Analysis/74Kr_f.root");
-TTree* ResultTree2 = (TTree*) ResultTreeFile2->FindObjectAny("ResultTree");
-ResultTree2->Draw("ThetaCM>>h2(36,0,180)","MUST2.Si_E@.size()==0","same");
-TH1F* h2 = (TH1F*) gDirectory->FindObjectAny("h2");
-h2->Sumw2();
-h2->Scale(hnorm/h2->Integral());
-h2->Divide(eff);
-h2->SetMarkerColor(kRed);
-h2->SetLineColor(kRed);
-h2->Draw("same");*/
-
-
-
-TGraph* g = new TGraph("../../Inputs/CrossSection/CS_74Krdp_g.txt");
-double* x = g->GetX();
-double* y = g->GetY();
-double norm = h->GetBinContent(h->FindBin(37.5))/g->Eval(37.5);
-
-for(unsigned int i = 0 ; i < g->GetN() ; i++){
- g->SetPoint(i,x[i],y[i]*norm);
-}
-g->SetLineColor(kAzure+7);
-g->Draw("c");
-
-TGraph* g2 = new TGraph("../../Inputs/CrossSection/CS_74Krdp_p.txt");
-x = g2->GetX();
-y = g2->GetY();
-norm = h->GetBinContent(h->FindBin(37.5))/g2->Eval(37.5);
-
-for(unsigned int i = 0 ; i < g2->GetN() ; i++){
- g2->SetPoint(i,x[i],y[i]*norm);
-}
-g2->SetLineColor(kOrange+7);
-g2->Draw("c");
-
-TGraph* g3 = new TGraph("../../Inputs/CrossSection/CS_74Krdp_f.txt");
-x = g3->GetX();
-y = g3->GetY();
-norm = h->GetBinContent(h->FindBin(37.5))/g3->Eval(37.5);
-
-for(unsigned int i = 0 ; i < g3->GetN() ; i++){
- g3->SetPoint(i,x[i],y[i]*norm);
-}
-g3->SetLineColor(kGreen-3);
-g3->Draw("c");
-
-gPad->SetLogy();
-}
diff --git a/Projects/S1554/Reaction/28Mgdp_EXD.reaction b/Projects/S1554/Reaction/28Mgdp_EXD.reaction
index f47723f6f..840871f3b 100644
--- a/Projects/S1554/Reaction/28Mgdp_EXD.reaction
+++ b/Projects/S1554/Reaction/28Mgdp_EXD.reaction
@@ -25,6 +25,6 @@ TwoBodyReaction
 	Heavy= 29Mg
 	ExcitationEnergyLight= 0.0
 	ExcitationEnergyDistribution= EXD.txt EX
-  CrossSectionPath= CS_28Mgdp_g.txt CSR0
+  CrossSectionPath= super.txt CSR0
 	ShootLight= 1
 	ShootHeavy= 1
diff --git a/Projects/S1554/macro/Mg.cxx b/Projects/S1554/macro/Mg.cxx
index 6a3c1ec97..e6a8a8777 100644
--- a/Projects/S1554/macro/Mg.cxx
+++ b/Projects/S1554/macro/Mg.cxx
@@ -3,9 +3,6 @@ void Mg(){
   TFile* file = new TFile("../../Outputs/Analysis/S1554_28Mgdp_Phy.root");
   TTree* tree = (TTree*) file->FindObjectAny("PhysicsTree");
 
-  file = new TFile("cuts/Cut_pp.root");
-  TCutG* Cut_pp = (TCutG*) file->FindObjectAny("Cut_pp");
-
   tree->SetAlias("GoodTrifoil","(Trifoil.Time>150 && Trifoil.Time<160 && RunNumber>35110) && ELab > 0 ") ;
   tree->SetAlias("GoodProton","ThetaLab>90 && Sharc.Strip_E>0.8");
   TCanvas* c = new TCanvas("Mg","Mg");
@@ -37,11 +34,13 @@ void Mg(){
   line -> Draw("c"); 
 
   c->cd(2);
-  tree->Draw("Ex>>h(200,-1,8)","GoodTrifoil && GoodProton  ","colz");
+
+  new TCanvas();
+  tree->Draw("Ex>>h(200,-8,8)","GoodTrifoil && GoodProton  ","colz");
   TH1* h = (TH1*) gDirectory->FindObjectAny("h");
   h->GetXaxis()->SetTitle("E_{29Mg} (MeV)");
   h->GetYaxis()->SetTitle("counts/40 keV");
-
+  return ;
   int maximum = h->GetMaximum();
   TLine* state1= new TLine(0,0,0,maximum);
   state1->Draw("l");
diff --git a/Projects/S1554/macro/MgCS2.cxx b/Projects/S1554/macro/MgCS2.cxx
index 13b54c2fe..6aaff7e17 100644
--- a/Projects/S1554/macro/MgCS2.cxx
+++ b/Projects/S1554/macro/MgCS2.cxx
@@ -41,17 +41,25 @@ void MgCS2(){
   new TCanvas();
   h->Draw("colz");
   // CS
-  TCanvas* c = new TCanvas("CS","CS",1000,1000);
-  c->Divide(2,2);
-
+  TCanvas* c = new TCanvas("CS","CS",800,800);
+//  c->Divide(2,2);
+  TGraph* CSth;
   // Region 
   current = Region(-0.1,0.4,h,c,nn++,Eff);
   g1 = TWOFNR(0.000, 0, 0.5, 1, 0, 0.5);
   g2 = TWOFNR(0.054, 0, 1.5, 0, 2, 1.5);
   g1->SetLineStyle(2);g1->Draw("c");
   g2->SetLineStyle(3);g2->Draw("c");
-  FindNormalisation(g1,g2,current)->Draw("c"); 
-  
+  CSth = FindNormalisation(g1,g2,current); 
+  CSth->Draw("c");
+  TLegend* leg = new TLegend(0.7,0.6,1,0.9);
+  leg->SetBorderSize(0);
+  leg->SetFillStyle(0);
+  leg->AddEntry(g1,"L=0 S=0.41(4)","l");
+  leg->AddEntry(g2,"L=2 S=0.13(4) ","l");
+  leg->AddEntry(CSth,"L=0 + L=2 ","l");
+  leg->Draw();
+/* 
   current = Region(0.6,1.8,h,c,nn++,Eff);
   g1 = TWOFNR(1.095, 0, 1.5, 1, 1, 1.5);
   g2 = TWOFNR(1.431, 0, 3.5, 0, 3, 3.5);
@@ -72,7 +80,7 @@ void MgCS2(){
   g1->SetLineStyle(2);g1->Draw("c");
   g2->SetLineStyle(3);g2->Draw("c");
   FindNormalisation(g1,g2,current)->Draw("c"); 
-
+*/
 
 }
 ////////////////////////////////////////////////////////////////////////////////
@@ -80,8 +88,9 @@ TH1* Region(double Emin, double Emax,TH2* h, TCanvas* c, int pad , TH2* Eff){
   c->cd(pad);
   TH1D* p =  h->ProjectionX(Form("p%i",pad),h->GetYaxis()->FindBin(Emin),h->GetYaxis()->FindBin(Emax));
   p->Draw();
+  p->GetYaxis()->SetTitle("d#sigma/d#Omega (mb/sr)");
   gPad->SetLogy();
-//  p->GetYaxis()->SetRangeUser(1e1,1e5);
+  p->GetYaxis()->SetRangeUser(1e-1,1e3);
   return p;
 }
 
diff --git a/Projects/S1554/macro/SM.cxx b/Projects/S1554/macro/SM.cxx
index 935467787..3ec6df37f 100644
--- a/Projects/S1554/macro/SM.cxx
+++ b/Projects/S1554/macro/SM.cxx
@@ -4,10 +4,10 @@
 void PlotLevel(string name,int offset,bool LR, RS::ShellModelCollection Collection, vector<int> matched);
 vector<TPad*> thePad;
 double Emin = -0.2;
-double Emax = 5.2;
+double Emax = 2.70;
 double ScaleMin = 0;
 double ScaleMax = 7;
-double LabelSize = 0.025;
+double LabelSize = 0.04;
 int nbr = 2;
 unsigned int pad =0 ;
 
@@ -28,13 +28,12 @@ vector<string> ExpFileName;
 
 
 void SM(){
-  ifstream infile("mg29olapc.lsf");
   RS::ShellModelCollection WBP("WBP");
   WBP.LoadCollectionFromNushell("mg29olapc.lsf");
   RS::ShellModelCollection Exp("Exp");
   Exp.LoadCollectionFromSimpleFile("Level.txt");
-
-  vector<int> matched;
+  
+vector<int> matched;
   matched.resize(100,1);
   PlotLevel("WBP",1,1,WBP,matched);
   PlotLevel("Exp",0,0,Exp,matched);
diff --git a/Projects/SharcEfficiency/Analysis.cxx b/Projects/SharcEfficiency/Analysis.cxx
index be0550555..26c323ae7 100644
--- a/Projects/SharcEfficiency/Analysis.cxx
+++ b/Projects/SharcEfficiency/Analysis.cxx
@@ -38,8 +38,8 @@ Analysis::~Analysis(){
 void Analysis::Init(){
   InitOutputBranch();
   InitInputBranch();
-    Sharc = (TSharcPhysics*)  m_DetectorManager -> GetDetector("Sharc");
-    Trifoil = (TPlasticPhysics*)  m_DetectorManager -> GetDetector("Plastic");
+  Sharc = (TSharcPhysics*)  m_DetectorManager -> GetDetector("Sharc");
+  Trifoil = (TPlasticPhysics*)  m_DetectorManager -> GetDetector("Plastic");
 
   myReaction = new NPL::Reaction();
   myReaction->ReadConfigurationFile(NPOptionManager::getInstance()->GetReactionFile());
@@ -73,13 +73,16 @@ void Analysis::Init(){
   X_Trifoil = 0;
   Y_Trifoil = 0 ;
 
-  
+
   Si_E_Sharc = 0 ;
   E_Sharc = 0;
   ThetaDetector = 0   ;
   BeamDirection = TVector3(0,0,1);
-  TargetPosition = TVector3(0.1635909,0.910980,m_DetectorManager->GetTargetZ() );
-  double finalEnergy = BeamCD2.Slow(224,TargetThickness*0.5,0);
+  // S1554
+  //  TargetPosition = TVector3(0.1635909,0.910980,m_DetectorManager->GetTargetZ() );
+  // S1107
+  TargetPosition = TVector3(0.0808323,0.177073,m_DetectorManager->GetTargetZ() );
+  double finalEnergy = BeamCD2.Slow(myReaction->GetBeamEnergy(),TargetThickness*0.5,0);
   myReaction->SetBeamEnergy(finalEnergy);
   cout << "Set Beam energy to: " <<  finalEnergy << " MeV" << endl;
 
@@ -91,11 +94,17 @@ void Analysis::Init(){
   ThetaCM_detected = new TH1F("ThetaCM_detected","ThetaCM_detected",72,0,180);
   ThetaLab_emmitted = new TH1F("ThetaLab_emmitted","ThetaLab_emmitted",72,0,180);
   ThetaLab_detected = new TH1F("ThetaLab_detected","ThetaLab_detected",72,0,180);
-
+/*
   ThetaCM_emmitted_2D = new TH2F("ThetaCM_emmitted_2D","ThetaCM_emmitted_2D",72,0,180,400,-8,8);
   ThetaCM_detected_2D = new TH2F("ThetaCM_detected_2D","ThetaCM_detected_2D",72,0,180,400,-8,8);
   ThetaLab_emmitted_2D = new TH2F("ThetaLab_emmitted_2D","ThetaLab_emmitted_2D",72,0,180,400,-8,8);
   ThetaLab_detected_2D = new TH2F("ThetaLab_detected_2D","ThetaLab_detected_2D",72,0,180,400,-8,8);
+*/
+  ThetaCM_emmitted_2D = new TH2F("ThetaCM_emmitted_2D","ThetaCM_emmitted_2D",180,0,180,1100,-1,10);
+  ThetaCM_detected_2D = new TH2F("ThetaCM_detected_2D","ThetaCM_detected_2D",180,0,180,1100,-1,10);
+  ThetaLab_emmitted_2D = new TH2F("ThetaLab_emmitted_2D","ThetaLab_emmitted_2D",180,0,180,1100,-1,10);
+  ThetaLab_detected_2D = new TH2F("ThetaLab_detected_2D","ThetaLab_detected_2D",180,0,180,1100,-1,10);
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -108,11 +117,11 @@ void Analysis::TreatEvent(){
   // Fill Initial condition Histo
   ThetaCM_emmitted->Fill(myInit->GetThetaCM(0));
   ThetaLab_emmitted->Fill(myInit->GetThetaLab_WorldFrame(0));
- 
+
   double EXD =myReaction->ReconstructRelativistic(myInit->GetKineticEnergy(0),myInit->GetThetaLab_WorldFrame(0)*deg);
   ThetaCM_emmitted_2D->Fill(myInit->GetThetaCM(0),EXD);
   ThetaLab_emmitted_2D->Fill(myInit->GetThetaLab_WorldFrame(0),EXD);
-  
+
   if(Sharc->Strip_E.size()==1){
     /************************************************/
     // Part 1 : Impact Angle
@@ -120,7 +129,7 @@ void Analysis::TreatEvent(){
     X_Sharc = Sharc -> GetPositionOfInteraction(0,true).X();
     Y_Sharc = Sharc -> GetPositionOfInteraction(0,true).Y();
     Z_Sharc = Sharc -> GetPositionOfInteraction(0,true).Z();
-    
+
     ThetaLab = HitDirection.Angle( BeamDirection );
     ThetaNormalTarget = HitDirection.Angle( TVector3(0,0,1) ) ;
     ThetaDetector = HitDirection.Angle(-Sharc->GetDetectorNormal(0));
@@ -136,11 +145,9 @@ void Analysis::TreatEvent(){
       Energy += Sharc->Strip_E[0];
 
     Energy =  LightAl.EvaluateInitialEnergy(Energy,Sharc->GetDeadLayer(0)*micrometer,0);
-
     // Target Correction
     ELab = Energy;
     ELab = LightCD2.EvaluateInitialEnergy( Energy ,TargetThickness*0.5, ThetaNormalTarget);
-   
     /************************************************/
 
     /************************************************/
@@ -152,6 +159,7 @@ void Analysis::TreatEvent(){
     // Part 4 : Theta CM Calculation
     ThetaCM  = myReaction -> EnergyLabToThetaCM( ELab , ThetaLab)/deg;
     ThetaLab=ThetaLab/deg;
+    
     /************************************************/
     // Part 5: Compute the X and Y coordinate of the Heavy in the Trifoil plan
     myReaction->SetThetaCM(ThetaCM*deg);
@@ -165,17 +173,63 @@ void Analysis::TreatEvent(){
     P.RotateZ(HitDirection.Phi()+3.14159);
     X_Trifoil = P.X();
     Y_Trifoil = P.Y();
-   
+
     myReaction->SetThetaCM(0);
     myReaction->SetExcitationHeavy(0);
-    if(Trifoil->Energy.size()>0){
-      if( abs(Ex-EXD)<0.5 && Trifoil->Energy[0]>0 && Sharc->Strip_E[0]>0.8) {
-     //     if( abs(Ex-EXD)<0.5 &&  Trifoil->Energy.size()>0 && Trifoil->Energy[0]>0 /*&& ((Sharc->Strip_E[0]>2 && Sharc->DetectorNumber[0]!=1) ||(Sharc->Strip_E[0]>0.7 && Sharc->DetectorNumber[0]==1))*/ ) { // for S1107
 
-      ThetaCM_detected->Fill(myInit->GetThetaCM(0));
-      ThetaLab_detected->Fill(myInit->GetThetaLab_WorldFrame(0));
-      ThetaCM_detected_2D->Fill(myInit->GetThetaCM(0),Ex);
-      ThetaLab_detected_2D->Fill(myInit->GetThetaLab_WorldFrame(0),Ex);
+    /* 
+       if(Trifoil->Energy.size()>0){
+       if( abs(Ex-EXD)<0.5 && Trifoil->Energy[0]>0 && Sharc->Strip_E[0]>0.8) {
+
+       ThetaCM_detected->Fill(myInit->GetThetaCM(0));
+       ThetaLab_detected->Fill(myInit->GetThetaLab_WorldFrame(0));
+       ThetaCM_detected_2D->Fill(myInit->GetThetaCM(0),Ex);
+       ThetaLab_detected_2D->Fill(myInit->GetThetaLab_WorldFrame(0),Ex);
+       }
+       }
+       */
+
+    // S1107
+    bool check = false;
+    if(Sharc->DetectorNumber[0] == 1 && Sharc->Strip_E[0]>1.83)
+      check = true;
+    
+    else if(Sharc->DetectorNumber[0] == 2 && Sharc->Strip_E[0]>1.88)
+      check = true;
+   
+    else if(Sharc->DetectorNumber[0] == 3 && Sharc->Strip_E[0]>1.74)
+      check = true;
+
+    else if(Sharc->DetectorNumber[0] == 4 && Sharc->Strip_E[0]>1.)
+      check = true;
+
+    else if(Sharc->DetectorNumber[0] == 5 && Sharc->Strip_E[0]>2.10)
+      check = true;
+
+    else if(Sharc->DetectorNumber[0] == 6 && Sharc->Strip_E[0]>2.16)
+      check = true;
+
+    else if(Sharc->DetectorNumber[0] == 7 && Sharc->Strip_E[0]>2.06)
+      check = true;
+
+    else if(Sharc->DetectorNumber[0] == 8 && Sharc->Strip_E[0]>2.09)
+      check = true;
+
+    else if(Sharc->DetectorNumber[0] == 9 && Sharc->Strip_E[0]>1.97)
+      check = true;
+
+    else if(Sharc->DetectorNumber[0] == 10 && Sharc->Strip_E[0]>2.03)
+      check = true;
+
+    else if(Sharc->DetectorNumber[0] == 12 && Sharc->Strip_E[0]>1.99)
+      check = true;
+
+    if(Trifoil->Energy.size()>0){
+      if( check && abs(Ex-EXD)<0.5 &&  Trifoil->Energy.size()>0 && Trifoil->Energy[0]>0) { // for S1107
+        ThetaCM_detected->Fill(myInit->GetThetaCM(0));
+        ThetaLab_detected->Fill(myInit->GetThetaLab_WorldFrame(0));
+        ThetaCM_detected_2D->Fill(myInit->GetThetaCM(0),Ex);
+        ThetaLab_detected_2D->Fill(myInit->GetThetaLab_WorldFrame(0),Ex);
       }
     }
     /************************************************/
@@ -188,7 +242,7 @@ void Analysis::End(){
   Efficiency_CM->SetName("EfficiencyCM");
   Efficiency_CM->SetTitle("EfficiencyCM");
   Efficiency_CM->Sumw2();
-  
+
   Efficiency_Lab = new TH1F(*ThetaLab_detected); 
   Efficiency_Lab->SetName("EfficiencyLab");
   Efficiency_Lab->SetTitle("EfficiencyLab");
@@ -198,7 +252,7 @@ void Analysis::End(){
   Efficiency_CM_2D->SetName("EfficiencyCM_2D");
   Efficiency_CM_2D->SetTitle("EfficiencyCM_2D");
   Efficiency_CM_2D->Sumw2();
-  
+
   Efficiency_Lab_2D = new TH2F(*ThetaLab_detected_2D); 
   Efficiency_Lab_2D->SetName("EfficiencyLab_2D");
   Efficiency_Lab_2D->SetTitle("EfficiencyLab_2D");
@@ -225,7 +279,7 @@ void Analysis::End(){
   SolidAngle_Lab_2D->SetName("SolidAngleLab_2D");
   SolidAngle_Lab_2D->SetTitle("SolidAngleLab_2D");
   SolidAngle_Lab_2D->Sumw2();  
-  
+
   Efficiency_CM->Divide(ThetaCM_emmitted);
   Efficiency_Lab->Divide(ThetaLab_emmitted);
 
@@ -235,8 +289,8 @@ void Analysis::End(){
   double dt = 180./Efficiency_Lab->GetNbinsX();
   cout << "Angular infinitesimal = " << dt << "deg " << endl;
   TF1* C = new TF1("C",Form("1./(2*%f*sin(x*%f/180.)*%f*%f/180.)",M_PI,M_PI,dt,M_PI),0,180);
-  
-  
+
+
   SolidAngle_CM->Divide(ThetaCM_emmitted);
   SolidAngle_CM->Divide(C,1);
 
diff --git a/Projects/SharcEfficiency/configs/ConfigSharc.dat b/Projects/SharcEfficiency/configs/ConfigSharc.dat
index 9c7ea5ce7..1e547da90 100644
--- a/Projects/SharcEfficiency/configs/ConfigSharc.dat
+++ b/Projects/SharcEfficiency/configs/ConfigSharc.dat
@@ -1,99 +1,182 @@
 ConfigSharc
-  STRIP_ENERGY_MATCHING_NUMBER_OF_SIGMA 20
-  STRIP_ENERGY_MATCHING_SIGMA 0.060
-% Detector 1
-  DISABLE_CHANNEL SH01STRF7
+	MAX_STRIP_MULTIPLICITY 6
+	STRIP_ENERGY_MATCHING_SIGMA 0.30
+	STRIP_ENERGY_MATCHING_NUMBER_OF_SIGMA 3
+
+  DISABLE_CHANNEL SH01STRF8
+  DISABLE_CHANNEL SH01STRF9
+  DISABLE_CHANNEL SH01STRF10
+  DISABLE_CHANNEL SH01STRF11
+  DISABLE_CHANNEL SH01STRF12
   DISABLE_CHANNEL SH01STRF13
-% Detector 2
-  DISABLE_CHANNEL SH02STRF1
-  DISABLE_CHANNEL SH02STRB1
-% Detector 3
-  DISABLE_CHANNEL SH03STRB24
-% Detector 4
-  DISABLE_CHANNEL SH04STRF8
-  DISABLE_CHANNEL SH04STRF9
-  DISABLE_CHANNEL SH04STRF10
-  DISABLE_CHANNEL SH04STRF11
+  DISABLE_CHANNEL SH01STRF14
+  DISABLE_CHANNEL SH03STRF1
+  DISABLE_CHANNEL SH03STRF2
+  DISABLE_CHANNEL SH05STRF22
+  DISABLE_CHANNEL SH05STRF23
+  DISABLE_CHANNEL SH05STRF24
+  DISABLE_CHANNEL SH07STRF23
+  DISABLE_CHANNEL SH07STRF24
+  DISABLE_CHANNEL SH08STRF19
+  DISABLE_CHANNEL SH08STRF20
+  DISABLE_CHANNEL SH08STRF21
+  DISABLE_CHANNEL SH09STRF3
+  DISABLE_CHANNEL SH09STRF4
+  DISABLE_CHANNEL SH09STRF5
+  DISABLE_CHANNEL SH09STRF13
+  DISABLE_CHANNEL SH09STRF14
+  DISABLE_CHANNEL SH09STRF15
+  DISABLE_CHANNEL SH10STRF1
+  DISABLE_CHANNEL SH10STRF2
+  DISABLE_CHANNEL SH10STRF6
+  DISABLE_CHANNEL SH10STRF7
+  DISABLE_CHANNEL SH10STRF8
+  DISABLE_CHANNEL SH12STRF19
+  DISABLE_CHANNEL SH12STRF20
+  DISABLE_CHANNEL SH12STRF21
+  DISABLE_CHANNEL SH12STRF22
+  DISABLE_CHANNEL SH12STRF23
+  
+  DISABLE_CHANNEL SH01STRB4
+  DISABLE_CHANNEL SH01STRB5
+  DISABLE_CHANNEL SH01STRB6
+  DISABLE_CHANNEL SH01STRB16
+  DISABLE_CHANNEL SH01STRB17
+  DISABLE_CHANNEL SH01STRB18
+  DISABLE_CHANNEL SH01STRB19
+  DISABLE_CHANNEL SH01STRB20
+  DISABLE_CHANNEL SH01STRB21
+  DISABLE_CHANNEL SH03STRB10
+  DISABLE_CHANNEL SH03STRB11
+  DISABLE_CHANNEL SH03STRB12
+  DISABLE_CHANNEL SH03STRB14
+  DISABLE_CHANNEL SH03STRB15
+  DISABLE_CHANNEL SH03STRB16
+  DISABLE_CHANNEL SH04STRB1
+  DISABLE_CHANNEL SH04STRB2
   DISABLE_CHANNEL SH04STRB5
-  DISABLE_CHANNEL SH04STRB17
-  DISABLE_CHANNEL SH04STRB18
-  DISABLE_CHANNEL SH04STRB19
-  DISABLE_CHANNEL SH04STRB20
-  DISABLE_CHANNEL SH04STRB21
-% Detector 5
-  DISABLE_CHANNEL SH05STRF9
-  DISABLE_CHANNEL SH05STRF14
-  DISABLE_CHANNEL SH05STRF17
+  DISABLE_CHANNEL SH04STRB6
+  DISABLE_CHANNEL SH04STRB7
+  DISABLE_CHANNEL SH04STRB8
+  DISABLE_CHANNEL SH04STRB9
+  DISABLE_CHANNEL SH04STRB10
+  DISABLE_CHANNEL SH04STRB11
+  DISABLE_CHANNEL SH04STRB12
+  DISABLE_CHANNEL SH04STRB13
+  DISABLE_CHANNEL SH04STRB23
+  DISABLE_CHANNEL SH04STRB24
   DISABLE_CHANNEL SH05STRB9
   DISABLE_CHANNEL SH05STRB10
   DISABLE_CHANNEL SH05STRB11
-  DISABLE_CHANNEL SH05STRB12
-  DISABLE_CHANNEL SH05STRB13
-  DISABLE_CHANNEL SH05STRB14
-  DISABLE_CHANNEL SH05STRB17
-  DISABLE_CHANNEL SH05STRB18
-  DISABLE_CHANNEL SH05STRB22
-  DISABLE_CHANNEL SH05STRB23
-  DISABLE_CHANNEL SH05STRB24
+  DISABLE_CHANNEL SH05STRB25
+  DISABLE_CHANNEL SH05STRB26
+  DISABLE_CHANNEL SH05STRB27
+  DISABLE_CHANNEL SH05STRB28
+  DISABLE_CHANNEL SH05STRB29
+  DISABLE_CHANNEL SH05STRB30
+  DISABLE_CHANNEL SH05STRB31
+  DISABLE_CHANNEL SH05STRB32
   DISABLE_CHANNEL SH05STRB33
-% Detector 6
-  DISABLE_CHANNEL SH06STRF9
-  DISABLE_CHANNEL SH06STRF24
+  DISABLE_CHANNEL SH05STRB34
+  DISABLE_CHANNEL SH05STRB35
+  DISABLE_CHANNEL SH05STRB36
+  DISABLE_CHANNEL SH05STRB37
+  DISABLE_CHANNEL SH05STRB38
+  DISABLE_CHANNEL SH05STRB39
+  DISABLE_CHANNEL SH05STRB40
+  DISABLE_CHANNEL SH05STRB41
+  DISABLE_CHANNEL SH05STRB45
+  DISABLE_CHANNEL SH05STRB46
+  DISABLE_CHANNEL SH05STRB47
+  DISABLE_CHANNEL SH06STRB6
+  DISABLE_CHANNEL SH06STRB7
   DISABLE_CHANNEL SH06STRB8
+  DISABLE_CHANNEL SH06STRB14
+  DISABLE_CHANNEL SH06STRB15
+  DISABLE_CHANNEL SH06STRB16
   DISABLE_CHANNEL SH06STRB17
+  DISABLE_CHANNEL SH06STRB18
+  DISABLE_CHANNEL SH06STRB19
+  DISABLE_CHANNEL SH06STRB20
   DISABLE_CHANNEL SH06STRB21
-  DISABLE_CHANNEL SH06STRB27
-% Detector 7
-  DISABLE_CHANNEL SH07STRB2
-  DISABLE_CHANNEL SH07STRB4
-  DISABLE_CHANNEL SH07STRB18
-  DISABLE_CHANNEL SH07STRB22
-  DISABLE_CHANNEL SH07STRB24
-  DISABLE_CHANNEL SH07STRB29
-  DISABLE_CHANNEL SH07STRB31
-  DISABLE_CHANNEL SH07STRB44
+  DISABLE_CHANNEL SH06STRB22
+  DISABLE_CHANNEL SH06STRB23
+  DISABLE_CHANNEL SH06STRB24
+  DISABLE_CHANNEL SH06STRB25
+  DISABLE_CHANNEL SH06STRB44
+  DISABLE_CHANNEL SH06STRB45
+  DISABLE_CHANNEL SH06STRB46
+  DISABLE_CHANNEL SH06STRB47
+  DISABLE_CHANNEL SH06STRB48
+  DISABLE_CHANNEL SH07STRB43
+  DISABLE_CHANNEL SH07STRB45
+  DISABLE_CHANNEL SH07STRB46
+  DISABLE_CHANNEL SH07STRB47
   DISABLE_CHANNEL SH07STRB48
-% Detector 8
-  DISABLE_CHANNEL SH08STRF6
-  DISABLE_CHANNEL SH08STRF7
-  DISABLE_CHANNEL SH08STRF8
-  DISABLE_CHANNEL SH08STRF9
-  DISABLE_CHANNEL SH08STRF10
-  DISABLE_CHANNEL SH08STRF14
-  DISABLE_CHANNEL SH08STRF15
-  DISABLE_CHANNEL SH08STRB7
+  DISABLE_CHANNEL SH08STRB10
+  DISABLE_CHANNEL SH08STRB11
+  DISABLE_CHANNEL SH08STRB12
   DISABLE_CHANNEL SH08STRB13
-  DISABLE_CHANNEL SH08STRB32
-  DISABLE_CHANNEL SH08STRB33
+  DISABLE_CHANNEL SH08STRB14
+  DISABLE_CHANNEL SH08STRB15
+  DISABLE_CHANNEL SH08STRB16
+  DISABLE_CHANNEL SH08STRB43
   DISABLE_CHANNEL SH08STRB44
+  DISABLE_CHANNEL SH08STRB46
   DISABLE_CHANNEL SH08STRB47
   DISABLE_CHANNEL SH08STRB48
-% Detector 9
-  DISABLE_ALL SH09
-% Detector 10
- DISABLE_CHANNEL SH10STRF7
- DISABLE_CHANNEL SH10STRB1
- DISABLE_CHANNEL SH10STRB2
- DISABLE_CHANNEL SH10STRB3
- DISABLE_CHANNEL SH10STRB4
- DISABLE_CHANNEL SH10STRB8
- DISABLE_CHANNEL SH10STRB17
- DISABLE_CHANNEL SH10STRB36
-  % Detector 11
-  DISABLE_ALL SH11
-% Detector 12
-  DISABLE_CHANNEL SH12STRF4
-  DISABLE_CHANNEL SH12STRF7
-  DISABLE_CHANNEL SH12STRF24
-  DISABLE_CHANNEL SH12STRB1
-  DISABLE_CHANNEL SH12STRB17
-  DISABLE_CHANNEL SH12STRB18
-  DISABLE_CHANNEL SH12STRB28
-  DISABLE_CHANNEL SH12STRB29
+  DISABLE_CHANNEL SH09STRB1
+  DISABLE_CHANNEL SH09STRB2
+  DISABLE_CHANNEL SH09STRB4
+  DISABLE_CHANNEL SH09STRB5
+  DISABLE_CHANNEL SH09STRB6
+  DISABLE_CHANNEL SH09STRB8
+  DISABLE_CHANNEL SH09STRB9
+  DISABLE_CHANNEL SH09STRB10
+  DISABLE_CHANNEL SH09STRB11
+  DISABLE_CHANNEL SH09STRB12
+  DISABLE_CHANNEL SH09STRB13
+  DISABLE_CHANNEL SH09STRB14
+  DISABLE_CHANNEL SH09STRB15
+  DISABLE_CHANNEL SH09STRB16
+  DISABLE_CHANNEL SH09STRB17
+  DISABLE_CHANNEL SH09STRB23
+  DISABLE_CHANNEL SH09STRB24
+  DISABLE_CHANNEL SH09STRB25
+  DISABLE_CHANNEL SH09STRB27
+  DISABLE_CHANNEL SH09STRB28
+  DISABLE_CHANNEL SH09STRB29
+  DISABLE_CHANNEL SH09STRB37
+  DISABLE_CHANNEL SH09STRB38
+  DISABLE_CHANNEL SH09STRB39
+  DISABLE_CHANNEL SH09STRB42
+  DISABLE_CHANNEL SH09STRB43
+  DISABLE_CHANNEL SH09STRB44
+  DISABLE_CHANNEL SH09STRB45
+  DISABLE_CHANNEL SH09STRB46
+  DISABLE_CHANNEL SH09STRB47
+  DISABLE_CHANNEL SH10STRB1
+  DISABLE_CHANNEL SH10STRB2
+  DISABLE_CHANNEL SH10STRB3
+  DISABLE_CHANNEL SH10STRB4
+  DISABLE_CHANNEL SH10STRB5
+  DISABLE_CHANNEL SH10STRB6
+  DISABLE_CHANNEL SH10STRB7
+  DISABLE_CHANNEL SH10STRB8
+  DISABLE_CHANNEL SH10STRB9
+  DISABLE_CHANNEL SH10STRB10
+  DISABLE_CHANNEL SH10STRB11
+  DISABLE_CHANNEL SH10STRB12
+  DISABLE_CHANNEL SH10STRB15
+  DISABLE_CHANNEL SH10STRB16
+  DISABLE_CHANNEL SH10STRB17
+  DISABLE_CHANNEL SH10STRB18
+  DISABLE_CHANNEL SH10STRB19
+  DISABLE_CHANNEL SH10STRB46
+  DISABLE_CHANNEL SH10STRB47
+  DISABLE_CHANNEL SH10STRB48
+  DISABLE_CHANNEL SH12STRB4
+  DISABLE_CHANNEL SH12STRB35
   DISABLE_CHANNEL SH12STRB36
-  DISABLE_CHANNEL SH12STRB45
-  DISABLE_CHANNEL SH12STRB46
-  DISABLE_CHANNEL SH12STRB47
-  DISABLE_CHANNEL SH12STRB48
-% PAD threshold
-  PAD_E_THRESHOLD 0.3
+  DISABLE_CHANNEL SH12STRB37
+
diff --git a/Projects/TRex_Miniball/18N.mac b/Projects/TRex_Miniball/18N.mac
index 05a3742ef..de243b4c1 100644
--- a/Projects/TRex_Miniball/18N.mac
+++ b/Projects/TRex_Miniball/18N.mac
@@ -1,13 +1,17 @@
-/run/beamOn 10000
+/run/beamOn 59
 /gen/open Reaction/17Ndp_1.reaction
-/run/beamOn 10000
+/run/beamOn 4096
 /gen/open Reaction/17Ndp_2.reaction
-/run/beamOn 10000
+/run/beamOn 4155
 /gen/open Reaction/17Ndp_3.reaction
-/run/beamOn 10000
+/run/beamOn 59
 /gen/open Reaction/17Ndp_4.reaction
-/run/beamOn 10000
+/run/beamOn 4037
 /gen/open Reaction/17Ndp_5.reaction
-/run/beamOn 10000
+/run/beamOn 4154
 /gen/open Reaction/17Ndp_6.reaction
+/run/beamOn 292   
+/gen/open Reaction/17Ndd.reaction
 /run/beamOn 10000   
+/gen/open Reaction/17Npp.reaction
+/run/beamOn 5000   
diff --git a/Projects/TRex_Miniball/Analysis.cxx b/Projects/TRex_Miniball/Analysis.cxx
index 04026e6b6..44a14a41a 100644
--- a/Projects/TRex_Miniball/Analysis.cxx
+++ b/Projects/TRex_Miniball/Analysis.cxx
@@ -243,16 +243,13 @@ void Analysis::InitOutputBranch(){
   RootOutput::getInstance()->GetTree()->Branch("Z_Sharc",&Z_Sharc,"Z_Sharc/D");
   RootOutput::getInstance()->GetTree()->Branch("X_Trifoil",&X_Trifoil,"X_Trifoil/D");
   RootOutput::getInstance()->GetTree()->Branch("Y_Trifoil",&Y_Trifoil,"Y_Trifoil/D");
-
-  RootOutput::getInstance()->GetTree()->Branch("RunNumber",&RunNumber,"RunNumber/I");
-  RootOutput::getInstance()->GetTree()->Branch("RunNumberMinor",&RunNumberMinor,"RunNumberMinor/I");
+  RootOutput::getInstance()->GetTree()->Branch("Run",&RunNumber,"Run/I");
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 void Analysis::InitInputBranch(){
-  RootInput::getInstance()->GetChain()->SetBranchAddress("RunNumber",&RunNumber);
-  RootInput::getInstance()->GetChain()->SetBranchAddress("RunNumberMinor",&RunNumberMinor);
+  RootInput::getInstance()->GetChain()->SetBranchAddress("Run",&RunNumber);
 }
 ////////////////////////////////////////////////////////////////////////////////
 void Analysis::ReInitValue(){
diff --git a/Projects/TRex_Miniball/Reaction/17Ndp.reaction b/Projects/TRex_Miniball/Reaction/17Ndp.reaction
index e6548c71f..f1fbd52ea 100644
--- a/Projects/TRex_Miniball/Reaction/17Ndp.reaction
+++ b/Projects/TRex_Miniball/Reaction/17Ndp.reaction
@@ -24,7 +24,7 @@ TwoBodyReaction
 	Heavy= 18N
 	ExcitationEnergyLight= 0.0
 	ExcitationEnergyHeavy= 0.0
-  CrossSectionPath= flat.txt CSR
+  CrossSectionPath= 18Ngs.txt CSR
 	ShootLight= 1
 	ShootHeavy= 1
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Projects/TRex_Miniball/Reaction/17Ndp_1.reaction b/Projects/TRex_Miniball/Reaction/17Ndp_1.reaction
index d03582805..c9ad67ad2 100644
--- a/Projects/TRex_Miniball/Reaction/17Ndp_1.reaction
+++ b/Projects/TRex_Miniball/Reaction/17Ndp_1.reaction
@@ -24,7 +24,7 @@ TwoBodyReaction
 	Heavy= 18N
 	ExcitationEnergyLight= 0.0
 	ExcitationEnergyHeavy= 0.121
-  CrossSectionPath= flat.txt CSR
+  CrossSectionPath= 18N_1.txt CSR1
 	ShootLight= 1
 	ShootHeavy= 1
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -32,4 +32,4 @@ GammaDecay 18N
   Cascade
     BranchingRatio= 100
     Energies= 0.121
-    DifferentialCrossSection= flat.txt	Gamma18N
+    DifferentialCrossSection= flat.txt	Gamma18N1
diff --git a/Projects/TRex_Miniball/Reaction/17Ndp_2.reaction b/Projects/TRex_Miniball/Reaction/17Ndp_2.reaction
index 299a9fc90..093ea6f7f 100644
--- a/Projects/TRex_Miniball/Reaction/17Ndp_2.reaction
+++ b/Projects/TRex_Miniball/Reaction/17Ndp_2.reaction
@@ -24,7 +24,7 @@ TwoBodyReaction
 	Heavy= 18N
 	ExcitationEnergyLight= 0.0
 	ExcitationEnergyHeavy= 0.580
-  CrossSectionPath= flat.txt CSR
+  CrossSectionPath= 18N_2.txt CSR2
 	ShootLight= 1
 	ShootHeavy= 1
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -32,4 +32,4 @@ GammaDecay 18N
   Cascade
     BranchingRatio= 100
     Energies= 0.580
-    DifferentialCrossSection= flat.txt	Gamma18N
+    DifferentialCrossSection= flat.txt	Gamma18N2
diff --git a/Projects/TRex_Miniball/Reaction/17Ndp_3.reaction b/Projects/TRex_Miniball/Reaction/17Ndp_3.reaction
index d29f736e1..4994e0463 100644
--- a/Projects/TRex_Miniball/Reaction/17Ndp_3.reaction
+++ b/Projects/TRex_Miniball/Reaction/17Ndp_3.reaction
@@ -24,7 +24,7 @@ TwoBodyReaction
 	Heavy= 18N
 	ExcitationEnergyLight= 0.0
 	ExcitationEnergyHeavy= 0.587
-  CrossSectionPath= flat.txt CSR
+  CrossSectionPath= 18N_3.txt CSR3
 	ShootLight= 1
 	ShootHeavy= 1
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Projects/TRex_Miniball/Reaction/17Ndp_4.reaction b/Projects/TRex_Miniball/Reaction/17Ndp_4.reaction
index b8157ed64..f955365c9 100644
--- a/Projects/TRex_Miniball/Reaction/17Ndp_4.reaction
+++ b/Projects/TRex_Miniball/Reaction/17Ndp_4.reaction
@@ -24,7 +24,7 @@ TwoBodyReaction
 	Heavy= 18N
 	ExcitationEnergyLight= 0.0
 	ExcitationEnergyHeavy= 0.742
-  CrossSectionPath= flat.txt CSR
+  CrossSectionPath= 18N_4.txt CSR4
 	ShootLight= 1
 	ShootHeavy= 1
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Projects/TRex_Miniball/Reaction/17Ndp_5.reaction b/Projects/TRex_Miniball/Reaction/17Ndp_5.reaction
index a45ee040f..aef1593b8 100644
--- a/Projects/TRex_Miniball/Reaction/17Ndp_5.reaction
+++ b/Projects/TRex_Miniball/Reaction/17Ndp_5.reaction
@@ -24,7 +24,7 @@ TwoBodyReaction
 	Heavy= 18N
 	ExcitationEnergyLight= 0.0
 	ExcitationEnergyHeavy= 0.747
-  CrossSectionPath= flat.txt CSR
+  CrossSectionPath= 18N_5.txt CSR5
 	ShootLight= 1
 	ShootHeavy= 1
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -32,4 +32,4 @@ GammaDecay 18N
   Cascade
     BranchingRatio= 100
     Energies= 0.747
-    DifferentialCrossSection= flat.txt	Gamma18N
+    DifferentialCrossSection= flat.txt	Gamma18N5
diff --git a/Projects/TRex_Miniball/Reaction/17Ndp_6.reaction b/Projects/TRex_Miniball/Reaction/17Ndp_6.reaction
index 309cc4d53..f211fd5bd 100644
--- a/Projects/TRex_Miniball/Reaction/17Ndp_6.reaction
+++ b/Projects/TRex_Miniball/Reaction/17Ndp_6.reaction
@@ -23,13 +23,13 @@ TwoBodyReaction
 	Light= 1H
 	Heavy= 18N
 	ExcitationEnergyLight= 0.0
-	ExcitationEnergyHeavy= 2.221
-  CrossSectionPath= flat.txt CSR
+	ExcitationEnergyHeavy= 1.735 
+  CrossSectionPath= 18N_6.txt CSR6
 	ShootLight= 1
 	ShootHeavy= 1
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 GammaDecay 18N
   Cascade
     BranchingRatio= 100
-    Energies= 2.221
-    DifferentialCrossSection= flat.txt	Gamma18N
+    Energies= 1.735 
+    DifferentialCrossSection= flat.txt	Gamma18N6
diff --git a/Projects/TRex_Miniball/Show.cxx b/Projects/TRex_Miniball/Show.cxx
index 7dcb5958e..125f12f03 100644
--- a/Projects/TRex_Miniball/Show.cxx
+++ b/Projects/TRex_Miniball/Show.cxx
@@ -3,18 +3,164 @@ void Show(){
 TFile* file = new TFile("../../Outputs/Analysis/PhysicsTree.root","READ");
 TTree* PhysicsTree = (TTree*) file->FindObjectAny("PhysicsTree");
 NPL::Reaction r("17N(d,p)18N@93");
+TH1* h;
 
+TCanvas* c ;
+c = new TCanvas();
+PhysicsTree->Draw("ELab:ThetaLab>>h2(360,0,180,1000,0,30)","Ex>-1000","colz");
+r.GetKinematicLine3()->Draw("c");
+h = (TH1*) gDirectory->FindObjectAny("h2");
+h->GetXaxis()->SetTitle("E_{Lab} (MeV)");
+h->GetYaxis()->SetTitle("#theta_{Lab} (deg)");
+c->SaveAs("~/Dropbox/Presentation\ and\ Poster/ISOLDE_2016/image/Kine.pdf");
+
+c = new TCanvas();
+PhysicsTree->Draw("Ex>>h3(900,-2,7)","Ex>-1000","colz");
+h = (TH1*) gDirectory->FindObjectAny("h3");
+h->GetXaxis()->SetTitle("E_{18N} (MeV)");
+h->GetYaxis()->SetTitle("counts / 10 keV");
+c->SaveAs("~/Dropbox/Presentation\ and\ Poster/ISOLDE_2016/image/Ex.pdf");
 
+c = new TCanvas();
+PhysicsTree->Draw("EDC>>h4(2000,0,2)","Ex>-1000","colz");
+h = (TH1*) gDirectory->FindObjectAny("h4");
+h->GetXaxis()->SetTitle("E_{#gamma} DC (MeV)");
+h->GetYaxis()->SetTitle("counts / 1 keV");
+gPad->SetLogy();
+c->SaveAs("~/Dropbox/Presentation\ and\ Poster/ISOLDE_2016/image/EDC.pdf");
+
+c = new TCanvas();
 PhysicsTree->Draw("Ex:EDC>>h1(1000,0,2.5,1000,-1,2.5)","Ex>-1000","colz");
-new TCanvas();
- PhysicsTree->Draw("ELab:ThetaLab>>h2","Ex>-1000","colz");
-r.GetKinematicLine3()->Draw("c");
+TLine* line = new TLine(0,0,2.5,2.5);
+line->Draw();
+h = (TH1*) gDirectory->FindObjectAny("h1");
+h->GetYaxis()->SetTitle("E_{18N} (MeV)");
+h->GetXaxis()->SetTitle("E_{#gamma} DC (MeV)");
+c->SaveAs("~/Dropbox/Presentation\ and\ Poster/ISOLDE_2016/image/ExEg.pdf");
+TFile* fcut = new TFile("cut.root","READ");
+TCutG* cut = (TCutG*) fcut->FindObjectAny("CUTG");
+cut->Draw();
+cut->SetLineWidth(3);
+c->SaveAs("~/Dropbox/Presentation\ and\ Poster/ISOLDE_2016/image/ExEg2.pdf");
+delete cut;
+fcut = new TFile("cut2.root","READ");
+cut = (TCutG*) fcut->FindObjectAny("CUTG2");
+cut->Draw();
+cut->SetLineWidth(3);
+c->SaveAs("~/Dropbox/Presentation\ and\ Poster/ISOLDE_2016/image/ExEg3.pdf");
+delete cut;
+fcut = new TFile("cut3.root","READ");
+cut = (TCutG*) fcut->FindObjectAny("CUTG3");
+cut->Draw();
+cut->SetLineWidth(3);
+c->SaveAs("~/Dropbox/Presentation\ and\ Poster/ISOLDE_2016/image/ExEg4.pdf");
+
+
+c = new TCanvas();
+cout << PhysicsTree->Draw("ThetaCM>>h5(36,0,180)","Ex>-1000 && EDC > 0.6 && EDC < 0.65","colz") << endl;
+h = (TH1*) gDirectory->FindObjectAny("h5");
+h->GetYaxis()->SetTitle("d#sigma/d#Omega (mb/sr)");
+h->GetXaxis()->SetTitle("#theta_{CM}(deg)");
+TFile* feff = new TFile("TRex_eff4.root","READ");
+TH1* eff = (TH1*) feff->FindObjectAny("hDetecThetaCM");
+eff->Rebin(5);
+h->Divide(eff);
+
+TGraph* g = new TGraph("CS/18N_4.txt");
+TGraph* g0 = new TGraph("CS/18N_5.txt");
+g0->Draw("c");
+g0->SetLineColor(kAzure+7);
+g->SetLineWidth(3);
+g0->SetLineWidth(3);
+
+double norm = h->GetBinContent(h->FindBin(12))/g->Eval(12);
+h->Scale(1/norm);
+h->GetYaxis()->SetRangeUser(1e-2,350);
+
+h->SetLineColor(kOrange+7);
+g->Draw("c");
+gPad->SetLogy();
+TLatex *   tex = new TLatex(86.5,110,"600 < E_{#gamma} < 650 keV");
+tex->Draw();
+leg = new TLegend(0.5,0.6,1,0.85);
+leg->SetBorderSize(0);
+leg->SetFillStyle(0);
+leg->SetHeader("742 keV (3^{- }) state");
+leg->AddEntry(g,"L=2","l");
+leg->AddEntry(g0,"L=0","l");
+leg->Draw();
+c->SaveAs("~/Dropbox/Presentation\ and\ Poster/ISOLDE_2016/image/CS_742.pdf");
+
+c = new TCanvas();
+cout << PhysicsTree->Draw("ThetaCM>>h6(36,0,180)","Ex>-1000 && EDC > 0.7 && EDC < 0.8","colz") << endl;
+h = (TH1*) gDirectory->FindObjectAny("h6");
+h->GetYaxis()->SetTitle("d#sigma/d#Omega (mb/sr)");
+h->GetXaxis()->SetTitle("#theta_{CM}(deg)");
+
+//feff = new TFile("TRex_eff6.root","READ");
+//eff = (TH1*) feff->FindObjectAny("hDetecThetaCM");
+//eff->Rebin(5);
+h->Divide(eff);
+h->SetLineColor(kOrange+7);
+
+g2 = new TGraph("CS/18N_5.txt");
+g3 = new TGraph("CS/18N_4.txt");
+g3->SetLineColor(kAzure+7);
+norm = h->GetBinContent(h->FindBin(12))/g2->Eval(12);
+h->Scale(1/norm);
+h->GetYaxis()->SetRangeUser(1e-2,350);
+
+g2->Draw("c");
+g2->SetLineWidth(3);
+g3->Draw("c");
+g3->SetLineWidth(3);
+gPad->SetLogy();
+tex = new TLatex(86.5,110,"700 < E_{#gamma} < 800 keV");
+tex->Draw();
+leg = new TLegend(0.5,0.6,1,0.85);
+leg->SetHeader("747 keV (1^{- }) state");
+leg->SetBorderSize(0);
+leg->SetFillStyle(0);
+
+leg->AddEntry(g2,"L=0","l");
+leg->AddEntry(g3,"L=2","l");
+leg->Draw();
+c->SaveAs("~/Dropbox/Presentation\ and\ Poster/ISOLDE_2016/image/CS_747.pdf");
+
+c = new TCanvas();
+cout << PhysicsTree->Draw("ThetaCM>>h7(36,0,180)","Ex>-1000 && EDC > 1.7 && EDC < 1.8","colz") << endl;
+h = (TH1*) gDirectory->FindObjectAny("h7");
+h->GetYaxis()->SetTitle("d#sigma/d#Omega (mb/sr)");
+h->GetXaxis()->SetTitle("#theta_{CM}(deg)");
+
+feff = new TFile("TRex_eff6.root","READ");
+eff = (TH1*) feff->FindObjectAny("hDetecThetaCM");
+eff->Rebin(5);
+h->Divide(eff);
+h->SetLineColor(kOrange+7);
 
-new TCanvas();
-PhysicsTree->Draw("Ex>>h3(1000,-10,10)","Ex>-1000","colz");
+g2 = new TGraph("CS/18N_6.txt");
+g3 = new TGraph("CS/18N_4.txt");
+g3->SetLineColor(kAzure+7);
+norm = h->GetBinContent(h->FindBin(12))/g2->Eval(12);
+h->Scale(1/norm);
+h->GetYaxis()->SetRangeUser(1e-2,350);
 
-new TCanvas();
-PhysicsTree->Draw("EDC>>h3(2500,0,2.5)","Ex>-1000","colz");
+g2->Draw("c");
+g2->SetLineWidth(3);
+g3->Draw("c");
+g3->SetLineWidth(3);
+gPad->SetLogy();
+tex = new TLatex(86.5,110,"1700 < E_{#gamma} < 1800 keV");
+tex->Draw();
+leg = new TLegend(0.5,0.6,1,0.85);
+leg->SetHeader("1735 keV (1^{- }) state");
+leg->SetBorderSize(0);
+leg->SetFillStyle(0);
 
+leg->AddEntry(g2,"L=0","l");
+leg->AddEntry(g3,"L=2","l");
+leg->Draw();
+c->SaveAs("~/Dropbox/Presentation\ and\ Poster/ISOLDE_2016/image/CS_1735.pdf");
 
 }
-- 
GitLab