diff --git a/NPAnalysis/Gaspard/include/ObjectManager.hh b/NPAnalysis/Gaspard/include/ObjectManager.hh
index 191fc0ab66fa0f75d2115fa8faa9cfe640da111a..c1a4d0cb2f862efe906208f311a9735b3c616095 100644
--- a/NPAnalysis/Gaspard/include/ObjectManager.hh
+++ b/NPAnalysis/Gaspard/include/ObjectManager.hh
@@ -105,8 +105,8 @@ namespace ENERGYLOSS
 {
    // Declare your Energy loss here
 //   EnergyLoss LightTargetCD2 = EnergyLoss("proton_cd2.txt", 100, 1, 1); // LISE++
-   EnergyLoss LightTarget = EnergyLoss("proton_CD2.G4table", 100);	// G4
-//   EnergyLoss BeamTarget = EnergyLoss("proton_CD2.G4table", 100);	// G4
+   EnergyLoss LightTarget = EnergyLoss("proton_CD2.G4table", "G4Table", 1000);          // G4
+   EnergyLoss BeamTarget  = EnergyLoss("Sn132[0.0]_CD2.G4table", "G4Table", 1000);      // G4
 }
 
 using namespace ENERGYLOSS ;
diff --git a/NPAnalysis/Gaspard/src/Analysis.cc b/NPAnalysis/Gaspard/src/Analysis.cc
index de68ee321311d095603b63d79429405bd6c92e7c..9239da4a9b48fd1cb0ab68758d86146c590a6bc7 100644
--- a/NPAnalysis/Gaspard/src/Analysis.cc
+++ b/NPAnalysis/Gaspard/src/Analysis.cc
@@ -26,15 +26,18 @@ int main(int argc,char** argv)
    NPL::Reaction* myReaction = new Reaction();
    myReaction->ReadConfigurationFile(reactionfileName);
 
-   // set energy beam at target middle
-   myReaction->SetBeamEnergy(1292);
-
    // Initialize the detector
    NPA::DetectorManager* myDetector = new DetectorManager;
    myDetector->ReadConfigurationFile(detectorfileName);
 
-   // Print target thickness
-   cout << myDetector->GetTargetThickness() << endl;
+   // nominal beam energy
+   Double_t BeamEnergyNominal = myReaction->GetBeamEnergy() * MeV;
+   cout << BeamEnergyNominal << endl;
+   // slow beam at target middle
+   Double_t BeamEnergy = BeamEnergyNominal - BeamTarget.Slow(BeamEnergyNominal, myDetector->GetTargetThickness()/2 * micrometer, 0);
+   cout << BeamEnergy << endl;
+   // set energy beam at target middle
+   myReaction->SetBeamEnergy(BeamEnergy);
 
    // Attach more branch to the output
    double Ex = 0 ; double ExNoStrips = 0 ; double EE = 0 ; double TT = 0 ; double X = 0 ; double Y = 0 ; int det ;
@@ -84,7 +87,7 @@ int main(int argc,char** argv)
          ThetaStrip = ThetaCalculation (A ,TVector3(0,0,1));
 
          // Correct for energy loss in the target
-         E = LightTarget.EvaluateInitialEnergy(E, 5.15*micrometer, ThetaStrip);
+         E = LightTarget.EvaluateInitialEnergy(E, myDetector->GetTargetThickness()/2 * micrometer, ThetaStrip);
 
          // Calculate excitation energy
          if (Theta/deg > 90) {
diff --git a/NPLib/Makefile b/NPLib/Makefile
index b9158c7b7aac4171648a27652076a40eefd30898..39b24f4098774d6cd05912264b62e00345601712 100644
--- a/NPLib/Makefile
+++ b/NPLib/Makefile
@@ -425,6 +425,7 @@ endif
 	make distclean -C ./InteractionCoordinates
 	make distclean -C ./InitialConditions
 	make distclean -C ./DummyDetector
+	make distclean -C ./Plastic
 .SUFFIXES: .$(SrcSuf)
 
 ###
diff --git a/NPSimulation/src/Target.cc b/NPSimulation/src/Target.cc
index 51eba32448deaa208974316e2729fddc5e7b8902..09bf750a14c7532cd4fd669bcb26abaf43467de1 100644
--- a/NPSimulation/src/Target.cc
+++ b/NPSimulation/src/Target.cc
@@ -292,7 +292,7 @@ void Target::ReadConfiguration(string Path)
 	            cout  << m_TargetZ / mm << " )" << endl ;           
 	         }
 
-	        else if (DataBuffer.compare(0, 9, "NbLayers=") == 0) {
+	        else if (DataBuffer.compare(0, 9, "NBLAYERS=") == 0) {
 	        	check_m_TargetNbLayers = true ;
 	            ConfigFile >> DataBuffer;
 	            m_TargetNbLayers = atoi(DataBuffer.c_str());
@@ -386,7 +386,7 @@ void Target::ReadConfiguration(string Path)
 	            cout << m_TargetZ / mm << " )" << endl ;
 	         }
 
-	        else if (DataBuffer.compare(0, 9, "m_TargetNbLayers=") == 0) {
+	        else if (DataBuffer.compare(0, 9, "NBLAYERS=") == 0) {
 	        	check_m_TargetNbLayers = true ;
 	            ConfigFile >> DataBuffer;
 	            m_TargetNbLayers = atoi(DataBuffer.c_str());